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
**/
#ifndef KDE_NO_DEPRECATED
static KDE_DEPRECATED Animator *self();
#endif
/**
* Factory to build new animation objects. To control their behavior,
@ -118,7 +120,9 @@ public:
* @return the id of the animation
* @deprecated use new Animator API with Qt Kinetic
**/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int animateItem(QGraphicsItem *item,Animation anim);
#endif
/**
* 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
* @deprecated use new Animator API with Qt Kinetic
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopItemAnimation(int id);
#endif
/**
* Starts a standard animation on a QGraphicsItem.
@ -138,7 +144,9 @@ public:
* @return the id of the animation
* @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);
#endif
/**
* 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
* @deprecated use new Animator API with Qt Kinetic
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopItemMovement(int id);
#endif
/**
* 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.
* @deprecated use new Animator API with Qt Kinetic
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int customAnimation(int frames, int duration,
Animator::CurveShape curve, QObject *receiver, const char *method);
#endif
/**
* 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
* @deprecated use new Animator API with Qt Kinetic
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopCustomAnimation(int id);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE int animateElement(QGraphicsItem *obj, Animation);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void stopElementAnimation(int id);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE void setInitialPixmap(int id, const QPixmap &pixmap);
#endif
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE QPixmap currentPixmap(int id);
#endif
/**
* Can be used to query if there are other animations happening. This way
@ -193,7 +215,9 @@ public:
* @since 4.1
* @deprecated use new Animator API with Qt Kinetic
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED Q_INVOKABLE bool isAnimating() const;
#endif
/**
* Register a widget as a scrolling widget.
@ -203,7 +227,9 @@ public:
* @param widget the widget that offers a scrolling behaviour
* @since 4.4
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void registerScrollingManager(QGraphicsWidget *widget);
#endif
/**
* unregister the scrolling manager of a certain widget
@ -212,20 +238,27 @@ public:
* @param widget the widget we don't want no longer animated
* @since 4.4
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void unregisterScrollingManager(QGraphicsWidget *widget);
#endif
Q_SIGNALS:
void animationFinished(QGraphicsItem *item, Plasma::Animator::Animation anim);
void movementFinished(QGraphicsItem *item);
void elementAnimationFinished(int id);
void customAnimationFinished(int id);
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED void scrollStateChanged(QGraphicsWidget *widget, QAbstractAnimation::State newState,
QAbstractAnimation::State oldState);
#endif
#ifndef KDE_NO_DEPRECATED
protected:
void timerEvent(QTimerEvent *event);
#endif
private:
#ifndef KDE_NO_DEPRECATED
friend class AnimatorSingleton;
explicit Animator(QObject * parent = 0);
~Animator();
@ -236,6 +269,9 @@ private:
Q_PRIVATE_SLOT(d, void customAnimReceiverDestroyed(QObject*))
Q_PRIVATE_SLOT(d, void scrollStateChanged(QAbstractAnimation::State,
QAbstractAnimation::State))
#else
Animator();
#endif
friend class AnimatorPrivate;
AnimatorPrivate * const d;

View File

@ -1578,10 +1578,12 @@ void ContainmentPrivate::mimeTypeRetrieved(KIO::Job *job, const QString &mimetyp
#endif // PLASMA_NO_KIO
}
#ifndef KDE_NO_DEPRECATED
const QGraphicsItem *Containment::toolBoxItem() const
{
return d->toolBox.data();
}
#endif
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
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED const QGraphicsItem *toolBoxItem() const;
#endif
/**
* Sets a custom ToolBox

View File

@ -497,10 +497,12 @@ QList<Plasma::Containment *> Corona::importLayout(const KConfigGroup &conf)
return d->importLayout(conf, true);
}
#ifndef KDE_NO_DEPRECATED
QList<Plasma::Containment *> Corona::importLayout(const KConfigBase &conf)
{
return d->importLayout(conf, true);
}
#endif
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
* @since 4.5
*/
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED QList<Plasma::Containment *> importLayout(const KConfigBase &config);
#endif
/**
* Returns the name of the preferred plugin to be used as containment toolboxes.

View File

@ -392,7 +392,7 @@ public:
qreal duration = qAbs(v / deceleration);
qreal diffY = v * duration + (0.5 * deceleration * duration * duration);
qreal startY = val;
qreal endY = startY + diffY;
if (velocity > 0) {
@ -1223,17 +1223,21 @@ void ScrollWidget::ensureItemVisible(QGraphicsItem *item)
}
}
#ifndef KDE_NO_DEPRECATED
void ScrollWidget::registerAsDragHandle(QGraphicsWidget *item)
{
Q_UNUSED(item);
return;
}
#endif
#ifndef KDE_NO_DEPRECATED
void ScrollWidget::unregisterAsDragHandle(QGraphicsWidget *item)
{
Q_UNUSED(item);
return;
}
#endif
QRectF ScrollWidget::viewportGeometry() const
{

View File

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