Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: Fix deprecation warnings when building with Qt 6.8.0 #7584

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0b76e35
Replace all uses of qAsConst with std::as_const
claucambra Nov 28, 2024
24933eb
Ensure use of QMessageBox-using QMessageBox::critical
claucambra Nov 28, 2024
d978b1f
Replace use of deprecated QLibraryInfo::location with QLibraryInfo::path
claucambra Nov 28, 2024
58971d5
Replace use of itemDelegate with itemDelegateForIndex
claucambra Nov 28, 2024
ec1ac85
Replace use of QCheckBox::stateChanged with QCheckBox::checkStateChanged
claucambra Nov 28, 2024
9d86dbb
Use QTimeZone::UTC instead of Qt::UTC
claucambra Nov 28, 2024
313a8a3
Remove unneeded take from systray
claucambra Nov 28, 2024
bacdf99
Do not use const char * to add data to crypto hash
claucambra Nov 28, 2024
2a2a816
Replace deprecated QVariant types with QMetaType
claucambra Nov 28, 2024
dabe041
Use char16_t cast instead of ushort cast
claucambra Nov 28, 2024
25ac0b6
Use unique_ptr over scoped pointer
claucambra Nov 28, 2024
6fc2d3b
Use matchView instead of match
claucambra Nov 28, 2024
72e7825
Use std::prev ove -1ing the iterator
claucambra Nov 28, 2024
0f11964
Replace QWebSocket::error with errorOccurred
claucambra Nov 28, 2024
04842ba
Use QDomDocument content method returning ParseResult
claucambra Nov 28, 2024
445352b
Move pinned Qt and Craft cache versions to 6.8.0 and 24.12 respectively
claucambra Nov 28, 2024
34c12bc
Use default downloaddir for craft
claucambra Nov 28, 2024
f07b120
use CI images with Qt 6.8.0
mgallien Dec 3, 2024
b118b80
Replace aAsConst with std::as_const in tests
claucambra Dec 5, 2024
3356d77
Use non-deprecated qChecksum in qtlocalpeer of qtsingleapplication
claucambra Dec 5, 2024
beeca9a
Use QTimeZone in startOfDay for QDate in tests
claucambra Dec 5, 2024
92eb18a
Use std::next rather than adding to iterator in tests
claucambra Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
jobs:
clang-tidy:
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Prepare compile_commands.json
run: |
cmake -G Ninja -B build -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DQT_MAJOR_VERSION=6 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake -G Ninja -B build -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DQT_MAJOR_VERSION=6 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DOPENSSL_ROOT_DIR=/usr/local/lib64
cd build && ninja
- name: Create results directory
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
build:
name: Linux Appimage Package
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-appimage-qt6:client-appimage-6.7.3-1
container: ghcr.io/nextcloud/continuous-integration-client-appimage-qt6:client-appimage-6.8.0-1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Configure, compile and package
run: |
BUILDNR=${GITHUB_RUN_ID} VERSION_SUFFIX=${GITHUB_HEAD_REF} BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=`pwd` EXECUTABLE_NAME=nextcloud QT_BASE_DIR=/opt/qt6.7.3 OPENSSL_ROOT_DIR=/usr/local/lib64 /bin/bash -c "./admin/linux/build-appimage.sh"
BUILDNR=${GITHUB_RUN_ID} VERSION_SUFFIX=${GITHUB_HEAD_REF} BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=`pwd` EXECUTABLE_NAME=nextcloud QT_BASE_DIR=/opt/qt6.8.0 OPENSSL_ROOT_DIR=/usr/local/lib64 /bin/bash -c "./admin/linux/build-appimage.sh"
BUILDNR=${GITHUB_RUN_ID} VERSION_SUFFIX=${GITHUB_HEAD_REF} DESKTOP_CLIENT_ROOT=`pwd` /bin/bash -c "./admin/linux/upload-appimage.sh" || echo "Upload failed, however this is an optional step."
4 changes: 2 additions & 2 deletions .github/workflows/linux-clang-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: Linux Clang compilation and tests
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-gcc-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: Linux GCC compilation and tests
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: SonarCloud analysis
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DQT_MAJOR_VERSION=6 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DBUILD_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DQT_MAJOR_VERSION=6 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DBUILD_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja
- name: Run tests
run: |
Expand Down
5 changes: 2 additions & 3 deletions craftmaster.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ Compile/BuildType = RelWithDebInfo

Compile/UseNinja = True

Paths/downloaddir = ${Variables:Root}\downloads
ShortPath/Enabled = False
ShortPath/EnableJunctions = False

