File qpowertop-slot-not-connecting.patch of Package qpowertop

diff -Naur a/mainwindow.cpp b/mainwindow.cpp
--- a/mainwindow.cpp	2012-11-01 18:25:59.970208060 -0500
+++ b/mainwindow.cpp	2012-11-01 17:36:09.538022059 -0500
@@ -8,11 +8,13 @@
     ui->setupUi(this);
     this->setWindowTitle("QPowerTop");
     qinit(this);
-    QTimer::singleShot(5000, this, SLOT(on_timer_timeout()));
+    connect(timer, SIGNAL(timeout(5000)), this, SLOT(timer_timeout()));
     if (geteuid() != 0)
         ui->teTimerStats->setText("You need to be a root to see detailed statistics");
 }
 
+
+
 MainWindow::~MainWindow()
 {
     delete ui;
@@ -70,14 +72,14 @@
         qinit(this,true);
 
 }
-void MainWindow::on_timer_timeout()
+void MainWindow::timer_timeout()
 {
         if(geteuid()==0)
             ui->teTimerStats->clear();
         ui->teCStates->clear();
         ui->teCpuFreq->clear();
         qinit(this,true);
-        QTimer::singleShot(5000, this, SLOT(on_timer_timeout()));
+	connect(timer, SIGNAL(timeout(5000)), this, SLOT(timer_timeout()));
 
 }
 
diff -Naur a/mainwindow.h b/mainwindow.h
--- a/mainwindow.h	2009-10-22 13:57:33.000000000 -0500
+++ b/mainwindow.h	2012-11-01 17:32:34.206137587 -0500
@@ -30,11 +30,12 @@
 
 private:
     Ui::MainWindow *ui;
+    QTimer *timer;
 
 private slots:
     void on_pbQuit_clicked();
     void on_pbRefresh_clicked();
-    void on_timer_timeout();
+    void timer_timeout();
 };
 
 int qinit(MainWindow*,bool=false);
openSUSE Build Service is sponsored by