mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 14:42:51 -04:00
Fix compilation and some warnings
This commit is contained in:
parent
30bb84c4a9
commit
17edf3c8de
2 changed files with 9 additions and 7 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
# include "util/androiddebug.h"
|
# include "util/androiddebug.h"
|
||||||
|
@ -65,7 +66,7 @@ int main(int argc, char *argv[])
|
||||||
qDebug() << "RetroShareAndroidNotifyService waiting for core to"
|
qDebug() << "RetroShareAndroidNotifyService waiting for core to"
|
||||||
<< "listen on:" << sockPath;
|
<< "listen on:" << sockPath;
|
||||||
|
|
||||||
usleep(2500000);
|
QThread::sleep(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
rsApi.openConnection(sockPath);
|
rsApi.openConnection(sockPath);
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
#include <QQmlComponent>
|
#include <QQmlComponent>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <unistd.h> // for usleep
|
#include <QThread>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
# include <QtAndroid>
|
# include <QtAndroid>
|
||||||
|
@ -57,7 +58,7 @@ int main(int argc, char *argv[])
|
||||||
QStringList mainArgs = app.arguments();
|
QStringList mainArgs = app.arguments();
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#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
|
/* 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
|
* 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";
|
<< waitCount << "times";
|
||||||
app.processEvents();
|
app.processEvents();
|
||||||
++waitCount;
|
++waitCount;
|
||||||
usleep(10000);
|
QThread::msleep(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (waitIntent);
|
while (waitIntent);
|
||||||
|
@ -113,15 +114,15 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if(!uriStr.isEmpty()) mainArgs.append(uriStr);
|
if(!uriStr.isEmpty()) mainArgs.append(uriStr);
|
||||||
#else
|
#else
|
||||||
rootContext.setContextProperty("Q_OS_ANDROID", false);
|
rootContext.setContextProperty("Q_OS_ANDROID", QVariant(false));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rootContext.setContextProperty("mainArgs", mainArgs);
|
rootContext.setContextProperty("mainArgs", mainArgs);
|
||||||
|
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
rootContext.setContextProperty("QT_DEBUG", true);
|
rootContext.setContextProperty("QT_DEBUG", QVariant(true));
|
||||||
#else
|
#else
|
||||||
rootContext.setContextProperty("QT_DEBUG", false);
|
rootContext.setContextProperty("QT_DEBUG", QVariant(false));
|
||||||
#endif // QT_DEBUG
|
#endif // QT_DEBUG
|
||||||
|
|
||||||
rootContext.setContextProperty("apiSocketPath", sockPath);
|
rootContext.setContextProperty("apiSocketPath", sockPath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue