From 2b76fe397b3b607563f744b57fed7e760f73aa1a Mon Sep 17 00:00:00 2001 From: LightBase Consultoria em Software Publico Date: Mon, 14 Jul 2014 13:35:43 -0300 Subject: [PATCH] primeiro commit --- install-cacic/instalcacic.cpp | 17 +++++++++++++++++ install-cacic/install-cacic.pro | 2 +- install-cacic/install-cacic.pro.user | 38 +++++++++++++++++++++++++------------- install-cacic/install-cacic.pro.user.05f7452 | 263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ install-cacic/installcacic.cpp | 36 ++++-------------------------------- install-cacic/installcacic.h | 17 ++--------------- install-cacic/main.cpp | 20 ++++++++++---------- 7 files changed, 322 insertions(+), 71 deletions(-) create mode 100644 install-cacic/instalcacic.cpp create mode 100644 install-cacic/install-cacic.pro.user.05f7452 diff --git a/install-cacic/instalcacic.cpp b/install-cacic/instalcacic.cpp new file mode 100644 index 0000000..2bccb94 --- /dev/null +++ b/install-cacic/instalcacic.cpp @@ -0,0 +1,17 @@ +#include + +class InstallCacic : public QObject { + Q_OBJECT + +public: + InstallCacic(QObject *parent = 0): QObject(parent) {} + +public slots: + void run() { + // Processa e finaliza + emit finished(); + } + +signals: + void finished(); +}; diff --git a/install-cacic/install-cacic.pro b/install-cacic/install-cacic.pro index ddb186a..cf42409 100644 --- a/install-cacic/install-cacic.pro +++ b/install-cacic/install-cacic.pro @@ -1,6 +1,6 @@ #------------------------------------------------- # -# Project created by QtCreator 2014-06-13T10:45:06 +# Project created by QtCreator 2014-07-03T16:13:12 # #------------------------------------------------- diff --git a/install-cacic/install-cacic.pro.user b/install-cacic/install-cacic.pro.user index 9b2addd..93ab587 100644 --- a/install-cacic/install-cacic.pro.user +++ b/install-cacic/install-cacic.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget @@ -54,14 +54,14 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.3.0 MinGW 32bit - Desktop Qt 5.3.0 MinGW 32bit - qt.53.win32_mingw482_kit + Desktop Qt 5.3 GCC 64bit + Desktop Qt 5.3 GCC 64bit + qt.53.gcc_64_kit 0 0 0 - E:/LightBase/cacic-agente-project/builds/install-cacic + /home/lightbase/Projeto Cacic/builds/install-cacic true @@ -78,7 +78,10 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + false @@ -94,7 +97,10 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + true clean @@ -114,7 +120,7 @@ true - E:/LightBase/Cacic Agente/cacic-agente/build-install-cacic-Desktop_Qt_5_3_0_MinGW_32bit-Release + /home/lightbase/Projeto Cacic/cacic-agente/build-install-cacic-Desktop_Qt_5_3_GCC_64bit-Release true @@ -131,7 +137,10 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + false @@ -147,7 +156,10 @@ Make Qt4ProjectManager.MakeStep - + + -w + -r + true clean @@ -219,8 +231,8 @@ 2 install-cacic - install-cacic2 - Qt4ProjectManager.Qt4RunConfiguration:E:/LightBase/cacic-agente-project/cacic-agente/install-cacic/install-cacic.pro + + Qt4ProjectManager.Qt4RunConfiguration:/home/lightbase/Projeto Cacic/cacic-agente/install-cacic/install-cacic.pro install-cacic.pro false @@ -242,7 +254,7 @@ ProjectExplorer.Project.Updater.EnvironmentId - {2d43e969-a5af-4db4-9730-35c8f8cce80d} + {ece4f619-8231-4029-8d3b-e5858b910820} ProjectExplorer.Project.Updater.FileVersion diff --git a/install-cacic/install-cacic.pro.user.05f7452 b/install-cacic/install-cacic.pro.user.05f7452 new file mode 100644 index 0000000..76c5a82 --- /dev/null +++ b/install-cacic/install-cacic.pro.user.05f7452 @@ -0,0 +1,263 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.3.0 GCC 64bit + Desktop Qt 5.3.0 GCC 64bit + qt.53.gcc_64_kit + 0 + 0 + 0 + + /home/eduardo/srv/cacic-agente-new/build-install-cacic-Desktop_Qt_5_3_0_GCC_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/eduardo/srv/cacic-agente-new/build-install-cacic-Desktop_Qt_5_3_0_GCC_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + install-cacic + + Qt4ProjectManager.Qt4RunConfiguration:/home/eduardo/srv/cacic-agente-new/install-cacic/install-cacic.pro + + install-cacic.pro + false + true + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {05f74523-32aa-49a4-aa35-22a4457a2f3f} + + + ProjectExplorer.Project.Updater.FileVersion + 15 + + diff --git a/install-cacic/installcacic.cpp b/install-cacic/installcacic.cpp index 06a4bff..cd3505d 100644 --- a/install-cacic/installcacic.cpp +++ b/install-cacic/installcacic.cpp @@ -1,40 +1,12 @@ #include "installcacic.h" - - -QCoreApplication *InstallCacic::getApp() const -{ - return app; -} - -void InstallCacic::setApp(const QCoreApplication &value) -{ - app = value; -} +#include "iostream" InstallCacic::InstallCacic(QObject *parent) : QObject(parent) { } - -void InstallCacic::runInstall() -{ - QString argumento; - cout << "Testando argumentos" << endl; - argumento = "--host"; - - if (app.arguments().count() > 1){ - for(int i=1;i -#include -#include -#include -#include - -using namespace std; class InstallCacic : public QObject { Q_OBJECT public: - // variaveis - explicit InstallCacic(QObject *parent = 0); - QCoreApplication *getApp() const; - void setApp(const QCoreApplication &value); - -private: - QCoreApplication app; signals: + void finished(); public slots: - void runInstall(QCoreApplication*); - + void run(); }; #endif // INSTALLCACIC_H diff --git a/install-cacic/main.cpp b/install-cacic/main.cpp index 76f0186..25b0db1 100644 --- a/install-cacic/main.cpp +++ b/install-cacic/main.cpp @@ -1,19 +1,19 @@ -#include - -using namespace std; +#include +#include +#include "installcacic.h" int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); - InstallCacic CInstallCacic; - CInstallCacic.setApp(*a); - try { + InstallCacic *installcacic = new InstallCacic(&a); + + // This will cause the application to exit when + // the task signals finished. + QObject::connect(installcacic, SIGNAL(finished()), &a, SLOT(quit())); - CInstallCacic.runInstall();// TENTAR RODAR COM CONNECT OU ALGO DO TIPO - } catch (int e) { - cout << "Error: " << e << endl; - } + // This will run the task from the application event loop. + QTimer::singleShot(0, installcacic, SLOT(run())); return a.exec(); } -- libgit2 0.21.2