summaryrefslogtreecommitdiff
path: root/core/launcher/suspendmonitor.cpp
Unidiff
Diffstat (limited to 'core/launcher/suspendmonitor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/suspendmonitor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/suspendmonitor.cpp b/core/launcher/suspendmonitor.cpp
index f555e84..50bc56f 100644
--- a/core/launcher/suspendmonitor.cpp
+++ b/core/launcher/suspendmonitor.cpp
@@ -29,49 +29,49 @@
29 29
30TempScreenSaverMonitor::TempScreenSaverMonitor(QObject *parent, const char *name) 30TempScreenSaverMonitor::TempScreenSaverMonitor(QObject *parent, const char *name)
31 : QObject(parent, name) 31 : QObject(parent, name)
32{ 32{
33 currentMode = QPEApplication::Enable; 33 currentMode = QPEApplication::Enable;
34 timerId = 0; 34 timerId = 0;
35} 35}
36 36
37void TempScreenSaverMonitor::setTempMode(int mode, int pid) 37void TempScreenSaverMonitor::setTempMode(int mode, int pid)
38{ 38{
39 removeOld(pid); 39 removeOld(pid);
40 switch(mode) { 40 switch(mode) {
41 case QPEApplication::Disable: 41 case QPEApplication::Disable:
42 sStatus[0].append(pid); 42 sStatus[0].append(pid);
43 break; 43 break;
44 case QPEApplication::DisableLightOff: 44 case QPEApplication::DisableLightOff:
45 sStatus[1].append(pid); 45 sStatus[1].append(pid);
46 break; 46 break;
47 case QPEApplication::DisableSuspend: 47 case QPEApplication::DisableSuspend:
48 sStatus[2].append(pid); 48 sStatus[2].append(pid);
49 break; 49 break;
50 case QPEApplication::Enable: 50 case QPEApplication::Enable:
51 break; 51 break;
52 default: 52 default:
53 qWarning("Unrecognized temp power setting. Ignored"); 53 owarn << "Unrecognized temp power setting. Ignored" << oendl;
54 return; 54 return;
55 } 55 }
56 updateAll(); 56 updateAll();
57} 57}
58 58
59// Returns true if app had set a temp Mode earlier 59// Returns true if app had set a temp Mode earlier
60bool TempScreenSaverMonitor::removeOld(int pid) 60bool TempScreenSaverMonitor::removeOld(int pid)
61{ 61{
62 QValueList<int>::Iterator it; 62 QValueList<int>::Iterator it;
63 for (int i = 0; i < 3; i++) { 63 for (int i = 0; i < 3; i++) {
64 it = sStatus[i].find(pid); 64 it = sStatus[i].find(pid);
65 if ( it != sStatus[i].end() ) { 65 if ( it != sStatus[i].end() ) {
66 sStatus[i].remove( it ); 66 sStatus[i].remove( it );
67 return TRUE; 67 return TRUE;
68 } 68 }
69 } 69 }
70 return FALSE; 70 return FALSE;
71} 71}
72 72
73void TempScreenSaverMonitor::updateAll() 73void TempScreenSaverMonitor::updateAll()
74{ 74{
75 int mode = QPEApplication::Enable; 75 int mode = QPEApplication::Enable;
76 if ( sStatus[0].count() ) { 76 if ( sStatus[0].count() ) {
77 mode = QPEApplication::Disable; 77 mode = QPEApplication::Disable;