Fix connections in QWidgetWindow
A recent update moved handleScreenChange out of being a private slot. Porting to the new syntax fixes the warning and moves to a compile-time check. Pick-to: 6.5 Change-Id: Ibd85c6caf7dca051d669250a94a82fbddbd3435d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
5d13e05651
commit
ec8e6ed200
@ -129,7 +129,7 @@ QWidgetWindow::QWidgetWindow(QWidget *widget)
|
||||
}
|
||||
|
||||
connect(widget, &QObject::objectNameChanged, this, &QWidgetWindow::updateObjectName);
|
||||
connect(this, SIGNAL(screenChanged(QScreen*)), this, SLOT(handleScreenChange()));
|
||||
connect(this, &QWidgetWindow::screenChanged, this, &QWidgetWindow::handleScreenChange);
|
||||
}
|
||||
|
||||
QWidgetWindow::~QWidgetWindow()
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
tst_QWidget_window();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void cleanup();
|
||||
@ -129,6 +130,11 @@ void tst_QWidget_window::initTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QWidget_window::init()
|
||||
{
|
||||
QTest::failOnWarning(QRegularExpression(".*No such slot.*"));
|
||||
}
|
||||
|
||||
void tst_QWidget_window::cleanupTestCase()
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user