From db1a6111716b7b5daa209ca7229d91cce5c791f3 Mon Sep 17 00:00:00 2001 From: XinyuHou Date: Thu, 5 Feb 2015 11:44:14 +0000 Subject: [PATCH] Revert "added plugin manager gui #4168" This reverts commit bfa9bab78dcb9f348ff046ff3848c47f9dc0ed06. --- ext/toolchain/commands1.py | 33 ++--------- src/gui/plugin/gui.pro | 24 -------- src/gui/plugin/res/MainWindowBase.ui | 84 ---------------------------- src/gui/plugin/src/Arguments.h | 13 ----- src/gui/plugin/src/Authenticate.cpp | 5 -- src/gui/plugin/src/Authenticate.h | 10 ---- src/gui/plugin/src/MainWindow.cpp | 31 ---------- src/gui/plugin/src/MainWindow.h | 26 --------- src/gui/plugin/src/main.cpp | 27 --------- 9 files changed, 5 insertions(+), 248 deletions(-) delete mode 100644 src/gui/plugin/gui.pro delete mode 100644 src/gui/plugin/res/MainWindowBase.ui delete mode 100644 src/gui/plugin/src/Arguments.h delete mode 100644 src/gui/plugin/src/Authenticate.cpp delete mode 100644 src/gui/plugin/src/Authenticate.h delete mode 100644 src/gui/plugin/src/MainWindow.cpp delete mode 100644 src/gui/plugin/src/MainWindow.h delete mode 100644 src/gui/plugin/src/main.cpp diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index effaff0c..d0b0960a 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -213,8 +213,7 @@ class InternalCommands: defaultTarget = 'release' cmake_dir = 'res' - main_gui_dir = 'src/gui/main' - plugin_gui_dir = 'src/gui/plugin' + gui_dir = 'src/gui' doc_dir = 'doc' extDir = 'ext' @@ -540,21 +539,13 @@ class InternalCommands: print "QMake command: " + qmake_cmd_string # run qmake from the gui dir - self.try_chdir(self.main_gui_dir) + self.try_chdir(self.gui_dir) err = os.system(qmake_cmd_string) self.restore_chdir() if err != 0: raise Exception('QMake encountered error: ' + str(err)) - # run qmake from the gui dir - self.try_chdir(self.plugin_gui_dir) - err = os.system(qmake_cmd_string) - self.restore_chdir() - - if err != 0: - raise Exception('QMake encountered error: ' + str(err)) - def getQmakeVersion(self): version = commands.getoutput("qmake --version") result = re.search('(\d+)\.(\d+)\.(\d)', version) @@ -786,21 +777,14 @@ class InternalCommands: if sys.platform == 'win32': for target in targets: - self.try_chdir(self.main_gui_dir) + self.try_chdir(self.gui_dir) err = os.system(gui_make_cmd + ' ' + target) self.restore_chdir() - - if err != 0: - raise Exception(gui_make_cmd + ' failed with error: ' + str(err)) - - self.try_chdir(self.plugin_gui_dir) - err = os.system(gui_make_cmd + ' ' + target) - self.restore_chdir() - + if err != 0: raise Exception(gui_make_cmd + ' failed with error: ' + str(err)) else: - self.try_chdir(self.main_gui_dir) + self.try_chdir(self.gui_dir) err = os.system(gui_make_cmd) self.restore_chdir() @@ -813,13 +797,6 @@ class InternalCommands: self.fixQtFrameworksLayout() - self.try_chdir(self.plugin_gui_dir) - err = os.system(gui_make_cmd) - self.restore_chdir() - - if err != 0: - raise Exception(gui_make_cmd + ' failed with error: ' + str(err)) - def symlink(self, source, target): if not os.path.exists(target): os.symlink(source, target) diff --git a/src/gui/plugin/gui.pro b/src/gui/plugin/gui.pro deleted file mode 100644 index ba4beddc..00000000 --- a/src/gui/plugin/gui.pro +++ /dev/null @@ -1,24 +0,0 @@ -TARGET = plugindownloader -TEMPLATE = app -SOURCES += src/main.cpp \ - src/MainWindow.cpp \ - src/Authenticate.cpp -HEADERS += src/MainWindow.h \ - src/Arguments.h \ - src/Authenticate.h -FORMS += res/MainWindowBase.ui -win32 { - Debug:DESTDIR = ../../../bin/Debug - Release:DESTDIR = ../../../bin/Release -} -else:DESTDIR = ../../../bin -debug { - OBJECTS_DIR = tmp/debug - MOC_DIR = tmp/debug - RCC_DIR = tmp/debug -} -release { - OBJECTS_DIR = tmp/release - MOC_DIR = tmp/release - RCC_DIR = tmp/release -} diff --git a/src/gui/plugin/res/MainWindowBase.ui b/src/gui/plugin/res/MainWindowBase.ui deleted file mode 100644 index f4b2b0af..00000000 --- a/src/gui/plugin/res/MainWindowBase.ui +++ /dev/null @@ -1,84 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 400 - 293 - - - - Synergy Plugin Downloader - - - - - - - true - - - false - - - true - - - - - - - - - Processing, please wait... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 0 - 0 - 400 - 21 - - - - - - - - diff --git a/src/gui/plugin/src/Arguments.h b/src/gui/plugin/src/Arguments.h deleted file mode 100644 index 8f0a7276..00000000 --- a/src/gui/plugin/src/Arguments.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ARGUMENTS_H -#define ARGUMENTS_H - -#include - -class Arguments -{ -public: - QString email; - QString password; -}; - -#endif // ARGUMENTS_H diff --git a/src/gui/plugin/src/Authenticate.cpp b/src/gui/plugin/src/Authenticate.cpp deleted file mode 100644 index 730d4421..00000000 --- a/src/gui/plugin/src/Authenticate.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "Authenticate.h" - -Authenticate::Authenticate() -{ -} diff --git a/src/gui/plugin/src/Authenticate.h b/src/gui/plugin/src/Authenticate.h deleted file mode 100644 index a0f13d22..00000000 --- a/src/gui/plugin/src/Authenticate.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef AUTHENTICATE_H -#define AUTHENTICATE_H - -class Authenticate -{ -public: - Authenticate(); -}; - -#endif // AUTHENTICATE_H diff --git a/src/gui/plugin/src/MainWindow.cpp b/src/gui/plugin/src/MainWindow.cpp deleted file mode 100644 index 5aa2a690..00000000 --- a/src/gui/plugin/src/MainWindow.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "MainWindow.h" -#include "ui_MainWindowBase.h" - -MainWindow::MainWindow(Arguments& args, QWidget* parent) : - QMainWindow(parent), - m_Arguments(args) -{ - setupUi(this); - appendInfo(m_Arguments.email); -} - -MainWindow::~MainWindow() -{ -} - -void MainWindow::changeEvent(QEvent* e) -{ - QMainWindow::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - retranslateUi(this); - break; - default: - break; - } -} - -void MainWindow::appendInfo(QString& s) -{ - m_pTextEditInfo->append(s); -} diff --git a/src/gui/plugin/src/MainWindow.h b/src/gui/plugin/src/MainWindow.h deleted file mode 100644 index 993daded..00000000 --- a/src/gui/plugin/src/MainWindow.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include "Arguments.h" - -#include - -#include "ui_MainWindowBase.h" - -class MainWindow : public QMainWindow, public Ui::MainWindow { - Q_OBJECT -public: - MainWindow(Arguments& args, QWidget* parent = 0); - ~MainWindow(); - -protected: - void changeEvent(QEvent* e); - -private: - void appendInfo(QString& s); - -private: - Arguments m_Arguments; -}; - -#endif // MAINWINDOW_H diff --git a/src/gui/plugin/src/main.cpp b/src/gui/plugin/src/main.cpp deleted file mode 100644 index 2f1ba115..00000000 --- a/src/gui/plugin/src/main.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "MainWindow.h" -#include "Arguments.h" - -#include - -void parseArgs(Arguments& args, int argc, char* argv[]) -{ - for (int i = 1; i < argc; i++) { - if (strcmp(argv[i], "--email") == 0) { - args.email = argv[++i]; - } - if (strcmp(argv[i], "--password") == 0) { - args.password = argv[++i]; - } - } -} - -int main(int argc, char *argv[]) -{ - Arguments args; - parseArgs(args, argc, argv); - - QApplication a(argc, argv); - MainWindow w(args); - w.show(); - return a.exec(); -}