Display warning when enabling SmartReflex
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Wed, 23 Jun 2010 11:15:20 +0000 (13:15 +0200)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Wed, 23 Jun 2010 11:15:20 +0000 (13:15 +0200)
debian/postinst
src/mainwindow.cpp
src/src.pro

index b66879c..5860e2a 100755 (executable)
@@ -12,6 +12,7 @@ update-sudoers
 if [ -e /opt/usr/bin/QCPUFreq ]; then
        chmod a+x /opt/usr/bin/QCPUFreq
        chmod a+x /opt/usr/bin/set_scalingmaxfreq
+       chmod a+x /opt/usr/bin/set_sr
 fi
 
 
index 0a9af8b..e99c249 100755 (executable)
@@ -24,6 +24,9 @@
 #include <QTextStream>
 #include <QProcess>
 #include <QDesktopWidget>
+#if defined(Q_WS_MAEMO_5)
+    #include <QMaemo5InformationBox>
+#endif
 
 
 #define APPNAME "QCPUFreq"
@@ -64,6 +67,7 @@ MainWindow::~MainWindow()
 void MainWindow::about()
 {
     QMessageBox::about(this, APPNAME " " APPVERSION, "<p style=\"align:center;\">&copy; 2010 Daniel Klaffenbach</p>" );
+    refresh();
 }
 
 
@@ -317,8 +321,10 @@ void MainWindow::setSmartReflex()
 
     if ( getSmartReflexState() == 1 )
        arguments.append( "off" );
-    else
+    else {
+       QMaemo5InformationBox::information(this, tr( "SmartReflex support is known to be unstable on some devices and may cause random reboots." ), QMaemo5InformationBox::DefaultTimeout);
        arguments.append( "on" );
+    }
 
     //execute the sr script script
     QProcess script;
index 6be15f4..62ec406 100755 (executable)
@@ -4,7 +4,7 @@
 #
 #-------------------------------------------------
 
-QT       += core gui
+QT       += core gui maemo5
 
 TARGET = QCPUFreq
 TEMPLATE = app