Add quit cli command and app quit option after stream session. Fixes #92 (#138)

* Add quit cli command and app quit option after stream session. Fixes #92

* Code review fixes.
This commit is contained in:
Janne Hakonen
2018-12-06 04:45:28 +02:00
committed by Cameron Gutman
parent ad47990a87
commit 0ab07303c9
22 changed files with 678 additions and 67 deletions
+3
View File
@@ -20,6 +20,7 @@
#define SER_WINDOWMODE "windowmode"
#define SER_UNSUPPORTEDFPS "unsupportedfps"
#define SER_MDNS "mdns"
#define SER_QUITAPPAFTER "quitAppAfter"
#define SER_MOUSEACCELERATION "mouseacceleration"
#define SER_STARTWINDOWED "startwindowed"
@@ -43,6 +44,7 @@ void StreamingPreferences::reload()
multiController = settings.value(SER_MULTICONT, true).toBool();
unsupportedFps = settings.value(SER_UNSUPPORTEDFPS, false).toBool();
enableMdns = settings.value(SER_MDNS, true).toBool();
quitAppAfter = settings.value(SER_QUITAPPAFTER, false).toBool();
mouseAcceleration = settings.value(SER_MOUSEACCELERATION, false).toBool();
startWindowed = settings.value(SER_STARTWINDOWED, false).toBool();
audioConfig = static_cast<AudioConfig>(settings.value(SER_AUDIOCFG,
@@ -71,6 +73,7 @@ void StreamingPreferences::save()
settings.setValue(SER_MULTICONT, multiController);
settings.setValue(SER_UNSUPPORTEDFPS, unsupportedFps);
settings.setValue(SER_MDNS, enableMdns);
settings.setValue(SER_QUITAPPAFTER, quitAppAfter);
settings.setValue(SER_MOUSEACCELERATION, mouseAcceleration);
settings.setValue(SER_STARTWINDOWED, startWindowed);
settings.setValue(SER_AUDIOCFG, static_cast<int>(audioConfig));
+3
View File
@@ -73,6 +73,7 @@ public:
Q_PROPERTY(bool multiController MEMBER multiController NOTIFY multiControllerChanged)
Q_PROPERTY(bool unsupportedFps MEMBER unsupportedFps NOTIFY unsupportedFpsChanged)
Q_PROPERTY(bool enableMdns MEMBER enableMdns NOTIFY enableMdnsChanged)
Q_PROPERTY(bool quitAppAfter MEMBER quitAppAfter NOTIFY quitAppAfterChanged)
Q_PROPERTY(bool mouseAcceleration MEMBER mouseAcceleration NOTIFY mouseAccelerationChanged)
Q_PROPERTY(bool startWindowed MEMBER startWindowed NOTIFY startWindowedChanged)
Q_PROPERTY(AudioConfig audioConfig MEMBER audioConfig NOTIFY audioConfigChanged)
@@ -91,6 +92,7 @@ public:
bool multiController;
bool unsupportedFps;
bool enableMdns;
bool quitAppAfter;
bool mouseAcceleration;
bool startWindowed;
AudioConfig audioConfig;
@@ -107,6 +109,7 @@ signals:
void multiControllerChanged();
void unsupportedFpsChanged();
void enableMdnsChanged();
void quitAppAfterChanged();
void mouseAccelerationChanged();
void audioConfigChanged();
void videoCodecConfigChanged();