mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 01:24:37 +08:00
46 lines
1.2 KiB
Diff
46 lines
1.2 KiB
Diff
From: Xuetian Weng <wengxt@gmail.com>
|
|
Date: Tue, 15 Dec 2015 12:52:26 +0000
|
|
Subject: Workaround a system icon tray issue in bug
|
|
X-Git-Tag: v5.5.1
|
|
X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=a0578e6e5dbd429366e6a9837af543a4c85b5a75
|
|
---
|
|
Workaround a system icon tray issue in bug
|
|
|
|
QTimer::singleShot(time, QObject*, char*)
|
|
QTimer::singleShot(time, QObject*, PointerToFunction)
|
|
|
|
behave differently when time == 0
|
|
|
|
So the porting had an effect
|
|
|
|
This patch migrates to QMetaObject::invokeMethod which is clearer
|
|
|
|
CCBUG: 352055
|
|
|
|
There seems to be two different bug in 352055 but looks similar, the other one is fixed in Qt 5.6 according to Albert Astals Cid.
|
|
---
|
|
|
|
|
|
--- a/applets/systemtray/plugin/host.cpp
|
|
+++ b/applets/systemtray/plugin/host.cpp
|
|
@@ -32,7 +32,7 @@
|
|
|
|
#include <QLoggingCategory>
|
|
#include <QQuickItem>
|
|
-#include <QTimer>
|
|
+#include <QMetaObject>
|
|
#include <QVariant>
|
|
#include <QStandardItemModel>
|
|
#include <QMenu>
|
|
@@ -99,7 +99,8 @@
|
|
QObject(parent),
|
|
d(new HostPrivate(this))
|
|
{
|
|
- QTimer::singleShot(0, this, &Host::init);
|
|
+ // Workaround for bug 352055
|
|
+ QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);
|
|
}
|
|
|
|
Host::~Host()
|
|
|