aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/commandlistener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlprofiler/commandlistener.cpp')
-rw-r--r--tools/qmlprofiler/commandlistener.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/tools/qmlprofiler/commandlistener.cpp b/tools/qmlprofiler/commandlistener.cpp
index 1d538d8a3d..369d095725 100644
--- a/tools/qmlprofiler/commandlistener.cpp
+++ b/tools/qmlprofiler/commandlistener.cpp
@@ -35,24 +35,7 @@
#include "constants.h"
#include <QtCore/QTextStream>
-CommandListener::CommandListener(QObject *parent)
- : QThread(parent)
- , m_stopRequested(false)
+void CommandListener::readCommand()
{
-}
-
-void CommandListener::run()
-{
- QString line;
- QTextStream in(stdin, QIODevice::ReadOnly);
- do {
- line = in.readLine();
- line = line.trimmed();
- if (!line.isEmpty()) {
- emit command(line);
- if (line == QLatin1String(Constants::CMD_QUIT)
- || line == QLatin1String(Constants::CMD_QUIT2))
- return;
- }
- } while (!m_stopRequested && !line.isNull());
+ emit command(QTextStream(stdin).readLine());
}