Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
kdelibs4
patch-r901693.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File patch-r901693.diff of Package kdelibs4
Subject: fix for user-created desktop files not being useable on some distros From: wstephenson@suse.de Bug: kde#178561 Patch-upstream: 901693 --- kded/kbuildsycoca.cpp (revision 901692) +++ kded/kbuildsycoca.cpp (revision 901693) @@ -300,7 +300,7 @@ bool KBuildSycoca::build() g_entryDict = serviceEntryDict; g_changed = false; - g_vfolder = new VFolderMenu; + g_vfolder = new VFolderMenu(g_bsf); if (!m_trackId.isEmpty()) g_vfolder->setTrackId(m_trackId); @@ -387,7 +387,6 @@ void KBuildSycoca::createMenu(const QStr } else { - g_bsf->addEntry( KSycocaEntry::Ptr::staticCast( p ) ); g_bsgf->addNewEntryTo( name, p ); } } --- kded/vfolder_menu.h (revision 901692) +++ kded/vfolder_menu.h (revision 901693) @@ -28,6 +28,8 @@ #include <kservice.h> +class KBuildServiceFactory; + class VFolderMenu : public QObject { Q_OBJECT @@ -51,7 +53,7 @@ public: appsInfo *apps_info; }; - VFolderMenu(); + VFolderMenu(KBuildServiceFactory* serviceFactory); ~VFolderMenu(); /** @@ -82,9 +84,11 @@ public: Q_SIGNALS: /** - Emitted when a service description needs to be completed. + Emitted when a KService for an application needs to be created. \sa parseMenu + + This is a callback for KBuildSycoca. */ void newService(const QString &path, KService::Ptr *entry); @@ -275,6 +279,9 @@ private: QString locateMenuFile(const QString &fileName); QString locateDirectoryFile(const QString &fileName); void loadApplications(const QString&, const QString&); + +private: + KBuildServiceFactory* m_serviceFactory; }; #endif --- kded/vfolder_menu.cpp (revision 901692) +++ kded/vfolder_menu.cpp (revision 901693) @@ -17,6 +17,7 @@ **/ #include "vfolder_menu.h" +#include "kbuildservicefactory.h" #include <sys/types.h> #include <sys/stat.h> @@ -297,7 +298,9 @@ VFolderMenu::insertService(SubMenu *pare } -VFolderMenu::VFolderMenu() : m_track(false) +VFolderMenu::VFolderMenu(KBuildServiceFactory* serviceFactory) : + m_track(false), + m_serviceFactory(serviceFactory) { m_usedAppsDict.reserve(797); m_rootMenu = 0; @@ -347,6 +350,7 @@ VFolderMenu::addApplication(const QStrin { service->setMenuId(id); m_appsInfo->applications.insert(id, service); + m_serviceFactory->addEntry(KSycocaEntry::Ptr::staticCast(service)); } void Index: kded/kbuildsycoca.cpp =================================================================== Index: kded/vfolder_menu.h =================================================================== Index: kded/vfolder_menu.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor