diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-05-21 15:39:28 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-06-06 15:20:33 +0000 |
commit | c402f593595f2705f8d0f73a13a08cb8bbda9421 (patch) | |
tree | e2980f3b318b51a98ee0758b2ad1f8383f67fc82 /tools/qmlprofiler/commandlistener.h | |
parent | 8555cdecd66444b07ab09b1644cb42fcb572dd76 (diff) |
qmlprofiler: Only accept commands if we ask for them
This way we can shut down the input thread after the last command and we
cannot get commands before we can process them.
Change-Id: Ie1583a338da9c9df0e07c9e09ce185857c5ea66d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tools/qmlprofiler/commandlistener.h')
-rw-r--r-- | tools/qmlprofiler/commandlistener.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/qmlprofiler/commandlistener.h b/tools/qmlprofiler/commandlistener.h index 7d4d43d727..e74d5323c8 100644 --- a/tools/qmlprofiler/commandlistener.h +++ b/tools/qmlprofiler/commandlistener.h @@ -36,20 +36,13 @@ #include <QtCore/QThread> -class CommandListener : public QThread -{ +class CommandListener : public QObject { Q_OBJECT -public: - CommandListener(QObject *parent = 0); +public slots: + void readCommand(); - void run(); - - void requestStop() { m_stopRequested = true; } signals: void command(const QString &command); - -private: - bool m_stopRequested; }; #endif // COMMANDLISTENER_H |