diff --git a/includes/CMakeLists.txt b/includes/CMakeLists.txt index a2e169c9..55a2bf00 100644 --- a/includes/CMakeLists.txt +++ b/includes/CMakeLists.txt @@ -288,7 +288,6 @@ install( KServiceAction KServiceGroup KServiceType - KServiceTypeProfile KServiceTypeTrader KSessionManager KSharedConfig diff --git a/includes/KServiceTypeProfile b/includes/KServiceTypeProfile deleted file mode 100644 index 3e9f4192..00000000 --- a/includes/KServiceTypeProfile +++ /dev/null @@ -1 +0,0 @@ -#include "../kservicetypeprofile.h" diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt index 8066819c..042127e9 100644 --- a/kdecore/CMakeLists.txt +++ b/kdecore/CMakeLists.txt @@ -191,7 +191,6 @@ set(kdecore_LIB_SRCS services/kserviceoffer.cpp services/kservicetype.cpp services/kservicetypefactory.cpp - services/kservicetypeprofile.cpp services/kservicetypetrader.cpp services/ktraderparse.cpp services/ktraderparsetree.cpp @@ -397,7 +396,6 @@ install( #services/kservicefactory.h: do not install, internal API services/kservicetype.h #services/kservicetypefactory.h: do not install, internal API - services/kservicetypeprofile.h services/kservicetypetrader.h #services/kserviceoffer.h: do not install, internal API services/kplugininfo.h diff --git a/kdecore/MAINTAINERS b/kdecore/MAINTAINERS index 9c24ebfd..f8c5fe57 100644 --- a/kdecore/MAINTAINERS +++ b/kdecore/MAINTAINERS @@ -122,7 +122,6 @@ services/ David Faure kserviceoffer.cpp kservicetype.cpp kservicetypefactory.cpp - kservicetypeprofile.cpp kservicetypetrader.cpp ktraderparse.cpp ktraderparsetree.cpp diff --git a/kdecore/services/kmimetypetrader.cpp b/kdecore/services/kmimetypetrader.cpp index 564b0966..99a04f0e 100644 --- a/kdecore/services/kmimetypetrader.cpp +++ b/kdecore/services/kmimetypetrader.cpp @@ -19,7 +19,6 @@ #include "kmimetypetrader.h" -#include "kservicetypeprofile.h" #include "kservicetype.h" #include "kservicetypetrader.h" #include "kmimetype.h" diff --git a/kdecore/services/kservicetype.cpp b/kdecore/services/kservicetype.cpp index 0f4bf150..3860292b 100644 --- a/kdecore/services/kservicetype.cpp +++ b/kdecore/services/kservicetype.cpp @@ -23,7 +23,6 @@ #include "kservice.h" #include "kservicetypefactory.h" #include "kservicefactory.h" -#include "kservicetypeprofile.h" #include #include #include diff --git a/kdecore/services/kservicetypefactory.cpp b/kdecore/services/kservicetypefactory.cpp index 0bc6e765..8e87c8ec 100644 --- a/kdecore/services/kservicetypefactory.cpp +++ b/kdecore/services/kservicetypefactory.cpp @@ -20,7 +20,6 @@ #include "ksycoca.h" #include "ksycocatype.h" #include "ksycocadict_p.h" -#include "kservicetypeprofile.h" #include #include @@ -55,7 +54,6 @@ KServiceTypeFactory::KServiceTypeFactory() KServiceTypeFactory::~KServiceTypeFactory() { - KServiceTypeProfile::clearCache(); if (kServiceTypeFactoryInstance) { kServiceTypeFactoryInstance = 0; } diff --git a/kdecore/services/kservicetypeprofile.cpp b/kdecore/services/kservicetypeprofile.cpp deleted file mode 100644 index 86f223fb..00000000 --- a/kdecore/services/kservicetypeprofile.cpp +++ /dev/null @@ -1,241 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Torben Weis - * Copyright (C) 2006 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "kservicetypeprofile.h" -#include "kservicetypeprofile_p.h" -#include -#include "kservice.h" -#include "kservicetype.h" -#include "kservicetypefactory.h" -#include "kservicefactory.h" - -#include -#include -#include -#include - -#include -#include - -// servicetype -> profile -class KServiceTypeProfiles : public QHash -{ -public: - KServiceTypeProfiles() { m_parsed = false; ensureParsed(); } - ~KServiceTypeProfiles() { clear(); } - void clear() { - QMutexLocker lock(&m_mutex); - qDeleteAll( *this ); - QHash::clear(); - m_parsed = false; - } - bool hasProfile(const QString& serviceType) { - QMutexLocker lock(&m_mutex); - ensureParsed(); - return contains(serviceType); - } - void ensureParsed(); // mutex must be locked when calling this - QMutex m_mutex; -private: - bool m_parsed; -}; - - -K_GLOBAL_STATIC(KServiceTypeProfiles, s_serviceTypeProfiles) - -static bool s_configurationMode = false; - -void KServiceTypeProfiles::ensureParsed() -{ - if (m_parsed) - return; - m_parsed = true; - - // Make sure that a KServiceTypeFactory gets created. - (void) KServiceTypeFactory::self(); - - // Read the service type profiles from servicetype_profilerc (new in kde4) - // See writeServiceTypeProfile for a description of the file format. - // ### Since this new format names groups after servicetypes maybe we can even - // avoid doing any init upfront, and just look up the group when asked... - KConfig configFile( QString::fromLatin1("servicetype_profilerc"), KConfig::NoGlobals ); - const QStringList tmpList = configFile.groupList(); - for (QStringList::const_iterator aIt = tmpList.begin(); - aIt != tmpList.end(); ++aIt) { - const QString type = *aIt; - KConfigGroup config(&configFile, type); - const int count = config.readEntry( "NumberOfEntries", 0 ); - KServiceTypeProfileEntry* p = this->value( type, 0 ); - if ( !p ) { - p = new KServiceTypeProfileEntry(); - this->insert( type, p ); - } - - for ( int i = 0; i < count; ++i ) { - const QString num = QString::fromLatin1("Entry") + QString::number(i); - const QString serviceId = config.readEntry( num + QLatin1String("_Service"), QString() ); - if (!serviceId.isEmpty()) { - const int pref = config.readEntry( num + QLatin1String("_Preference"), 0 ); - //kDebug(7014) << "adding service " << serviceId << " to profile for " << type << " with preference " << pref; - p->addService( serviceId, pref ); - } - } - } -} - -//static -void KServiceTypeProfile::clearCache() -{ - if (s_serviceTypeProfiles.exists()) - s_serviceTypeProfiles->clear(); -} - -/** - * Returns the offers in the profile for the requested service type. - * @param list list of offers (including initialPreference) - * @param servicetype the service type - * @return the weighted and sorted offer list - * @internal used by KServiceTypeTrader - */ -namespace KServiceTypeProfile { - KServiceOfferList sortServiceTypeOffers( const KServiceOfferList& list, const QString& servicetype ); -} - -KServiceOfferList KServiceTypeProfile::sortServiceTypeOffers( const KServiceOfferList& list, const QString& serviceType ) -{ - QMutexLocker lock(&s_serviceTypeProfiles->m_mutex); - s_serviceTypeProfiles->ensureParsed(); - KServiceTypeProfileEntry* profile = s_serviceTypeProfiles->value(serviceType, 0); - - KServiceOfferList offers; - - KServiceOfferList::const_iterator it = list.begin(); - const KServiceOfferList::const_iterator end = list.end(); - for( ; it != end; ++it ) - { - const KService::Ptr servPtr = (*it).service(); - //kDebug(7014) << "KServiceTypeProfile::offers considering " << servPtr->storageId(); - // Look into the profile (if there's one), to find this service's preference. - bool foundInProfile = false; - if ( profile ) - { - QMap::ConstIterator it2 = profile->m_mapServices.constFind( servPtr->storageId() ); - if( it2 != profile->m_mapServices.constEnd() ) - { - const int pref = it2.value(); - //kDebug(7014) << "found in mapServices pref=" << pref; - if ( pref > 0 ) { // 0 disables the service - offers.append( KServiceOffer( servPtr, pref, 0, servPtr->allowAsDefault() ) ); - } - foundInProfile = true; - } - } - if ( !foundInProfile ) - { - // This offer isn't in the profile - // This can be because we have no profile at all, or because the - // services have been installed after the profile was written, - // but it's also the case for any service that's neither App nor ReadOnlyPart, e.g. RenameDlg/Plugin - //kDebug(7014) << "not found in mapServices. Appending."; - - // If there's a profile, we use 0 as the preference to ensure new apps don't take over existing apps (which default to 1) - offers.append( KServiceOffer( servPtr, - profile ? 0 : (*it).preference(), - 0, - servPtr->allowAsDefault() ) ); - } - } - - qStableSort( offers ); - - //kDebug(7014) << "KServiceTypeProfile::offers returning " << offers.count() << " offers"; - return offers; -} - -bool KServiceTypeProfile::hasProfile( const QString& serviceType ) -{ - return s_serviceTypeProfiles->hasProfile(serviceType); -} - -void KServiceTypeProfile::writeServiceTypeProfile( const QString& serviceType, - const KService::List& services, - const KService::List& disabledServices ) -{ - /* - * [ServiceType] - * NumEntries=3 - * Entry0_Service=serv.desktop - * Entry0_Preference=10 - * Entry1_Service=otherserv.desktop - * Entry1_Preference=5 - * Entry2_Service=broken_service.desktop - * Entry2_Preference=0 - */ - - KConfig configFile( QString::fromLatin1("servicetype_profilerc"), KConfig::SimpleConfig); - configFile.deleteGroup( serviceType ); - - KConfigGroup config(&configFile, serviceType ); - const int count = services.count(); - config.writeEntry( "NumberOfEntries", count + disabledServices.count() ); - KService::List::ConstIterator servit = services.begin(); - int i = 0; - for( ; servit != services.end(); ++servit, ++i ) { - if (!servit->isNull()) { - const QString num = QString::fromLatin1("Entry") + QString::number(i); - config.writeEntry( num + QLatin1String("_Service"), (*servit)->storageId() ); - config.writeEntry( num + QLatin1String("_Preference"), count - i ); - } - } - servit = disabledServices.begin(); - for( ; servit != disabledServices.end(); ++servit, ++i ) { - if (!servit->isNull()) { - const QString num = QString::fromLatin1("Entry") + QString::number(i); - config.writeEntry( num + QLatin1String("_Service"), (*servit)->storageId() ); - config.writeEntry( num + QLatin1String("_Preference"), 0 ); - } - } - configFile.sync(); - - // Drop the whole cache... - clearCache(); -} - -void KServiceTypeProfile::deleteServiceTypeProfile( const QString& serviceType) -{ - KConfig config(QString::fromLatin1("servicetype_profilerc"), KConfig::SimpleConfig); - config.deleteGroup( serviceType ); - config.sync(); - - // Not threadsafe, but well the whole idea of using this method isn't - // threadsafe in the first place. - if (s_serviceTypeProfiles.exists()) { - delete s_serviceTypeProfiles->take( serviceType ); - } -} - -void KServiceTypeProfile::setConfigurationMode() -{ - s_configurationMode = true; -} - -bool KServiceTypeProfile::configurationMode() -{ - return s_configurationMode; -} diff --git a/kdecore/services/kservicetypeprofile.h b/kdecore/services/kservicetypeprofile.h deleted file mode 100644 index 587786dd..00000000 --- a/kdecore/services/kservicetypeprofile.h +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Torben Weis - Copyright 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __kservicetypeprofile_h__ -#define __kservicetypeprofile_h__ - -#include - - -/** - * KServiceTypeProfile represents the user's preferences for services - * of a service type. - * It consists of a list of services (service offers) for the service type - * that is sorted by the user's preference. - * KServiceTypeTrader uses KServiceTypeProfile to - * get results sorted according to the user's preference. - * - * @see KService - * @see KServiceType - * @see KServiceTypeTrader - * @short Represents the user's preferences for services of a service type - */ -namespace KServiceTypeProfile -{ - /** - * Write the complete profile for a given servicetype. - * Do not use this for mimetypes. - * @param serviceType The name of the servicetype. - * @param services Ordered list of services, from the preferred one to the least preferred one. - * @param disabledServices List of services which are normally associated with this serviceType, - * but which should be disabled, i.e. trader queries will not return them. - */ - KDECORE_EXPORT void writeServiceTypeProfile( const QString& serviceType, - const KService::List& services, - const KService::List& disabledServices = KService::List() ); - - - /** - * Delete the complete profile for a given servicetype, reverting to the default - * preference order (the one specified by InitialPreference in the .desktop files). - * - * Do not use this for mimetypes. - * @param serviceType The name of the servicetype. - */ - KDECORE_EXPORT void deleteServiceTypeProfile( const QString& serviceType ); - - /** - * This method activates a special mode of KServiceTypeProfile, in which all/all - * and all/allfiles are excluded from the results of the queries. - * It is meant for the configuration module _only_. - * @internal - */ - KDECORE_EXPORT void setConfigurationMode(); - /** - * @internal - */ - KDECORE_EXPORT bool configurationMode(); - - /** - * @internal, for KServiceTypeTrader - */ - KDECORE_EXPORT bool hasProfile( const QString& serviceType ); - - /** - * Clear all cached information - * @internal, for KServiceTypeFactory - */ - void clearCache(); - -} - -#endif diff --git a/kdecore/services/kservicetypeprofile_p.h b/kdecore/services/kservicetypeprofile_p.h deleted file mode 100644 index 01fd8f2a..00000000 --- a/kdecore/services/kservicetypeprofile_p.h +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Torben Weis - * Copyright (C) 2006 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef KSERVICETYPEPROFILE_P_H -#define KSERVICETYPEPROFILE_P_H - -#include - -/** - * @internal - */ -class KServiceTypeProfileEntry -{ -public: - explicit KServiceTypeProfileEntry() {} - - /** - * Add a service to this profile. - * @param _service the name of the service - * @param _preference the user's preference value, must be positive, - * bigger is better - * @param _allow_as_default true if the service should be used as - * default - */ - void addService( const QString& service, int preference = 1 ) { - m_mapServices.insert( service, preference ); - } - - /** - * Map of all services for which we have assessments. - * Key: service ID - * Value: preference - */ - QMap m_mapServices; -}; - -#endif /* KSERVICETYPEPROFILE_P_H */ - diff --git a/kdecore/services/kservicetypetrader.cpp b/kdecore/services/kservicetypetrader.cpp index ac6c0d9c..4258ff66 100644 --- a/kdecore/services/kservicetypetrader.cpp +++ b/kdecore/services/kservicetypetrader.cpp @@ -20,7 +20,6 @@ #include "kservicetypetrader.h" #include "ktraderparsetree_p.h" -#include #include #include "kservicetype.h" #include "kservicetypefactory.h" @@ -30,10 +29,6 @@ using namespace KTraderParse; // -------------------------------------------------- -namespace KServiceTypeProfile { - KServiceOfferList sortServiceTypeOffers( const KServiceOfferList& list, const QString& servicetype ); -} - KServiceTypeTrader* KServiceTypeTrader::self() { K_GLOBAL_STATIC(KServiceTypeTrader, s_globalServiceTypeTrader) @@ -98,10 +93,10 @@ static KServiceOfferList weightedOffers( const QString& serviceType ) return KServiceOfferList(); // First, get all offers known to ksycoca. - const KServiceOfferList services = KServiceFactory::self()->offers( servTypePtr->offset(), servTypePtr->serviceOffersOffset() ); + KServiceOfferList offers = KServiceFactory::self()->offers( servTypePtr->offset(), servTypePtr->serviceOffersOffset() ); - const KServiceOfferList offers = KServiceTypeProfile::sortServiceTypeOffers( services, serviceType ); - //kDebug(7014) << "Found profile: " << offers.count() << " offers"; + qStableSort( offers ); + //kDebug(7014) << "Found offers: " << offers.count() << " offers"; #if 0 dumpOfferList( offers ); @@ -134,27 +129,7 @@ KService::List KServiceTypeTrader::defaultOffers( const QString& serviceType, KService::List KServiceTypeTrader::query( const QString& serviceType, const QString& constraint ) const { - if ( !KServiceTypeProfile::hasProfile( serviceType ) ) - { - // Fast path: skip the profile stuff if there's none (to avoid kservice->serviceoffer->kservice) - // The ordering according to initial preferences is done by kbuildsycoca - return defaultOffers( serviceType, constraint ); - } - - KService::List lst; - // Get all services of this service type. - const KServiceOfferList offers = weightedOffers( serviceType ); - - // Now extract only the services; the weighting was only used for sorting. - KServiceOfferList::const_iterator itOff = offers.begin(); - for( ; itOff != offers.end(); ++itOff ) - lst.append( (*itOff).service() ); - - applyConstraints( lst, constraint ); - - //kDebug(7014) << "query for serviceType " << serviceType << constraint - // << " : returning " << lst.count() << " offers" << endl; - return lst; + return defaultOffers( serviceType, constraint ); } KService::Ptr KServiceTypeTrader::preferredService( const QString & serviceType ) const diff --git a/kdecore/tests/kservicetest.cpp b/kdecore/tests/kservicetest.cpp index b9806ca2..1c412788 100644 --- a/kdecore/tests/kservicetest.cpp +++ b/kdecore/tests/kservicetest.cpp @@ -34,24 +34,12 @@ #include #include #include -#include #include #include QTEST_KDEMAIN_CORE( KServiceTest ) -static void eraseProfiles() -{ - QString profilerc = KStandardDirs::locateLocal( "config", "profilerc" ); - if ( !profilerc.isEmpty() ) - QFile::remove( profilerc ); - - profilerc = KStandardDirs::locateLocal( "config", "servicetype_profilerc" ); - if ( !profilerc.isEmpty() ) - QFile::remove( profilerc ); -} - void KServiceTest::initTestCase() { // A non-C locale is necessary for some tests. @@ -65,7 +53,6 @@ void KServiceTest::initTestCase() } m_hasKde4Konsole = false; - eraseProfiles(); // Create some fake services for the tests below, and ensure they are in ksycoca. @@ -371,58 +358,13 @@ void KServiceTest::testHasServiceType2() // with services coming from ksycoca QVERIFY( !faketextPlugin->hasServiceType( "KParts/ReadOnlyPart" ) ); } -void KServiceTest::testWriteServiceTypeProfile() -{ - const QString serviceType = "KParts/ReadOnlyPart"; - KService::List services, disabledServices; - services.append(KService::serviceByDesktopPath("fakepart.desktop")); - disabledServices.append(KService::serviceByDesktopPath("kwebkitpart.desktop")); - - KService::List::ConstIterator servit = services.constBegin(); - for( ; servit != services.constEnd(); ++servit) { - QVERIFY(!servit->isNull()); - } - - - KServiceTypeProfile::writeServiceTypeProfile( serviceType, services, disabledServices ); - - // Check that the file got written - QString profilerc = KStandardDirs::locateLocal( "config", "servicetype_profilerc" ); - QVERIFY(!profilerc.isEmpty()); - QVERIFY(QFile::exists(profilerc)); - - KService::List offers = KServiceTypeTrader::self()->query( serviceType ); - QVERIFY( offers.count() > 0 ); // not empty - - //foreach( KService::Ptr service, offers ) - // qDebug( "%s %s", qPrintable( service->name() ), qPrintable( service->entryPath() ) ); - - QVERIFY( offers.count() >= 1 ); // at least 1, even - QCOMPARE( offers[0]->entryPath(), QString("fakepart.desktop") ); - QVERIFY( !offerListHasService( offers, "kwebkitpart.desktop" ) ); // it got disabled above -} - void KServiceTest::testDefaultOffers() { - // Now that we have a user-profile, let's see if defaultOffers indeed gives us the default ordering. + // Let's see if defaultOffers indeed gives us the default ordering. const QString serviceType = "KParts/ReadOnlyPart"; KService::List offers = KServiceTypeTrader::self()->defaultOffers( serviceType ); QVERIFY( offers.count() > 0 ); // not empty - QVERIFY( offerListHasService( offers, "kwebkitpart.desktop" ) ); // it's here even though it's disabled in the profile - if ( m_firstOffer.isEmpty() ) - QSKIP( "testServiceTypeTraderForReadOnlyPart not run", SkipAll ); - QCOMPARE( offers[0]->entryPath(), m_firstOffer ); -} - -void KServiceTest::testDeleteServiceTypeProfile() -{ - const QString serviceType = "KParts/ReadOnlyPart"; - KServiceTypeProfile::deleteServiceTypeProfile( serviceType ); - - KService::List offers = KServiceTypeTrader::self()->query( serviceType ); - QVERIFY( offers.count() > 0 ); // not empty - QVERIFY( offerListHasService( offers, "kwebkitpart.desktop" ) ); // it's back - + QVERIFY( offerListHasService( offers, "kwebkitpart.desktop" ) ); if ( m_firstOffer.isEmpty() ) QSKIP( "testServiceTypeTraderForReadOnlyPart not run", SkipAll ); QCOMPARE( offers[0]->entryPath(), m_firstOffer ); diff --git a/kdecore/tests/kservicetest.h b/kdecore/tests/kservicetest.h index f64cecee..c2773df5 100644 --- a/kdecore/tests/kservicetest.h +++ b/kdecore/tests/kservicetest.h @@ -37,9 +37,7 @@ private Q_SLOTS: void testTraderConstraints(); void testHasServiceType1(); void testHasServiceType2(); - void testWriteServiceTypeProfile(); void testDefaultOffers(); - void testDeleteServiceTypeProfile(); void testDBUSStartupType(); void testByStorageId(); void testActionsAndDataStream(); diff --git a/kdecore/tests/ksycocathreadtest.cpp b/kdecore/tests/ksycocathreadtest.cpp index d0caf910..e3325695 100644 --- a/kdecore/tests/ksycocathreadtest.cpp +++ b/kdecore/tests/ksycocathreadtest.cpp @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/kded/DESIGN b/kded/DESIGN index ceb45b6e..f833c18d 100644 --- a/kded/DESIGN +++ b/kded/DESIGN @@ -75,8 +75,6 @@ Offer list | * mimetype offset, service offset | * 0 This allows to quickly find services associated with a servicetype. -It does NOT reflect the user profile, which is stored in profilerc and -implemented in KServiceTypeProfile. Mimetype patterns | Fast patterns (fixed size) diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index d3e2745b..43fb134b 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -156,7 +156,7 @@ void KBuildServiceFactory::collectInheritedServices() Q_FOREACH(const QString& mimeType, allMimeTypes) { collectInheritedServices(mimeType, visitedMimes); } - // TODO do the same for all/all and all/allfiles, if (!KServiceTypeProfile::configurationMode()) + // TODO do the same for all/all and all/allfiles } void KBuildServiceFactory::collectInheritedServices(const QString& mimeTypeName, QSet& visitedMimes) diff --git a/kio/tests/kdcopcheck.cpp b/kio/tests/kdcopcheck.cpp index 586de0c2..06dacaf5 100644 --- a/kio/tests/kdcopcheck.cpp +++ b/kio/tests/kdcopcheck.cpp @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index 8f5e3e27..7a37510c 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include