Package: kde4libs / 4:4.14.2-5+deb8u2

default_kde4_xdg_menu_prefix.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
 kded/CMakeLists.txt   |    2 +-
 kded/vfolder_menu.cpp |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

Index: kde4libs/kded/CMakeLists.txt
===================================================================
--- kde4libs.orig/kded/CMakeLists.txt	2014-02-05 14:54:26.195883775 +0100
+++ kde4libs/kded/CMakeLists.txt	2014-02-05 14:54:26.195883775 +0100
@@ -74,7 +74,7 @@
 if (WIN32)
 install( FILES applications.menu  DESTINATION  ${SHARE_INSTALL_PREFIX}/xdg/menus )
 else (WIN32)
-install( FILES applications.menu  DESTINATION  ${SYSCONF_INSTALL_DIR}/xdg/menus )
+install( FILES applications.menu  DESTINATION  ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde4-applications.menu )
 endif (WIN32)
 install( FILES kdedmodule.desktop DESTINATION  ${SERVICETYPES_INSTALL_DIR} )
 install( FILES kded.upd           DESTINATION  ${DATA_INSTALL_DIR}/kconf_update )
Index: kde4libs/kded/vfolder_menu.cpp
===================================================================
--- kde4libs.orig/kded/vfolder_menu.cpp	2014-02-05 14:54:26.195883775 +0100
+++ kde4libs/kded/vfolder_menu.cpp	2014-02-05 14:54:26.195883775 +0100
@@ -774,8 +774,10 @@
    QString result;
 
    QString xdgMenuPrefix = QString::fromLocal8Bit(qgetenv("XDG_MENU_PREFIX"));
-   if (!xdgMenuPrefix.isEmpty())
-   {
+   // enforce kde4 prefix unless XDG_MENU_PREFIX is set (LP: #297195)
+   if (xdgMenuPrefix.isEmpty())
+      xdgMenuPrefix = QString("kde4-");
+
       QFileInfo fileInfo(fileName);
 
       QString fileNameOnly = fileInfo.fileName();
@@ -785,7 +787,6 @@
       QString baseName = QDir::cleanPath(m_docInfo.baseDir +
                                          fileInfo.path() + '/' + fileNameOnly);
       result = KStandardDirs::locate("xdgconf-menu", baseName);
-   }
 
    if (result.isEmpty())
    {