Packager/RepositoryUrl = https://files.kde.org/craft/Qt6
Packager/PackageType = NullsoftInstallerPackager
Packager/CacheVersion = 24.08
Packager/CacheVersion = 24.12

ContinuousIntegration/Enabled = True

Expand All @@ -42,7 +41,7 @@ Packager/CacheDir = ${Variables:Root}\cache
[BlueprintSettings]
nextcloud-client.buildTests = True
binary/mysql.useMariaDB = False
libs/qt6.version = 6.7.2
libs/qt6.version = 6.8.0

[windows-msvc2022_64-cl]
QtSDK/Compiler = msvc2022_64
Expand Down
2 changes: 1 addition & 1 deletion src/3rdparty/kmessagewidget/kmessagewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void KMessageWidgetPrivate::createLayout()
layout->addWidget(iconLabel);
layout->addWidget(textLabel);

for (QToolButton *button : qAsConst(buttons)) {
for (QToolButton *button : std::as_const(buttons)) {
layout->addWidget(button);
}

Expand Down
4 changes: 2 additions & 2 deletions src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ static const char ack[] = "ack";

QString QtLocalPeer::appSessionId(const QString &appId)
{
QByteArray idc = appId.toUtf8();
quint16 idNum = qChecksum(idc.constData(), idc.size());
const auto idc = appId.toUtf8();
const auto idNum = qChecksum(idc);
//### could do: two 16bit checksums over separate halves of id, for a 32bit result - improved uniqeness probability. Every-other-char split would be best.

QString res = QLatin1String("qtsingleapplication-")
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/simplesslerrorhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "common/utility.h"

Check failure on line 14 in src/cmd/simplesslerrorhandler.cpp

View workflow job for this annotation

GitHub Actions / build

src/cmd/simplesslerrorhandler.cpp:14:10 [clang-diagnostic-error]

'common/utility.h' file not found
#include "account.h"
#include "simplesslerrorhandler.h"

Expand All @@ -27,15 +27,15 @@
}

if (account->trustCertificates()) {
for (const auto &error : qAsConst(errors)) {
for (const auto &error : std::as_const(errors)) {
certs->append(error.certificate());
}
return true;
}

bool allTrusted = true;

for (const auto &error : qAsConst(errors)) {
for (const auto &error : std::as_const(errors)) {
if (!account->approvedCerts().contains(error.certificate())) {
allTrusted = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/checksumcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ bool ChecksumCalculator::addChunk(const QByteArray &chunk, const qint64 size)
} else {
Q_ASSERT(_cryptographicHash);
if (_cryptographicHash) {
_cryptographicHash->addData(chunk.data(), size);
_cryptographicHash->addData(chunk);
return true;
}
}
Expand Down
36 changes: 10 additions & 26 deletions src/common/ownsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <QDateTime>

Check failure on line 19 in src/common/ownsql.cpp

View workflow job for this annotation

GitHub Actions / build

src/common/ownsql.cpp:19:10 [clang-diagnostic-error]

'QDateTime' file not found
#include <QLoggingCategory>
#include <QString>
#include <QFile>
Expand Down Expand Up @@ -364,34 +364,24 @@
return;
}

switch (value.type()) {
case QVariant::Int:
case QVariant::Bool:
const auto metatype = value.metaType();
if (metatype == QMetaType(QMetaType::Int) || metatype == QMetaType(QMetaType::Bool)) {
res = sqlite3_bind_int(_stmt, pos, value.toInt());
break;
case QVariant::Double:
} else if (metatype == QMetaType(QMetaType::Double)) {
res = sqlite3_bind_double(_stmt, pos, value.toDouble());
break;
case QVariant::UInt:
case QVariant::LongLong:
case QVariant::ULongLong:
} else if (metatype == QMetaType(QMetaType::UInt) || metatype == QMetaType(QMetaType::LongLong) || metatype == QMetaType(QMetaType::ULongLong)) {
res = sqlite3_bind_int64(_stmt, pos, value.toLongLong());
break;
case QVariant::DateTime: {
} else if (metatype == QMetaType(QMetaType::QDateTime)) {
const QDateTime dateTime = value.toDateTime();
const QString str = dateTime.toString(QStringLiteral("yyyy-MM-ddThh:mm:ss.zzz"));
res = sqlite3_bind_text16(_stmt, pos, str.utf16(),
str.size() * static_cast<int>(sizeof(ushort)), SQLITE_TRANSIENT);
break;
}
case QVariant::Time: {
} else if (metatype == QMetaType(QMetaType::QTime)) {
const QTime time = value.toTime();
const QString str = time.toString(QStringLiteral("hh:mm:ss.zzz"));
res = sqlite3_bind_text16(_stmt, pos, str.utf16(),
str.size() * static_cast<int>(sizeof(ushort)), SQLITE_TRANSIENT);
break;
}
case QVariant::String: {
} else if (metatype == QMetaType(QMetaType::QString)) {
if (!value.toString().isNull()) {
// lifetime of string == lifetime of its qvariant
const auto *str = static_cast<const QString *>(value.constData());
Expand All @@ -400,20 +390,14 @@
} else {
res = sqlite3_bind_null(_stmt, pos);
}
break;
}
case QVariant::ByteArray: {
} else if (metatype == QMetaType(QMetaType::QByteArray)) {
auto ba = value.toByteArray();
res = sqlite3_bind_text(_stmt, pos, ba.constData(), ba.size(), SQLITE_TRANSIENT);
break;
}
default: {
} else {
QString str = value.toString();
// SQLITE_TRANSIENT makes sure that sqlite buffers the data
res = sqlite3_bind_text16(_stmt, pos, str.utf16(),
(str.size()) * static_cast<int>(sizeof(QChar)), SQLITE_TRANSIENT);
break;
}
}
if (res != SQLITE_OK) {
qCWarning(lcSql) << "ERROR binding SQL value:" << value << "error:" << res;
Expand All @@ -428,7 +412,7 @@

QString SqlQuery::stringValue(int index)
{
return QString::fromUtf16(static_cast<const ushort *>(sqlite3_column_text16(_stmt, index)));
return QString::fromUtf16(static_cast<const char16_t *>(sqlite3_column_text16(_stmt, index)));
}

int SqlQuery::intValue(int index)
Expand Down
4 changes: 2 additions & 2 deletions src/csync/csync_exclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "config_csync.h"

Check failure on line 21 in src/csync/csync_exclude.cpp

View workflow job for this annotation

GitHub Actions / build

src/csync/csync_exclude.cpp:21:10 [clang-diagnostic-error]

'config_csync.h' file not found
#include <qglobal.h>

#ifndef _GNU_SOURCE
Expand Down Expand Up @@ -461,10 +461,10 @@
QRegularExpressionMatch m;
if (filetype == ItemTypeDirectory
&& _bnameTraversalRegexDir.contains(basePath)) {
m = _bnameTraversalRegexDir[basePath].match(bnameStr);
m = _bnameTraversalRegexDir[basePath].matchView(bnameStr);
} else if (filetype == ItemTypeFile
&& _bnameTraversalRegexFile.contains(basePath)) {
m = _bnameTraversalRegexFile[basePath].match(bnameStr);
m = _bnameTraversalRegexFile[basePath].matchView(bnameStr);
} else {
continue;
}
Expand Down
5 changes: 2 additions & 3 deletions src/csync/vio/csync_vio_local_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include <memory>

#include "c_private.h"

Check failure on line 31 in src/csync/vio/csync_vio_local_unix.cpp

View workflow job for this annotation

GitHub Actions / build

src/csync/vio/csync_vio_local_unix.cpp:31:10 [clang-diagnostic-error]

'c_private.h' file not found
#include "c_lib.h"
#include "csync.h"

Expand All @@ -52,8 +52,7 @@
static int _csync_vio_local_stat_mb(const mbchar_t *wuri, csync_file_stat_t *buf);

csync_vio_handle_t *csync_vio_local_opendir(const QString &name) {
QScopedPointer<csync_vio_handle_t> handle(new csync_vio_handle_t{});

auto handle = std::make_unique<csync_vio_handle_t>();
auto dirname = QFile::encodeName(name);

handle->dh = _topendir(dirname.constData());
Expand All @@ -62,7 +61,7 @@
}

handle->path = dirname;
return handle.take();
return handle.release();
}

int csync_vio_local_closedir(csync_vio_handle_t *dhandle) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void AccountManager::save(bool saveCredentials)
{
const auto settings = ConfigFile::settingsWithGroup(QLatin1String(accountsC));
settings->setValue(QLatin1String(versionC), maxAccountsVersion);
for (const auto &acc : qAsConst(_accounts)) {
for (const auto &acc : std::as_const(_accounts)) {
settings->beginGroup(acc->account()->id());
saveAccountHelper(acc->account().data(), *settings, saveCredentials);
settings->endGroup();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void AccountSettings::slotFolderListClicked(const QModelIndex &indx)
QStyleOptionViewItem opt;
opt.initFrom(treeView);
const auto btnRect = treeView->visualRect(indx);
const auto btnSize = treeView->itemDelegate(indx)->sizeHint(opt, indx);
const auto btnSize = treeView->itemDelegateForIndex(indx)->sizeHint(opt, indx);
const auto actual = QStyle::visualRect(opt.direction, btnRect, QRect(btnRect.topLeft(), btnSize));
if (!actual.contains(pos)) {
return;
Expand Down
7 changes: 4 additions & 3 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check notice on line 1 in src/gui/application.cpp

View workflow job for this annotation

GitHub Actions / build

Run clang-format on src/gui/application.cpp

File src/gui/application.cpp does not conform to Custom style guidelines. (lines 591)
* Copyright (C) by Duncan Mac-Vicar P. <[email protected]>
* Copyright (C) by Klaas Freitag <[email protected]>
* Copyright (C) by Daniel Molkentin <[email protected]>
Expand Down Expand Up @@ -199,7 +199,7 @@
settings->endGroup();

// Wipe confusing keys from the future, ignore the others
for (const auto &badKey : qAsConst(deleteKeys)) {
for (const auto &badKey : std::as_const(deleteKeys)) {
settings->remove(badKey);
}
}
Expand Down Expand Up @@ -588,7 +588,8 @@
tr("There was an error while accessing the configuration "
"file at %1. Please make sure the file can be accessed by your system account.")
.arg(ConfigFile().configFile()),
tr("Quit %1").arg(Theme::instance()->appNameGUI()));
QMessageBox::Ok
);
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
}
Expand Down Expand Up @@ -1002,7 +1003,7 @@
// have a translation file provided.
qCInfo(lcApplication) << "Using" << lang << "translation";
setProperty("ui_lang", lang);
const QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString qtTrPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath);
const QString qtTrFile = QLatin1String("qt_") + lang;
const QString qtBaseTrFile = QLatin1String("qtbase_") + lang;
if (!qtTranslator->load(qtTrFile, qtTrPath)) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editlocallyjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ void EditLocallyJob::lockFile(const QString &etag)

void EditLocallyJob::disconnectFolderSignals()
{
for (const auto &connection : qAsConst(_folderConnections)) {
for (const auto &connection : std::as_const(_folderConnections)) {
disconnect(connection);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editlocallymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void EditLocallyManager::showError(const QString &message, const QString &inform
void EditLocallyManager::showErrorNotification(const QString &message,
const QString &informativeText)
{
Systray::instance()->showMessage(message, informativeText, Systray::MessageIcon::Critical);
Systray::instance()->showMessage(message, informativeText, Systray::MessageIcon::Critical);
}

void EditLocallyManager::showErrorMessageBox(const QString &message,
Expand Down
4 changes: 2 additions & 2 deletions src/gui/filedetails/sharemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ void ShareModel::handlePlaceholderLinkShare()
auto linkSharePresent = false;
auto placeholderLinkSharePresent = false;

for (const auto &share : qAsConst(_shares)) {
for (const auto &share : std::as_const(_shares)) {
const auto shareType = share->getShareType();

if (!linkSharePresent && shareType == Share::TypeLink) {
Expand Down Expand Up @@ -415,7 +415,7 @@ void ShareModel::handleSecureFileDropLinkShare()
auto linkSharePresent = false;
auto secureFileDropLinkSharePresent = false;

for (const auto &share : qAsConst(_shares)) {
for (const auto &share : std::as_const(_shares)) {
const auto shareType = share->getShareType();

if (!linkSharePresent && shareType == Share::TypeLink) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "common/syncjournaldb.h"

Check failure on line 16 in src/gui/folder.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/folder.cpp:16:10 [clang-diagnostic-error]

'common/syncjournaldb.h' file not found
#include "config.h"

#include "account.h"
Expand Down Expand Up @@ -1760,7 +1760,7 @@
const auto existingBlacklistSet = QSet<QString>{existingBlacklist.begin(), existingBlacklist.end()};
auto expandedBlacklistSet = QSet<QString>{existingBlacklist.begin(), existingBlacklist.end()};

for (const auto &path : qAsConst(e2eFoldersToBlacklist)) {
for (const auto &path : std::as_const(e2eFoldersToBlacklist)) {
expandedBlacklistSet.insert(path);
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/foldercreationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void FolderCreationDialog::accept()
if (QDir(_destination).mkdir(ui->newFolderNameEdit->text())) {
Q_EMIT folderCreated(fullPath);
} else {
QMessageBox::critical(this, tr("Error"), tr("Could not create a folder! Check your write permissions."));
QMessageBox::critical(this, tr("Error"), tr("Could not create a folder! Check your write permissions."), QMessageBox::Ok);
}

QDialog::accept();
Expand Down
Loading
Loading