Remove deprecated symbols from the build (if KDE_NO_DEPRECATED is defined).

svn path=/trunk/KDE/kdelibs/; revision=1192863
This commit is contained in:
Kevin Ottens 2010-11-04 08:06:43 +00:00
parent c6d5218c34
commit c09422cc8c
7 changed files with 53 additions and 1 deletions

View File

@ -88,7 +88,9 @@ public:
/** /**
* Singleton accessor * Singleton accessor
**/ **/
#ifndef KDE_NO_DEPRECATED
static KDE_DEPRECATED Animator *self(); static KDE_DEPRECATED Animator *self();
#endif
/** /**
* Factory to build new animation objects. To control their behavior, * Factory to build new animation objects. To control their behavior,
@ -118,7 +120,9 @@ public:
* @return the id of the animation * @return the id of the animation
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
**/ **/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int animateItem(QGraphicsItem *item,Animation anim); KDE_DEPRECATED Q_INVOKABLE int animateItem(QGraphicsItem *item,Animation anim);
#endif
/** /**
* Stops an item animation before the animation is complete. * Stops an item animation before the animation is complete.
@ -128,7 +132,9 @@ public:
* @arg id the id of the animation as returned by animateItem * @arg id the id of the animation as returned by animateItem
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopItemAnimation(int id); KDE_DEPRECATED Q_INVOKABLE void stopItemAnimation(int id);
#endif
/** /**
* Starts a standard animation on a QGraphicsItem. * Starts a standard animation on a QGraphicsItem.
@ -138,7 +144,9 @@ public:
* @return the id of the animation * @return the id of the animation
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
**/ **/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int moveItem(QGraphicsItem *item, Movement movement, const QPoint &destination); KDE_DEPRECATED Q_INVOKABLE int moveItem(QGraphicsItem *item, Movement movement, const QPoint &destination);
#endif
/** /**
* Stops an item movement before the animation is complete. * Stops an item movement before the animation is complete.
@ -148,7 +156,9 @@ public:
* @arg id the id of the animation as returned by moveItem * @arg id the id of the animation as returned by moveItem
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopItemMovement(int id); KDE_DEPRECATED Q_INVOKABLE void stopItemMovement(int id);
#endif
/** /**
* Starts a custom animation, preventing the need to create a timeline * Starts a custom animation, preventing the need to create a timeline
@ -168,8 +178,10 @@ public:
* @return an id that can be used to identify this animation. * @return an id that can be used to identify this animation.
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int customAnimation(int frames, int duration, KDE_DEPRECATED Q_INVOKABLE int customAnimation(int frames, int duration,
Animator::CurveShape curve, QObject *receiver, const char *method); Animator::CurveShape curve, QObject *receiver, const char *method);
#endif
/** /**
* Stops a custom animation. Note that it is not necessary to call * Stops a custom animation. Note that it is not necessary to call
@ -179,12 +191,22 @@ public:
* @arg id the id of the animation as returned by customAnimation * @arg id the id of the animation as returned by customAnimation
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopCustomAnimation(int id); KDE_DEPRECATED Q_INVOKABLE void stopCustomAnimation(int id);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int animateElement(QGraphicsItem *obj, Animation); KDE_DEPRECATED Q_INVOKABLE int animateElement(QGraphicsItem *obj, Animation);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopElementAnimation(int id); KDE_DEPRECATED Q_INVOKABLE void stopElementAnimation(int id);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void setInitialPixmap(int id, const QPixmap &pixmap); KDE_DEPRECATED Q_INVOKABLE void setInitialPixmap(int id, const QPixmap &pixmap);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE QPixmap currentPixmap(int id); KDE_DEPRECATED Q_INVOKABLE QPixmap currentPixmap(int id);
#endif
/** /**
* Can be used to query if there are other animations happening. This way * Can be used to query if there are other animations happening. This way
@ -193,7 +215,9 @@ public:
* @since 4.1 * @since 4.1
* @deprecated use new Animator API with Qt Kinetic * @deprecated use new Animator API with Qt Kinetic
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE bool isAnimating() const; KDE_DEPRECATED Q_INVOKABLE bool isAnimating() const;
#endif
/** /**
* Register a widget as a scrolling widget. * Register a widget as a scrolling widget.
@ -203,7 +227,9 @@ public:
* @param widget the widget that offers a scrolling behaviour * @param widget the widget that offers a scrolling behaviour
* @since 4.4 * @since 4.4
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void registerScrollingManager(QGraphicsWidget *widget); KDE_DEPRECATED void registerScrollingManager(QGraphicsWidget *widget);
#endif
/** /**
* unregister the scrolling manager of a certain widget * unregister the scrolling manager of a certain widget
@ -212,20 +238,27 @@ public:
* @param widget the widget we don't want no longer animated * @param widget the widget we don't want no longer animated
* @since 4.4 * @since 4.4
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void unregisterScrollingManager(QGraphicsWidget *widget); KDE_DEPRECATED void unregisterScrollingManager(QGraphicsWidget *widget);
#endif
Q_SIGNALS: Q_SIGNALS:
void animationFinished(QGraphicsItem *item, Plasma::Animator::Animation anim); void animationFinished(QGraphicsItem *item, Plasma::Animator::Animation anim);
void movementFinished(QGraphicsItem *item); void movementFinished(QGraphicsItem *item);
void elementAnimationFinished(int id); void elementAnimationFinished(int id);
void customAnimationFinished(int id); void customAnimationFinished(int id);
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void scrollStateChanged(QGraphicsWidget *widget, QAbstractAnimation::State newState, KDE_DEPRECATED void scrollStateChanged(QGraphicsWidget *widget, QAbstractAnimation::State newState,
QAbstractAnimation::State oldState); QAbstractAnimation::State oldState);
#endif
#ifndef KDE_NO_DEPRECATED
protected: protected:
void timerEvent(QTimerEvent *event); void timerEvent(QTimerEvent *event);
#endif
private: private:
#ifndef KDE_NO_DEPRECATED
friend class AnimatorSingleton; friend class AnimatorSingleton;
explicit Animator(QObject * parent = 0); explicit Animator(QObject * parent = 0);
~Animator(); ~Animator();
@ -236,6 +269,9 @@ private:
Q_PRIVATE_SLOT(d, void customAnimReceiverDestroyed(QObject*)) Q_PRIVATE_SLOT(d, void customAnimReceiverDestroyed(QObject*))
Q_PRIVATE_SLOT(d, void scrollStateChanged(QAbstractAnimation::State, Q_PRIVATE_SLOT(d, void scrollStateChanged(QAbstractAnimation::State,
QAbstractAnimation::State)) QAbstractAnimation::State))
#else
Animator();
#endif
friend class AnimatorPrivate; friend class AnimatorPrivate;
AnimatorPrivate * const d; AnimatorPrivate * const d;

View File

@ -1578,10 +1578,12 @@ void ContainmentPrivate::mimeTypeRetrieved(KIO::Job *job, const QString &mimetyp
#endif // PLASMA_NO_KIO #endif // PLASMA_NO_KIO
} }
#ifndef KDE_NO_DEPRECATED
const QGraphicsItem *Containment::toolBoxItem() const const QGraphicsItem *Containment::toolBoxItem() const
{ {
return d->toolBox.data(); return d->toolBox.data();
} }
#endif
void Containment::setToolBox(AbstractToolBox *toolBox) void Containment::setToolBox(AbstractToolBox *toolBox)
{ {

View File

@ -603,7 +603,9 @@ class PLASMA_EXPORT Containment : public Applet
/** /**
* @returns the toolbox associated with this containment, or a null pointer if none * @returns the toolbox associated with this containment, or a null pointer if none
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED const QGraphicsItem *toolBoxItem() const; KDE_DEPRECATED const QGraphicsItem *toolBoxItem() const;
#endif
/** /**
* Sets a custom ToolBox * Sets a custom ToolBox

View File

@ -497,10 +497,12 @@ QList<Plasma::Containment *> Corona::importLayout(const KConfigGroup &conf)
return d->importLayout(conf, true); return d->importLayout(conf, true);
} }
#ifndef KDE_NO_DEPRECATED
QList<Plasma::Containment *> Corona::importLayout(const KConfigBase &conf) QList<Plasma::Containment *> Corona::importLayout(const KConfigBase &conf)
{ {
return d->importLayout(conf, true); return d->importLayout(conf, true);
} }
#endif
QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf, bool mergeConfig) QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf, bool mergeConfig)
{ {

View File

@ -261,7 +261,9 @@ public:
* @return the list of containments that were loaded * @return the list of containments that were loaded
* @since 4.5 * @since 4.5
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED QList<Plasma::Containment *> importLayout(const KConfigBase &config); KDE_DEPRECATED QList<Plasma::Containment *> importLayout(const KConfigBase &config);
#endif
/** /**
* Returns the name of the preferred plugin to be used as containment toolboxes. * Returns the name of the preferred plugin to be used as containment toolboxes.

View File

@ -1223,17 +1223,21 @@ void ScrollWidget::ensureItemVisible(QGraphicsItem *item)
} }
} }
#ifndef KDE_NO_DEPRECATED
void ScrollWidget::registerAsDragHandle(QGraphicsWidget *item) void ScrollWidget::registerAsDragHandle(QGraphicsWidget *item)
{ {
Q_UNUSED(item); Q_UNUSED(item);
return; return;
} }
#endif
#ifndef KDE_NO_DEPRECATED
void ScrollWidget::unregisterAsDragHandle(QGraphicsWidget *item) void ScrollWidget::unregisterAsDragHandle(QGraphicsWidget *item)
{ {
Q_UNUSED(item); Q_UNUSED(item);
return; return;
} }
#endif
QRectF ScrollWidget::viewportGeometry() const QRectF ScrollWidget::viewportGeometry() const
{ {

View File

@ -181,7 +181,9 @@ public:
* it's not necessary to call this function. * it's not necessary to call this function.
* @since 4.4 * @since 4.4
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void registerAsDragHandle(QGraphicsWidget *item); KDE_DEPRECATED Q_INVOKABLE void registerAsDragHandle(QGraphicsWidget *item);
#endif
/** /**
* Unregister the given item as drag handle (if it was registered) * Unregister the given item as drag handle (if it was registered)
@ -191,7 +193,9 @@ public:
* *
* @since 4.4 * @since 4.4
*/ */
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void unregisterAsDragHandle(QGraphicsWidget *item); KDE_DEPRECATED Q_INVOKABLE void unregisterAsDragHandle(QGraphicsWidget *item);
#endif
/** /**
* The geometry of the viewport. * The geometry of the viewport.