diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ include(FeatureSummary) set(QT_MIN_VERSION "5.8.0") -set(KF5_MIN_VERSION "5.48.0") +set(KF5_MIN_VERSION "5.64.0") find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS DBus Network Widgets Svg) find_package(Qt5Test ${QT_MIN_VERSION} CONFIG QUIET) diff --git a/nfs/nfsv2.cpp b/nfs/nfsv2.cpp --- a/nfs/nfsv2.cpp +++ b/nfs/nfsv2.cpp @@ -862,7 +862,7 @@ const QString partFilePath = destPath + QLatin1String(".part"); const NFSFileHandle partFH = getFileHandle(partFilePath); const bool bPartExists = !partFH.isInvalid(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bPartExists) { int rpcStatus; @@ -992,7 +992,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep size. - const unsigned int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const unsigned int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (writeArgs.offset < size) { if (!remove(partFilePath)) { qCDebug(LOG_KIO_NFS) << "Could not remove part file, ignoring..."; @@ -1077,7 +1077,7 @@ bool bResume = false; const QFileInfo partInfo(destPath + QLatin1String(".part")); const bool bPartExists = partInfo.exists(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bMarkPartial && bPartExists && partInfo.size() > 0) { if (partInfo.isDir()) { @@ -1195,7 +1195,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep - const int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (partInfo.size() < size) { QFile::remove(partInfo.absoluteFilePath()); } @@ -1277,7 +1277,7 @@ const QString partFilePath = destPath + QLatin1String(".part"); const NFSFileHandle partFH = getFileHandle(partFilePath); const bool bPartExists = !partFH.isInvalid(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bPartExists) { int rpcStatus; @@ -1392,7 +1392,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep size. - const unsigned int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const unsigned int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (writeArgs.offset < size) { if (!remove(partFilePath)) { qCDebug(LOG_KIO_NFS) << "Could not remove part file, ignoring..."; diff --git a/nfs/nfsv3.cpp b/nfs/nfsv3.cpp --- a/nfs/nfsv3.cpp +++ b/nfs/nfsv3.cpp @@ -1107,7 +1107,7 @@ const QString partFilePath = destPath + QLatin1String(".part"); const NFSFileHandle partFH = getFileHandle(partFilePath); const bool bPartExists = !partFH.isInvalid(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bPartExists) { int rpcStatus; @@ -1241,7 +1241,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep size. - const unsigned int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const unsigned int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (writeArgs.offset < size) { if (!remove(partFilePath)) { qCDebug(LOG_KIO_NFS) << "Could not remove part file, ignoring..."; @@ -1333,7 +1333,7 @@ bool bResume = false; const QFileInfo partInfo(destPath + QLatin1String(".part")); const bool bPartExists = partInfo.exists(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bMarkPartial && bPartExists && partInfo.size() > 0) { if (partInfo.isDir()) { @@ -1451,7 +1451,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep - const int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (partInfo.size() < size) { QFile::remove(partInfo.absoluteFilePath()); } @@ -1531,7 +1531,7 @@ const QString partFilePath = destPath + QLatin1String(".part"); const NFSFileHandle partFH = getFileHandle(partFilePath); const bool bPartExists = !partFH.isInvalid(); - const bool bMarkPartial = m_slave->config()->readEntry("MarkPartial", true); + const bool bMarkPartial = m_slave->configValue(QStringLiteral("MarkPartial"), true); if (bPartExists) { int rpcStatus; @@ -1653,7 +1653,7 @@ if (error) { if (bMarkPartial) { // Remove the part file if it's smaller than the minimum keep size. - const unsigned int size = m_slave->config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const unsigned int size = m_slave->configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (writeArgs.offset < size) { if (!remove(partFilePath)) { qCDebug(LOG_KIO_NFS) << "Could not remove part file, ignoring..."; diff --git a/sftp/kio_sftp.cpp b/sftp/kio_sftp.cpp --- a/sftp/kio_sftp.cpp +++ b/sftp/kio_sftp.cpp @@ -1658,7 +1658,7 @@ sftp_attributes sb = sftp_lstat(mSftp, dest_orig_c.constData()); const bool bOrigExists = (sb != nullptr); bool bPartExists = false; - const bool bMarkPartial = config()->readEntry("MarkPartial", true); + const bool bMarkPartial = configValue(QStringLiteral("MarkPartial"), true); // Don't change permissions of the original file if (bOrigExists) { @@ -1808,7 +1808,7 @@ sftp_attributes attr = sftp_stat(mSftp, dest.constData()); if (bMarkPartial && attr != nullptr) { - size_t size = config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + size_t size = configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (attr->size < size) { sftp_unlink(mSftp, dest.constData()); } @@ -1952,7 +1952,7 @@ const QString sPart = sCopyFile + QLatin1String(".part"); // do we have a ".part" file? QFileInfo partFile(sPart); const bool bPartExists = partFile.exists(); - const bool bMarkPartial = config()->readEntry("MarkPartial", true); + const bool bMarkPartial = configValue(QStringLiteral("MarkPartial"), true); const QString dest = (bMarkPartial ? sPart : sCopyFile); if (bMarkPartial && bPartExists && copyFile.size() > 0) { @@ -2022,7 +2022,7 @@ } else{ partFile.refresh(); - const int size = config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const int size = configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (partFile.exists() && partFile.size() < size) { // should a very small ".part" be deleted? QFile::remove(sPart); } diff --git a/smb/kio_smb_dir.cpp b/smb/kio_smb_dir.cpp --- a/smb/kio_smb_dir.cpp +++ b/smb/kio_smb_dir.cpp @@ -251,7 +251,7 @@ bool bResume = false; const QFileInfo partInfo (dstFile + QLatin1String(".part")); const bool bPartExists = partInfo.exists(); - const bool bMarkPartial = config()->readEntry("MarkPartial", true); + const bool bMarkPartial = configValue(QStringLiteral("MarkPartial"), true); if (bMarkPartial && bPartExists && partInfo.size() > 0) { if (partInfo.isDir()) { @@ -389,7 +389,7 @@ if (isErr) { const QString sPart = partInfo.absoluteFilePath(); if (bMarkPartial) { - const int size = config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const int size = configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); if (partInfo.size() < size) { QFile::remove(sPart); } @@ -462,7 +462,7 @@ bool bResume = false; bool bPartExists = false; - const bool bMarkPartial = config()->readEntry("MarkPartial", true); + const bool bMarkPartial = configValue(QStringLiteral("MarkPartial"), true); const SMBUrl dstOrigUrl (kdst); if (bMarkPartial) { @@ -576,7 +576,7 @@ // Handle error condition. if (isErr) { if (bMarkPartial) { - const int size = config()->readEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE); + const int size = configValue(QStringLiteral("MinimumKeepSize"), DEFAULT_MINIMUM_KEEP_SIZE); const int errNum = cache_stat(dstUrl, &st); if (errNum == 0 && st.st_size < size) { smbc_unlink(dstUrl.toSmbcUrl());