Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit c6537e4

Browse files
committed
general cleanups
1 parent 3258772 commit c6537e4

19 files changed

+118
-124
lines changed

.qmake.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
load(qt_build_config)
22

33
CONFIG += warning_clean exceptions c++17
4-
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
5-
6-
versionAtLeast(QT_VERSION, 5.11.0): CONFIG += sample_test_model
4+
#QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
75

86
DEFINES += QT_DEPRECATED_WARNINGS QT_ASCII_CAST_WARNINGS
97

examples/datasync/AndroidSync/AndroidSync.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SOURCES += \
1515
RESOURCES += qml.qrc
1616

1717
target.path = $$[QT_INSTALL_EXAMPLES]/datasync/$$TARGET
18-
INSTALLS += target
18+
!install_ok: INSTALLS += target
1919

2020
DISTFILES += \
2121
android/AndroidManifest.xml \

examples/datasync/IosSync/IosSync.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ RESOURCES += qml.qrc
1717
QMAKE_INFO_PLIST = Info.plist
1818

1919
target.path = $$[QT_INSTALL_EXAMPLES]/datasync/$$TARGET
20-
INSTALLS += target
20+
!install_ok: INSTALLS += target

examples/datasync/Sample/Sample.pro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
TEMPLATE = app
22

33
QT += core gui widgets datasync
4-
sample_test_model: QT += testlib
5-
sample_test_model: DEFINES += SAMPLE_TEST_MODELS
4+
QT += testlib
65

76
TARGET = Sample
87

@@ -27,7 +26,7 @@ FORMS += \
2726
DISTFILES += docker-compose.yaml
2827

2928
target.path = $$[QT_INSTALL_EXAMPLES]/datasync/$$TARGET
30-
INSTALLS += target
29+
!install_ok: INSTALLS += target
3130

3231
#not found by linker?
3332
unix:!mac {

examples/datasync/Sample/widget.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
#include <QMetaEnum>
66

77
#include "accountdialog.h"
8-
#ifdef SAMPLE_TEST_MODELS
98
#include <QAbstractItemModelTester>
10-
#endif
119

1210
Widget::Widget(const QString &setup, QWidget *parent) :
1311
QWidget(parent),
@@ -47,9 +45,7 @@ Widget::Widget(const QString &setup, QWidget *parent) :
4745
qCritical() << e.what();
4846
});
4947

50-
#ifdef SAMPLE_TEST_MODELS
5148
new QAbstractItemModelTester(_model, QAbstractItemModelTester::FailureReportingMode::Fatal, this);
52-
#endif
5349
_model->setTypeId<SampleData>();
5450
_model->addColumn(QStringLiteral("Id"), "id");
5551
_model->addColumn(QStringLiteral("Title"), "title");

src/datasync/datasync.pro

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,14 @@ REPC_SOURCE += \
8989

9090
REPC_REPLICA += $$REPC_SOURCE
9191

92-
TRANSLATIONS += \
93-
translations/qtdatasync_de.ts \
94-
translations/qtdatasync_template.ts
95-
9692
include(rothreadedbackend/rothreadedbackend.pri)
9793
include(../messages/messages.pri)
9894

99-
MODULE_CONFIG += c++14
95+
MODULE_CONFIG += c++17
10096
MODULE_PLUGIN_TYPES = keystores
10197

10298
load(qt_module)
10399

