Commit bbdfdd90 authored by Don Gagne's avatar Don Gagne

Merge pull request #1793 from DonLakeFlyer/FakeMobile

--fake-mobile command line support
parents 8412f333 29091cf8
...@@ -160,6 +160,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) ...@@ -160,6 +160,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
, _runningUnitTests(unitTesting) , _runningUnitTests(unitTesting)
, _styleIsDark(true) , _styleIsDark(true)
, _pMavManager(NULL) , _pMavManager(NULL)
, _fakeMobile(false)
{ {
Q_ASSERT(_app == NULL); Q_ASSERT(_app == NULL);
_app = this; _app = this;
...@@ -177,6 +178,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) ...@@ -177,6 +178,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
CmdLineOpt_t rgCmdLineOptions[] = { CmdLineOpt_t rgCmdLineOptions[] = {
{ "--clear-settings", &fClearSettingsOptions, QString() }, { "--clear-settings", &fClearSettingsOptions, QString() },
{ "--full-logging", &fullLogging, QString() }, { "--full-logging", &fullLogging, QString() },
{ "--fake-mobile", &_fakeMobile, QString() },
// Add additional command line option flags here // Add additional command line option flags here
}; };
......
...@@ -109,6 +109,9 @@ public: ...@@ -109,6 +109,9 @@ public:
/// Show a non-modal message to the user /// Show a non-modal message to the user
void showToolBarMessage(const QString& message); void showToolBarMessage(const QString& message);
/// @return true: Fake ui into showing mobile interface
bool fakeMobile(void) { return _fakeMobile; }
public slots: public slots:
/// You can connect to this slot to show an information message box from a different thread. /// You can connect to this slot to show an information message box from a different thread.
...@@ -178,6 +181,8 @@ private: ...@@ -178,6 +181,8 @@ private:
QStringList _missingParams; ///< List of missing facts to be displayed QStringList _missingParams; ///< List of missing facts to be displayed
MavManager* _pMavManager; MavManager* _pMavManager;
bool _fakeMobile; ///< true: Fake ui into displaying mobile interface
/// Unit Test have access to creating and destroying singletons /// Unit Test have access to creating and destroying singletons
friend class UnitTest; friend class UnitTest;
}; };
......
...@@ -110,7 +110,7 @@ public: ...@@ -110,7 +110,7 @@ public:
#else #else
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return false; } bool isMobile () { return qgcApp()->fakeMobile(); }
#endif #endif
signals: signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment