[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/powerdevil
From: Dario Freddi <drf54321 () gmail ! com>
Date: 2009-04-02 15:52:48
Message-ID: 1238687568.953234.5376.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 948235 by dafre:
And fixing codestyle to make sources look decent
M +10 -12 daemon/PowerDevilDaemon.cpp
M +4 -3 daemon/SuspensionLockHandler.cpp
M +1 -2 kcmodule/CapabilitiesPage.cpp
M +1 -1 kcmodule/EditPage.cpp
M +1 -1 kcmodule/PowerDevilKCM.cpp
--- trunk/KDE/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp #948234:948235
@@ -63,8 +63,7 @@
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
-extern "C"
-{
+extern "C" {
#include <X11/extensions/dpms.h>
int __kde_do_not_unload = 1;
@@ -411,8 +410,7 @@
}
#ifdef HAVE_DPMS
-extern "C"
-{
+extern "C" {
int dropError(Display *, XErrorEvent *);
typedef int (*XErrFunc)(Display *, XErrorEvent *);
}
@@ -566,8 +564,8 @@
if (PowerDevilSettings::waitBeforeSuspending()) {
emitWarningNotification("criticalbattery",
i18np("Your battery level is critical, the \
computer will be suspended to RAM in 1 second.",
- "Your battery level is critical, the \
computer will be suspended to RAM in %1 seconds.",
- \
PowerDevilSettings::waitBeforeSuspendingTime()), + \
"Your battery level is critical, the computer will be suspended to RAM in %1 \
seconds.", + \
PowerDevilSettings::waitBeforeSuspendingTime()), SLOT(suspendToRam()));
} else {
suspendToRam();
@@ -577,8 +575,8 @@
if (PowerDevilSettings::waitBeforeSuspending()) {
emitWarningNotification("criticalbattery",
i18np("Your battery level is critical, the \
computer will be put into standby in 1 second.",
- "Your battery level is critical, the \
computer will be put into standby in %1 seconds.",
- \
PowerDevilSettings::waitBeforeSuspendingTime()), + \
"Your battery level is critical, the computer will be put into standby in %1 \
seconds.", + \
PowerDevilSettings::waitBeforeSuspendingTime()), SLOT(standby()));
} else {
standby();
@@ -864,7 +862,7 @@
* We make an intensive use of qMin/qMax here to determine the minimum time.
*/
- // kDebug() << "Polling started, idle time is" << idle << "seconds";
+ // kDebug() << "Polling started, idle time is" << idle << "seconds";
KConfigGroup * settings = getCurrentProfile();
@@ -874,7 +872,7 @@
if (!settings->readEntry("dimOnIdle", false) && \
!settings->readEntry("turnOffIdle", false) && \
settings->readEntry("idleAction").toInt() == None) {
- // kDebug() << "Stopping timer";
+ // kDebug() << "Stopping timer";
POLLER_CALL(d->pollLoader->poller(), stopCatchingTimeouts());
return;
}
@@ -899,13 +897,13 @@
minTime = qMin(minTime, minDimTime);
}
- // kDebug() << "Minimum time is" << minTime << "seconds";
+ // kDebug() << "Minimum time is" << minTime << "seconds";
if (idle < minTime) {
d->status = NoAction;
int remaining = minTime - idle;
POLLER_CALL(d->pollLoader->poller(), setNextTimeout(remaining * 1000));
- // kDebug() << "Nothing to do, next event in" << remaining << "seconds";
+ // kDebug() << "Nothing to do, next event in" << remaining << "seconds";
return;
}
--- trunk/KDE/kdebase/workspace/powerdevil/daemon/SuspensionLockHandler.cpp \
#948234:948235 @@ -184,15 +184,16 @@
}
}
-void SuspensionLockHandler::inhibitionTimeout() {
+void SuspensionLockHandler::inhibitionTimeout()
+{
QTimer *timer = qobject_cast<QTimer*>(sender());
-
+
if (!timer) {
return;
}
releaseInhibiton(timer->property("inhibit_cookie_id").toInt());
-
+
timer->deleteLater();
}
--- trunk/KDE/kdebase/workspace/powerdevil/kcmodule/CapabilitiesPage.cpp \
#948234:948235 @@ -48,8 +48,7 @@
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
-extern "C"
-{
+extern "C" {
#include <X11/extensions/dpms.h>
int __kde_do_not_unload = 1;
--- trunk/KDE/kdebase/workspace/powerdevil/kcmodule/EditPage.cpp #948234:948235
@@ -402,7 +402,7 @@
QList<int> list;
- for (int i = 0;i < CPUListLayout->count();++i) {
+ for (int i = 0; i < CPUListLayout->count(); ++i) {
QCheckBox *box = qobject_cast<QCheckBox*> \
(CPUListLayout->itemAt(i)->widget());
if (!box)
--- trunk/KDE/kdebase/workspace/powerdevil/kcmodule/PowerDevilKCM.cpp #948234:948235
@@ -83,7 +83,7 @@
QDBusConnection conn = QDBusConnection::systemBus();
if (conn.interface()->isServiceRegistered("org.freedesktop.PowerManagement") \
|| (
- conn.interface()->isServiceRegistered("org.freedesktop.Policy.Power") && \
!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.powerdevilsystem"))){
+ \
conn.interface()->isServiceRegistered("org.freedesktop.Policy.Power") && \
!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.powerdevilsystem"))) \
{
initError(i18n("Another power manager has been detected. PowerDevil will \
not start if "
"other power managers are active. If you want to use \
PowerDevil as your primary "
"power manager, please remove the existing one and \
restart the PowerDevil service."));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic