kcminit: log message to specialized area

1208 is reserved for kinfocenter

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-10-22 21:45:40 +03:00
parent bc155644ac
commit 94f09f0f88
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,7 @@
########### next target ###############
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=90250)
add_executable(kcminit main.cpp)
target_link_libraries(kcminit

View file

@ -84,13 +84,13 @@ bool KCMInit::runModule(const QString &libName, KService::Ptr service)
void *init = lib.resolve(kcminit.toUtf8());
if (init) {
// initialize the module
kDebug(1208) << "Initializing " << libName << ": " << kcminit;
kDebug() << "Initializing " << libName << ": " << kcminit;
void (*func)() = (void(*)())init;
func();
return true;
} else {
kDebug(1208) << "Module" << libName << "does not actually have a kcminit function";
kDebug() << "Module" << libName << "does not actually have a kcminit function";
}
}
return false;
@ -170,7 +170,7 @@ KCMInit::KCMInit( KCmdLineArgs* args )
KService::Ptr serv = KService::serviceByStorageId( module );
if ( !serv || serv->library().isEmpty() ) {
kError(1208) << i18n("Module %1 not found", module) << endl;
kError() << i18n("Module %1 not found", module) << endl;
return;
} else
list.append(serv);