From dd3229e6724f05c7c61d6ffc92b5ebfa8ece0b23 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 7 Jun 2019 13:02:03 +0200 Subject: [PATCH] Remove a few usages of deprecated API Change-Id: I94bad0b8d3891c6b4a55178836cfff2a4312e330 Reviewed-by: Marc Mutz --- src/corelib/kernel/qbasictimer.cpp | 2 ++ src/corelib/mimetypes/qmimetype.h | 2 +- src/gui/image/qmovie.cpp | 3 ++- src/widgets/widgets/qcombobox.cpp | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp index b16833b34ce..ea8f8e2c774 100644 --- a/src/corelib/kernel/qbasictimer.cpp +++ b/src/corelib/kernel/qbasictimer.cpp @@ -105,6 +105,7 @@ QT_BEGIN_NAMESPACE \sa stop(), isActive(), swap() */ +#if QT_DEPRECATED_SINCE(5, 14) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /*! \internal @@ -125,6 +126,7 @@ QBasicTimer &QBasicTimer::operator=(const QBasicTimer &other) return *this; } #endif +#endif /*! \fn QBasicTimer::~QBasicTimer() diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h index 6d6f9eb4888..df1b60f2cec 100644 --- a/src/corelib/mimetypes/qmimetype.h +++ b/src/corelib/mimetypes/qmimetype.h @@ -48,11 +48,11 @@ QT_REQUIRE_CONFIG(mimetype); #include #include #include +#include QT_BEGIN_NAMESPACE class QMimeTypePrivate; -class QStringList; class QMimeType; Q_CORE_EXPORT uint qHash(const QMimeType &key, uint seed = 0) noexcept; diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp index 79203c7b980..c9344fe2a1a 100644 --- a/src/gui/image/qmovie.cpp +++ b/src/gui/image/qmovie.cpp @@ -175,6 +175,7 @@ #include "qmovie.h" #include "qglobal.h" +#include "qelapsedtimer.h" #include "qimage.h" #include "qimagereader.h" #include "qpixmap.h" @@ -437,7 +438,7 @@ QFrameInfo QMoviePrivate::infoForFrame(int frameNumber) */ bool QMoviePrivate::next() { - QTime time; + QElapsedTimer time; time.start(); QFrameInfo info = infoForFrame(nextFrameNumber); if (!info.isValid()) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 07c55e4db67..d8e72588e63 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1881,12 +1881,11 @@ void QComboBox::setLineEdit(QLineEdit *edit) d->updateFocusPolicy(); d->lineEdit->setFocusProxy(this); d->lineEdit->setAttribute(Qt::WA_MacShowFocusRect, false); +#if QT_DEPRECATED_SINCE(5, 13) #if QT_CONFIG(completer) setAutoCompletion(d->autoCompletion); -#endif #ifdef QT_KEYPAD_NAVIGATION -#if QT_CONFIG(completer) if (QApplication::keypadNavigationEnabled()) { // Editable combo boxes will have a completer that is set to UnfilteredPopupCompletion. // This means that when the user enters edit mode they are immediately presented with a @@ -1898,6 +1897,7 @@ void QComboBox::setLineEdit(QLineEdit *edit) } } #endif +#endif #endif setAttribute(Qt::WA_InputMethodEnabled);