Fix GCC 4.8 build

Change-Id: I4994146b359e8e37f6c0fa1b27f03fb9e800fdd5
Fixes: QTBUG-77218
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Ville Voutilainen 2019-08-05 15:24:16 +03:00
parent f3c816befe
commit 4f116f00fc
4 changed files with 27 additions and 27 deletions

View File

@ -94,7 +94,7 @@ public:
}
QVertexIndexVector() = default;
QVertexIndexVector(const QVertexIndexVector &other) = default;
QVertexIndexVector(const QVertexIndexVector &) = default;
inline QVertexIndexVector &operator = (const QVertexIndexVector &other)
{
if (t == UnsignedInt)

View File

@ -114,8 +114,8 @@ public:
// not ambiguous. Implementation detail that should not be documented.
template<char = 0>
#endif
QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
: QTextLayout(text, font, const_cast<QPaintDevice*>(paintdevice))
QTextLayout(const QString &textData, const QFont &textFont, const QPaintDevice *paintdevice)
: QTextLayout(textData, textFont, const_cast<QPaintDevice*>(paintdevice))
{}
#else
QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice = nullptr);

View File

@ -118,7 +118,7 @@ public:
QStyleOptionFocusRect();
QStyleOptionFocusRect(const QStyleOptionFocusRect &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionFocusRect &operator=(const QStyleOptionFocusRect &other) = default;
QStyleOptionFocusRect &operator=(const QStyleOptionFocusRect &) = default;
protected:
QStyleOptionFocusRect(int version);
@ -143,7 +143,7 @@ public:
QStyleOptionFrame();
QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionFrame &operator=(const QStyleOptionFrame &other) = default;
QStyleOptionFrame &operator=(const QStyleOptionFrame &) = default;
protected:
QStyleOptionFrame(int version);
@ -173,7 +173,7 @@ public:
QStyleOptionTabWidgetFrame();
inline QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
: QStyleOption(Version, Type) { *this = other; }
QStyleOptionTabWidgetFrame &operator=(const QStyleOptionTabWidgetFrame &other) = default;
QStyleOptionTabWidgetFrame &operator=(const QStyleOptionTabWidgetFrame &) = default;
protected:
QStyleOptionTabWidgetFrame(int version);
@ -197,7 +197,7 @@ public:
QStyleOptionTabBarBase();
QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionTabBarBase &operator=(const QStyleOptionTabBarBase &other) = default;
QStyleOptionTabBarBase &operator=(const QStyleOptionTabBarBase &) = default;
protected:
QStyleOptionTabBarBase(int version);
@ -229,7 +229,7 @@ public:
QStyleOptionHeader();
QStyleOptionHeader(const QStyleOptionHeader &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionHeader &operator=(const QStyleOptionHeader &other) = default;
QStyleOptionHeader &operator=(const QStyleOptionHeader &) = default;
protected:
QStyleOptionHeader(int version);
@ -252,7 +252,7 @@ public:
QStyleOptionButton();
QStyleOptionButton(const QStyleOptionButton &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionButton &operator=(const QStyleOptionButton &other) = default;
QStyleOptionButton &operator=(const QStyleOptionButton &) = default;
protected:
QStyleOptionButton(int version);
@ -290,7 +290,7 @@ public:
QStyleOptionTab();
QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionTab &operator=(const QStyleOptionTab &other) = default;
QStyleOptionTab &operator=(const QStyleOptionTab &) = default;
protected:
QStyleOptionTab(int version);
@ -321,7 +321,7 @@ public:
int midLineWidth;
QStyleOptionToolBar();
QStyleOptionToolBar(const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionToolBar &operator=(const QStyleOptionToolBar &other) = default;
QStyleOptionToolBar &operator=(const QStyleOptionToolBar &) = default;
protected:
QStyleOptionToolBar(int version);
@ -349,7 +349,7 @@ public:
QStyleOptionProgressBar();
QStyleOptionProgressBar(const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionProgressBar &operator=(const QStyleOptionProgressBar &other) = default;
QStyleOptionProgressBar &operator=(const QStyleOptionProgressBar &) = default;
protected:
QStyleOptionProgressBar(int version);
@ -380,7 +380,7 @@ public:
QStyleOptionMenuItem();
QStyleOptionMenuItem(const QStyleOptionMenuItem &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionMenuItem &operator=(const QStyleOptionMenuItem &other) = default;
QStyleOptionMenuItem &operator=(const QStyleOptionMenuItem &) = default;
protected:
QStyleOptionMenuItem(int version);
@ -400,7 +400,7 @@ public:
QStyleOptionDockWidget();
QStyleOptionDockWidget(const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionDockWidget &operator=(const QStyleOptionDockWidget &other) = default;
QStyleOptionDockWidget &operator=(const QStyleOptionDockWidget &) = default;
protected:
QStyleOptionDockWidget(int version);
@ -452,7 +452,7 @@ public:
QStyleOptionViewItem();
QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionViewItem &operator=(const QStyleOptionViewItem &other) = default;
QStyleOptionViewItem &operator=(const QStyleOptionViewItem &) = default;
protected:
QStyleOptionViewItem(int version);
@ -483,7 +483,7 @@ public:
QStyleOptionToolBox();
QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionToolBox &operator=(const QStyleOptionToolBox &other) = default;
QStyleOptionToolBox &operator=(const QStyleOptionToolBox &) = default;
protected:
QStyleOptionToolBox(int version);
@ -503,7 +503,7 @@ public:
QStyleOptionRubberBand();
QStyleOptionRubberBand(const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionRubberBand &operator=(const QStyleOptionRubberBand &other) = default;
QStyleOptionRubberBand &operator=(const QStyleOptionRubberBand &) = default;
protected:
QStyleOptionRubberBand(int version);
@ -522,7 +522,7 @@ public:
QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex);
QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionComplex &operator=(const QStyleOptionComplex &other) = default;
QStyleOptionComplex &operator=(const QStyleOptionComplex &) = default;
};
#if QT_CONFIG(slider)
@ -547,7 +547,7 @@ public:
QStyleOptionSlider();
QStyleOptionSlider(const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionSlider &operator=(const QStyleOptionSlider &other) = default;
QStyleOptionSlider &operator=(const QStyleOptionSlider &) = default;
protected:
QStyleOptionSlider(int version);
@ -567,7 +567,7 @@ public:
QStyleOptionSpinBox();
QStyleOptionSpinBox(const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionSpinBox &operator=(const QStyleOptionSpinBox &other) = default;
QStyleOptionSpinBox &operator=(const QStyleOptionSpinBox &) = default;
protected:
QStyleOptionSpinBox(int version);
@ -595,7 +595,7 @@ public:
QStyleOptionToolButton();
QStyleOptionToolButton(const QStyleOptionToolButton &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionToolButton &operator=(const QStyleOptionToolButton &other) = default;
QStyleOptionToolButton &operator=(const QStyleOptionToolButton &) = default;
protected:
QStyleOptionToolButton(int version);
@ -618,7 +618,7 @@ public:
QStyleOptionComboBox();
QStyleOptionComboBox(const QStyleOptionComboBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionComboBox &operator=(const QStyleOptionComboBox &other) = default;
QStyleOptionComboBox &operator=(const QStyleOptionComboBox &) = default;
protected:
QStyleOptionComboBox(int version);
@ -637,7 +637,7 @@ public:
QStyleOptionTitleBar();
QStyleOptionTitleBar(const QStyleOptionTitleBar &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionTitleBar &operator=(const QStyleOptionTitleBar &other) = default;
QStyleOptionTitleBar &operator=(const QStyleOptionTitleBar &) = default;
protected:
QStyleOptionTitleBar(int version);
@ -658,7 +658,7 @@ public:
QStyleOptionGroupBox();
QStyleOptionGroupBox(const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionGroupBox &operator=(const QStyleOptionGroupBox &other) = default;
QStyleOptionGroupBox &operator=(const QStyleOptionGroupBox &) = default;
protected:
QStyleOptionGroupBox(int version);
};
@ -673,7 +673,7 @@ public:
QStyleOptionSizeGrip();
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
QStyleOptionSizeGrip &operator=(const QStyleOptionSizeGrip &other) = default;
QStyleOptionSizeGrip &operator=(const QStyleOptionSizeGrip &) = default;
protected:
QStyleOptionSizeGrip(int version);
};
@ -690,7 +690,7 @@ public:
QStyleOptionGraphicsItem();
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
QStyleOptionGraphicsItem &operator=(const QStyleOptionGraphicsItem &other) = default;
QStyleOptionGraphicsItem &operator=(const QStyleOptionGraphicsItem &) = default;
static qreal levelOfDetailFromTransform(const QTransform &worldTransform);
protected:
QStyleOptionGraphicsItem(int version);

View File

@ -491,7 +491,7 @@ void tst_QApplication::lastWindowClosed()
QPointer<QDialog> dialog = new QDialog;
dialog->setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QLatin1String("Dialog"));
QVERIFY(dialog->testAttribute(Qt::WA_QuitOnClose));
QTimer::singleShot(1000, dialog, &QDialog::accept);
QTimer::singleShot(1000, dialog.data(), &QDialog::accept);
dialog->exec();
QVERIFY(dialog);
QCOMPARE(spy.count(), 0);