104-
CONFIG += lrelease
105-
QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS]
106-
107100
win32 {
108101
QMAKE_TARGET_PRODUCT = "QtDataSync"
109102
QMAKE_TARGET_COMPANY = "Skycoder42"
@@ -112,23 +105,7 @@ win32 {
112105
QMAKE_TARGET_BUNDLE_PREFIX = "de.skycoder42."
113106
}
114107

115-
QDEP_DEPENDS += Skycoder42/QPluginFactory
108+
QDEP_DEPENDS += Skycoder42/QPluginFactory@1.5.0
116109
QDEP_LINK_DEPENDS += ../messages
117110

118-
# extra cpp files for translations
119-
never_true_lupdate_only {
120-
SOURCES += ../messages/*.h \
121-
../messages/*.cpp \
122-
../imports/datasync/*.h \
123-
../imports/datasync/*.cpp \
124-
../imports/datasync/*.qml
125-
PLUGINS = $$files(../plugins/keystores/*)
126-
for(plugin, PLUGINS): SOURCES += $$plugin/*.h
127-
for(plugin, PLUGINS): SOURCES += $$plugin/*.cpp
128-
}
129-
130111
!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.")
131-
132-
#replace template qm by ts
133-
QM_FILES -= $$__qdep_lrelease_real_dir/qtdatasync_template.qm
134-
QM_FILES += translations/qtdatasync_template.ts

src/messages/messages.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ load(qt_helper_lib)
6363
CONFIG += qt warning_clean
6464
QT = core
6565

66-
QDEP_DEPENDS += Skycoder42/CryptoQQ@1.2.0
67-
QDEP_EXPORTS += Skycoder42/CryptoQQ@1.2.0
66+
QDEP_DEPENDS += Skycoder42/CryptoQQ@2.0.3
67+
QDEP_EXPORTS += Skycoder42/CryptoQQ@2.0.3
6868
CONFIG += qdep_no_link
6969

7070
!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.")

src/src.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ SUBDIRS += \
55
plugins \
66
imports \
77
messages \
8-
3rdparty
8+
3rdparty \
9+
translations
910

1011
messages.depends += 3rdparty
1112
datasync.depends += messages 3rdparty

src/datasync/translations/qtdatasync_de.ts renamed to src/translations/qtdatasync_de.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<context>
55
<name>QtDataSync::AccountManager</name>
66
<message>
7-
<location filename="../accountmanager.cpp" line="+159"/>
7+
<location filename="../datasync/accountmanager.cpp" line="+159"/>
88
<source>Password must not be empty.</source>
99
<translation>Password darf nicht leer sein.</translation>
1010
</message>
@@ -18,7 +18,7 @@
1818
<context>
1919
<name>QtDataSync::AccountManagerPrivate</name>
2020
<message>
21-
<location filename="../accountmanager_p.cpp" line="+119"/>
21+
<location filename="../datasync/accountmanager_p.cpp" line="+119"/>
2222
<location line="+26"/>
2323
<source>Failed to generate export data. You must be registered to a server to export data.</source>
2424
<translation>Export-Daten konnten nicht erstellt werden. Sie müssen registriert sein um exportieren zu können.</translation>
@@ -43,7 +43,7 @@
4343
<context>
4444
<name>QtDataSync::ChangeController</name>
4545
<message>
46-
<location filename="../changecontroller.cpp" line="+75"/>
46+
<location filename="../datasync/changecontroller.cpp" line="+75"/>
4747
<location line="+25"/>
4848
<location line="+105"/>
4949
<source>Failed to upload changes to server.</source>
@@ -53,7 +53,7 @@
5353
<context>
5454
<name>QtDataSync::ExchangeBuffer</name>
5555
<message>
56-
<location filename="../rothreadedbackend/exchangebuffer.cpp" line="+24"/>
56+
<location filename="../datasync/rothreadedbackend/exchangebuffer.cpp" line="+28"/>
5757
<source>ExchangeBuffer already open</source>
5858
<translation>ExchangeBuffer is bereits geöffnet</translation>
5959
</message>
@@ -66,7 +66,7 @@
6666
<context>
6767
<name>QtDataSync::ExchangeEngine</name>
6868
<message>
69-
<location filename="../setup.cpp" line="+449"/>
69+
<location filename="../datasync/setup.cpp" line="+450"/>
7070
<source>Password for trusted import must not be empty</source>
7171
<translation>Das Passwort für den Import von vertrauten Daten darf nicht leer sein</translation>
7272
</message>
@@ -79,7 +79,7 @@
7979
<context>
8080
<name>QtDataSync::RemoteConnector</name>
8181
<message>
82-
<location filename="../remoteconnector.cpp" line="+791"/>
82+
<location filename="../datasync/remoteconnector.cpp" line="+791"/>
8383
<source>Failed to load user identity! Make shure your keystore is available.</source>
8484
<translation>User-Identität konnte nicht geladen werden. Stellen Sie sicher, dass der Schlüsselspeicher verfügbar ist.</translation>
8585
</message>
@@ -127,15 +127,15 @@
127127
<context>
128128
<name>QtDataSync::SyncController</name>
129129
<message>
130-
<location filename="../synccontroller.cpp" line="+164"/>
130+
<location filename="../datasync/synccontroller.cpp" line="+164"/>
131131
<source>Data downloaded from server is invalid.</source>
132132
<translation>Die vom Server heruntergeladenen Daten sind ungültig.</translation>
133133
</message>
134134
</context>
135135
<context>
136136
<name>QtDataSync::UserExchangeManager</name>
137137
<message>
138-
<location filename="../userexchangemanager.cpp" line="+146"/>
138+
<location filename="../datasync/userexchangemanager.cpp" line="+146"/>
139139
<location line="+28"/>
140140
<source>Cannot export data if UserExchangeManager is not in active state</source>
141141
<translation>Daten können nicht exportiert werden, wenn der Austausch nicht aktiviert wurde</translation>

src/datasync/translations/qtdatasync_template.ts renamed to src/translations/qtdatasync_template.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<context>
55
<name>QtDataSync::AccountManager</name>
66
<message>
7-
<location filename="../accountmanager.cpp" line="+159"/>
7+
<location filename="../datasync/accountmanager.cpp" line="+159"/>
88
<source>Password must not be empty.</source>
99
<translation type="unfinished"></translation>
1010
</message>
@@ -18,7 +18,7 @@
1818
<context>
1919
<name>QtDataSync::AccountManagerPrivate</name>
2020
<message>
21-
<location filename="../accountmanager_p.cpp" line="+119"/>
21+
<location filename="../datasync/accountmanager_p.cpp" line="+119"/>
2222
<location line="+26"/>
2323
<source>Failed to generate export data. You must be registered to a server to export data.</source>
2424
<translation type="unfinished"></translation>
@@ -43,7 +43,7 @@
4343
<context>
4444
<name>QtDataSync::ChangeController</name>
4545
<message>
46-
<location filename="../changecontroller.cpp" line="+75"/>
46+
<location filename="../datasync/changecontroller.cpp" line="+75"/>
4747
<location line="+25"/>
4848
<location line="+105"/>
4949
<source>Failed to upload changes to server.</source>
@@ -53,7 +53,7 @@
5353
<context>
5454
<name>QtDataSync::ExchangeBuffer</name>
5555
<message>
56-
<location filename="../rothreadedbackend/exchangebuffer.cpp" line="+24"/>
56+
<location filename="../datasync/rothreadedbackend/exchangebuffer.cpp" line="+28"/>
5757
<source>ExchangeBuffer already open</source>
5858
<translation type="unfinished"></translation>
5959
</message>
@@ -66,7 +66,7 @@
6666
<context>
6767
<name>QtDataSync::ExchangeEngine</name>
6868
<message>
69-
<location filename="../setup.cpp" line="+449"/>
69+
<location filename="../datasync/setup.cpp" line="+450"/>
7070
<source>Password for trusted import must not be empty</source>
7171
<translation type="unfinished"></translation>
7272
</message>
@@ -79,7 +79,7 @@
7979
<context>
8080
<name>QtDataSync::RemoteConnector</name>
8181
<message>
82-
<location filename="../remoteconnector.cpp" line="+791"/>
82+
<location filename="../datasync/remoteconnector.cpp" line="+791"/>
8383
<source>Failed to load user identity! Make shure your keystore is available.</source>
8484
<translation type="unfinished"></translation>
8585
</message>
@@ -127,15 +127,15 @@
127127
<context>
128128
<name>QtDataSync::SyncController</name>
129129
<message>
130-
<location filename="../synccontroller.cpp" line="+164"/>
130+
<location filename="../datasync/synccontroller.cpp" line="+164"/>
131131
<source>Data downloaded from server is invalid.</source>
132132
<translation type="unfinished"></translation>
133133
</message>
134134
</context>
135135
<context>
136136
<name>QtDataSync::UserExchangeManager</name>
137137
<message>
138-
<location filename="../userexchangemanager.cpp" line="+146"/>
138+
<location filename="../datasync/userexchangemanager.cpp" line="+146"/>
139139
<location line="+28"/>
140140
<source>Cannot export data if UserExchangeManager is not in active state</source>
141141
<translation type="unfinished"></translation>

0 commit comments

Comments
 (0)