Skip to content

Commit 29bff2d

Browse files
committed
project cleanup
1 parent ac9f6fc commit 29bff2d

File tree

17 files changed

+48
-36
lines changed

17 files changed

+48
-36
lines changed

.qmake.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ load(qt_build_config)
33
CONFIG += warning_clean exceptions
44
DEFINES += QT_DEPRECATED_WARNINGS QT_ASCII_CAST_WARNINGS
55

6-
MODULE_VERSION = 2.1.3
6+
MODULE_VERSION = 2.1.4

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ services:
44
- docker
55

66
sudo: required
7+
dist: trusty
8+
osx_image: xcode9.2
79

810
env:
911
global:
10-
- QT_VER=5.10.0
12+
- QPMX_CACHE_DIR=$HOME/.qpmx-cache
13+
- QT_VER=5.10.1
1114

1215
matrix:
1316
include:
1417
- os: linux
15-
dist: trusty
1618
env:
1719
- PLATFORM=gcc_64
1820
- BUILD_DOC=true
1921
- os: osx
20-
osx_image: xcode9.1
2122
env:
2223
- PLATFORM=clang_64
2324

@@ -44,9 +45,10 @@ deploy:
4445
before_cache:
4546
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
4647
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
48+
- rm -fr $QPMX_CACHE_DIR/locks
4749
cache:
4850
directories:
49-
- $HOME/.cache/Skycoder42/qpmx
5051
- $HOME/.gradle/caches/
5152
- $HOME/.gradle/wrapper/
5253
- $HOME/.android/build-cache
54+
- $QPMX_CACHE_DIR

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The Qt auto updater library is a library to automatically check for updates and
66

77
[![Travis Build Status](https://travis-ci.org/Skycoder42/QtAutoUpdater.svg?branch=master)](https://travis-ci.org/Skycoder42/QtAutoUpdater)
88
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/5iw2byrvnsdfytxv/branch/master?svg=true)](https://ci.appveyor.com/project/Skycoder42/qtautoupdater/branch/master)
9+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a5b2e3cc66c644869515d2f3a5c3ff49)](https://www.codacy.com/app/Skycoder42/QtAutoUpdater)
910

1011
## Features
1112
### Core Library

appveyor.yml

Lines changed: 3 additions & 3 deletions
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

1010
matrix:
1111
- PLATFORM: msvc2017_64
@@ -17,12 +17,12 @@ matrix:
1717
exclude:
1818
- PLATFORM: msvc2017_64
1919
image: Visual Studio 2015
20-
- PLATFORM: mingw53_32
21-
image: Visual Studio 2015
2220
- PLATFORM: msvc2015_64
2321
image: Visual Studio 2017
2422
- PLATFORM: msvc2015
2523
image: Visual Studio 2017
24+
- PLATFORM: mingw53_32
25+
image: Visual Studio 2017
2626

2727
install:
2828
- git clone https://github.com/Skycoder42/QtModules.git .\qtmodules-travis

deploy.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"title": "QtAutoUpdater",
3+
"description": "A Qt library to automatically check for updates and install them.",
4+
"modules": [ "QtAutoUpdaterCore", "QtAutoUpdaterGui" ],
5+
"dependencies": [],
6+
"excludes": [ "static", "android", "ios", "winrt" ],
7+
"license": {
8+
"name": "BSD-3-Clause",
9+
"path": "LICENSE"
10+
}
11+
}

examples/examples.pro

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
TEMPLATE = subdirs
22

33
SUBDIRS = autoupdatercore autoupdatergui
4-
5-
docTarget.target = doxygen
6-
QMAKE_EXTRA_TARGETS += docTarget

qtautoupdater.pro

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ load(qt_parts)
22

33
SUBDIRS += doc
44

5-
docTarget.target = doxygen
6-
docTarget.CONFIG += recursive
7-
docTarget.recurse_target = doxygen
8-
QMAKE_EXTRA_TARGETS += docTarget
5+
doxygen.target = doxygen
6+
doxygen.CONFIG = recursive
7+
doxygen.recurse_target = doxygen
8+
doxygen.recurse += doc
9+
QMAKE_EXTRA_TARGETS += doxygen
910

10-
DISTFILES += .qmake.conf
11+
lrelease.target = lrelease
12+
lrelease.CONFIG = recursive
13+
lrelease.recurse_target = lrelease
14+
lrelease.recurse += sub_src
15+
QMAKE_EXTRA_TARGETS += lrelease
16+
17+
DISTFILES += .qmake.conf \
18+
sync.profile

src/autoupdatercore/adminauthoriser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace QtAutoUpdater
1313
class Q_AUTOUPDATERCORE_EXPORT AdminAuthoriser
1414
{
1515
public:
16-
//! Virtual destructor
1716
virtual inline ~AdminAuthoriser() {}
1817
//! Tests whether this program already has elevated rights or not
1918
virtual bool hasAdminRights() = 0;

src/autoupdatergui/adminauthorization_mac.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ bool AdminAuthorization::executeAsAdmin(const QString &program, const QStringLis
6868

6969
QVector<char *> args;
7070
QVector<QByteArray> utf8Args;
71-
foreach (const QString &argument, arguments) {
71+
for(auto argument : arguments) {
7272
utf8Args.push_back(argument.toUtf8());
7373
args.push_back(utf8Args.last().data());
7474
}

src/autoupdatergui/adminauthorization_x11.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ bool AdminAuthorization::hasAdminRights()
7676

7777
bool AdminAuthorization::executeAsAdmin(const QString &program, const QStringList &arguments)
7878
{
79-
foreach(auto su, suFontends) {
79+
for(auto su : qAsConst(suFontends)) {
8080
auto command = QStandardPaths::findExecutable(su.first);
8181
if(!command.isEmpty()) {
8282
auto args = su.second;
@@ -157,7 +157,6 @@ static bool execAdminFallback(const QString &program, const QStringList &argumen
157157
QByteArray data;
158158
QByteArray errData;
159159
int bytes = 0;
160-
int errBytes = 0;
161160
char buf[1024];
162161
char errBuf[1024];
163162
while (bytes >= 0) {
@@ -174,7 +173,7 @@ static bool execAdminFallback(const QString &program, const QStringList &argumen
174173
else
175174
bytes = 0;
176175
}
177-
errBytes = ::read(pipedData[0], errBuf, 1023);
176+
int errBytes = ::read(pipedData[0], errBuf, 1023);
178177
if (errBytes > 0)
179178
{
180179
errData.append(errBuf, errBytes);
@@ -266,7 +265,7 @@ static bool execAdminFallback(const QString &program, const QStringList &argumen
266265
::unsetenv("LC_ALL");
267266

268267
::execv(SU_COMMAND, argp);
269-
_exit(0);
268+
_exit(EXIT_FAILURE);
270269
return false;
271270
}
272271
}

0 commit comments

Comments
 (0)