Commit 6d88fa2c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify + use std::as_const here

parent 47a5f840
......@@ -77,7 +77,8 @@ endif()
configure_file(config-audiocd.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-audiocd.h)
#############################
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
......
......@@ -1004,7 +1004,7 @@ void AudioCDProtocol::paranoiaRead(struct cdrom_drive *drive,
qCDebug(AUDIOCD_KIO_LOG) << "Encoder processing error, stopping.";
ok = false;
QString errMsg = i18n("Could not read %1: encoding failed", fileName);
QString details = encoder->lastErrorMessage();
const QString details = encoder->lastErrorMessage();
if (!details.isEmpty())
errMsg += QLatin1Char('\n') + details;
error(ERR_SLAVE_DEFINED, errMsg);
......
......@@ -54,7 +54,7 @@ KAudiocdModule::KAudiocdModule(QWidget *parent, const QVariantList &lst)
QList<AudioCDEncoder *> encoders;
AudioCDEncoder::findAllPlugins(nullptr, encoders);
for (AudioCDEncoder *encoder : qAsConst(encoders)) {
for (AudioCDEncoder *encoder : std::as_const(encoders)) {
if (encoder->init()) {
KConfigSkeleton *config = nullptr;
QWidget *widget = encoder->getConfigureWidget(&config);
......
......@@ -64,7 +64,7 @@ void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, QList<AudioCDEncoder
dir.setFilter(QDir::Files);
const QFileInfoList files = dir.entryInfoList();
for (const QFileInfo &fi : qAsConst(files)) {
for (const QFileInfo &fi : std::as_const(files)) {
if (fi.fileName().contains(QRegularExpression(QStringLiteral("^libaudiocd_encoder_.*.so$")))) {
QString fileName = fi.baseName();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment