[repo.or.cz] nomnom.git branch next updated: 0.1.4-21-g49cc661
Brought to you by:
legatvs
|
From: legatvs <le...@gm...> - 2011-10-12 06:08:07
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project nomnom.git.
The branch, next has been updated
via 49cc661bc8b553d62b73bed771b121f00c341cb1 (commit)
from a54a487fa5a46e481136443ecb86d94a489678ee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/nomnom.git/commit/49cc661bc8b553d62b73bed771b121f00c341cb1
commit 49cc661bc8b553d62b73bed771b121f00c341cb1
Author: Toni Gundogdu <le...@gm...>
Date: Tue Oct 11 14:06:03 2011 +0300
Use QProcess::errorString instead
diff --git a/src/feed/nfeedprogressdialog.cpp b/src/feed/nfeedprogressdialog.cpp
index 27a25f4..1774c49 100644
--- a/src/feed/nfeedprogressdialog.cpp
+++ b/src/feed/nfeedprogressdialog.cpp
@@ -50,6 +50,7 @@ bool NFeedProgressDialog::open(QStringList& args)
_errmsg.clear();
setMaximum(0);
setMinimum(0);
+ _args = args;
show();
_proc->start(args.takeFirst(), args);
exec();
@@ -99,48 +100,16 @@ bool NFeedProgressDialog::results(feed::NFeedList& dst, QString& err)
return true;
}
-static QString to_errmsg(const QProcess::ProcessError e)
+void NFeedProgressDialog::error(QProcess::ProcessError n)
{
- QString s;
- switch (e)
+ if (!_cancelled)
{
- case QProcess::FailedToStart:
- s = QObject::tr("The process failed to start. Either the invoked "
- "program is missing, or you may have insufficient "
- "permissions to invoke the program.");
- break;
- case QProcess::Crashed:
- s = QObject::tr("The process crashed some time after "
- "starting successfully.");
- break;
- case QProcess::Timedout:
- s = QObject::tr("The last waitFor...() function timed out. "
- "The state of QProcess is unchanged, and you "
- "can try calling waitFor...() again.");
- break;
- case QProcess::WriteError:
- s = QObject::tr("An error occurred when attempting to write "
- "to the process. For example, the process may "
- "not be running, or it may have closed its input "
- "channel.");
- break;
- case QProcess::ReadError:
- s = QObject::tr("An error occurred when attempting to read "
- "from the process. For example, the process "
- "may not be running.");
- break;
- case QProcess::UnknownError:
- default:
- s = QObject::tr("An unknown error occurred.");
- break;
+ _errmsg = tr("Error while running command:<p>%1</p>"
+ "Qt error message follows (code #%2):<p>%3</p>")
+ .arg(_args.first())
+ .arg(n)
+ .arg(_proc->errorString());
}
- return s;
-}
-
-void NFeedProgressDialog::error(QProcess::ProcessError e)
-{
- if (!_cancelled)
- _errmsg = to_errmsg(e);
cancel();
}
diff --git a/src/feed/nfeedprogressdialog.h b/src/feed/nfeedprogressdialog.h
index c59c46c..bc4658f 100644
--- a/src/feed/nfeedprogressdialog.h
+++ b/src/feed/nfeedprogressdialog.h
@@ -44,6 +44,7 @@ private slots:
void cleanup();
void read();
private:
+ QStringList _args;
QString _buffer;
QString _errmsg;
QProcess *_proc;
-----------------------------------------------------------------------
Summary of changes:
src/feed/nfeedprogressdialog.cpp | 47 ++++++-------------------------------
src/feed/nfeedprogressdialog.h | 1 +
2 files changed, 9 insertions(+), 39 deletions(-)
repo.or.cz automatic notification. Contact project admin le...@gm...
if you want to unsubscribe, or site admin ad...@re... if you receive
no reply.
--
nomnom.git ("The graphical media download tool")
|