mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-18 16:31:44 +03:00
Add delay routine to MainWindow to allow sleep in a Qt friendly way #4823
This commit is contained in:
parent
267f3ac41f
commit
19f5ad8cab
@ -1351,3 +1351,12 @@ QString MainWindow::getProfileRootForArg()
|
|||||||
|
|
||||||
return QString("\"%1\"").arg(dir);
|
return QString("\"%1\"").arg(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::delay(unsigned int s)
|
||||||
|
{
|
||||||
|
QTime dieTime= QTime::currentTime().addSecs(s);
|
||||||
|
|
||||||
|
while( QTime::currentTime() < dieTime ) {
|
||||||
|
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -63,6 +63,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
|||||||
|
|
||||||
friend class QSynergyApplication;
|
friend class QSynergyApplication;
|
||||||
friend class SetupWizard;
|
friend class SetupWizard;
|
||||||
|
friend class PluginWizardPage;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum qSynergyState
|
enum qSynergyState
|
||||||
@ -108,6 +109,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
|||||||
void serverDetected(const QString name);
|
void serverDetected(const QString name);
|
||||||
void setEdition(int type);
|
void setEdition(int type);
|
||||||
void updateLocalFingerprint();
|
void updateLocalFingerprint();
|
||||||
|
void delay(unsigned int);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void appendLogRaw(const QString& text);
|
void appendLogRaw(const QString& text);
|
||||||
|
Loading…
Reference in New Issue
Block a user