summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-15 07:08:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-15 07:08:47 +0000
commita33006bd3c2d5b533a3af66a7d94ec633c4b5810 (patch)
tree9a3457ec28c0ce574b8a6571533090a4629dd8db
parent65b5cd4b6c373089958268c9c0772458a9d1128f (diff)
downloadkpowersave-a33006bd3c2d5b533a3af66a7d94ec633c4b5810.tar.gz
kpowersave-a33006bd3c2d5b533a3af66a7d94ec633c4b5810.zip
Fined new suspend warning popup that should not have been shown
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1115082 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--src/kpowersave.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp
index c746399..dcd60bf 100644
--- a/src/kpowersave.cpp
+++ b/src/kpowersave.cpp
@@ -2270,8 +2270,7 @@ void kpowersave::handleResumeSignal() {
}
// handle result of the resume/suspend
- // 1 is a valid return code; don't error out when it is received!
- if ((resume_result == 0) || (resume_result == 1) || (resume_result == INT_MAX)) {
+ if ((resume_result == 0) || (resume_result == INT_MAX)) {
if ( resume_result == INT_MAX )
kdWarning() << "Unknown if we successful resumed, look like a D-Bus timeout since "
<< "elapsed time between suspend and resume is higher than 6 hours" << endl;
@@ -2284,11 +2283,14 @@ void kpowersave::handleResumeSignal() {
this, i18n("Warning"), 15000);
}
} else {
- kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
- QString msg;
+ // 1 is a valid return code; don't error out when it is received!
+ if (resume_result != 1) {
+ kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
+ QString msg;
- msg = i18n("An unknown error occurred while %1. The errorcode is: '%2'").
- arg(getSuspendString(calledSuspend)).arg(resume_result);
+ msg = i18n("An unknown error occurred while %1. The errorcode is: '%2'").
+ arg(getSuspendString(calledSuspend)).arg(resume_result);
+ }
#if defined(DISTRO_IS_SUSE) || defined(DISTRO_IS_SLES_SLED) || defined(DISTRO_IS_PARDUS)
// okay we know this system use pm-utils and log is under /var/log/pm-suspend.log