From 4dc6d9c57f0b4d76bcb88c30c40eb9c45ef04f8f Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 00:05:19 +0200 Subject: Unmark localization/*.ts files executable localization/*.ts files are XML (data) files, there is no need for them to be marked executable, but two of them were. --- localization/localization_de_DE.ts | 0 localization/localization_de_LU.ts | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 localization/localization_de_DE.ts mode change 100755 => 100644 localization/localization_de_LU.ts diff --git a/localization/localization_de_DE.ts b/localization/localization_de_DE.ts old mode 100755 new mode 100644 diff --git a/localization/localization_de_LU.ts b/localization/localization_de_LU.ts old mode 100755 new mode 100644 -- cgit v1.2.3 From fc830980b1f8c3786b6ebc3cca42fbd5930bea55 Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 00:41:57 +0200 Subject: Remove localization/localization_nl.ts from qtpass.pro, too Commits 29e65d7208da06 ("Fix html links color and NL translation building error") and df43cec8642813 ("Localization normalized and minor (auto) updates") removed localization/localization_nl.ts file from the source tree and qtpass resources but forgot to remove it from qtpass.pro so it got automatically recreated (nearly empty) every time qmake was run. Remove it from this file, too. --- qtpass.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qtpass.pro b/qtpass.pro index b27eef14..258abe00 100644 --- a/qtpass.pro +++ b/qtpass.pro @@ -58,8 +58,7 @@ CONFIG(coverage) { QMAKE_DISTCLEAN += -r src/$$OBJECTS_DIR/lcov/ } -TRANSLATIONS += localization/localization_nl.ts \ - localization/localization_ca.ts \ +TRANSLATIONS += localization/localization_ca.ts \ localization/localization_de_DE.ts \ localization/localization_es_ES.ts \ localization/localization_gl_ES.ts \ -- cgit v1.2.3 From 2f415d2da9bed91757ff60d77b55f648a1f30afe Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 00:44:51 +0200 Subject: Add tests/auto/ui/tst_ui and tests/auto/util/tst_util to .gitignore (At least) Linux uses tests/auto/ui/tst_ui and tests/auto/util/tst_util as output file names for built tests, so add these names to .gitignore so they don't pop up as untracked files. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 116e22e7..ded98b04 100644 --- a/.gitignore +++ b/.gitignore @@ -23,10 +23,12 @@ src/libqtpass.a src/moc_predefs.h tests/auto/ui/moc_predefs.h tests/auto/ui/target_wrapper.sh +tests/auto/ui/tst_ui tests/auto/ui/tst_ui.app/ tests/auto/ui/tst_ui.moc tests/auto/util/moc_predefs.h tests/auto/util/target_wrapper.sh +tests/auto/util/tst_util tests/auto/util/tst_util.app/ tests/auto/util/tst_util.moc **/*.gc* -- cgit v1.2.3 From ca76b9b5513f0548361ebb01f87edc45f3ad89d6 Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 00:19:25 +0200 Subject: Remove compiler_updateqm_make_all target from PRE_TARGETDEPS in src.pro Having compiler_updateqm_make_all target in PRE_TARGETDEPS in src.pro causes make to always consider libqtpass.a out of date and rebuild it. Together with the next commit this will cause main/qtpass to always be considered out of date and so relinked unnecessarily on each make invocation. It looks like this PRE_TARGETDEPS entry isn't actually required as qmake generates proper localization/*.ts -> localization/*.qm dependencies without it anyway, so let's just remove it. --- src/src.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index 8f364004..6c603fbd 100644 --- a/src/src.pro +++ b/src/src.pro @@ -90,7 +90,6 @@ updateqm.output = ../localization/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ../localization/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link target_predeps QMAKE_EXTRA_COMPILERS += updateqm -PRE_TARGETDEPS += compiler_updateqm_make_all !nosingleapp { SOURCES += singleapplication.cpp -- cgit v1.2.3 From fd1369d8fcda295af879e5db5e28099881f6ca4a Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 00:31:33 +0200 Subject: Make sure main/qtpass actually depends on libqtpass.a Currently, if one changes some source file in src and then runs make the libqtpass.a gets correctly rebuilt, however main/qtpass isn't actually relinked to make use of this new library version. According to the qmake project file snippet at the very bottom of https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html internal static libraries need to be manually added to their users PRE_TARGETDEPS, too. The same goes for tests that link to libqtpass.a. --- main/main.pro | 2 ++ tests/auto/ui/ui.pro | 1 + tests/auto/util/util.pro | 1 + 3 files changed, 4 insertions(+) diff --git a/main/main.pro b/main/main.pro index 515dfcf9..64cf8200 100644 --- a/main/main.pro +++ b/main/main.pro @@ -5,6 +5,8 @@ QT += core gui CONFIG += c++11 LIBS = -L"$$OUT_PWD/../src/$(OBJECTS_DIR)" -lqtpass $$LIBS +clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../src/$(OBJECTS_DIR)/libqtpass.a" + INCLUDEPATH += ../src macx { diff --git a/tests/auto/ui/ui.pro b/tests/auto/ui/ui.pro index a7324599..7949d49a 100644 --- a/tests/auto/ui/ui.pro +++ b/tests/auto/ui/ui.pro @@ -3,6 +3,7 @@ SOURCES += tst_ui.cpp LIBS = -L"$$OUT_PWD/../../../src/$(OBJECTS_DIR)" -lqtpass $$LIBS +clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../../../src/$(OBJECTS_DIR)/libqtpass.a" HEADERS += passworddialog.h \ passwordconfiguration.h diff --git a/tests/auto/util/util.pro b/tests/auto/util/util.pro index 89aa15be..41fd89cb 100644 --- a/tests/auto/util/util.pro +++ b/tests/auto/util/util.pro @@ -3,6 +3,7 @@ SOURCES += tst_util.cpp \ LIBS = -L"$$OUT_PWD/../../../src/$(OBJECTS_DIR)" -lqtpass $$LIBS +clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../../../src/$(OBJECTS_DIR)/libqtpass.a" HEADERS += util.h \ filecontent.h -- cgit v1.2.3 From 65aa4957ad0167880ef990bb355b8bdcd2875b7d Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sun, 29 Sep 2019 15:16:47 +0200 Subject: Make sure resources are built just once Currently, the project resources are built twice: the first time in the "main" directory and the second time in the "src" directory. This is because they are specified both in main.pro and src.pro qmake project files (and in qtpass.pro, too). They should be specified in just one such project file instead so they are built just once. Let's leave them in src.pro since that's where localization *.ts -> *.qm dependencies are provided. For this, a Q_INIT_RESOURCE() statement is needed so they are properly linked to by the main application. --- main/main.cpp | 3 +++ main/main.pro | 2 -- qtpass.pro | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 907aa9e2..c5688537 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -4,6 +4,7 @@ #endif #include +#include #include /*! \mainpage QtPass @@ -67,6 +68,8 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); #endif + Q_INIT_RESOURCE(resources); + QCoreApplication::setOrganizationName("IJHack"); QCoreApplication::setOrganizationDomain("ijhack.org"); QCoreApplication::setApplicationName("QtPass"); diff --git a/main/main.pro b/main/main.pro index 64cf8200..619b6bcc 100644 --- a/main/main.pro +++ b/main/main.pro @@ -17,8 +17,6 @@ macx { SOURCES += main.cpp -RESOURCES += ../resources.qrc - isEmpty(PREFIX) { PREFIX = $$(PREFIX) } diff --git a/qtpass.pro b/qtpass.pro index 258abe00..bb0058ac 100644 --- a/qtpass.pro +++ b/qtpass.pro @@ -9,8 +9,6 @@ OTHER_FILES += LICENSE \ README.md \ qtpass.1 -RESOURCES += resources.qrc - # add Makefile target to generate code coverage using gcov gcov.target = gcov gcov.commands += cd src/$$OBJECTS_DIR && gcov "*.gcda" 1>/dev/null $$escape_expand(\\n\\t) -- cgit v1.2.3