Commit 1edce871 authored by Daniel Teske's avatar Daniel Teske
Browse files

Readd Android specific code for Qt Quick 2 template



I tested that it works.

Change-Id: I01387c302c48f3ba9244ba40099f1dead970fb33
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
parent 7b39f41c
......@@ -26,7 +26,7 @@ QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/../Resources/%2")
.arg(QCoreApplication::applicationDirPath(), path);
#elif defined(Q_OS_UNIX)
#elif defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID)
const QString pathInInstallDir =
QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
if (QFileInfo(pathInInstallDir).exists())
......@@ -51,7 +51,11 @@ QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
{
d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
#ifdef Q_OS_ANDROID
setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
#else
setSource(QUrl::fromLocalFile(d->mainQmlFile));
#endif
}
void QtQuick2ApplicationViewer::addImportPath(const QString &path)
......
......@@ -227,7 +227,7 @@ QByteArray QtQuickApp::generateFileExtended(int fileType,
int QtQuickApp::stubVersionMinor() const
{
return m_componentSet == QtQuick20Components ? 1 : 22;
return m_componentSet == QtQuick20Components ? 2 : 22;
}
QList<AbstractGeneratedFileInfo> QtQuickApp::updateableFiles(const QString &mainProFile) const
......
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