[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/calligra/2.9] krita/ui: Remove the dbus-based check for other running krita processes
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2015-05-15 10:22:49
Message-ID: E1YtClV-0007M1-NM () scm ! kde ! org
[Download RAW message or body]
Git commit ca5dd5f4ce7f79dfb83b9bf77249c63d4e8c5269 by Boudewijn Rempt.
Committed on 15/05/2015 at 10:22.
Pushed by rempt into branch 'calligra/2.9'.
Remove the dbus-based check for other running krita processes
This was done so we wouldn't try to recover the autosave files from
instances of krita that were still running, but snce we're a
qtsingleapplication now, that's no longer necessary.
M +0 -38 krita/ui/KisApplication.cpp
http://commits.kde.org/calligra/ca5dd5f4ce7f79dfb83b9bf77249c63d4e8c5269
diff --git a/krita/ui/KisApplication.cpp b/krita/ui/KisApplication.cpp
index f140247..e443ccb 100644
--- a/krita/ui/KisApplication.cpp
+++ b/krita/ui/KisApplication.cpp
@@ -21,10 +21,6 @@
#include "KisApplication.h"
-#ifndef QT_NO_DBUS
-#include <QtDBus>
-#endif
-
#include <KoPluginLoader.h>
#include <KoShapeRegistry.h>
@@ -581,40 +577,6 @@ int KisApplication::checkAutosaveFiles(KisMainWindow \
*mainWindow) // all autosave files for our application
autoSaveFiles = dir.entryList(filters, QDir::Files | QDir::Hidden);
- QStringList pids;
- QString ourPid;
- ourPid.setNum(qApp->applicationPid());
-
-#ifndef QT_NO_DBUS
- // all running instances of our application -- bit hackish, but we cannot get at \
the dbus name here, for some reason
- QDBusReply<QStringList> reply = \
QDBusConnection::sessionBus().interface()->registeredServiceNames();
-
- foreach (const QString &name, reply.value()) {
- if (name.contains("krita")) {
- // we got another instance of ourselves running, let's get the pid
- QString pid = name.split('-').last();
- if (pid != ourPid) {
- pids << pid;
- }
- }
- }
-#endif
-
- // remove the autosave files that are saved for other, open instances of \
ourselves.
- foreach(const QString &autoSaveFileName, autoSaveFiles) {
- if (!QFile::exists(QDir::homePath() + "/" + autoSaveFileName)) {
- autoSaveFiles.removeAll(autoSaveFileName);
- continue;
- }
- QStringList split = autoSaveFileName.split('-');
- if (split.size() == 4) {
- if (pids.contains(split[1])) {
- // We've got an active, owned autosave file. Remove.
- autoSaveFiles.removeAll(autoSaveFileName);
- }
- }
- }
-
// Allow the user to make their selection
if (autoSaveFiles.size() > 0) {
KisAutoSaveRecoveryDialog dlg(autoSaveFiles);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic