From kde-commits Fri Jul 09 20:04:17 2004 From: Frans Englich Date: Fri, 09 Jul 2004 20:04:17 +0000 To: kde-commits Subject: new_kcm_code: kdelibs/kcmshell Message-Id: <20040709200417.70EC616B29 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108940352729716 CVS commit by englich: Small changes. With the new KCM code in the new_kcm_code branch, I cannot think of any more large changes or feature additions, except an API cleanup and refactoring in KDE 4. The branch have been bugfree/stable for a month or so(rather, the code I am comitting). What a shame, it should have been in KDE 3.3. M +2 -0 Makefile.am 1.2.2.2 M +9 -5 main.cpp 1.75.2.2 M +1 -1 main.h 1.2.2.2 --- kdelibs/kcmshell/Makefile.am #1.2.2.1:1.2.2.2 @@ -2,4 +2,5 @@ # Copyright (c) 1999 Matthias Hoelzer-Kluepfel # Copyright (c) 2000 Matthias Elter +# Copyright (c) 2004 Frans Englich # # This program is free software; you can redistribute it and/or modify @@ -28,2 +29,3 @@ messages: rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kcmshell.pot + --- kdelibs/kcmshell/main.cpp #1.75.2.1:1.75.2.2 @@ -37,4 +37,5 @@ #include #include +#include #include #include @@ -102,9 +103,12 @@ static KService::Ptr locateModule(const return 0; + if(!KCModuleLoader::testModule( module )) + return 0; + return service; } void -kcmApplication::setDCOPName(const QCString &dcopName) +KCMShell::setDCOPName(const QCString &dcopName) { m_dcopName = "kcmshell_"+dcopName; @@ -113,5 +117,5 @@ kcmApplication::setDCOPName(const QCStri bool -kcmApplication::isRunning() +KCMShell::isRunning() { if (dcopClient()->appId() == m_dcopName) @@ -135,5 +139,5 @@ kcmApplication::isRunning() void -kcmApplication::waitForExit() +KCMShell::waitForExit() { connect(dcopClient(), SIGNAL(applicationRemoved(const QCString&)), @@ -143,5 +147,5 @@ kcmApplication::waitForExit() void -kcmApplication::slotAppExit(const QCString &appId) +KCMShell::slotAppExit(const QCString &appId) { if (appId == m_dcopName) @@ -183,5 +187,5 @@ extern "C" int kdemain(int _argc, char * KCmdLineArgs::init(_argc, _argv, &aboutData); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. - kcmApplication app; + KCMShell app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); --- kdelibs/kcmshell/main.h #1.2.2.1:1.2.2.2 @@ -24,5 +24,5 @@ #include -class kcmApplication : public KApplication +class KCMShell : public KApplication { Q_OBJECT