diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2013-08-07 12:45:31 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2013-08-08 11:15:59 +0200 |
commit | 578d18691a751e2f3ba3be00801193b635f98b75 (patch) | |
tree | 30bb69e91869d0f1fa89a07083350cdf13acf9f2 /src/libs/utils/synchronousprocess.h | |
parent | 5da86a07578fb62a1161eeacf6a95bb5cdea9e5c (diff) | |
download | qt-creator-578d18691a751e2f3ba3be00801193b635f98b75.tar.gz |
SynchronousProcess: Replace last QByteArrays with QStrings
Matching \n in a QByteArray is wrong. For example, it detects Ċ (U+010A)
and ਛ (U+0A1B) as end-of-line
Change-Id: I9c03d0b19da3d328e706ff2c89f09713be870f34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/libs/utils/synchronousprocess.h')
-rw-r--r-- | src/libs/utils/synchronousprocess.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h index 9172d8be58..96c600c00f 100644 --- a/src/libs/utils/synchronousprocess.h +++ b/src/libs/utils/synchronousprocess.h @@ -34,11 +34,9 @@ #include <QProcess> #include <QSharedPointer> +#include <QTextCodec> -QT_BEGIN_NAMESPACE -class QTextCodec; -class QDebug; -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QDebug) namespace Utils { @@ -141,8 +139,8 @@ public: static QString normalizeNewlines(const QString &text); signals: - void stdOut(const QByteArray &data, bool firstTime); - void stdErr(const QByteArray &data, bool firstTime); + void stdOut(const QString &text, bool firstTime); + void stdErr(const QString &text, bool firstTime); void stdOutBuffered(const QString &data, bool firstTime); void stdErrBuffered(const QString &data, bool firstTime); @@ -157,7 +155,7 @@ private slots: private: void processStdOut(bool emitSignals); void processStdErr(bool emitSignals); - QString convertOutput(const QByteArray &) const; + QString convertOutput(const QByteArray &, QTextCodec::ConverterState *state) const; SynchronousProcessPrivate *d; }; |