Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-08-12 16:23:11 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-08-12 19:18:57 +0300
commitd58ec4bf706515ce74f8f63aa284b867566fd9e7 (patch)
tree6349f1c16cbc37cbb86fd92f64068a512d7dd2ad
parent7bb54e34d77f03f5915715137cc14761e4815fc9 (diff)
Enable the modernize-use-using check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
-rw-r--r--.clang-tidy1
-rw-r--r--shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp2
-rw-r--r--src/3rdparty/qtokenizer/qtokenizer.h10
-rw-r--r--src/3rdparty/qtsingleapplication/qtlocalpeer.cpp2
-rw-r--r--src/cmd/netrcparser.h2
-rw-r--r--src/csync/csync.h27
-rw-r--r--src/csync/csync_exclude.h2
-rw-r--r--src/csync/csync_update.h2
-rw-r--r--src/csync/csync_util.cpp4
-rw-r--r--src/csync/std/c_private.h8
-rw-r--r--src/csync/vio/csync_vio.h6
-rw-r--r--src/csync/vio/csync_vio_local_unix.cpp4
-rw-r--r--src/csync/vio/csync_vio_local_win.cpp4
-rw-r--r--src/gui/accountstate.h6
-rw-r--r--src/gui/cloudproviders/cloudproviderwrapper.h14
-rw-r--r--src/gui/folder.h4
-rw-r--r--src/gui/sharee.h2
-rw-r--r--src/gui/sharemanager.h2
-rw-r--r--src/gui/socketapi.h2
-rw-r--r--src/gui/tray/ActivityData.h5
-rw-r--r--src/libsync/account.h2
-rw-r--r--src/libsync/accountfwd.h4
-rw-r--r--src/libsync/configfile.h2
-rw-r--r--src/libsync/syncfileitem.h4
-rw-r--r--src/libsync/syncfilestatustracker.h2
-rw-r--r--test/csync/csync_tests/check_csync_exclude.cpp2
-rw-r--r--test/csync/vio_tests/check_vio_ext.cpp4
-rw-r--r--test/testconcaturl.cpp2
-rw-r--r--test/testnextcloudpropagator.cpp2
-rw-r--r--test/testsyncjournaldb.cpp2
30 files changed, 65 insertions, 70 deletions
diff --git a/.clang-tidy b/.clang-tidy
index cda2510ad..34de4128f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -20,6 +20,7 @@ Checks: '-*,
modernize-user-override,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
+ modernize-use-using,
'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
diff --git a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp
index d89aa9174..f11e7ac0b 100644
--- a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp
+++ b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp
@@ -30,7 +30,7 @@ class OwncloudDolphinPlugin : public KOverlayIconPlugin
Q_PLUGIN_METADATA(IID "com.owncloud.ovarlayiconplugin" FILE "ownclouddolphinoverlayplugin.json")
Q_OBJECT
- typedef QHash<QByteArray, QByteArray> StatusMap;
+ using StatusMap = QHash<QByteArray, QByteArray>;
StatusMap m_status;
public:
diff --git a/src/3rdparty/qtokenizer/qtokenizer.h b/src/3rdparty/qtokenizer/qtokenizer.h
index 95f1e3212..b8de15a7d 100644
--- a/src/3rdparty/qtokenizer/qtokenizer.h
+++ b/src/3rdparty/qtokenizer/qtokenizer.h
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
template <class T, class const_iterator>
struct QTokenizerPrivate {
- typedef typename T::value_type char_type;
+ using char_type = typename T::value_type;
struct State {
bool inQuote = false;
@@ -113,7 +113,7 @@ struct QTokenizerPrivate {
template <class T, class const_iterator>
class QTokenizer {
public:
- typedef typename T::value_type char_type;
+ using char_type = typename T::value_type;
/*!
\class QTokenizer
@@ -253,9 +253,9 @@ public:
}
};
-typedef QTokenizer<QByteArray, QByteArray::const_iterator> QByteArrayTokenizer;
-typedef QTokenizer<std::string, std::string::const_iterator> StringTokenizer;
-typedef QTokenizer<std::wstring, std::wstring::const_iterator> WStringTokenizer;
+using QByteArrayTokenizer = QTokenizer<QByteArray, QByteArray::const_iterator>;
+using StringTokenizer = QTokenizer<std::string, std::string::const_iterator>;
+using WStringTokenizer = QTokenizer<std::wstring, std::wstring::const_iterator>;
QT_END_NAMESPACE
diff --git a/src/3rdparty/qtsingleapplication/qtlocalpeer.cpp b/src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
index 4630abd3f..c563e2f28 100644
--- a/src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
+++ b/src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
@@ -36,7 +36,7 @@
#if defined(Q_OS_WIN)
#include <QLibrary>
#include <qt_windows.h>
-typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*);
+using PProcessIdToSessionId = BOOL (WINAPI*)(DWORD, DWORD*);
static PProcessIdToSessionId pProcessIdToSessionId = 0;
#endif
diff --git a/src/cmd/netrcparser.h b/src/cmd/netrcparser.h
index 028ee1380..8ad346551 100644
--- a/src/cmd/netrcparser.h
+++ b/src/cmd/netrcparser.h
@@ -27,7 +27,7 @@ namespace OCC {
class NetrcParser
{
public:
- typedef QPair<QString, QString> LoginPair;
+ using LoginPair = QPair<QString, QString>;
NetrcParser(const QString &file = QString());
bool parse();
diff --git a/src/csync/csync.h b/src/csync/csync.h
index eab9699b1..c57cd6f3d 100644
--- a/src/csync/csync.h
+++ b/src/csync/csync.h
@@ -95,7 +95,7 @@ enum csync_status_codes_e {
CSYNC_STATUS_INDIVIDUAL_CANNOT_ENCODE
};
-typedef enum csync_status_codes_e CSYNC_STATUS;
+using CSYNC_STATUS = enum csync_status_codes_e;
#ifndef likely
# define likely(x) (x)
@@ -146,7 +146,7 @@ enum ItemType {
// currently specified at https://github.com/owncloud/core/issues/8322 are 9 to 10
#define REMOTE_PERM_BUF_SIZE 15
-typedef struct csync_file_stat_s csync_file_stat_t;
+using csync_file_stat_t = struct csync_file_stat_s;
struct OCSYNC_EXPORT csync_file_stat_s {
time_t modtime = 0;
@@ -193,26 +193,19 @@ struct OCSYNC_EXPORT csync_file_stat_s {
/**
* csync handle
*/
-typedef struct csync_s CSYNC;
+using CSYNC = struct csync_s;
-typedef int (*csync_auth_callback) (const char *prompt, char *buf, size_t len,
- int echo, int verify, void *userdata);
+using csync_auth_callback = int (*)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata);
-typedef void (*csync_update_callback) (bool local,
- const char *dirUrl,
- void *userdata);
+using csync_update_callback = void (*)(bool local, const char *dirUrl, void *userdata);
-typedef void csync_vio_handle_t;
-typedef csync_vio_handle_t* (*csync_vio_opendir_hook) (const char *url,
- void *userdata);
-typedef std::unique_ptr<csync_file_stat_t> (*csync_vio_readdir_hook) (csync_vio_handle_t *dhhandle,
- void *userdata);
-typedef void (*csync_vio_closedir_hook) (csync_vio_handle_t *dhhandle,
- void *userdata);
+using csync_vio_handle_t = void;
+using csync_vio_opendir_hook = csync_vio_handle_t *(*)(const char *url, void *userdata);
+using csync_vio_readdir_hook = std::unique_ptr<csync_file_stat_t> (*)(csync_vio_handle_t *dhandle, void *userdata);
+using csync_vio_closedir_hook = void (*)(csync_vio_handle_t *dhandle, void *userdata);
/* Compute the checksum of the given \a checksumTypeId for \a path. */
-typedef QByteArray (*csync_checksum_hook)(
- const QByteArray &path, const QByteArray &otherChecksumHeader, void *userdata);
+using csync_checksum_hook = QByteArray (*)(const QByteArray &path, const QByteArray &otherChecksumHeader, void *userdata);
/**
* @brief Update detection
diff --git a/src/csync/csync_exclude.h b/src/csync/csync_exclude.h
index 0b1147791..2ec59eb30 100644
--- a/src/csync/csync_exclude.h
+++ b/src/csync/csync_exclude.h
@@ -45,7 +45,7 @@ enum csync_exclude_type_e {
CSYNC_FILE_EXCLUDE_CONFLICT,
CSYNC_FILE_EXCLUDE_CANNOT_ENCODE
};
-typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
+using CSYNC_EXCLUDE_TYPE = enum csync_exclude_type_e;
class ExcludedFilesTest;
diff --git a/src/csync/csync_update.h b/src/csync/csync_update.h
index 1b4c50995..66afd7c07 100644
--- a/src/csync/csync_update.h
+++ b/src/csync/csync_update.h
@@ -37,7 +37,7 @@
* @{
*/
-typedef int (*csync_walker_fn) (CSYNC *ctx, std::unique_ptr<csync_file_stat_t> fs);
+using csync_walker_fn = int (*)(CSYNC *ctx, std::unique_ptr<csync_file_stat_t> fs);
/**
* @brief The walker function to use in the file tree walker.
diff --git a/src/csync/csync_util.cpp b/src/csync/csync_util.cpp
index a65c2b427..60bc348ec 100644
--- a/src/csync/csync_util.cpp
+++ b/src/csync/csync_util.cpp
@@ -37,10 +37,10 @@
Q_LOGGING_CATEGORY(lcCSyncUtils, "nextcloud.sync.csync.utils", QtInfoMsg)
-typedef struct {
+using _instr_code_struct = struct {
const char *instr_str;
enum csync_instructions_e instr_code;
-} _instr_code_struct;
+};
static const _instr_code_struct _instr[] =
{
diff --git a/src/csync/std/c_private.h b/src/csync/std/c_private.h
index 76f25e453..ba4f986e1 100644
--- a/src/csync/std/c_private.h
+++ b/src/csync/std/c_private.h
@@ -80,10 +80,10 @@
#ifdef _WIN32
-typedef struct stat64 csync_stat_t;
+typedef struct stat64 csync_stat_t; // NOLINT this is sometimes compiled in C mode
#define _FILE_OFFSET_BITS 64
#else
-typedef struct stat csync_stat_t;
+typedef struct stat csync_stat_t; // NOLINT this is sometimes compiled in C mode
#endif
#ifndef O_NOATIME
@@ -112,7 +112,7 @@ typedef struct stat csync_stat_t;
#endif
#if defined _WIN32 && defined _UNICODE
-typedef wchar_t mbchar_t;
+typedef wchar_t mbchar_t; // NOLINT this is sometimes compiled in C mode
#define _topen _wopen
#define _tdirent _wdirent
#define _topendir _wopendir
@@ -133,7 +133,7 @@ typedef wchar_t mbchar_t;
#define _tchdir _wchdir
#define _tgetcwd _wgetcwd
#else
-typedef char mbchar_t;
+typedef char mbchar_t; // NOLINT this is sometimes compiled in C mode
#define _tdirent dirent
#define _topen open
#define _topendir opendir
diff --git a/src/csync/vio/csync_vio.h b/src/csync/vio/csync_vio.h
index 7d3a2e0b4..54b71cb7a 100644
--- a/src/csync/vio/csync_vio.h
+++ b/src/csync/vio/csync_vio.h
@@ -28,9 +28,11 @@
#include "csync.h"
#include "csync_private.h"
-typedef struct fhandle_s {
+using fhandle_t = struct fhandle_s {
+
int fd;
-} fhandle_t;
+
+};
csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name);
int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle);
diff --git a/src/csync/vio/csync_vio_local_unix.cpp b/src/csync/vio/csync_vio_local_unix.cpp
index bac8801a7..8f704dd24 100644
--- a/src/csync/vio/csync_vio_local_unix.cpp
+++ b/src/csync/vio/csync_vio_local_unix.cpp
@@ -43,10 +43,10 @@ Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "nextcloud.sync.csync.vio_local", QtInfoMsg)
* directory functions
*/
-typedef struct dhandle_s {
+using dhandle_t = struct dhandle_s {
DIR *dh;
char *path;
-} dhandle_t;
+};
static int _csync_vio_local_stat_mb(const mbchar_t *wuri, csync_file_stat_t *buf);
diff --git a/src/csync/vio/csync_vio_local_win.cpp b/src/csync/vio/csync_vio_local_win.cpp
index dceabcdaa..38446289d 100644
--- a/src/csync/vio/csync_vio_local_win.cpp
+++ b/src/csync/vio/csync_vio_local_win.cpp
@@ -43,12 +43,12 @@ Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "nextcloud.sync.csync.vio_local", QtInfoMsg)
* directory functions
*/
-typedef struct dhandle_s {
+using dhandle_t = struct dhandle_s {
WIN32_FIND_DATA ffd;
HANDLE hFind;
int firstFind;
mbchar_t *path; // Always ends with '\'
-} dhandle_t;
+};
static int _csync_vio_local_stat_mb(const mbchar_t *uri, csync_file_stat_t *buf);
diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h
index f1209a47a..7e390e167 100644
--- a/src/gui/accountstate.h
+++ b/src/gui/accountstate.h
@@ -32,8 +32,8 @@ class Account;
class AccountApp;
class RemoteWipe;
-typedef QExplicitlySharedDataPointer<AccountState> AccountStatePtr;
-typedef QList<AccountApp*> AccountAppList;
+using AccountStatePtr = QExplicitlySharedDataPointer<AccountState>;
+using AccountAppList = QList<AccountApp *>;
/**
* @brief Extra info about an ownCloud server account.
@@ -75,7 +75,7 @@ public:
};
/// The actual current connectivity status.
- typedef ConnectionValidator::Status ConnectionStatus;
+ using ConnectionStatus = ConnectionValidator::Status;
/// Use the account as parent
explicit AccountState(AccountPtr account);
diff --git a/src/gui/cloudproviders/cloudproviderwrapper.h b/src/gui/cloudproviders/cloudproviderwrapper.h
index e3a46cc43..22caf3629 100644
--- a/src/gui/cloudproviders/cloudproviderwrapper.h
+++ b/src/gui/cloudproviders/cloudproviderwrapper.h
@@ -20,17 +20,17 @@
/* Forward declaration required since gio header files interfere with QObject headers */
struct _CloudProvidersProviderExporter;
-typedef _CloudProvidersProviderExporter CloudProvidersProviderExporter;
+using CloudProvidersProviderExporter = _CloudProvidersProviderExporter;
struct _CloudProvidersAccountExporter;
-typedef _CloudProvidersAccountExporter CloudProvidersAccountExporter;
+using CloudProvidersAccountExporter = _CloudProvidersAccountExporter;
struct _GMenuModel;
-typedef _GMenuModel GMenuModel;
+using GMenuModel = _GMenuModel;
struct _GMenu;
-typedef _GMenu GMenu;
+using GMenu = _GMenu;
struct _GActionGroup;
-typedef _GActionGroup GActionGroup;
-typedef char gchar;
-typedef void* gpointer;
+using GActionGroup = _GActionGroup;
+using gchar = char;
+using gpointer = void*;
using namespace OCC;
diff --git a/src/gui/folder.h b/src/gui/folder.h
index 518353f6a..72c651b73 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -95,8 +95,8 @@ public:
~Folder();
- typedef QMap<QString, Folder *> Map;
- typedef QMapIterator<QString, Folder *> MapIterator;
+ using Map = QMap<QString, Folder *>;
+ using MapIterator = QMapIterator<QString, Folder *>;
/**
* The account the folder is configured on.
diff --git a/src/gui/sharee.h b/src/gui/sharee.h
index 690ec0047..c6fbcfe29 100644
--- a/src/gui/sharee.h
+++ b/src/gui/sharee.h
@@ -66,7 +66,7 @@ class ShareeModel : public QAbstractListModel
public:
explicit ShareeModel(const AccountPtr &account, const QString &type, QObject *parent = nullptr);
- typedef QVector<QSharedPointer<Sharee>> ShareeSet; // FIXME: make it a QSet<Sharee> when Sharee can be compared
+ using ShareeSet = QVector<QSharedPointer<Sharee>>; // FIXME: make it a QSet<Sharee> when Sharee can be compared
void fetch(const QString &search, const ShareeSet &blacklist);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
diff --git a/src/gui/sharemanager.h b/src/gui/sharemanager.h
index a7a7a718c..daac8bfc8 100644
--- a/src/gui/sharemanager.h
+++ b/src/gui/sharemanager.h
@@ -48,7 +48,7 @@ public:
TypeCircle = Sharee::Circle
};
- typedef SharePermissions Permissions;
+ using Permissions = SharePermissions;
/*
* Constructor for shares
diff --git a/src/gui/socketapi.h b/src/gui/socketapi.h
index b31294c5b..4822629d5 100644
--- a/src/gui/socketapi.h
+++ b/src/gui/socketapi.h
@@ -25,7 +25,7 @@
#include "socketapisocket_mac.h"
#else
#include <QLocalServer>
-typedef QLocalServer SocketApiServer;
+using SocketApiServer = QLocalServer;
#endif
class QUrl;
diff --git a/src/gui/tray/ActivityData.h b/src/gui/tray/ActivityData.h
index f2fc0e345..be30f77a2 100644
--- a/src/gui/tray/ActivityData.h
+++ b/src/gui/tray/ActivityData.h
@@ -45,7 +45,7 @@ public:
class Activity
{
public:
- typedef QPair<qlonglong, QString> Identifier;
+ using Identifier = QPair<qlonglong, QString>;
enum Type {
ActivityType,
@@ -92,8 +92,7 @@ bool operator<(const Activity &rhs, const Activity &lhs);
*
* A QList based list of Activities
*/
-
-typedef QList<Activity> ActivityList;
+using ActivityList = QList<Activity>;
}
Q_DECLARE_METATYPE(OCC::Activity::Type)
diff --git a/src/libsync/account.h b/src/libsync/account.h
index 183e54218..3df7a29a1 100644
--- a/src/libsync/account.h
+++ b/src/libsync/account.h
@@ -51,7 +51,7 @@ namespace OCC {
class AbstractCredentials;
class Account;
-typedef QSharedPointer<Account> AccountPtr;
+using AccountPtr = QSharedPointer<Account>;
class AccessManager;
class SimpleNetworkJob;
diff --git a/src/libsync/accountfwd.h b/src/libsync/accountfwd.h
index 9345bc1e3..ae87639c1 100644
--- a/src/libsync/accountfwd.h
+++ b/src/libsync/accountfwd.h
@@ -20,9 +20,9 @@
namespace OCC {
class Account;
-typedef QSharedPointer<Account> AccountPtr;
+using AccountPtr = QSharedPointer<Account>;
class AccountState;
-typedef QExplicitlySharedDataPointer<AccountState> AccountStatePtr;
+using AccountStatePtr = QExplicitlySharedDataPointer<AccountState>;
} // namespace OCC
diff --git a/src/libsync/configfile.h b/src/libsync/configfile.h
index 432720a3a..e0629c1df 100644
--- a/src/libsync/configfile.h
+++ b/src/libsync/configfile.h
@@ -201,7 +201,7 @@ private:
QString keychainProxyPasswordKey() const;
private:
- typedef QSharedPointer<AbstractCredentials> SharedCreds;
+ using SharedCreds = QSharedPointer<AbstractCredentials>;
static bool _askedUser;
static QString _oCVersion;
diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h
index 2215dca42..adcd4ae4d 100644
--- a/src/libsync/syncfileitem.h
+++ b/src/libsync/syncfileitem.h
@@ -27,7 +27,7 @@ namespace OCC {
class SyncFileItem;
class SyncJournalFileRecord;
-typedef QSharedPointer<SyncFileItem> SyncFileItemPtr;
+using SyncFileItemPtr = QSharedPointer<SyncFileItem>;
/**
* @brief The SyncFileItem class
@@ -254,7 +254,7 @@ inline bool operator<(const SyncFileItemPtr &item1, const SyncFileItemPtr &item2
return *item1 < *item2;
}
-typedef QVector<SyncFileItemPtr> SyncFileItemVector;
+using SyncFileItemVector = QVector<SyncFileItemPtr>;
}
Q_DECLARE_METATYPE(OCC::SyncFileItem)
diff --git a/src/libsync/syncfilestatustracker.h b/src/libsync/syncfilestatustracker.h
index f4b31a130..4a6b89f0d 100644
--- a/src/libsync/syncfilestatustracker.h
+++ b/src/libsync/syncfilestatustracker.h
@@ -54,7 +54,7 @@ private:
struct PathComparator {
bool operator()( const QString& lhs, const QString& rhs ) const;
};
- typedef std::map<QString, SyncFileStatus::SyncFileStatusTag, PathComparator> ProblemsMap;
+ using ProblemsMap = std::map<QString, SyncFileStatus::SyncFileStatusTag, PathComparator>;
SyncFileStatus::SyncFileStatusTag lookupProblem(const QString &pathToMatch, const ProblemsMap &problemMap);
enum SharedFlag { UnknownShared,
diff --git a/test/csync/csync_tests/check_csync_exclude.cpp b/test/csync/csync_tests/check_csync_exclude.cpp
index c052f2424..304e1c5ce 100644
--- a/test/csync/csync_tests/check_csync_exclude.cpp
+++ b/test/csync/csync_tests/check_csync_exclude.cpp
@@ -698,7 +698,7 @@ static void check_csync_exclude_expand_escapes(void **state)
int torture_run_tests(void)
{
- typedef ExcludedFilesTest T;
+ using T = ExcludedFilesTest;
const struct CMUnitTest tests[] = {
cmocka_unit_test_setup_teardown(T::check_csync_exclude_add, T::setup, T::teardown),
diff --git a/test/csync/vio_tests/check_vio_ext.cpp b/test/csync/vio_tests/check_vio_ext.cpp
index afcb0c87f..567dbd70b 100644
--- a/test/csync/vio_tests/check_vio_ext.cpp
+++ b/test/csync/vio_tests/check_vio_ext.cpp
@@ -43,11 +43,11 @@
static mbchar_t wd_buffer[WD_BUFFER_SIZE];
-typedef struct {
+using statevar = struct {
CSYNC *csync;
char *result;
char *ignored_dir;
-} statevar;
+};
/* remove the complete test dir */
static int wipe_testdir()
diff --git a/test/testconcaturl.cpp b/test/testconcaturl.cpp
index 16f76ed34..a6caac8b1 100644
--- a/test/testconcaturl.cpp
+++ b/test/testconcaturl.cpp
@@ -14,7 +14,7 @@
using namespace OCC;
-typedef QList< QPair<QString,QString> > QueryItems;
+using QueryItems = QList<QPair<QString, QString>>;
Q_DECLARE_METATYPE(QueryItems)
diff --git a/test/testnextcloudpropagator.cpp b/test/testnextcloudpropagator.cpp
index 443d3a430..954c665f5 100644
--- a/test/testnextcloudpropagator.cpp
+++ b/test/testnextcloudpropagator.cpp
@@ -65,7 +65,7 @@ private slots:
void testParseEtag()
{
- typedef QPair<const char*, const char*> Test;
+ using Test = QPair<const char*, const char*>;
QList<Test> tests;
tests.append(Test("\"abcd\"", "abcd"));
tests.append(Test("\"\"", ""));
diff --git a/test/testsyncjournaldb.cpp b/test/testsyncjournaldb.cpp
index 75df2cf51..61f00fffd 100644
--- a/test/testsyncjournaldb.cpp
+++ b/test/testsyncjournaldb.cpp
@@ -130,7 +130,7 @@ private slots:
void testDownloadInfo()
{
- typedef SyncJournalDb::DownloadInfo Info;
+ using Info = SyncJournalDb::DownloadInfo;
Info record = _db.getDownloadInfo("nonexistant");
QVERIFY(!record._valid);