aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--copydata.pro10
-rw-r--r--src/main.cpp2
2 files changed, 10 insertions, 2 deletions
diff --git a/copydata.pro b/copydata.pro
index 3aaa29a..3846cb7 100644
--- a/copydata.pro
+++ b/copydata.pro
@@ -1,7 +1,15 @@
TEMPLATE = aux
# Copy all QML files during the build time
-do_copydata.commands = $(COPY_DIR) $$PWD/examples $$PWD/apps $$PWD/imports $$PWD/sysui $$PWD/styles $$PWD/am-config.yaml $$PWD/am-config-dev.yaml $$PWD/Main.qml $$OUT_PWD
+DIRECTORIES = examples apps imports sysui styles
+FILES = am-config.yaml am-config-dev.yaml Main.qml
+
+for (d , DIRECTORIES) {
+ do_copydata.commands += $(COPY_DIR) $$shell_path($$PWD/$${d}) $$shell_path($$OUT_PWD/$${d}) $$escape_expand(\n\t)
+}
+for (f , FILES) {
+ do_copydata.commands += $(COPY) $$shell_path($$PWD/$${f}) $$shell_path($$OUT_PWD/$${f}) $$escape_expand(\n\t)
+}
first.depends = do_copydata
!equals(PWD, $$OUT_PWD):QMAKE_EXTRA_TARGETS += first do_copydata
diff --git a/src/main.cpp b/src/main.cpp
index 4133b9f..1cbafeb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -67,7 +67,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
}
try {
- setenv("QT_IM_MODULE", "qtvirtualkeyboard", 1);
+ qputenv("QT_IM_MODULE", "qtvirtualkeyboard");
// this is needed for both WebEngine and Wayland Multi-screen rendering
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
#if !defined(QT_NO_SESSIONMANAGER)