Changeset View
Changeset View
Standalone View
Standalone View
menuinfo.cpp
Show All 16 Lines | |||||
17 | * | 17 | * | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "menuinfo.h" | 20 | #include "menuinfo.h" | ||
21 | 21 | | |||
22 | #include <QRegExp> | 22 | #include <QRegExp> | ||
23 | 23 | | |||
24 | #include <KDesktopFile> | 24 | #include <KDesktopFile> | ||
25 | #include <KStandardDirs> | 25 | | ||
26 | #include <KConfigGroup> | 26 | #include <KConfigGroup> | ||
27 | #include <QStandardPaths> | ||||
27 | 28 | | |||
28 | #include "menufile.h" | 29 | #include "menufile.h" | ||
29 | #ifdef WITH_HOTKEYS | 30 | #ifdef WITH_HOTKEYS | ||
30 | #include "khotkeys.h" | 31 | #include "khotkeys.h" | ||
31 | #endif | 32 | #endif | ||
32 | 33 | | |||
33 | // | 34 | // | ||
34 | // MenuFolderInfo | 35 | // MenuFolderInfo | ||
▲ Show 20 Lines • Show All 266 Lines • ▼ Show 20 Line(s) | |||||
301 | void MenuEntryInfo::setDirty() | 302 | void MenuEntryInfo::setDirty() | ||
302 | { | 303 | { | ||
303 | if (dirty) { | 304 | if (dirty) { | ||
304 | return; | 305 | return; | ||
305 | } | 306 | } | ||
306 | 307 | | |||
307 | dirty = true; | 308 | dirty = true; | ||
308 | 309 | | |||
309 | QString local = KStandardDirs::locateLocal("xdgdata-apps", service->menuId()); | 310 | QString local = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + QLatin1Char('/') + service->menuId(); | ||
310 | if (local != service->entryPath()) { | 311 | if (local != service->entryPath()) { | ||
311 | KDesktopFile *oldDf = desktopFile(); | 312 | KDesktopFile *oldDf = desktopFile(); | ||
312 | m_desktopFile = oldDf->copyTo(local); | 313 | m_desktopFile = oldDf->copyTo(local); | ||
313 | delete oldDf; | 314 | delete oldDf; | ||
314 | } | 315 | } | ||
315 | } | 316 | } | ||
316 | 317 | | |||
317 | bool MenuEntryInfo::needInsertion() | 318 | bool MenuEntryInfo::needInsertion() | ||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |