mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
global.cpp: Ensure qApp does not emit signal because of local QEventLoop
BUG: 469656
This commit is contained in:
parent
d4897767bf
commit
dec80fb0f9
1 changed files with 2 additions and 0 deletions
|
@ -148,6 +148,8 @@ QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, QStringList>> Do
|
||||||
static KActivities::Consumer *consumer;
|
static KActivities::Consumer *consumer;
|
||||||
std::call_once(one_consumer, []() {
|
std::call_once(one_consumer, []() {
|
||||||
consumer = new KActivities::Consumer();
|
consumer = new KActivities::Consumer();
|
||||||
|
// to prevent QGuiApplication::saveStateRequest
|
||||||
|
const QSignalBlocker blocker(qApp);
|
||||||
// ensures the consumer is ready for query
|
// ensures the consumer is ready for query
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QObject::connect(consumer, &KActivities::Consumer::serviceStatusChanged, &loop, &QEventLoop::quit);
|
QObject::connect(consumer, &KActivities::Consumer::serviceStatusChanged, &loop, &QEventLoop::quit);
|
||||||
|
|
Loading…
Reference in a new issue