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

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/services
From:       Kevin Ottens <ervin () kde ! org>
Date:       2010-11-04 7:43:01
Message-ID: 20101104074301.0A437AC89B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1192842 by ervin:

Remove deprecated symbols from the build (if KDE_NO_DEPRECATED is defined). Cleanup \
klibloader.h include when it's not needed.

 M  +2 -0      kmimetype.cpp  
 M  +2 -0      kmimetype.h  
 M  +8 -0      kservice.cpp  
 M  +16 -1     kservice.h  
 M  +2 -0      kservicegroup.cpp  
 M  +2 -0      kservicegroup.h  
 M  +2 -0      kservicetype.cpp  
 M  +2 -0      kservicetype.h  
 M  +2 -0      kservicetypetrader.h  


--- trunk/KDE/kdelibs/kdecore/services/kmimetype.cpp #1192841:1192842
@@ -498,6 +498,7 @@
     return d->comment(url);
 }
 
+#ifndef KDE_NO_DEPRECATED
 QString KMimeType::parentMimeType() const
 {
     const QStringList parents = parentMimeTypes();
@@ -505,6 +506,7 @@
         return parents.first();
     return QString();
 }
+#endif
 
 bool KMimeTypePrivate::inherits(const QString& mime) const
 {
--- trunk/KDE/kdelibs/kdecore/services/kmimetype.h #1192841:1192842
@@ -328,7 +328,9 @@
      * which is actually part of the shared-mime-info standard.
      * Use is(), parentMimeTypes(), or allParentMimeTypes() instead of \
                parentMimeType()
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED QString parentMimeType() const;
+#endif
 
     /**
      * If this mimetype is a subclass of one or more other mimetypes,
--- trunk/KDE/kdelibs/kdecore/services/kservice.cpp #1192841:1192842
@@ -440,12 +440,14 @@
     return false;
 }
 
+#ifndef KDE_NO_DEPRECATED
 bool KService::hasMimeType( const KServiceType* ptr ) const
 {
     if (!ptr) return false;
 
     return hasMimeType(ptr->name());
 }
+#endif
 
 bool KService::hasMimeType(const QString& mimeType) const
 {
@@ -601,10 +603,12 @@
     return KServiceFactory::self()->allServices();
 }
 
+#ifndef KDE_NO_DEPRECATED
 KService::Ptr KService::serviceByName( const QString& _name )
 {
     return KServiceFactory::self()->findServiceByName( _name );
 }
+#endif
 
 KService::Ptr KService::serviceByDesktopPath( const QString& _name )
 {
@@ -829,11 +833,13 @@
     return d->m_strType == QLatin1String("Application");
 }
 
+#ifndef KDE_NO_DEPRECATED
 QString KService::type() const
 {
     Q_D(const KService);
     return d->m_strType;
 }
+#endif
 
 QString KService::exec() const
 {
@@ -871,10 +877,12 @@
 }
 
 // KDE5: remove and port code to entryPath?
+#ifndef KDE_NO_DEPRECATED
 QString KService::desktopEntryPath() const
 {
     return entryPath();
 }
+#endif
 
 QString KService::desktopEntryName() const
 {
--- trunk/KDE/kdelibs/kdecore/services/kservice.h #1192841:1192842
@@ -24,7 +24,6 @@
 #include "kserviceaction.h"
 #include <QtCore/QStringList>
 #include <QtCore/QVariant>
-#include <klibloader.h>
 #include <kpluginfactory.h>
 #include <kpluginloader.h>
 #include <ksycocaentry.h>
@@ -101,7 +100,9 @@
      * @return the type of the service ("Application" or "Service")
      * @deprecated use isApplication()
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED QString type() const;
+#endif
 
     /**
      * Returns the executable.
@@ -166,7 +167,9 @@
      * @return the path of the service's desktop file,
      *         or QString() if not set
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED QString desktopEntryPath() const;
+#endif
 
     /**
      * Returns the filename of the service desktop entry without any
@@ -289,7 +292,9 @@
      * @return true if the mime type you specified is supported, otherwise false.
      * @deprecated, use hasMimeType(QString)
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED bool hasMimeType( const KServiceType* mimeTypePtr ) const;
+#endif
 
     /**
      * Checks whether the service supports this mime type
@@ -419,7 +424,9 @@
      * @em Very @em important: Don't store the result in a KService* !
      * @deprecated there is never a good reason to use this method.
      */
+#ifndef KDE_NO_DEPRECATED
     static Ptr serviceByName( const QString& _name ); // KDE5: remove
+#endif
 
     /**
      * Find a service based on its path as returned by entryPath().
@@ -554,17 +561,20 @@
     /**
      * @deprecated Use the non-static service->createInstance<T>(parent, args, \
                &error)
      */
+#ifndef KDE_NO_DEPRECATED
     template <class T>
     static KDE_DEPRECATED T *createInstance(const KService::Ptr &service, QObject \
                *parent = 0,
             const QVariantList &args = QVariantList(), QString *error = 0)
     {
         return service->createInstance<T>(parent, args, error);
     }
+#endif
 
     /**
      * @deprecated Use the non-static service->createInstance<T>(parent, args, \
                &error)
      * where args is a QVariantList rather than a QStringList
      */
+#ifndef KDE_NO_DEPRECATED
     template <class T>
     static KDE_DEPRECATED T *createInstance( const KService::Ptr &service,
                               QObject *parent,
@@ -580,6 +590,7 @@
 
         return KLibLoader::createInstance<T>( library, parent, args, error );
     }
+#endif
 
     /**
      * This template allows to create a component from a list of services,
@@ -596,6 +607,7 @@
      * @return A pointer to the newly created object or a null pointer if the
      *         factory was unable to create an object of the given type.
      */
+#ifndef KDE_NO_DEPRECATED
     template <class T, class ServiceIterator>
     static KDE_DEPRECATED T *createInstance(ServiceIterator begin, ServiceIterator \
                end, QObject *parent = 0,
             const QVariantList &args = QVariantList(), QString *error = 0)
@@ -616,7 +628,9 @@
         }
         return 0;
     }
