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

Use Q_DECLARE_OVERRIDE

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