From a00e73a9e46636bf020e8065369b7338e21f06f9 Mon Sep 17 00:00:00 2001 From: Jari Jarvi Date: Tue, 22 Jun 2010 10:49:22 +0300 Subject: [PATCH] Bugfix in IrCtrl --- src/irctrl.cpp | 7 +++---- src/irctrl.h | 5 ++--- src/mainwidget.cpp | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/irctrl.cpp b/src/irctrl.cpp index 92bf8b2..1346b45 100644 --- a/src/irctrl.cpp +++ b/src/irctrl.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #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(); } diff --git a/src/irctrl.h b/src/irctrl.h index 1cc42ed..0b22480 100644 --- a/src/irctrl.h +++ b/src/irctrl.h @@ -3,8 +3,7 @@ #include #include - -class QTimer; +#include class IrCtrl : public QObject { @@ -22,8 +21,8 @@ private: void stopLirc(); private: + QTimer m_killLircTimer; static const quint16 LIRC_PORT = 8765; - QTimer *killLircTimer; }; #endif diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index c4b635a..bc70126 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -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); -- 1.7.9.5