summaryrefslogtreecommitdiffstats
path: root/tools/runonphone/trksignalhandler.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-03-24 23:06:43 (GMT)
committerLorn Potter <lorn.potter@nokia.com>2010-03-24 23:06:43 (GMT)
commitd20510dd91e01b15e2346c0cb12e352080b6a093 (patch)
tree83554f5c96f69df6fe6d9d5c2a9f529a3b1316d8 /tools/runonphone/trksignalhandler.cpp
parentf727f993c3c4e3f548b06d57b3ee0da4f3914bae (diff)
parent8218a16815d883823d3411be9896332b997f3e91 (diff)
downloadQt-d20510dd91e01b15e2346c0cb12e352080b6a093.zip
Qt-d20510dd91e01b15e2346c0cb12e352080b6a093.tar.gz
Qt-d20510dd91e01b15e2346c0cb12e352080b6a093.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Conflicts: src/plugins/bearer/corewlan/qcorewlanengine.mm
Diffstat (limited to 'tools/runonphone/trksignalhandler.cpp')
-rw-r--r--tools/runonphone/trksignalhandler.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/runonphone/trksignalhandler.cpp b/tools/runonphone/trksignalhandler.cpp
index 18a2c0c..2abf91f 100644
--- a/tools/runonphone/trksignalhandler.cpp
+++ b/tools/runonphone/trksignalhandler.cpp
@@ -54,6 +54,7 @@ private:
QTextStream out;
QTextStream err;
int loglevel;
+ int lastpercent;
};
void TrkSignalHandler::copyingStarted()
@@ -131,7 +132,12 @@ void TrkSignalHandler::applicationOutputReceived(const QString &output)
void TrkSignalHandler::copyProgress(int percent)
{
if (d->loglevel > 0) {
- d->out << percent << "% ";
+ if (d->lastpercent == 0)
+ d->out << "[ ]\r[" << flush;
+ while (percent > d->lastpercent) {
+ d->out << QLatin1Char('#');
+ d->lastpercent+=2; //because typical console is 80 chars wide
+ }
d->out.flush();
if (percent==100)
d->out << endl;
@@ -167,7 +173,8 @@ void TrkSignalHandler::timeout()
TrkSignalHandlerPrivate::TrkSignalHandlerPrivate()
: out(stdout),
err(stderr),
- loglevel(0)
+ loglevel(0),
+ lastpercent(0)
{
}