mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kded: message filter micro-optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
abc282545a
commit
d712c60cd1
1 changed files with 3 additions and 2 deletions
|
@ -57,6 +57,7 @@
|
|||
#define KDED_EXENAME "kded4"
|
||||
|
||||
#define MODULES_PATH "/modules/"
|
||||
#define MODULES_PATH_SIZE 9
|
||||
|
||||
Kded *Kded::_self = 0;
|
||||
|
||||
|
@ -172,12 +173,12 @@ void Kded::messageFilter(const QDBusMessage &message)
|
|||
}
|
||||
|
||||
QString obj = message.path();
|
||||
if (!obj.startsWith(MODULES_PATH)) {
|
||||
if (!obj.startsWith(QLatin1String(MODULES_PATH))) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the <MODULES_PATH> part
|
||||
obj = obj.mid(strlen(MODULES_PATH));
|
||||
obj = obj.mid(MODULES_PATH_SIZE);
|
||||
|
||||
// Remove the part after the modules name
|
||||
int index = obj.indexOf('/');
|
||||
|
|
Loading…
Add table
Reference in a new issue