Add a few overrides in Qt Core

Clang-tidy says:
  warning: annotate this function with 'override' or (rarely) 'final'
  [modernize-use-override]

Change-Id: Ic2304cf35f4132ba1f55714493db93836f8b413d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Alessandro Portale 2018-08-01 18:26:26 +02:00
parent f8dba7ac01
commit 01e57909d4
13 changed files with 103 additions and 103 deletions

View File

@ -94,12 +94,12 @@ public:
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
QEucJpCodec();
~QEucJpCodec();

View File

@ -90,12 +90,12 @@ public:
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
};
class QCP949Codec : public QTextCodec {
@ -104,12 +104,12 @@ public:
static QList<QByteArray> _aliases();
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
};
#endif // QT_NO_BIG_CODECS

View File

@ -69,12 +69,12 @@ public:
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
static int _mibEnum() { return 114; }
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
};
class QGbkCodec : public QGb18030Codec {
@ -85,12 +85,12 @@ public:
static QList<QByteArray> _aliases();
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
};
class QGb2312Codec : public QGb18030Codec {
@ -101,11 +101,11 @@ public:
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
static int _mibEnum();
QByteArray name() const { return _name(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
};
#endif // QT_NO_BIG_CODECS

View File

@ -69,11 +69,11 @@ public:
QIconvCodec();
~QIconvCodec();
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
QByteArray name() const;
int mibEnum() const;
QByteArray name() const override;
int mibEnum() const override;
void init() const;
iconv_t createIconv_t(const char *to, const char *from) const;

View File

@ -94,12 +94,12 @@ public:
static QList<QByteArray> _aliases();
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
QJisCodec();
~QJisCodec();

View File

@ -349,15 +349,15 @@ public:
// uint Jisx0201ToUnicode(uint h, uint l) const;
// uint Jisx0201LatinToUnicode(uint h, uint l) const;
// uint Jisx0201KanaToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const;
uint jisx0212ToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const override;
uint jisx0212ToUnicode(uint h, uint l) const override;
// uint UnicodeToAscii(uint h, uint l) const;
// uint UnicodeToJisx0201(uint h, uint l) const;
// uint UnicodeToJisx0201Latin(uint h, uint l) const;
// uint UnicodeToJisx0201Kana(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const;
uint unicodeToJisx0212(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const override;
uint unicodeToJisx0212(uint h, uint l) const override;
};
uint QJpUnicodeConv_Unicode_ASCII::jisx0208ToUnicode(uint h, uint l) const
@ -406,18 +406,18 @@ class QJpUnicodeConv_JISX0221_JISX0201 : public QJpUnicodeConv {
public:
QJpUnicodeConv_JISX0221_JISX0201(int r) : QJpUnicodeConv(r) {}
uint asciiToUnicode(uint h, uint l) const;
uint asciiToUnicode(uint h, uint l) const override;
// uint Jisx0201ToUnicode(uint h, uint l) const;
// uint Jisx0201LatinToUnicode(uint h, uint l) const;
// uint Jisx0201KanaToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const override;
// uint Jisx0212ToUnicode(uint h, uint l) const;
uint unicodeToAscii(uint h, uint l) const;
uint unicodeToAscii(uint h, uint l) const override;
// uint UnicodeToJisx0201(uint h, uint l) const;
// uint UnicodeToJisx0201Latin(uint h, uint l) const;
// uint UnicodeToJisx0201Kana(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const override;
// uint UnicodeToJisx0212(uint h, uint l) const;
};
@ -462,17 +462,17 @@ public:
// uint AsciiToUnicode(uint h, uint l) const;
// uint Jisx0201ToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const override;
// uint Jisx0201KanaToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const;
uint jisx0212ToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const override;
uint jisx0212ToUnicode(uint h, uint l) const override;
// uint UnicodeToAscii(uint h, uint l) const;
// uint UnicodeToJisx0201(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const override;
// uint UnicodeToJisx0201Kana(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const;
uint unicodeToJisx0212(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const override;
uint unicodeToJisx0212(uint h, uint l) const override;
};
uint QJpUnicodeConv_JISX0221_ASCII::jisx0201LatinToUnicode(uint h, uint l) const
@ -558,17 +558,17 @@ public:
// uint AsciiToUnicode(uint h, uint l) const;
// uint Jisx0201ToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const override;
// uint Jisx0201KanaToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const;
uint jisx0212ToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const override;
uint jisx0212ToUnicode(uint h, uint l) const override;
uint unicodeToAscii(uint h, uint l) const;
uint unicodeToAscii(uint h, uint l) const override;
// uint UnicodeToJisx0201(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const override;
// uint UnicodeToJisx0201Kana(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const;
uint unicodeToJisx0212(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const override;
uint unicodeToJisx0212(uint h, uint l) const override;
};
uint QJpUnicodeConv_Sun::jisx0201LatinToUnicode(uint h, uint l) const
@ -647,17 +647,17 @@ public:
// uint AsciiToUnicode(uint h, uint l) const;
// uint Jisx0201ToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const;
uint jisx0201LatinToUnicode(uint h, uint l) const override;
// uint Jisx0201KanaToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const;
uint jisx0212ToUnicode(uint h, uint l) const;
uint jisx0208ToUnicode(uint h, uint l) const override;
uint jisx0212ToUnicode(uint h, uint l) const override;
// uint UnicodeToAscii(uint h, uint l) const;
// uint UnicodeToJisx0201(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const;
uint unicodeToJisx0201Latin(uint h, uint l) const override;
// uint UnicodeToJisx0201Kana(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const;
uint unicodeToJisx0212(uint h, uint l) const;
uint unicodeToJisx0208(uint h, uint l) const override;
uint unicodeToJisx0212(uint h, uint l) const override;
};
uint QJpUnicodeConv_Microsoft::jisx0201LatinToUnicode(uint h, uint l) const

View File

@ -94,12 +94,12 @@ public:
static QList<QByteArray> _aliases();
static int _mibEnum();
QByteArray name() const { return _name(); }
QList<QByteArray> aliases() const { return _aliases(); }
int mibEnum() const { return _mibEnum(); }
QByteArray name() const override { return _name(); }
QList<QByteArray> aliases() const override { return _aliases(); }
int mibEnum() const override { return _mibEnum(); }
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
QSjisCodec();
~QSjisCodec();

View File

@ -61,12 +61,12 @@ public:
QWindowsLocalCodec();
~QWindowsLocalCodec();
QString convertToUnicode(const char *, int, ConverterState *) const;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
QString convertToUnicode(const char *, int, ConverterState *) const override;
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
QString convertToUnicodeCharByChar(const char *chars, int length, ConverterState *state) const;
QByteArray name() const;
int mibEnum() const;
QByteArray name() const override;
int mibEnum() const override;
};

