Commit 532b24f4 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent dbbfed40
...@@ -33,7 +33,7 @@ public: ...@@ -33,7 +33,7 @@ public:
void setOn(bool value); void setOn(bool value);
protected: protected:
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
private: private:
bool on_; bool on_;
......
...@@ -115,8 +115,8 @@ public: ...@@ -115,8 +115,8 @@ public:
Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag) Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag)
private: private:
virtual bool eventFilter(QObject *o, QEvent *e); bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
virtual bool event(QEvent *e); bool event(QEvent *e) Q_DECL_OVERRIDE;
void updateGeometry(); void updateGeometry();
void setupMainActions(); void setupMainActions();
void setupKeys(); void setupKeys();
...@@ -128,8 +128,8 @@ private: ...@@ -128,8 +128,8 @@ private:
void setupStatisticKeys(); void setupStatisticKeys();
void setupConstantsKeys(); void setupConstantsKeys();
void setupMiscKeys(); void setupMiscKeys();
void keyPressEvent(QKeyEvent *e); void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
void keyReleaseEvent(QKeyEvent *e); void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
void setPrecision(); void setPrecision();
void setAngle(); void setAngle();
void setBase(); void setBase();
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
void addMode(ButtonModeFlags mode, const QString &label, void addMode(ButtonModeFlags mode, const QString &label,
const QString &tooltip); const QString &tooltip);
virtual QSize sizeHint() const; // reimp QSize sizeHint() const; // reimp
void setFont(const QFont &fnt); void setFont(const QFont &fnt);
void setText(const QString &text); // reimp void setText(const QString &text); // reimp
...@@ -77,7 +77,7 @@ public slots: ...@@ -77,7 +77,7 @@ public slots:
void slotSetAccelDisplayMode(bool flag); void slotSetAccelDisplayMode(bool flag);
protected: protected:
virtual void paintEvent(QPaintEvent *e); void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
private: private:
void calcSizeHint(); void calcSizeHint();
......
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
QString text() const; QString text() const;
void updateDisplay(); void updateDisplay();
void setStatusText(int i, const QString &text); void setStatusText(int i, const QString &text);
virtual QSize sizeHint() const; QSize sizeHint() const Q_DECL_OVERRIDE;
void changeSettings(); void changeSettings();
void enterDigit(int data); void enterDigit(int data);
...@@ -108,8 +108,8 @@ signals: ...@@ -108,8 +108,8 @@ signals:
void changedAmount(const KNumber &); void changedAmount(const KNumber &);
protected: protected:
void mousePressEvent(QMouseEvent *); void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
virtual void paintEvent(QPaintEvent *p); void paintEvent(QPaintEvent *p) Q_DECL_OVERRIDE;
private: private:
bool changeSign(); bool changeSign();
......
...@@ -45,66 +45,66 @@ public: ...@@ -45,66 +45,66 @@ public:
virtual ~knumber_error(); virtual ~knumber_error();
public: public:
virtual QString toString(int precision) const; QString toString(int precision) const Q_DECL_OVERRIDE;
virtual quint64 toUint64() const; quint64 toUint64() const Q_DECL_OVERRIDE;
virtual qint64 toInt64() const; qint64 toInt64() const Q_DECL_OVERRIDE;
public: public:
virtual bool is_integer() const; bool is_integer() const Q_DECL_OVERRIDE;
virtual bool is_zero() const; bool is_zero() const Q_DECL_OVERRIDE;
virtual int sign() const; int sign() const Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *add(knumber_base *rhs); knumber_base *add(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *sub(knumber_base *rhs); knumber_base *sub(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mul(knumber_base *rhs); knumber_base *mul(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *div(knumber_base *rhs); knumber_base *div(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mod(knumber_base *rhs); knumber_base *mod(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *bitwise_and(knumber_base *rhs); knumber_base *bitwise_and(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_xor(knumber_base *rhs); knumber_base *bitwise_xor(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_or(knumber_base *rhs); knumber_base *bitwise_or(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_shift(knumber_base *rhs); knumber_base *bitwise_shift(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *pow(knumber_base *rhs); knumber_base *pow(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *neg(); knumber_base *neg() Q_DECL_OVERRIDE;
virtual knumber_base *cmp(); knumber_base *cmp() Q_DECL_OVERRIDE;
virtual knumber_base *abs(); knumber_base *abs() Q_DECL_OVERRIDE;
virtual knumber_base *sqrt(); knumber_base *sqrt() Q_DECL_OVERRIDE;
virtual knumber_base *cbrt(); knumber_base *cbrt() Q_DECL_OVERRIDE;
virtual knumber_base *factorial(); knumber_base *factorial() Q_DECL_OVERRIDE;
virtual knumber_base *reciprocal(); knumber_base *reciprocal() Q_DECL_OVERRIDE;
virtual knumber_base *tgamma(); knumber_base *tgamma() Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *log2(); knumber_base *log2() Q_DECL_OVERRIDE;
virtual knumber_base *log10(); knumber_base *log10() Q_DECL_OVERRIDE;
virtual knumber_base *ln(); knumber_base *ln() Q_DECL_OVERRIDE;
virtual knumber_base *exp2(); knumber_base *exp2() Q_DECL_OVERRIDE;
virtual knumber_base *exp10(); knumber_base *exp10() Q_DECL_OVERRIDE;
virtual knumber_base *floor(); knumber_base *floor() Q_DECL_OVERRIDE;
virtual knumber_base *ceil(); knumber_base *ceil() Q_DECL_OVERRIDE;
virtual knumber_base *exp(); knumber_base *exp() Q_DECL_OVERRIDE;
virtual knumber_base *bin(knumber_base *rhs); knumber_base *bin(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *sin(); knumber_base *sin() Q_DECL_OVERRIDE;
virtual knumber_base *cos(); knumber_base *cos() Q_DECL_OVERRIDE;
virtual knumber_base *tan(); knumber_base *tan() Q_DECL_OVERRIDE;
virtual knumber_base *asin(); knumber_base *asin() Q_DECL_OVERRIDE;
virtual knumber_base *acos(); knumber_base *acos() Q_DECL_OVERRIDE;
virtual knumber_base *atan(); knumber_base *atan() Q_DECL_OVERRIDE;
virtual knumber_base *sinh(); knumber_base *sinh() Q_DECL_OVERRIDE;
virtual knumber_base *cosh(); knumber_base *cosh() Q_DECL_OVERRIDE;
virtual knumber_base *tanh(); knumber_base *tanh() Q_DECL_OVERRIDE;
virtual knumber_base *asinh(); knumber_base *asinh() Q_DECL_OVERRIDE;
virtual knumber_base *acosh(); knumber_base *acosh() Q_DECL_OVERRIDE;
virtual knumber_base *atanh(); knumber_base *atanh() Q_DECL_OVERRIDE;
public: public:
virtual int compare(knumber_base *rhs); int compare(knumber_base *rhs) Q_DECL_OVERRIDE;
private: private:
// conversion constructors // conversion constructors
...@@ -114,7 +114,7 @@ private: ...@@ -114,7 +114,7 @@ private:
explicit knumber_error(const knumber_error *value); explicit knumber_error(const knumber_error *value);
public: public:
virtual knumber_base *clone(); knumber_base *clone() Q_DECL_OVERRIDE;
private: private:
Error error_; Error error_;
......
...@@ -55,69 +55,69 @@ private: ...@@ -55,69 +55,69 @@ private:
explicit knumber_float(const knumber_error *value); explicit knumber_float(const knumber_error *value);
public: public:
virtual QString toString(int precision) const; QString toString(int precision) const Q_DECL_OVERRIDE;
virtual quint64 toUint64() const; quint64 toUint64() const Q_DECL_OVERRIDE;
virtual qint64 toInt64() const; qint64 toInt64() const Q_DECL_OVERRIDE;
public: public:
virtual bool is_integer() const; bool is_integer() const Q_DECL_OVERRIDE;
virtual bool is_zero() const; bool is_zero() const Q_DECL_OVERRIDE;
virtual int sign() const; int sign() const Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *add(knumber_base *rhs); knumber_base *add(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *sub(knumber_base *rhs); knumber_base *sub(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mul(knumber_base *rhs); knumber_base *mul(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *div(knumber_base *rhs); knumber_base *div(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mod(knumber_base *rhs); knumber_base *mod(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *pow(knumber_base *rhs); knumber_base *pow(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *neg(); knumber_base *neg() Q_DECL_OVERRIDE;
virtual knumber_base *cmp(); knumber_base *cmp() Q_DECL_OVERRIDE;
virtual knumber_base *abs(); knumber_base *abs() Q_DECL_OVERRIDE;
virtual knumber_base *sqrt(); knumber_base *sqrt() Q_DECL_OVERRIDE;
virtual knumber_base *cbrt(); knumber_base *cbrt() Q_DECL_OVERRIDE;
virtual knumber_base *factorial(); knumber_base *factorial() Q_DECL_OVERRIDE;
virtual knumber_base *reciprocal(); knumber_base *reciprocal() Q_DECL_OVERRIDE;
virtual knumber_base *tgamma(); knumber_base *tgamma() Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *log2(); knumber_base *log2() Q_DECL_OVERRIDE;
virtual knumber_base *log10(); knumber_base *log10() Q_DECL_OVERRIDE;
virtual knumber_base *ln(); knumber_base *ln() Q_DECL_OVERRIDE;
virtual knumber_base *floor(); knumber_base *floor() Q_DECL_OVERRIDE;
virtual knumber_base *ceil(); knumber_base *ceil() Q_DECL_OVERRIDE;
virtual knumber_base *exp2(); knumber_base *exp2() Q_DECL_OVERRIDE;
virtual knumber_base *exp10(); knumber_base *exp10() Q_DECL_OVERRIDE;
virtual knumber_base *exp(); knumber_base *exp() Q_DECL_OVERRIDE;
virtual knumber_base *bin(knumber_base *rhs); knumber_base *bin(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *sin(); knumber_base *sin() Q_DECL_OVERRIDE;
virtual knumber_base *cos(); knumber_base *cos() Q_DECL_OVERRIDE;
virtual knumber_base *tan(); knumber_base *tan() Q_DECL_OVERRIDE;
virtual knumber_base *asin(); knumber_base *asin() Q_DECL_OVERRIDE;
virtual knumber_base *acos(); knumber_base *acos() Q_DECL_OVERRIDE;
virtual knumber_base *atan(); knumber_base *atan() Q_DECL_OVERRIDE;
virtual knumber_base *sinh(); knumber_base *sinh() Q_DECL_OVERRIDE;
virtual knumber_base *cosh(); knumber_base *cosh() Q_DECL_OVERRIDE;
virtual knumber_base *tanh(); knumber_base *tanh() Q_DECL_OVERRIDE;
virtual knumber_base *asinh(); knumber_base *asinh() Q_DECL_OVERRIDE;
virtual knumber_base *acosh(); knumber_base *acosh() Q_DECL_OVERRIDE;
virtual knumber_base *atanh(); knumber_base *atanh() Q_DECL_OVERRIDE;
public: public:
virtual int compare(knumber_base *rhs); int compare(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *bitwise_and(knumber_base *rhs); knumber_base *bitwise_and(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_xor(knumber_base *rhs); knumber_base *bitwise_xor(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_or(knumber_base *rhs); knumber_base *bitwise_or(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_shift(knumber_base *rhs); knumber_base *bitwise_shift(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *clone(); knumber_base *clone() Q_DECL_OVERRIDE;
private: private:
template <double F(double)> template <double F(double)>
......
...@@ -49,69 +49,69 @@ public: ...@@ -49,69 +49,69 @@ public:
virtual ~knumber_fraction(); virtual ~knumber_fraction();
public: public:
virtual knumber_base *clone(); knumber_base *clone() Q_DECL_OVERRIDE;
public: public:
virtual QString toString(int precision) const; QString toString(int precision) const Q_DECL_OVERRIDE;
virtual quint64 toUint64() const; quint64 toUint64() const Q_DECL_OVERRIDE;
virtual qint64 toInt64() const; qint64 toInt64() const Q_DECL_OVERRIDE;
public: public:
virtual bool is_integer() const; bool is_integer() const Q_DECL_OVERRIDE;
virtual bool is_zero() const; bool is_zero() const Q_DECL_OVERRIDE;
virtual int sign() const; int sign() const Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *add(knumber_base *rhs); knumber_base *add(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *sub(knumber_base *rhs); knumber_base *sub(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mul(knumber_base *rhs); knumber_base *mul(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *div(knumber_base *rhs); knumber_base *div(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mod(knumber_base *rhs); knumber_base *mod(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *bitwise_and(knumber_base *rhs); knumber_base *bitwise_and(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_xor(knumber_base *rhs); knumber_base *bitwise_xor(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_or(knumber_base *rhs); knumber_base *bitwise_or(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_shift(knumber_base *rhs); knumber_base *bitwise_shift(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *pow(knumber_base *rhs); knumber_base *pow(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *neg(); knumber_base *neg() Q_DECL_OVERRIDE;
virtual knumber_base *cmp(); knumber_base *cmp() Q_DECL_OVERRIDE;
virtual knumber_base *abs(); knumber_base *abs() Q_DECL_OVERRIDE;
virtual knumber_base *sqrt(); knumber_base *sqrt() Q_DECL_OVERRIDE;
virtual knumber_base *cbrt(); knumber_base *cbrt() Q_DECL_OVERRIDE;
virtual knumber_base *factorial(); knumber_base *factorial() Q_DECL_OVERRIDE;
virtual knumber_base *reciprocal(); knumber_base *reciprocal() Q_DECL_OVERRIDE;
virtual knumber_base *tgamma(); knumber_base *tgamma() Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *log2(); knumber_base *log2() Q_DECL_OVERRIDE;
virtual knumber_base *log10(); knumber_base *log10() Q_DECL_OVERRIDE;
virtual knumber_base *ln(); knumber_base *ln() Q_DECL_OVERRIDE;
virtual knumber_base *exp2(); knumber_base *exp2() Q_DECL_OVERRIDE;
virtual knumber_base *floor(); knumber_base *floor() Q_DECL_OVERRIDE;
virtual knumber_base *ceil(); knumber_base *ceil() Q_DECL_OVERRIDE;
virtual knumber_base *exp10(); knumber_base *exp10() Q_DECL_OVERRIDE;
virtual knumber_base *exp(); knumber_base *exp() Q_DECL_OVERRIDE;
virtual knumber_base *bin(knumber_base *rhs); knumber_base *bin(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *sin(); knumber_base *sin() Q_DECL_OVERRIDE;
virtual knumber_base *cos(); knumber_base *cos() Q_DECL_OVERRIDE;
virtual knumber_base *tan(); knumber_base *tan() Q_DECL_OVERRIDE;
virtual knumber_base *asin(); knumber_base *asin() Q_DECL_OVERRIDE;
virtual knumber_base *acos(); knumber_base *acos() Q_DECL_OVERRIDE;
virtual knumber_base *atan(); knumber_base *atan() Q_DECL_OVERRIDE;
virtual knumber_base *sinh(); knumber_base *sinh() Q_DECL_OVERRIDE;
virtual knumber_base *cosh(); knumber_base *cosh() Q_DECL_OVERRIDE;
virtual knumber_base *tanh(); knumber_base *tanh() Q_DECL_OVERRIDE;
virtual knumber_base *asinh(); knumber_base *asinh() Q_DECL_OVERRIDE;
virtual knumber_base *acosh(); knumber_base *acosh() Q_DECL_OVERRIDE;
virtual knumber_base *atanh(); knumber_base *atanh() Q_DECL_OVERRIDE;
public: public:
virtual int compare(knumber_base *rhs); int compare(knumber_base *rhs) Q_DECL_OVERRIDE;
private: private:
knumber_integer *numerator() const; knumber_integer *numerator() const;
......
...@@ -41,71 +41,71 @@ public: ...@@ -41,71 +41,71 @@ public:
virtual ~knumber_integer(); virtual ~knumber_integer();
public: public:
virtual knumber_base *clone(); knumber_base *clone() Q_DECL_OVERRIDE;
public: public:
virtual QString toString(int precision) const; QString toString(int precision) const Q_DECL_OVERRIDE;
virtual quint64 toUint64() const; quint64 toUint64() const Q_DECL_OVERRIDE;
virtual qint64 toInt64() const; qint64 toInt64() const Q_DECL_OVERRIDE;
public: public:
virtual bool is_even() const; virtual bool is_even() const;
virtual bool is_odd() const; virtual bool is_odd() const;
virtual bool is_integer() const; bool is_integer() const Q_DECL_OVERRIDE;
virtual bool is_zero() const; bool is_zero() const Q_DECL_OVERRIDE;
virtual int sign() const; int sign() const Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *add(knumber_base *rhs); knumber_base *add(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *sub(knumber_base *rhs); knumber_base *sub(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mul(knumber_base *rhs); knumber_base *mul(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *div(knumber_base *rhs); knumber_base *div(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *mod(knumber_base *rhs); knumber_base *mod(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *bitwise_and(knumber_base *rhs); knumber_base *bitwise_and(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_xor(knumber_base *rhs); knumber_base *bitwise_xor(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_or(knumber_base *rhs); knumber_base *bitwise_or(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *bitwise_shift(knumber_base *rhs); knumber_base *bitwise_shift(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *pow(knumber_base *rhs); knumber_base *pow(knumber_base *rhs) Q_DECL_OVERRIDE;
virtual knumber_base *neg(); knumber_base *neg() Q_DECL_OVERRIDE;
virtual knumber_base *cmp(); knumber_base *cmp() Q_DECL_OVERRIDE;
virtual knumber_base *abs(); knumber_base *abs() Q_DECL_OVERRIDE;
virtual knumber_base *sqrt(); knumber_base *sqrt() Q_DECL_OVERRIDE;
virtual knumber_base *cbrt(); knumber_base *cbrt() Q_DECL_OVERRIDE;
virtual knumber_base *factorial(); knumber_base *factorial() Q_DECL_OVERRIDE;
virtual knumber_base *reciprocal(); knumber_base *reciprocal() Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *log2(); knumber_base *log2() Q_DECL_OVERRIDE;
virtual knumber_base *log10(); knumber_base *log10() Q_DECL_OVERRIDE;
virtual knumber_base *ln(); knumber_base *ln() Q_DECL_OVERRIDE;
virtual knumber_base *exp2(); knumber_base *exp2() Q_DECL_OVERRIDE;
virtual knumber_base *floor(); knumber_base *floor() Q_DECL_OVERRIDE;
virtual knumber_base *ceil(); knumber_base *ceil() Q_DECL_OVERRIDE;
virtual knumber_base *exp10(); knumber_base *exp10() Q_DECL_OVERRIDE;
virtual knumber_base *exp(); knumber_base *exp() Q_DECL_OVERRIDE;
virtual knumber_base *bin(knumber_base *rhs); knumber_base *bin(knumber_base *rhs) Q_DECL_OVERRIDE;
public: public:
virtual knumber_base *sin();