aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/process
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-08-07 12:45:31 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-08-08 11:15:59 +0200
commit578d18691a751e2f3ba3be00801193b635f98b75 (patch)
tree30bb69e91869d0f1fa89a07083350cdf13acf9f2 /tests/manual/process
parent5da86a07578fb62a1161eeacf6a95bb5cdea9e5c (diff)
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 'tests/manual/process')
-rw-r--r--tests/manual/process/mainwindow.cpp8
-rw-r--r--tests/manual/process/mainwindow.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/process/mainwindow.cpp b/tests/manual/process/mainwindow.cpp
index 0c497370332..ca33bf6d6c0 100644
--- a/tests/manual/process/mainwindow.cpp
+++ b/tests/manual/process/mainwindow.cpp
@@ -44,9 +44,9 @@ MainWindow::MainWindow(QWidget *parent) :
QTimer::singleShot(200, this, SLOT(test()));
}
-void MainWindow::append(const QByteArray &a)
+void MainWindow::append(const QString &s)
{
- m_logWindow->appendPlainText(QString::fromLocal8Bit(a));
+ m_logWindow->appendPlainText(s);
}
void MainWindow::test()
@@ -58,8 +58,8 @@ void MainWindow::test()
Utils::SynchronousProcess process;
process.setTimeout(2000);
qDebug() << "Async: " << cmd << args;
- connect(&process, SIGNAL(stdOut(QByteArray,bool)), this, SLOT(append(QByteArray)));
- connect(&process, SIGNAL(stdErr(QByteArray,bool)), this, SLOT(append(QByteArray)));
+ connect(&process, SIGNAL(stdOut(QString,bool)), this, SLOT(append(QString)));
+ connect(&process, SIGNAL(stdErr(QString,bool)), this, SLOT(append(QString)));
const Utils::SynchronousProcessResponse resp = process.run(cmd, args);
qDebug() << resp;
}
diff --git a/tests/manual/process/mainwindow.h b/tests/manual/process/mainwindow.h
index cb6f40654f0..a4889c0a518 100644
--- a/tests/manual/process/mainwindow.h
+++ b/tests/manual/process/mainwindow.h
@@ -46,7 +46,7 @@ signals:
public slots:
void test();
- void append(const QByteArray &a);
+ void append(const QString &s);
private:
QPlainTextEdit *m_logWindow;