[Marble-commits] KDE/kdeedu/marble/src/plugins/runner/monav
Dennis Nienhüser
earthwings at gentoo.org
Wed Oct 13 21:47:15 CEST 2010
SVN commit 1185586 by nienhueser:
Replace unistd.h / usleep (not working under windows) with a qt solution.
M +15 -3 MonavPlugin.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/runner/monav/MonavPlugin.cpp #1185585:1185586
@@ -22,12 +22,24 @@
#include <QtCore/QDirIterator>
#include <QtCore/QTimer>
#include <QtNetwork/QLocalSocket>
+#include <QtCore/QThread>
-#include <unistd.h>
-
namespace Marble
{
+/** A helper class to have a portable sleep call */
+class MonavWaiter : private QThread
+{
+public:
+ static void msleep( unsigned long milliSeconds ) {
+ QThread::msleep( milliSeconds );
+ }
+
+private:
+ MonavWaiter();
+ Q_DISABLE_COPY( MonavWaiter );
+};
+
class MonavMap
{
public:
@@ -172,7 +184,7 @@
if ( isDaemonRunning() ) {
break;
}
- usleep( 100 * 1000 );
+ MonavWaiter::msleep( 100 );
}
return true;
More information about the Marble-commits
mailing list