# # # patch "guitone/src/util/SignalWaiter.cpp" # from [4fe4a08a5d27f559e572c691812520ff11425e71] # to [464b7cd7092c07111abebf3ee114bb955d4dda6d] # # patch "guitone/src/util/SignalWaiter.h" # from [d56a5f9d80726c5cae3a791fc59ce8d5186be75b] # to [ae0b9b4faf37d59c592b57d9c41b54c629532e26] # ============================================================ --- guitone/src/util/SignalWaiter.cpp 4fe4a08a5d27f559e572c691812520ff11425e71 +++ guitone/src/util/SignalWaiter.cpp 464b7cd7092c07111abebf3ee114bb955d4dda6d @@ -20,7 +20,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "signalwaiter.h" +#include "SignalWaiter.h" #include #include @@ -32,7 +32,7 @@ SignalWaiter::SignalWaiter(const QObject } // Returns true if the signal was caught, returns false if the wait timed out -static bool SignalWaiter::wait(const QObject* sender, const char* signal, int msec) +bool SignalWaiter::wait(const QObject* sender, const char* signal, int msec) { SignalWaiter w(sender, signal); return w.wait(msec); @@ -45,7 +45,7 @@ void SignalWaiter::timerEvent(QTimerEven void SignalWaiter::timerEvent(QTimerEvent* event) { - killTimer(); + killTimer(timer); timeout = true; } @@ -56,7 +56,7 @@ bool SignalWaiter::wait(int msec) if (msec < -1) return false; // activate the timeout - if (msec != -1) startTimer(msec); + if (msec != -1) timer = startTimer(msec); // Begin waiting ready = timeout = false; @@ -64,7 +64,7 @@ bool SignalWaiter::wait(int msec) QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents); // Clean up and return status - killTimer(); + killTimer(timer); return ready || !timeout; } ============================================================ --- guitone/src/util/SignalWaiter.h d56a5f9d80726c5cae3a791fc59ce8d5186be75b +++ guitone/src/util/SignalWaiter.h ae0b9b4faf37d59c592b57d9c41b54c629532e26 @@ -24,13 +24,14 @@ #define SIGNALWAITER_H #include + class QTimerEvent; class SignalWaiter : public QObject { Q_OBJECT public: - QxtSignalWaiter(const QObject* sender, const char* signal); + SignalWaiter(const QObject* sender, const char* signal); static bool wait(const QObject* sender, const char* signal, int msec = -1); bool wait(int msec = -1); protected: @@ -39,6 +40,7 @@ private: void signalCaught(); private: bool ready, timeout; + int timer; }; #endif