aboutsummaryrefslogtreecommitdiff
path: root/src/app/qmmpstarter.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
commit8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a (patch)
tree15d339b62e98d5858a57aa787334e14f0e2f0ad7 /src/app/qmmpstarter.cpp
parent6fc05db7c6de9a51beba754f12ff4ac32859977d (diff)
downloadqmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.gz
qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.bz2
qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.zip
copy 1.2 branch to trunk
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7772 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/app/qmmpstarter.cpp')
-rw-r--r--src/app/qmmpstarter.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/app/qmmpstarter.cpp b/src/app/qmmpstarter.cpp
index c2d038f6e..cbabb8a28 100644
--- a/src/app/qmmpstarter.cpp
+++ b/src/app/qmmpstarter.cpp
@@ -38,7 +38,6 @@
#include <qmmpui/uiloader.h>
#include <qmmpui/qmmpuisettings.h>
#include "qmmpstarter.h"
-#include "lxdesupport.h"
#include "builtincommandlineoption.h"
#ifdef Q_OS_WIN
@@ -48,8 +47,6 @@
#include <sys/stat.h>
#endif
-
-
#ifdef Q_OS_WIN
#define UDS_PATH QString("qmmp")
#else
@@ -65,6 +62,9 @@ QMMPStarter::QMMPStarter() : QObject()
m_ui = 0;
m_finished = false;
m_exit_code = EXIT_SUCCESS;
+#ifndef QT_NO_SESSIONMANAGER
+ connect(qApp, SIGNAL(commitDataRequest(QSessionManager&)), SLOT(commitData(QSessionManager&)), Qt::DirectConnection);
+#endif
#ifdef Q_OS_WIN
m_named_mutex = 0;
#endif
@@ -227,9 +227,6 @@ void QMMPStarter::startPlayer()
theme_paths << share_path + "/icons";
theme_paths.removeDuplicates();
QIcon::setThemeSearchPaths(theme_paths);
-
- //load lxde icons
- LXDESupport::load();
#endif
//prepare libqmmp and libqmmpui libraries for usage
@@ -275,6 +272,15 @@ void QMMPStarter::savePosition()
m_core->stop();
}
+void QMMPStarter::commitData(QSessionManager &manager)
+{
+ if(UiHelper::instance())
+ UiHelper::instance()->exit();
+#ifndef QT_NO_SESSIONMANAGER
+ manager.release();
+#endif
+}
+
void QMMPStarter::writeCommand()
{
QString workingDir = QDir::currentPath() + "|||";