diff --git a/retroshare-android-notify-service/src/main.cpp b/retroshare-android-notify-service/src/main.cpp index 5ce3fefbf..47593da7f 100644 --- a/retroshare-android-notify-service/src/main.cpp +++ b/retroshare-android-notify-service/src/main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef __ANDROID__ # include "util/androiddebug.h" @@ -65,7 +66,7 @@ int main(int argc, char *argv[]) qDebug() << "RetroShareAndroidNotifyService waiting for core to" << "listen on:" << sockPath; - usleep(2500000); + QThread::sleep(2); } rsApi.openConnection(sockPath); diff --git a/retroshare-qml-app/src/main-app.cpp b/retroshare-qml-app/src/main-app.cpp index 1e23c9d63..9f872f06d 100644 --- a/retroshare-qml-app/src/main-app.cpp +++ b/retroshare-qml-app/src/main-app.cpp @@ -23,7 +23,8 @@ #include #include #include -#include // for usleep +#include +#include #ifdef Q_OS_ANDROID # include @@ -57,7 +58,7 @@ int main(int argc, char *argv[]) QStringList mainArgs = app.arguments(); #ifdef Q_OS_ANDROID - rootContext.setContextProperty("Q_OS_ANDROID", true); + rootContext.setContextProperty("Q_OS_ANDROID", QVariant(true)); /* Add Activity Intent data to args, because onNewIntent is called only if * the Intet was triggered when the Activity was already created, so only in @@ -104,7 +105,7 @@ int main(int argc, char *argv[]) << waitCount << "times"; app.processEvents(); ++waitCount; - usleep(10000); + QThread::msleep(10); } } while (waitIntent); @@ -113,15 +114,15 @@ int main(int argc, char *argv[]) if(!uriStr.isEmpty()) mainArgs.append(uriStr); #else - rootContext.setContextProperty("Q_OS_ANDROID", false); + rootContext.setContextProperty("Q_OS_ANDROID", QVariant(false)); #endif rootContext.setContextProperty("mainArgs", mainArgs); #ifdef QT_DEBUG - rootContext.setContextProperty("QT_DEBUG", true); + rootContext.setContextProperty("QT_DEBUG", QVariant(true)); #else - rootContext.setContextProperty("QT_DEBUG", false); + rootContext.setContextProperty("QT_DEBUG", QVariant(false)); #endif // QT_DEBUG rootContext.setContextProperty("apiSocketPath", sockPath);