aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerapplication.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-05-21 15:39:28 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-06 15:20:33 +0000
commitc402f593595f2705f8d0f73a13a08cb8bbda9421 (patch)
treee2980f3b318b51a98ee0758b2ad1f8383f67fc82 /tools/qmlprofiler/qmlprofilerapplication.cpp
parent8555cdecd66444b07ab09b1644cb42fcb572dd76 (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/qmlprofilerapplication.cpp')
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index c2d3375d10..23483b2d16 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -249,14 +249,10 @@ QString QmlProfilerApplication::traceFileName() const
void QmlProfilerApplication::userCommand(const QString &command)
{
QString cmd = command.trimmed();
- if (cmd == Constants::CMD_HELP
- || cmd == Constants::CMD_HELP2
- || cmd == Constants::CMD_HELP3) {
- printCommands();
- } else if (cmd == Constants::CMD_RECORD
- || cmd == Constants::CMD_RECORD2) {
+ if (cmd == Constants::CMD_RECORD || cmd == Constants::CMD_RECORD2) {
m_qmlProfilerClient.sendRecordingStatus(!m_recording);
m_v8profilerClient.sendRecordingStatus(!m_recording);
+ emit readyForCommand();
} else if (cmd == Constants::CMD_QUIT
|| cmd == Constants::CMD_QUIT2) {
print(QLatin1String("Quit"));
@@ -267,6 +263,9 @@ void QmlProfilerApplication::userCommand(const QString &command)
} else {
quit();
}
+ } else {
+ printCommands();
+ emit readyForCommand();
}
}
@@ -300,6 +299,7 @@ void QmlProfilerApplication::run()
}
m_connectTimer.start();
+ emit readyForCommand();
}
void QmlProfilerApplication::tryToConnect()