aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index 04ad4b31e2..a1e4d9a153 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -29,7 +29,6 @@
#include "qmlprofilerapplication.h"
#include "constants.h"
#include <QtCore/QStringList>
-#include <QtCore/QTextStream>
#include <QtCore/QProcess>
#include <QtCore/QTimer>
#include <QtCore/QDateTime>
@@ -38,6 +37,8 @@
#include <QtCore/QCommandLineParser>
#include <QtCore/QTemporaryFile>
+#include <iostream>
+
static const char commandTextC[] =
"The following commands are available:\n"
"'r', 'record'\n"
@@ -120,10 +121,8 @@ QmlProfilerApplication::~QmlProfilerApplication()
logStatus("Killing process ...");
m_process->kill();
}
- if (isInteractive()) {
- QTextStream err(stderr);
- err << endl;
- }
+ if (isInteractive())
+ std::cerr << std::endl;
delete m_process;
}
@@ -539,10 +538,8 @@ void QmlProfilerApplication::disconnected()
void QmlProfilerApplication::processHasOutput()
{
Q_ASSERT(m_process);
- while (m_process->bytesAvailable()) {
- QTextStream out(stderr);
- out << m_process->readAll();
- }
+ while (m_process->bytesAvailable())
+ std::cerr << m_process->readAll().constData();
}
void QmlProfilerApplication::processFinished()
@@ -594,10 +591,9 @@ void QmlProfilerApplication::traceFinished()
void QmlProfilerApplication::prompt(const QString &line, bool ready)
{
if (m_interactive) {
- QTextStream err(stderr);
if (!line.isEmpty())
- err << line << endl;
- err << QLatin1String("> ");
+ std::cerr << qPrintable(line) << std::endl;
+ std::cerr << "> ";
if (ready)
emit readyForCommand();
}
@@ -605,14 +601,12 @@ void QmlProfilerApplication::prompt(const QString &line, bool ready)
void QmlProfilerApplication::logError(const QString &error)
{
- QTextStream err(stderr);
- err << "Error: " << error << endl;
+ std::cerr << "Error: " << qPrintable(error) << std::endl;
}
void QmlProfilerApplication::logStatus(const QString &status)
{
if (!m_verbose)
return;
- QTextStream err(stderr);
- err << status << endl;
+ std::cerr << qPrintable(status) << std::endl;
}