+#endif
 
+#ifndef KDE_NO_DEPRECATED
     template <class T, class ServiceIterator>
     static KDE_DEPRECATED T *createInstance( ServiceIterator begin, ServiceIterator \
end,  QObject *parent,
@@ -636,6 +650,7 @@
             *error = KLibLoader::ErrNoServiceFound;
         return 0;
     }
+#endif
 
 protected:
     friend class KMimeAssociations;
--- trunk/KDE/kdelibs/kdecore/services/kservicegroup.cpp #1192841:1192842
@@ -700,11 +700,13 @@
     return d->sortOrder;
 }
 
+#ifndef KDE_NO_DEPRECATED
 KServiceGroup::Ptr
 KServiceGroup::baseGroup( const QString & _baseGroupName )
 {
     return KServiceGroupFactory::self()->findBaseGroup(_baseGroupName, true);
 }
+#endif
 
 KServiceGroup::Ptr
 KServiceGroup::root()
--- trunk/KDE/kdelibs/kdecore/services/kservicegroup.h #1192841:1192842
@@ -249,7 +249,9 @@
    * @deprecated Use a servicetype and a proper trader query instead, for a better
    * way of finding related services.
    */
+#ifndef KDE_NO_DEPRECATED
   static KDE_DEPRECATED Ptr baseGroup( const QString &baseGroupName );
+#endif
 
   /**
    * Returns the root service group.
--- trunk/KDE/kdelibs/kdecore/services/kservicetype.cpp #1192841:1192842
@@ -236,10 +236,12 @@
 }
 
 // ## KDE4: remove?
+#ifndef KDE_NO_DEPRECATED
 QString KServiceType::desktopEntryPath() const
 {
     return entryPath();
 }
+#endif
 
 bool KServiceType::isDerived() const
 {
--- trunk/KDE/kdelibs/kdecore/services/kservicetype.h #1192841:1192842
@@ -72,7 +72,9 @@
      * For instance inode/directory.desktop, or kpart.desktop
      * @return the path of the desktop file
      */
+#ifndef KDE_NO_DEPRECATED
     KDE_DEPRECATED QString desktopEntryPath() const;
+#endif
 
     /**
      * Checks whether this service type inherits another one.
--- trunk/KDE/kdelibs/kdecore/services/kservicetypetrader.h #1192841:1192842
@@ -198,6 +198,7 @@
      * createInstanceFromQuery(const QString&, const QString&, QObject*, const \
                QVariantList&, QString*)
      * instead
      */
+#ifndef KDE_NO_DEPRECATED
     template <class T>
     static KDE_DEPRECATED T *createInstanceFromQuery(const QString &serviceType, \
const QString &constraint,  QObject *parent, const QStringList &args, int *error = 0)
@@ -212,6 +213,7 @@
 
         return KService::createInstance<T>(offers.begin(), offers.end(), parent, \
args, error);  }
+#endif
 
 
     /**


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

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