mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
Making sure that DBus objects are all created before the service
Summary: Currently the DBus service is created before the MainWindow DBus object is created. This can cause hangs if another service makes calls to a a method in an object that's not been initialised, when the service is already published. This patch defers the creation of the service until all DBus objects are created. Test Plan: Tested in KDevelop. Have "open new folders in tabs" feature enabled. Open several folders with Dolphin at once. Before this patch there would be noticeable hanging. With this patch all tabs instantly open with no hanging. Reviewers: elvisangelaccio, ngraham Reviewed By: elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23672
This commit is contained in:
parent
c5a713763d
commit
56b3059f77
|
@ -116,9 +116,6 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
|
|||
|
||||
KAboutData::setApplicationData(aboutData);
|
||||
|
||||
KDBusService dolphinDBusService;
|
||||
DBusInterface interface;
|
||||
|
||||
QCommandLineParser parser;
|
||||
aboutData.setupCommandLine(&parser);
|
||||
|
||||
|
@ -139,6 +136,8 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
|
|||
QList<QUrl> urls = Dolphin::validateUris(args);
|
||||
|
||||
if (parser.isSet(QStringLiteral("daemon"))) {
|
||||
KDBusService dolphinDBusService;
|
||||
DBusInterface interface;
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
|
@ -178,5 +177,8 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
KDBusService dolphinDBusService;
|
||||
DBusInterface interface;
|
||||
|
||||
return app.exec(); // krazy:exclude=crash;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue