Commit 2fbece9a authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: Changed the wait command in Xtt to a busy loop.

parent 2d14057e
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#include <QPrinter> #include <QPrinter>
#include <QPushButton> #include <QPushButton>
#include <QScrollArea> #include <QScrollArea>
#include <QTime>
#include <QTimer> #include <QTimer>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -896,13 +897,12 @@ pwr_tStatus CoWowQt::DeleteMenuItem(const char* name, void* menu) ...@@ -896,13 +897,12 @@ pwr_tStatus CoWowQt::DeleteMenuItem(const char* name, void* menu)
return 1; return 1;
} }
void CoWowQtObject::wait_cb()
{
}
void CoWowQt::Wait(float time) void CoWowQt::Wait(float time)
{ {
initOneShotTimer(m_wait_timerid, SLOT(wait_cb()), int(time * 1000)); QTime start = QTime::currentTime().addMSecs(int(time * 1000));
while (QTime::currentTime() < start) {
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}
} }
void CoWowQt::update_title(QWidget* w, int editmode) void CoWowQt::update_title(QWidget* w, int editmode)
......
...@@ -239,8 +239,6 @@ public: ...@@ -239,8 +239,6 @@ public:
public slots: public slots:
void DisplayWarranty(); void DisplayWarranty();
void DisplayLicense(); void DisplayLicense();
void wait_cb();
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment