Commit 29091cf8 authored by Don Gagne's avatar Don Gagne

--fake-mobile command line support

parent 65aa662a
......@@ -160,6 +160,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
, _runningUnitTests(unitTesting)
, _styleIsDark(true)
, _pMavManager(NULL)
, _fakeMobile(false)
{
Q_ASSERT(_app == NULL);
_app = this;
......@@ -177,6 +178,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
CmdLineOpt_t rgCmdLineOptions[] = {
{ "--clear-settings", &fClearSettingsOptions, QString() },
{ "--full-logging", &fullLogging, QString() },
{ "--fake-mobile", &_fakeMobile, QString() },
// Add additional command line option flags here
};
......
......@@ -109,6 +109,9 @@ public:
/// Show a non-modal message to the user
void showToolBarMessage(const QString& message);
/// @return true: Fake ui into showing mobile interface
bool fakeMobile(void) { return _fakeMobile; }
public slots:
/// You can connect to this slot to show an information message box from a different thread.
......@@ -178,6 +181,8 @@ private:
QStringList _missingParams; ///< List of missing facts to be displayed
MavManager* _pMavManager;
bool _fakeMobile; ///< true: Fake ui into displaying mobile interface
/// Unit Test have access to creating and destroying singletons
friend class UnitTest;
};
......
......@@ -110,7 +110,7 @@ public:
#else
bool isAndroid () { return false; }
bool isiOS () { return false; }
bool isMobile () { return false; }
bool isMobile () { return qgcApp()->fakeMobile(); }
#endif
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