diff options
| author | Alexander Saoutkin <[email protected]> | 2019-09-02 23:13:52 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-09-02 23:13:53 +0200 |
| commit | 56b3059f774ae5917185d91a380c9f0a95e7584f (patch) | |
| tree | 9916a0c7aff377f07688e3ca243acd86ce70f5af /src/main.cpp | |
| parent | c5a713763daf113c78697341bfea7dc0860192a3 (diff) | |
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
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8981b54bc..a4685f257 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; } |
