From 4bdeafab8e4f072193e84808a5e197b5686f877e Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 12 Mar 2014 14:47:41 +0000 Subject: fixed uninstall plugin git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4157 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/CommandLineOptions/CommandLineOptions.pro | 8 ++++---- .../CommandLineOptions/UninstallOption/UninstallOption.pro | 10 ++-------- .../CommandLineOptions/UninstallOption/uninstalloption.cpp | 6 ++++-- 3 files changed, 10 insertions(+), 14 deletions(-) (limited to 'src/plugins/CommandLineOptions') diff --git a/src/plugins/CommandLineOptions/CommandLineOptions.pro b/src/plugins/CommandLineOptions/CommandLineOptions.pro index 393079a96..9a0950ee4 100644 --- a/src/plugins/CommandLineOptions/CommandLineOptions.pro +++ b/src/plugins/CommandLineOptions/CommandLineOptions.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs -SUBDIRS = IncDecVolumeOption \ - SeekOption \ - StatusOption \ - PlayListOption +unix:SUBDIRS = IncDecVolumeOption \ + SeekOption \ + StatusOption \ + PlayListOption win32:SUBDIRS += UninstallOption diff --git a/src/plugins/CommandLineOptions/UninstallOption/UninstallOption.pro b/src/plugins/CommandLineOptions/UninstallOption/UninstallOption.pro index af9107145..424ca252f 100644 --- a/src/plugins/CommandLineOptions/UninstallOption/UninstallOption.pro +++ b/src/plugins/CommandLineOptions/UninstallOption/UninstallOption.pro @@ -5,10 +5,9 @@ plugin \ lib TARGET = $$PLUGINS_PREFIX/CommandLineOptions/uninstalloption -QMAKE_CLEAN = $$PLUGINS_PREFIX/CommandLineOptions/libuninstalloption.so TEMPLATE = lib -QMAKE_LIBDIR += ../../../../lib +QMAKE_LIBDIR += ../../../../bin TRANSLATIONS = translations/uninstall_plugin_cs.ts \ translations/uninstall_plugin_de.ts \ @@ -27,15 +26,10 @@ TRANSLATIONS = translations/uninstall_plugin_cs.ts \ translations/uninstall_plugin_sr_RS.ts RESOURCES = translations/translations.qrc -isEmpty(LIB_DIR){ - LIB_DIR = /lib -} -target.path = $$LIB_DIR/qmmp/CommandLineOptions -INSTALLS += target INCLUDEPATH += ../../../../src -LIBS += -lqmmpui -lqmmp +LIBS += -lqmmpui0 -lqmmp0 HEADERS += uninstalloption.h diff --git a/src/plugins/CommandLineOptions/UninstallOption/uninstalloption.cpp b/src/plugins/CommandLineOptions/UninstallOption/uninstalloption.cpp index 51cf15063..f34f8f1fd 100644 --- a/src/plugins/CommandLineOptions/UninstallOption/uninstalloption.cpp +++ b/src/plugins/CommandLineOptions/UninstallOption/uninstalloption.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include "uninstalloption.h" @@ -36,13 +36,14 @@ bool UninstallOption::identify(const QString &str) const const QString UninstallOption::helpString() const { QString help; - help += QString("--uninstall ") + tr("Restores the old file associations and cleans up the registry.") + help += QString("--uninstall ") + tr("Restores the old file associations and cleans up the registry") + "\n"; return help; } QString UninstallOption::executeCommand(const QString &opt_str, const QStringList &args) { + Q_UNUSED(args); if(opt_str == "--uninstall") { WinFileAssoc assoc; @@ -54,6 +55,7 @@ QString UninstallOption::executeCommand(const QString &opt_str, const QStringLis } assoc.GetRegisteredExtensions(extsToCheck, regExts); assoc.RestoreFileAssociations(regExts); + QMetaObject::invokeMethod(qApp, "quit", Qt::QueuedConnection); } return QString(); } -- cgit v1.2.3-13-gbd6f