Port away from deprecated KIO/KCM functions
Updated plugins/share/shareplugin.cpp: - KFileUtils::suggestName() is a drop-in replacement as of 5.64, just moved to another library Updated plugins/findthisdevice/findthisdevice_config.cpp: - KCModule::markAsChanged() is likewise as of 5.64 Signed-off-by: Peter J. Mello <admin@petermello.net>
This commit is contained in:
parent
a47fbe7215
commit
bc3c7567a7
2 changed files with 3 additions and 2 deletions
|
@ -49,7 +49,7 @@ FindThisDeviceConfig::FindThisDeviceConfig(QWidget* parent, const QVariantList&
|
|||
connect(m_ui->playSoundButton, &QToolButton::clicked,
|
||||
this, &FindThisDeviceConfig::playSound);
|
||||
connect(m_ui->soundFileRequester, &KUrlRequester::textChanged,
|
||||
this, QOverload<>::of(&FindThisDeviceConfig::changed));
|
||||
this, &FindThisDeviceConfig::markAsChanged);
|
||||
}
|
||||
|
||||
FindThisDeviceConfig::~FindThisDeviceConfig()
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <KIO/Job>
|
||||
#include <KIO/MkpathJob>
|
||||
#include <KMimeTypeTrader>
|
||||
#include <KFileUtils>
|
||||
|
||||
#include "core/filetransferjob.h"
|
||||
#include "core/daemon.h"
|
||||
|
@ -73,7 +74,7 @@ QUrl SharePlugin::getFileDestination(const QString filename) const
|
|||
QUrl destination(dir);
|
||||
destination.setPath(dir.path() + QStringLiteral("/") + filename, QUrl::DecodedMode);
|
||||
if (destination.isLocalFile() && QFile::exists(destination.toLocalFile())) {
|
||||
destination.setPath(dir.path() + QStringLiteral("/") + KIO::suggestName(dir, filename), QUrl::DecodedMode);
|
||||
destination.setPath(dir.path() + QStringLiteral("/") + KFileUtils::suggestName(dir, filename), QUrl::DecodedMode);
|
||||
}
|
||||
return destination;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue