[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.3/kdeplasma-addons/applets/lancelot
From: Ivan Čukić <ivan.cukic+kde () gmail ! com>
Date: 2009-09-25 17:04:33
Message-ID: 1253898273.858178.8201.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1028050 by ivan:
fixed bug 208400
M +2 -2 app/src/models/Applications.cpp
M +9 -7 libs/lancelot/widgets/BasicWidget.cpp
--- branches/KDE/4.3/kdeplasma-addons/applets/lancelot/app/src/models/Applications.cpp \
#1028049:1028050 @@ -89,7 +89,7 @@
continue;
data.icon = KIcon(service->icon());
- data.name = service->name();
+ data.name = service->name().replace("&", "&&");
data.description = service->genericName();
data.desktopFile = service->entryPath();
@@ -112,7 +112,7 @@
if (!found) {
m_submodels.append(new Applications(
serviceGroup->relPath(),
- serviceGroup->caption(),
+ serviceGroup->caption().replace("&", "&&"),
KIcon(serviceGroup->icon())
));
} else {
--- branches/KDE/4.3/kdeplasma-addons/applets/lancelot/libs/lancelot/widgets/BasicWidget.cpp \
#1028049:1028050 @@ -68,21 +68,22 @@
parent->setGroupByName("BasicWidget");
}
- int shortcutPosition(const QString & text)
+ int shortcutPosition(QString & text)
{
Q_UNUSED(text);
int index = 0;
- while ((index = title.indexOf('&', index)) != -1) {
- if (index == title.size() - 1) {
+ while ((index = text.indexOf('&', index)) != -1) {
+ if (index == text.size() - 1) {
return -1;
}
- if (title.at(index + 1) != '&') {
+ if (text.at(index + 1) != '&') {
return index + 1;
}
- index += 2;
+ index++;
+ text.remove(index, 1);
}
return -1;
}
@@ -415,10 +416,11 @@
return d->iconInSvg;
}
-void BasicWidget::setTitle(const QString & title)
+void BasicWidget::setTitle(const QString & value)
{
- d->title = title;
+ d->title = value;
+ QString title(value);
int pos = d->shortcutPosition(title);
if (pos > -1) {
setShortcutKey(title.at(pos));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic