Skip to content
Snippets Groups Projects
Commit 882bffae authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-14696 Beta-8 dev

parent 29f916d3
No related branches found
No related tags found
1 merge request!76QDS-14696 Beta-8 dev
Pipeline #79216 passed
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
-DANDROID_OPENSSL_PATH=${QDS_CI_JOB_OPENSSL_PATH} \ -DANDROID_OPENSSL_PATH=${QDS_CI_JOB_OPENSSL_PATH} \
-DGOOGLE_PLAY_APP_VERSION=${GOOGLE_PLAY_APP_VERSION} \ -DGOOGLE_PLAY_APP_VERSION=${GOOGLE_PLAY_APP_VERSION} \
-DBUILD_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF
- cat ${QDS_CI_JOB_BUILD_PATH}/src/dynamic_imports.qml
- cmake --build ${QDS_CI_JOB_BUILD_PATH} --target aab - cmake --build ${QDS_CI_JOB_BUILD_PATH} --target aab
.copy-and-sign-apks: &copy-and-sign-apks .copy-and-sign-apks: &copy-and-sign-apks
...@@ -118,4 +119,5 @@ build-desktop: ...@@ -118,4 +119,5 @@ build-desktop:
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=${QDS_CI_JOB_QT_PATH} \ -DCMAKE_PREFIX_PATH=${QDS_CI_JOB_QT_PATH} \
-DBUILD_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF
- cat ${QDS_CI_JOB_BUILD_PATH}/src/dynamic_imports.qml
- cmake --build ${QDS_CI_JOB_BUILD_PATH} - cmake --build ${QDS_CI_JOB_BUILD_PATH}
...@@ -46,12 +46,26 @@ foreach(imported_target IN LISTS imported_targets) ...@@ -46,12 +46,26 @@ foreach(imported_target IN LISTS imported_targets)
_qt_qml_module_installed_plugin_target) _qt_qml_module_installed_plugin_target)
if(qml_plugin_target) if(qml_plugin_target)
message(STATUS
"Imported target: ${imported_target} -> ${qml_plugin_target}") message(STATUS
"Imported target: ${imported_target} -> ${qml_plugin_target}")
# Get location of the plugin file. # Get location of the plugin file.
get_target_property(imported_location "${qml_plugin_target}" IMPORTED_LOCATION) get_target_property(imported_location_default "${qml_plugin_target}" IMPORTED_LOCATION)
if(NOT EXISTS "${imported_location}") get_target_property(imported_location_release "${qml_plugin_target}" IMPORTED_LOCATION_RELEASE)
get_target_property(imported_location_min_size "${qml_plugin_target}" IMPORTED_LOCATION_MINSIZEREL)
get_target_property(imported_location_min_size_rel "${qml_plugin_target}" IMPORTED_LOCATION_RELWITHDEBINFO)
if(imported_location_default)
set(imported_location "${imported_location_default}")
elseif(imported_location_release)
set(imported_location "${imported_location_release}")
elseif(imported_location_min_size)
set(imported_location "${imported_location_min_size}")
elseif(imported_location_min_size_rel)
set(imported_location "${imported_location_min_size_rel}")
else()
message(WARNING "No imported location found for ${qml_plugin_target}.")
continue() continue()
endif() endif()
...@@ -62,12 +76,14 @@ foreach(imported_target IN LISTS imported_targets) ...@@ -62,12 +76,14 @@ foreach(imported_target IN LISTS imported_targets)
# to the plugin file. That's at least usually the case for Qt qml plugins. # to the plugin file. That's at least usually the case for Qt qml plugins.
set(qmldir_path "${imported_location_dir}/qmldir") set(qmldir_path "${imported_location_dir}/qmldir")
if(NOT EXISTS "${qmldir_path}") if(NOT EXISTS "${qmldir_path}")
message(WARNING "No qmldir file found for ${qml_plugin_target}.")
continue() continue()
endif() endif()
# Read qmldir file contents. # Read qmldir file contents.
file(READ "${qmldir_path}" qmldir_content) file(READ "${qmldir_path}" qmldir_content)
if(qmldir_content STREQUAL "") if(qmldir_content STREQUAL "")
message(WARNING "Empty qmldir for ${qml_plugin_target}.")
continue() continue()
endif() endif()
......
...@@ -39,7 +39,10 @@ void DesignStudioManager::init() ...@@ -39,7 +39,10 @@ void DesignStudioManager::init()
QUdpSocket udpSocket; QUdpSocket udpSocket;
const int port = 53452; const int port = 53452;
#ifdef Q_OS_ANDROID
udpSocket.writeDatagram(datagram, QHostAddress::LocalHost, port); udpSocket.writeDatagram(datagram, QHostAddress::LocalHost, port);
#endif
udpSocket.writeDatagram(datagram, QHostAddress::Broadcast, port); udpSocket.writeDatagram(datagram, QHostAddress::Broadcast, port);
udpSocket.writeDatagram(datagram, QHostAddress::AnyIPv4, port); udpSocket.writeDatagram(datagram, QHostAddress::AnyIPv4, port);
udpSocket.writeDatagram(datagram, QHostAddress::AnyIPv6, port); udpSocket.writeDatagram(datagram, QHostAddress::AnyIPv6, port);
......
...@@ -48,7 +48,12 @@ int main(int argc, char *argv[]) ...@@ -48,7 +48,12 @@ int main(int argc, char *argv[])
view.engine()->rootContext()->setContextProperty("backend", &backend); view.engine()->rootContext()->setContextProperty("backend", &backend);
view.setSource(QUrl(QStringLiteral("qrc:/qt/qml/AndroidUI/Main.qml"))); view.setSource(QUrl(QStringLiteral("qrc:/qt/qml/AndroidUI/Main.qml")));
view.setResizeMode(QQuickView::SizeRootObjectToView); view.setResizeMode(QQuickView::SizeRootObjectToView);
#ifdef Q_OS_ANDROID
view.showMaximized(); view.showMaximized();
#else
view.show();
#endif
return app.exec(); return app.exec();
} }
...@@ -135,9 +135,12 @@ QString ProjectManager::unpackProject(const QByteArray &project) ...@@ -135,9 +135,12 @@ QString ProjectManager::unpackProject(const QByteArray &project)
return resourcePath; return resourcePath;
} }
QString ProjectManager::findFile(const QString &dir, const QString &filter) QString ProjectManager::findFile(const QString &dir, const QString &filter, const bool recursive)
{ {
QDirIterator it(dir, {filter}, QDir::Files); QDirIterator it(dir,
{filter},
QDir::Files,
recursive ? QDirIterator::Subdirectories : QDirIterator::NoIteratorFlags);
return it.next(); return it.next();
} }
...@@ -203,7 +206,7 @@ bool ProjectManager::runProjectInternal(const QByteArray &project) ...@@ -203,7 +206,7 @@ bool ProjectManager::runProjectInternal(const QByteArray &project)
const QString projectPath = unpackProject(project); const QString projectPath = unpackProject(project);
qDebug() << "Project location: " << projectPath; qDebug() << "Project location: " << projectPath;
const QString qmlProjectFile = findFile(projectPath, "*.qmlproject"); const QString qmlProjectFile = findFile(projectPath, "*.qmlproject", false);
if (qmlProjectFile.isEmpty()) { if (qmlProjectFile.isEmpty()) {
qCritical() << "No \"*.qmlproject\" found in \"" << projectPath << "\"."; qCritical() << "No \"*.qmlproject\" found in \"" << projectPath << "\".";
return false; return false;
...@@ -217,7 +220,7 @@ bool ProjectManager::runProjectInternal(const QByteArray &project) ...@@ -217,7 +220,7 @@ bool ProjectManager::runProjectInternal(const QByteArray &project)
if (mainQmlFilePath.isEmpty()) if (mainQmlFilePath.isEmpty())
return false; return false;
const QString qtquickcontrols2File = findFile(projectPath, "qtquickcontrols2.conf"); const QString qtquickcontrols2File = findFile(projectPath, "qtquickcontrols2.conf", false);
if (!qtquickcontrols2File.isEmpty()) { if (!qtquickcontrols2File.isEmpty()) {
qputenv("QT_QUICK_CONTROLS_CONF", qtquickcontrols2File.toLatin1()); qputenv("QT_QUICK_CONTROLS_CONF", qtquickcontrols2File.toLatin1());
} }
......
...@@ -62,7 +62,7 @@ private: ...@@ -62,7 +62,7 @@ private:
// project management // project management
bool runProjectInternal(const QByteArray &project); bool runProjectInternal(const QByteArray &project);
QString findFile(const QString &dir, const QString &filter); QString findFile(const QString &dir, const QString &filter, const bool recursive = true);
QString readQmlProjectFile(const QString &qmlProjectFilePath); QString readQmlProjectFile(const QString &qmlProjectFilePath);
QString getMainQmlFile(const QString &projectPath, const QString &qmlProjectFileContent); QString getMainQmlFile(const QString &projectPath, const QString &qmlProjectFileContent);
QStringList getImportPaths(const QString &projectPath, const QString &qmlProjectFileContent); QStringList getImportPaths(const QString &projectPath, const QString &qmlProjectFileContent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment