diff --git a/.clang-tidy b/.clang-tidy index 9c41a78db..5d611df00 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,6 +3,7 @@ Checks: '-*, modernize-make-shared, modernize-redundant-void-arg, modernize-replace-*, + modernize-return-braced-init-list, modernize-shrink-to-fit, modernize-use-auto, modernize-use-bool-literals, diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 35bcd85e1..75838fbb1 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -483,7 +483,7 @@ QModelIndex FolderStatusModel::index(int row, int column, const QModelIndex &par return {}; case RootFolder: if (_folders.count() <= parent.row()) - return QModelIndex(); // should not happen + return {}; // should not happen return createIndex(row, column, const_cast(&_folders[parent.row()])); case SubFolder: { auto pinfo = static_cast(parent.internalPointer()); diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 928a0fbd0..380a69659 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -57,7 +57,7 @@ public: bool checkAccountExists(bool openSettings); static void raiseDialog(QWidget *raiseWidget); - static QSize settingsDialogSize() { return QSize(800, 500); } + static QSize settingsDialogSize() { return {800, 500}; } void setupOverlayIcons(); #ifdef WITH_LIBCLOUDPROVIDERS void setupCloudProviders();