[Bug 169710] Keyboard settings not shown in GNOME's keyboard.desktop is present
Luc Menut
Luc.Menut at supagro.inra.fr
Thu Aug 28 21:43:48 BST 2008
http://bugs.kde.org/show_bug.cgi?id=169710
Luc Menut Luc Menut supagro inra fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Luc.Menut at supagro.inra.fr
--- Comment #1 from Luc Menut <Luc Menut supagro inra fr> 2008-08-28 22:43:42 ---
to complete this report, this is a part of the output in console when the bug
appears
...
systemsettings(8725)/kutils (KCModuleInfo) KCModuleInfo::Private::Private:
Could not find the service.
systemsettings(8725) MainWindow::readMenu: " " Looking for children in '
"keyboard-and-mouse" '
systemsettings(8725) MainWindow::readMenu: " " found module ' "Clavier" '
"keyboard.desktop"
>>>>>>>>>>>>>>>>>>>>>
systemsettings(8725) MainWindow::readMenu: " " filename is
"/usr/share/applications/keyboard.desktop"
<<<<<<<<<<<<<<<<<<<<<
findServiceByDesktopPath: not found
systemsettings(8725)/kutils (KCModuleInfo) KCModuleInfo::Private::Private:
Could not find the service.
systemsettings(8725) MainWindow::readMenu: " " found module ' "Souris" '
"mouse.desktop"
systemsettings(8725) MainWindow::readMenu: " " filename is "mouse.desktop"
findServiceByDesktopPath: not found
systemsettings(8725)/kutils (KCModuleInfo) KCModuleInfo::Private::Private:
Could not find the service.
systemsettings(8725) MainWindow::readMenu: " " found module ' "Raccourcis
clavier" ' "keys.desktop"
systemsettings(8725) MainWindow::readMenu: " " filename is "keys.desktop"
...
the problem seems in readMenu from mainwindow.cpp, in this part of the code
118- // scan for any modules at this level and add them
119- for (int i = 0; i < modules.size(); ++i) {
120- KService::Ptr entry = modules.at(i);
121- QString category =
entry->property("X-KDE-System-Settings-Parent-Category").toString();
122- //kDebug() << "Examining module " << category;
123- if(!parent->name.isEmpty() && category == parent->name ) {
124- kDebug() << space << "found module '" << entry->name() << "' "
<< entry->entryPath();
125- // Add the module info to the menu
126: KCModuleInfo module(entry->entryPath());
127- kDebug() << space << "filename is " << module.fileName();
128- //append(module);
129- MenuItem * infoItem = new MenuItem(false, parent);
130- infoItem->name = category;
131- infoItem->service = entry;
132- infoItem->item = module;
133- }
134- }
at line 126 with entry->entryPath()
for entryPath, api says
QString entryPath ( self )
Returns:
the path of this entry The path can be absolute or relative. The
corresponding factory should know relative to what.
It seems that it isn't very safe here, and a wrong path can be used.
It seems me safer to use the ptr entry directly. That fixes this bug for me.
I'm not a kde developper.
Please could you review the patch in attachment, and apply it if it is OK, and
there isn't side effects to use KCModuleInfo module(entry); instead of
KCModuleInfo module(entry->entryPath());
--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list