diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-20 20:07:58 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-29 10:46:50 +0000 |
commit | 3945cf1f9aa3c4f43b995cc695cc3cfb5ec75c8c (patch) | |
tree | 95bc8edabe371f343bcebd921ac19b024337165c /src/widgets | |
parent | 9ec028071409410dba192ec1c1e228cf3aea224b (diff) |
Convert features.movie to QT_[REQUIRE_]CONFIG
Change-Id: I838c7305d4649f953c5bb972f1aa51dbb078afe2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/accessible/simplewidgets.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qlabel.cpp | 16 | ||||
-rw-r--r-- | src/widgets/widgets/qlabel.h | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qlabel_p.h | 6 |
4 files changed, 16 insertions, 14 deletions
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp index aa075cad1b..e557dc9615 100644 --- a/src/widgets/accessible/simplewidgets.cpp +++ b/src/widgets/accessible/simplewidgets.cpp @@ -422,7 +422,7 @@ QAccessible::Role QAccessibleDisplay::role() const if (l->picture()) return QAccessible::Graphic; #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) if (l->movie()) return QAccessible::Animation; #endif diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp index 39e072234e..4946e3e354 100644 --- a/src/widgets/widgets/qlabel.cpp +++ b/src/widgets/widgets/qlabel.cpp @@ -72,7 +72,7 @@ QLabelPrivate::QLabelPrivate() #ifndef QT_NO_PICTURE picture(Q_NULLPTR), #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) movie(), #endif control(Q_NULLPTR), @@ -582,7 +582,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const } else if (picture && !picture->isNull()) { br = picture->boundingRect(); #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) } else if (movie && !movie->currentPixmap().isNull()) { br = movie->currentPixmap().rect(); br.setSize(br.size() / movie->currentPixmap().devicePixelRatio()); @@ -1015,7 +1015,7 @@ void QLabel::paintEvent(QPaintEvent *) int align = QStyle::visualAlignment(d->isTextLabel ? d->textDirection() : layoutDirection(), QFlag(d->align)); -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) if (d->movie) { if (d->scaledcontents) style->drawItemPixmap(&painter, cr, align, d->movie->currentPixmap().scaled(cr.size())); @@ -1216,7 +1216,7 @@ void QLabelPrivate::updateShortcut() #endif // QT_NO_SHORTCUT -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) void QLabelPrivate::_q_movieUpdated(const QRect& rect) { Q_Q(QLabel); @@ -1276,7 +1276,7 @@ void QLabel::setMovie(QMovie *movie) d->updateLabel(); } -#endif // QT_NO_MOVIE +#endif // QT_CONFIG(movie) /*! \internal @@ -1309,7 +1309,7 @@ void QLabelPrivate::clearContents() q->releaseShortcut(shortcutId); shortcutId = 0; #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) if (movie) { QObject::disconnect(movie, SIGNAL(resized(QSize)), q, SLOT(_q_movieResized(QSize))); QObject::disconnect(movie, SIGNAL(updated(QRect)), q, SLOT(_q_movieUpdated(QRect))); @@ -1329,7 +1329,7 @@ void QLabelPrivate::clearContents() } -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) /*! Returns a pointer to the label's movie, or 0 if no movie has been @@ -1344,7 +1344,7 @@ QMovie *QLabel::movie() const return d->movie; } -#endif // QT_NO_MOVIE +#endif // QT_CONFIG(movie) /*! \property QLabel::textFormat diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h index 3978e34d14..469254a145 100644 --- a/src/widgets/widgets/qlabel.h +++ b/src/widgets/widgets/qlabel.h @@ -76,7 +76,7 @@ public: #ifndef QT_NO_PICTURE const QPicture *picture() const; #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) QMovie *movie() const; #endif @@ -122,7 +122,7 @@ public Q_SLOTS: #ifndef QT_NO_PICTURE void setPicture(const QPicture &); #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) void setMovie(QMovie *movie); #endif void setNum(int); @@ -152,7 +152,7 @@ protected: private: Q_DISABLE_COPY(QLabel) Q_DECLARE_PRIVATE(QLabel) -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) Q_PRIVATE_SLOT(d_func(), void _q_movieUpdated(const QRect&)) Q_PRIVATE_SLOT(d_func(), void _q_movieResized(const QSize&)) #endif diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h index d13c05fc99..f3236ac527 100644 --- a/src/widgets/widgets/qlabel_p.h +++ b/src/widgets/widgets/qlabel_p.h @@ -59,7 +59,9 @@ #include "qtextdocumentfragment.h" #include "qframe_p.h" #include "qtextdocument.h" +#if QT_CONFIG(movie) #include "qmovie.h" +#endif #include "qimage.h" #include "qbitmap.h" #include "qpicture.h" @@ -79,7 +81,7 @@ public: void updateLabel(); QSize sizeForWidth(int w) const; -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) void _q_movieUpdated(const QRect&); void _q_movieResized(const QSize&); #endif @@ -116,7 +118,7 @@ public: #ifndef QT_NO_PICTURE QPicture *picture; #endif -#ifndef QT_NO_MOVIE +#if QT_CONFIG(movie) QPointer<QMovie> movie; #endif mutable QWidgetTextControl *control; |