Commit 3514becc authored by Méven Car's avatar Méven Car Committed by Méven Car
Browse files

kcm_keys: clean copying of desktop files to kglobalaccel data dir

CCBUG: 421329
parent 5837d769
......@@ -174,8 +174,6 @@ void KCMKeys::addApplication(QQuickItem *ctx)
const KService::Ptr service = dialog->service();
const QString desktopFileName = service->desktopEntryName() + ".desktop";
if (m_shortcutsModel->match(m_shortcutsModel->index(0, 0), ShortcutsModel::ComponentRole, desktopFileName).isEmpty()) {
const QString destination = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kglobalaccel/";
QFile::copy(service->entryPath(), destination + desktopFileName);
m_shortcutsModel->addApplication(desktopFileName, service->name());
} else {
qCDebug(KCMKEYS) << "Already have component" << service->storageId();
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