Replace Q_DECL_FINAL with final

Remaining uses of Q_DECL_FINAL are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
  (definition and documentation of Q_DECL_FINAL)
src/tools/moc/moc.cpp
tests/auto/tools/moc/
  (supported for moc for Q_DECL_FINAL)

Change-Id: I0d28946c9c3f9d37d0b303db86079129014de1f3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Kevin Funk 2017-09-21 17:01:03 +02:00
parent 11604b5366
commit 8762ae7315
6 changed files with 281 additions and 281 deletions

View File

@ -73,19 +73,19 @@ public:
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
bool hasPendingEvents() override;
void registerSocketNotifier(QSocketNotifier *socketNotifier) Q_DECL_FINAL;
void unregisterSocketNotifier(QSocketNotifier *socketNotifier) Q_DECL_FINAL;
void registerSocketNotifier(QSocketNotifier *socketNotifier) final;
void unregisterSocketNotifier(QSocketNotifier *socketNotifier) final;
void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) Q_DECL_FINAL;
bool unregisterTimer(int timerId) Q_DECL_FINAL;
bool unregisterTimers(QObject *object) Q_DECL_FINAL;
QList<TimerInfo> registeredTimers(QObject *object) const Q_DECL_FINAL;
void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) final;
bool unregisterTimer(int timerId) final;
bool unregisterTimers(QObject *object) final;
QList<TimerInfo> registeredTimers(QObject *object) const final;
int remainingTime(int timerId) Q_DECL_FINAL;
int remainingTime(int timerId) final;
void wakeUp() Q_DECL_FINAL;
void interrupt() Q_DECL_FINAL;
void flush() Q_DECL_FINAL;
void wakeUp() final;
void interrupt() final;
void flush() final;
static bool versionSupported();

View File

@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QEventDispatcherUNIXPrivate;
struct Q_CORE_EXPORT QSocketNotifierSetUNIX Q_DECL_FINAL
struct Q_CORE_EXPORT QSocketNotifierSetUNIX final
{
inline QSocketNotifierSetUNIX() Q_DECL_NOTHROW;
@ -108,18 +108,18 @@ public:
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
bool hasPendingEvents() override;
void registerSocketNotifier(QSocketNotifier *notifier) Q_DECL_FINAL;
void unregisterSocketNotifier(QSocketNotifier *notifier) Q_DECL_FINAL;
void registerSocketNotifier(QSocketNotifier *notifier) final;
void unregisterSocketNotifier(QSocketNotifier *notifier) final;
void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) Q_DECL_FINAL;
bool unregisterTimer(int timerId) Q_DECL_FINAL;
bool unregisterTimers(QObject *object) Q_DECL_FINAL;
QList<TimerInfo> registeredTimers(QObject *object) const Q_DECL_FINAL;
void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) final;
bool unregisterTimer(int timerId) final;
bool unregisterTimers(QObject *object) final;
QList<TimerInfo> registeredTimers(QObject *object) const final;
int remainingTime(int timerId) Q_DECL_FINAL;
int remainingTime(int timerId) final;
void wakeUp() Q_DECL_FINAL;
void interrupt() Q_DECL_FINAL;
void wakeUp() final;
void interrupt() final;
void flush() override;
protected:

View File

@ -278,11 +278,11 @@ class QVariantIsNull
Q_STATIC_ASSERT(!HasIsNullMethod<SelfTest2>::Value);
struct SelfTest3 : public SelfTest1 {};
Q_STATIC_ASSERT(HasIsNullMethod<SelfTest3>::Value);
struct SelfTestFinal1 Q_DECL_FINAL { bool isNull() const; };
struct SelfTestFinal1 final { bool isNull() const; };
Q_STATIC_ASSERT(HasIsNullMethod<SelfTestFinal1>::Value);
struct SelfTestFinal2 Q_DECL_FINAL {};
struct SelfTestFinal2 final {};
Q_STATIC_ASSERT(!HasIsNullMethod<SelfTestFinal2>::Value);
struct SelfTestFinal3 Q_DECL_FINAL : public SelfTest1 {};
struct SelfTestFinal3 final : public SelfTest1 {};
Q_STATIC_ASSERT(HasIsNullMethod<SelfTestFinal3>::Value);
template<typename T, bool HasIsNull = HasIsNullMethod<T>::Value>

View File

@ -171,7 +171,7 @@ Q_DECLARE_TYPEINFO(QTimeZonePrivate::Data, Q_MOVABLE_TYPE);
template<> QTimeZonePrivate *QSharedDataPointer<QTimeZonePrivate>::clone();
class Q_AUTOTEST_EXPORT QUtcTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class Q_AUTOTEST_EXPORT QUtcTimeZonePrivate final : public QTimeZonePrivate
{
public:
// Create default UTC time zone
@ -224,7 +224,7 @@ private:
};
#if QT_CONFIG(icu)
class Q_AUTOTEST_EXPORT QIcuTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class Q_AUTOTEST_EXPORT QIcuTimeZonePrivate final : public QTimeZonePrivate
{
public:
// Create default time zone
@ -285,7 +285,7 @@ Q_DECL_CONSTEXPR inline bool operator==(const QTzTransitionRule &lhs, const QTzT
Q_DECL_CONSTEXPR inline bool operator!=(const QTzTransitionRule &lhs, const QTzTransitionRule &rhs) Q_DECL_NOTHROW
{ return !operator==(lhs, rhs); }
class Q_AUTOTEST_EXPORT QTzTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class Q_AUTOTEST_EXPORT QTzTimeZonePrivate final : public QTimeZonePrivate
{
QTzTimeZonePrivate(const QTzTimeZonePrivate &) = default;
public:
@ -341,7 +341,7 @@ private:
#endif // Q_OS_UNIX
#ifdef Q_OS_MAC
class Q_AUTOTEST_EXPORT QMacTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class Q_AUTOTEST_EXPORT QMacTimeZonePrivate final : public QTimeZonePrivate
{
public:
// Create default time zone
@ -386,7 +386,7 @@ private:
#endif // Q_OS_MAC
#ifdef Q_OS_WIN
class Q_AUTOTEST_EXPORT QWinTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class Q_AUTOTEST_EXPORT QWinTimeZonePrivate final : public QTimeZonePrivate
{
public:
struct QWinTransitionRule {
@ -444,7 +444,7 @@ private:
#endif // Q_OS_WIN
#ifdef Q_OS_ANDROID
class QAndroidTimeZonePrivate Q_DECL_FINAL : public QTimeZonePrivate
class QAndroidTimeZonePrivate final : public QTimeZonePrivate
{
public:
// Create default time zone

File diff suppressed because it is too large Load Diff

View File

@ -989,7 +989,7 @@ void CodeGenerator::writeExtensionClassDeclaration(QTextStream &stream, const QS
stream << QStringLiteral(" ") << className << QStringLiteral("();") << endl << endl;
// Base class virtual function(s)
QString resolveFunction = QStringLiteral(" bool initializeOpenGLFunctions() Q_DECL_FINAL;");
QString resolveFunction = QStringLiteral(" bool initializeOpenGLFunctions() final;");
stream << resolveFunction << endl << endl;
}