Skip to content

Commit 62ed432

Browse files
deepin-ci-robot18202781743
authored andcommitted
sync: from linuxdeepin/dtkdeclarative
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#549
1 parent 7b47840 commit 62ed432

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

examples/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
set(CHAMELEON_PATH "${PROJECT_BINARY_DIR}/plugins")
21
add_definitions(
3-
-DCHAMELEON_PATH="${CHAMELEON_PATH}"
42
-DQT_DEPRECATED_WARNINGS
53
)
64
add_subdirectory(exhibition)

examples/exhibition/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@ int main(int argc, char **argv)
7171

7272
QQmlApplicationEngine engine;
7373

74-
engine.addImportPath(CHAMELEON_PATH);
74+
const QString chameleonPath = QStringLiteral("%1/../../../plugins").arg(QGuiApplication::applicationDirPath());
75+
engine.addImportPath(chameleonPath);
7576
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
76-
QQuickStyle::addStylePath(CHAMELEON_PATH);
77+
QQuickStyle::addStylePath(chameleonPath);
7778
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
7879
#else
7980
// QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
8081
#endif
8182

8283
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) && defined(QT_NO_DEBUG)
83-
QQuickStyle::setStyle(CHAMELEON_PATH"/Chameleon");
84+
QQuickStyle::setStyle(chameleonPath"/Chameleon");
8485
#else
8586
QQuickStyle::setStyle("Chameleon");
8687
#endif

examples/qml-inspect/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ int main(int argc, char *argv[])
2020

2121
QQmlApplicationEngine engine;
2222

23-
engine.addImportPath(CHAMELEON_PATH);
23+
const QString chameleonPath = QStringLiteral("%1/../../../plugins").arg(QGuiApplication::applicationDirPath());
24+
engine.addImportPath(chameleonPath);
2425
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
25-
QQuickStyle::addStylePath(CHAMELEON_PATH);
26+
QQuickStyle::addStylePath(chameleonPath);
2627
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
2728
#else
2829
// QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
2930
#endif
3031

3132
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) && defined(QT_NO_DEBUG)
32-
QQuickStyle::setStyle(CHAMELEON_PATH"/Chameleon");
33+
QQuickStyle::setStyle(chameleonPath"/Chameleon");
3334
#else
3435
QQuickStyle::setStyle("Chameleon");
3536
#endif

qt6/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ install(EXPORT Dtk${DTK_VERSION_MAJOR}DeclarativeTargets NAMESPACE Dtk${DTK_VERS
8787
install(FILES ${QM_FILES} DESTINATION "${TRANSLATIONS_INSTALL_PATH}")
8888
# Install plugin
8989
install(TARGETS ${PLUGIN_NAME} DESTINATION "${QML_INSTALL_DIR}/${URI_PATH}")
90-
install(DIRECTORY "${PLUGIN_OUTPUT_DIR}/${URI_PATH}/" DESTINATION "${QML_INSTALL_DIR}/${URI_PATH}")
90+
install(FILES "${PLUGIN_OUTPUT_DIR}/${URI_PATH}/qmldir" DESTINATION "${QML_INSTALL_DIR}/${URI_PATH}")

0 commit comments

Comments
 (0)