summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/image/image.pri6
-rw-r--r--src/gui/image/qmovie.cpp4
-rw-r--r--src/gui/image/qmovie.h7
-rw-r--r--src/widgets/accessible/simplewidgets.cpp2
-rw-r--r--src/widgets/widgets/qlabel.cpp16
-rw-r--r--src/widgets/widgets/qlabel.h6
-rw-r--r--src/widgets/widgets/qlabel_p.h6
7 files changed, 22 insertions, 25 deletions
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index bac00f7e95..76aba944b2 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -10,7 +10,6 @@ HEADERS += \
image/qimageiohandler.h \
image/qimagereader.h \
image/qimagewriter.h \
- image/qmovie.h \
image/qpaintengine_pic_p.h \
image/qpicture.h \
image/qpicture_p.h \
@@ -41,7 +40,6 @@ SOURCES += \
image/qpixmap.cpp \
image/qpixmapcache.cpp \
image/qplatformpixmap.cpp \
- image/qmovie.cpp \
image/qpixmap_raster.cpp \
image/qpixmap_blitter.cpp \
image/qimagepixmapcleanuphooks.cpp \
@@ -50,6 +48,10 @@ SOURCES += \
image/qiconengine.cpp \
image/qiconengineplugin.cpp \
+qtConfig(movie) {
+ HEADERS += image/qmovie.h
+ SOURCES += image/qmovie.cpp
+}
win32:!winrt: SOURCES += image/qpixmap_win.cpp
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 55ddd839b7..a1ca857daa 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -172,8 +172,6 @@
#include "qmovie.h"
-#ifndef QT_NO_MOVIE
-
#include "qglobal.h"
#include "qimage.h"
#include "qimagereader.h"
@@ -1020,5 +1018,3 @@ void QMovie::setCacheMode(CacheMode cacheMode)
QT_END_NAMESPACE
#include "moc_qmovie.cpp"
-
-#endif // QT_NO_MOVIE
diff --git a/src/gui/image/qmovie.h b/src/gui/image/qmovie.h
index 2b41e07dba..930d502892 100644
--- a/src/gui/image/qmovie.h
+++ b/src/gui/image/qmovie.h
@@ -42,15 +42,14 @@
#include <QtGui/qtguiglobal.h>
-#ifndef QT_NO_MOVIE
-
#include <QtCore/qobject.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtGui/qimagereader.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(movie);
+QT_BEGIN_NAMESPACE
class QByteArray;
class QColor;
@@ -144,6 +143,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_MOVIE
-
#endif // QMOVIE_H
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;