View File

@ -355,15 +355,15 @@ public:
const QString &application);
~QMacSettingsPrivate();
void remove(const QString &key);
void set(const QString &key, const QVariant &value);
bool get(const QString &key, QVariant *value) const;
QStringList children(const QString &prefix, ChildSpec spec) const;
void clear();
void sync();
void flush();
bool isWritable() const;
QString fileName() const;
void remove(const QString &key) override;
void set(const QString &key, const QVariant &value) override;
bool get(const QString &key, QVariant *value) const override;
QStringList children(const QString &prefix, ChildSpec spec) const override;
void clear() override;
void sync() override;
void flush() override;
bool isWritable() const override;
QString fileName() const override;
private:
struct SearchDomain

View File

@ -383,17 +383,17 @@ public:
QWinSettingsPrivate(QString rKey, REGSAM access = 0);
~QWinSettingsPrivate();
void remove(const QString &uKey);
void set(const QString &uKey, const QVariant &value);
bool get(const QString &uKey, QVariant *value) const;
QStringList children(const QString &uKey, ChildSpec spec) const;
void clear();
void sync();
void flush();
bool isWritable() const;
void remove(const QString &uKey) override;
void set(const QString &uKey, const QVariant &value) override;
bool get(const QString &uKey, QVariant *value) const override;
QStringList children(const QString &uKey, ChildSpec spec) const override;
void clear() override;
void sync() override;
void flush() override;
bool isWritable() const override;
HKEY writeHandle() const;
bool readKey(HKEY parentHandle, const QString &rSubKey, QVariant *value) const;
QString fileName() const;
QString fileName() const override;
private:
RegistryKeyList regList; // list of registry locations to search for keys

View File

@ -290,15 +290,15 @@ public:
QWinRTSettingsPrivate(const QString &rKey);
~QWinRTSettingsPrivate();
void remove(const QString &uKey);
void set(const QString &uKey, const QVariant &value);
bool get(const QString &uKey, QVariant *value) const;
QStringList children(const QString &uKey, ChildSpec spec) const;
void clear();
void sync();
void flush();
bool isWritable() const;
QString fileName() const;
void remove(const QString &uKey) override;
void set(const QString &uKey, const QVariant &value) override;
bool get(const QString &uKey, QVariant *value) const override;
QStringList children(const QString &uKey, ChildSpec spec) const override;
void clear() override;
void sync() override;
void flush() override;
bool isWritable() const override;
QString fileName() const override;
private:
void init(QSettings::Scope scope);

View File

@ -168,7 +168,7 @@ public:
}
}
void timerEvent(QTimerEvent *e) {
void timerEvent(QTimerEvent *e) override {
if (e->timerId() == warn) {
killTimer(warn);
fprintf(stderr, "%s\n", will_shutdown_1min);

View File

@ -70,7 +70,7 @@ Q_SIGNALS:
void activated(HANDLE hEvent, QPrivateSignal);
protected:
bool event(QEvent * e);
bool event(QEvent *e) override;
};
QT_END_NAMESPACE