[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/services
From:       David Faure <faure () kde ! org>
Date:       2008-02-29 21:58:16
Message-ID: 1204322296.093777.16088.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 780740 by dfaure:

Remove friend declaration and "private" method that was used by KOpenWithDialog, it \
doesn't need that anymore, thanks to mimeapps.list


 M  +6 -16     kmimetypetrader.cpp  
 M  +0 -11     kmimetypetrader.h  


--- trunk/KDE/kdelibs/kdecore/services/kmimetypetrader.cpp #780739:780740
@@ -118,21 +118,6 @@
     }
 }
 
-KServiceOfferList KMimeTypeTrader::weightedOffers( const QString& mimeType,
-                                                   const QString& genericServiceType \
                ) const
-{
-    kDebug(7014) << "KMimeTypeTrader::weightedOffers( " << mimeType << ", " << \
                genericServiceType << " )";
-    Q_ASSERT( !genericServiceType.isEmpty() );
-
-    // First, get all offers known to ksycoca.
-    KServiceOfferList offers = mimeTypeSycocaOffers( mimeType );
-
-    // Assign preferences from the profile to those offers - and filter for \
                genericServiceType
-    Q_ASSERT(!genericServiceType.isEmpty());
-    filterMimeTypeOffers(offers, genericServiceType);
-    return offers;
-}
-
 KService::List KMimeTypeTrader::query( const QString& mimeType,
                                        const QString& genericServiceType,
                                        const QString& constraint ) const
@@ -150,8 +135,13 @@
 
 KService::Ptr KMimeTypeTrader::preferredService( const QString & mimeType, const \
QString & genericServiceType )  {
-    const KServiceOfferList offers = weightedOffers( mimeType, genericServiceType );
+    // First, get all offers known to ksycoca.
+    KServiceOfferList offers = mimeTypeSycocaOffers( mimeType );
 
+    // Assign preferences from the profile to those offers - and filter for \
genericServiceType +    Q_ASSERT(!genericServiceType.isEmpty());
+    filterMimeTypeOffers(offers, genericServiceType);
+
     KServiceOfferList::const_iterator itOff = offers.begin();
     // Look for the first one that is allowed as default.
     // Since the allowed-as-default are first anyway, we only have
--- trunk/KDE/kdelibs/kdecore/services/kmimetypetrader.h #780739:780740
@@ -186,17 +186,6 @@
      */
     KMimeTypeTrader();
 
-    friend class KOpenWithDialogPrivate;
-    /**
-     * Returns the offers associated with a given servicetype, sorted by preference.
-     * This is what query() uses to get the list of offers, before applying the
-     * constraints and preferences. In general you want to simply use query().
-     *
-     * @param mimeType A mime type like 'text/plain' or 'text/html'.
-     * @param genericServiceType a basic service type, like 'KParts/ReadOnlyPart' or \
                'Application'
-     */
-    QList<KServiceOffer> weightedOffers( const QString& mimeType, const QString& \
                genericServiceType = QString::fromLatin1("Application") ) const;
-
 private:
     class Private;
     Private * const d;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic