Selaa lähdekoodia

baseclassnamee changed from Application to ApplicahtionLaunch due to possible conflicts with Qt baseclassess

Reinhard Russinger 7 vuotta sitten
vanhempi
commit
4a99aa53e0
4 muutettua tiedostoa jossa 28 lisäystä ja 28 poistoa
  1. 18 18
      application.cpp
  2. 5 5
      application.h
  3. 4 4
      applicationlauncher.qmltypes
  4. 1 1
      applicationlauncher_plugin.cpp

+ 18 - 18
application.cpp

@@ -4,7 +4,7 @@
 #include <QFile>
 #include <QTextStream>
 
-Application::Application(QObject *parent) :
+ApplicationLaunch::ApplicationLaunch(QObject *parent) :
     QObject(parent),
     m_process(new QProcess(this))
 {
@@ -21,73 +21,73 @@ Application::Application(QObject *parent) :
             SLOT(process_error(QProcess::ProcessError)));
 }
 
-QString Application::appName() const
+QString ApplicationLaunch::appName() const
 {
     return m_AppName;
 }
 
-void Application::setAppName(const QString &appName)
+void ApplicationLaunch::setAppName(const QString &appName)
 {
     m_AppName = appName;
 }
 
-QString Application::outFName() const
+QString ApplicationLaunch::outFName() const
 {
     return m_outFName;
 }
 
-void Application::setoutFName(const QString &outFName)
+void ApplicationLaunch::setoutFName(const QString &outFName)
 {
     m_outFName = outFName;
 }
 
 
-QString Application::stdERR() const
+QString ApplicationLaunch::stdERR() const
 {
     return m_stdERR;
 }
 
-void Application::setstdERR(const QString &stdERR)
+void ApplicationLaunch::setstdERR(const QString &stdERR)
 {
     m_stdERR = stdERR;
 }
 
-QString Application::stdOUT() const
+QString ApplicationLaunch::stdOUT() const
 {
     return m_stdOUT;
 }
 
-void Application::setstdOUT(const QString &stdOUT)
+void ApplicationLaunch::setstdOUT(const QString &stdOUT)
 {
     m_stdOUT = stdOUT;
 }
 
-int Application::exitCode()
+int ApplicationLaunch::exitCode()
 {
     return m_exitCode;
 }
 
-int Application::exitStatus()
+int ApplicationLaunch::exitStatus()
 {
     return m_exitStatus;
 }
 
-int Application::exitError()
+int ApplicationLaunch::exitError()
 {
     return m_error;
 }
 
-QString Application::arguments() const
+QString ApplicationLaunch::arguments() const
 {
     return m_Arguments;
 }
 
-void Application::setArguments(const QString &arguments)
+void ApplicationLaunch::setArguments(const QString &arguments)
 {
     m_Arguments = arguments;
 }
 
-void Application::launchScript()
+void ApplicationLaunch::launchScript()
 {
     m_stdERR.clear();
     m_stdOUT.clear();
@@ -102,7 +102,7 @@ void Application::launchScript()
 }
 
 
-void Application::finished(int exitCode, QProcess::ExitStatus status)
+void ApplicationLaunch::finished(int exitCode, QProcess::ExitStatus status)
 {
     m_stdOUT = QString(m_process->readAllStandardOutput());
     m_stdERR = QString(m_process->readAllStandardError());
@@ -123,13 +123,13 @@ void Application::finished(int exitCode, QProcess::ExitStatus status)
     emit this->appFinished();
 }
 
-void Application::process_started(void)
+void ApplicationLaunch::process_started(void)
 {
     emit this->appStarted();
 }
 
 
-void Application::process_error(QProcess::ProcessError app_error)
+void ApplicationLaunch::process_error(QProcess::ProcessError app_error)
 {
     m_error = app_error;
     emit this->appError();

+ 5 - 5
application.h

@@ -1,13 +1,13 @@
-#ifndef APPLICATION_H
-#define APPLICATION_H
+#ifndef APPLICATION_LAUNCH_H
+#define APPLICATION_LAUNCH_H
 #include <QObject>
 #include <QProcess>
-class Application : public QObject
+class ApplicationLaunch : public QObject
 {
     Q_OBJECT
 
 public:
-    explicit Application(QObject *parent = 0);
+    explicit ApplicationLaunch(QObject *parent = 0);
     Q_PROPERTY( QString appName READ appName WRITE setAppName)
     Q_PROPERTY( QString arguments READ arguments WRITE setArguments)
     Q_PROPERTY( QString stdERR READ stdERR  WRITE setstdERR)
@@ -60,4 +60,4 @@ private Q_SLOTS:
     void process_error(QProcess::ProcessError);
 
 };
-#endif //APPLICATION_H
+#endif //APPLICATION_LAUNCH_H

+ 4 - 4
applicationlauncher.qmltypes

@@ -4,14 +4,14 @@ import QtQuick.tooling 1.2
 // It is used for QML tooling purposes only.
 //
 // This file was auto-generated by:
-// 'qmlplugindump ApplicationLauncher 1.0'
+// 'qmlplugindump -nonrelocatable ApplicationLauncher 1.0'
 
 Module {
     dependencies: ["QtQuick 2.7"]
     Component {
-        name: "Application"
+        name: "ApplicationLaunch"
         prototype: "QObject"
-        exports: ["Application 1.0"]
+        exports: ["ApplicationLauncher/ApplicationLaunch 1.0"]
         exportMetaObjectRevisions: [0]
         Property { name: "appName"; type: "string" }
         Property { name: "arguments"; type: "string" }
@@ -30,7 +30,7 @@ Module {
         name: "ApplicationLauncher"
         defaultProperty: "data"
         prototype: "QQuickItem"
-        exports: ["ApplicationLauncher 1.0"]
+        exports: ["ApplicationLauncher/ApplicationLauncher 1.0"]
         exportMetaObjectRevisions: [0]
     }
 }

+ 1 - 1
applicationlauncher_plugin.cpp

@@ -9,7 +9,7 @@ void ApplicationLauncherPlugin::registerTypes(const char *uri)
 {
     // @uri ApplicationLauncher
     qmlRegisterType<ApplicationLauncher>(uri, 1, 0 , "ApplicationLauncher");
-    qmlRegisterType<Application>(uri, 1, 0, "Application");
+    qmlRegisterType<ApplicationLaunch>(uri, 1, 0, "ApplicationLaunch");
 }