Commit 734f1997 authored by Laurent Montel's avatar Laurent Montel 😁

Make it compile on window

parent 5e31cbaf
......@@ -32,7 +32,9 @@
#include <QLockFile>
#include <QGlobalStatic>
#ifndef WIN32
#include <unistd.h> // sleep
#endif
#define GROUP "KHighscore"
......@@ -155,7 +157,13 @@ bool KHighscore::lockForWriting(QWidget *widget)
item.setText(i18n("Retry"));
int res = KMessageBox::warningContinueCancel(widget, i18n("Cannot access the highscore file. Another user is probably currently writing to it."), QString(), item, KStandardGuiItem::cancel(), QStringLiteral( "ask_lock_global_highscore_file" ));
if ( res==KMessageBox::Cancel ) break;
} else sleep(1);
} else {
#ifdef WIN32
Sleep(1000);
#else
sleep(1);
#endif
}
first = false;
}
return false;
......
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