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

Commit 09c02f0

Browse files
committed
internal code updates
1 parent 5a2fd28 commit 09c02f0

File tree

60 files changed

+185
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+185
-117
lines changed

.qmake.conf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ win32:cross_compile: CONFIG += winrt
55

66
DEFINES += QT_DEPRECATED_WARNINGS QT_ASCII_CAST_WARNINGS
77

8-
MODULE_VERSION = 4.0.0
8+
MODULE_VERSION_MAJOR = 4
9+
MODULE_VERSION_MINOR = 0
10+
MODULE_VERSION_PATCH = 1
11+
MODULE_VERSION_IMPORT = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR}
12+
MODULE_VERSION = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR}.$${MODULE_VERSION_PATCH}
13+

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ osx_image: xcode9.2
99

1010
env:
1111
global:
12-
- QT_VER=5.10.0
12+
- QPMX_CACHE_DIR=$HOME/.qpmx-cache
13+
- QT_VER=5.10.1
1314
- EXTRA_MODULES=".qtremoteobjects .skycoder42.jsonserializer"
1415
- STATIC_QT_MODS="qttools qtwebsockets qtscxml qtremoteobjects"
1516
- STATIC_EXTRA_MODS="qtjsonserializer"
@@ -20,7 +21,7 @@ matrix:
2021
env:
2122
- PLATFORM=gcc_64
2223
- BUILD_DOC=true
23-
- EXTRA_PKG="libsecret-1-dev gnome-keyring" #in order to build secrectservice keystore
24+
- EXTRA_PKG="libsecret-1-dev" #in order to build secrectservice keystore
2425
- os: linux
2526
env:
2627
- PLATFORM=android_armv7
@@ -59,10 +60,10 @@ deploy:
5960
before_cache:
6061
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
6162
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
62-
#TODO rm qpmx locks
63+
- rm -fr $QPMX_CACHE_DIR/locks
6364
cache:
6465
directories:
65-
- $HOME/.cache/Skycoder42/qpmx
6666
- $HOME/.gradle/caches/
6767
- $HOME/.gradle/wrapper/
6868
- $HOME/.android/build-cache
69+
- $QPMX_CACHE_DIR

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ auto store = new QtDataSync::DataStore(this); //Use the "default setup"
158158
//store an entry
159159
store->save<Data>({42, "tree"});
160160
//load all entries
161-
foreach(Data d, store->loadAll<Data>()) {
161+
for(Data d : store->loadAll<Data>()) {
162162
qDebug() << d.key << d.value;
163163
});
164164
```

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ image:
55
version: build-{build}
66

77
environment:
8-
QT_VER: 5.10.0
8+
QT_VER: 5.10.1
99
EXTRA_MODULES: .qtremoteobjects;.skycoder42.jsonserializer
1010
STATIC_QT_MODS: qttools qtwebsockets qtscxml qtremoteobjects
1111
STATIC_EXTRA_MODS: qtjsonserializer

doc/datatypestore.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ initially. This can be a potentially long operation, and thus you should only us
225225
number of datasets does not get extremly big.
226226

227227
One additional feature of the store is that it provides read-only STL iterators for easy access.
228-
Using it with foreach however is currently not possible, as the store is not a value type.
228+
Using it with for/foreach however is currently not possible, as the store is not a value type.
229229

230230
@sa DataStore, DataStore::loadAll, DataTypeStore
231231
*/

examples/datasync/Sample/accountdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void AccountDialog::exec(const QString &setup, QWidget *parent)
7070
void AccountDialog::updateDevices(const QList<QtDataSync::DeviceInfo> &devices)
7171
{
7272
ui->treeWidget->clear();
73-
foreach(auto device, devices) {
73+
for(auto device : devices) {
7474
auto item = new QTreeWidgetItem(ui->treeWidget);
7575
item->setText(0, device.name());
7676
item->setText(1, printFingerprint(device.fingerprint()));
@@ -111,7 +111,7 @@ void AccountDialog::login(QtDataSync::LoginRequest request)
111111
QString AccountDialog::printFingerprint(const QByteArray &fingerprint)
112112
{
113113
QByteArrayList res;
114-
foreach(char c, fingerprint)
114+
for(char c : fingerprint)
115115
res.append(QByteArray(1, c).toHex());
116116
return QString::fromUtf8(res.join(':'));
117117
}

examples/datasync/Sample/exchangedialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void ExchangeDialog::exec(QtDataSync::AccountManager *manager, QWidget *parent)
3535
void ExchangeDialog::devicesChanged(QList<QtDataSync::UserInfo> devices)
3636
{
3737
ui->treeWidget->clear();
38-
foreach(auto dev, devices) {
38+
for(auto dev : devices) {
3939
auto item = new QTreeWidgetItem(ui->treeWidget);
4040
item->setText(0, dev.name());
4141
item->setText(1, QStringLiteral("%1:%2").arg(dev.address().toString()).arg(dev.port()));

src/datasync/changecontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void ChangeController::uploadNext(bool emitStarted)
143143

144144
//skip stuff already beeing uploaded (could still have changed, but to prevent errors)
145145
auto skip = false;
146-
foreach(auto mKey, _activeUploads.keys()) {
146+
for(auto mKey : _activeUploads.keys()) {
147147
if(key == mKey) {
148148
skip = true;
149149
break;

src/datasync/changeemitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void ChangeEmitter::triggerRemoteClear(const QByteArray &typeName)
5858
{
5959
if(_cache) {
6060
QWriteLocker _(&_cache->lock);
61-
foreach(auto key, _cache->cache.keys()) {
61+
for(auto key : _cache->cache.keys()) {
6262
if(key.typeName == typeName)
6363
_cache->cache.remove(key);
6464
}

src/datasync/cryptocontroller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ QStringList CryptoController::allKeystoreKeys()
129129
QStringList CryptoController::availableKeystoreKeys()
130130
{
131131
QStringList keys;
132-
foreach(auto key, factory->allKeys()) {
132+
for(auto key : factory->allKeys()) {
133133
if(factory->isAvailable(key))
134134
keys.append(key);
135135
}
@@ -860,7 +860,7 @@ void CryptoController::cleanCiphers() const
860860
auto keys = settings()->childKeys();
861861
settings()->endGroup();
862862

863-
foreach(auto key, keys) {
863+
for(auto key : keys) {
864864
auto ok = false;
865865
auto keyIndex = key.toUInt(&ok);
866866
if(!ok)

0 commit comments

Comments
 (0)