Bugfix in IrCtrl
authorJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 22 Jun 2010 07:49:22 +0000 (10:49 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 22 Jun 2010 07:49:22 +0000 (10:49 +0300)
src/irctrl.cpp
src/irctrl.h
src/mainwidget.cpp

index 92bf8b2..1346b45 100644 (file)
@@ -3,7 +3,6 @@
 #include <QSettings>
 #include <QTcpSocket>
 #include <QHostAddress>
-#include <QTimer>
 
 #include "irctrl.h"
 
@@ -18,10 +17,10 @@ IrCtrl::~IrCtrl()
 
 void IrCtrl::sendCmd(const QString &cmd)
 {
-    if (!killLircTimer->isActive()) {
+    if (!m_killLircTimer.isActive()) {
         startLirc();
     } else {
-        killLircTimer->stop();
+        m_killLircTimer.stop();
     }
 
     QTcpSocket sock;
@@ -37,7 +36,7 @@ void IrCtrl::sendCmd(const QString &cmd)
     sock.waitForBytesWritten();
     sock.close();
 
-    killLircTimer->start();
+    m_killLircTimer.start();
 }
 
 
index 1cc42ed..0b22480 100644 (file)
@@ -3,8 +3,7 @@
 
 #include <QObject>
 #include <QString>
-
-class QTimer;
+#include <QTimer>
 
 class IrCtrl : public QObject
 {
@@ -22,8 +21,8 @@ private:
     void stopLirc();
 
 private:
+    QTimer m_killLircTimer;
     static const quint16 LIRC_PORT = 8765;
-    QTimer *killLircTimer;
 };
 
 #endif
index c4b635a..bc70126 100644 (file)
@@ -84,7 +84,7 @@ void MainWidget::sendCmdMute()
     irCtrl.sendCmd(settings->value("muteCmd", "MUTE").toString());
 }
 
-void MainWidget::paintEvent(QPaintEvent*)
+void MainWidget::paintEvent(QPaintEvent *)
 {
     int bgAlpha = settings->value("bgAlpha", "192").toInt();
     QPainter p(this);