QQmlConnections: make overridden virtual functions protected
QQmlConnections overrides classBegin and componentComplete from QQmlParserStatus. the purely virtual functions are public, but the overridden functions are private. this causes compile errors with qmltc generated code. Pick-to: 6.5 6.6 Change-Id: Ic586265412cbbec945a04bd2313f499738a10675 Task-Id: QTBUG-114359 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
0978bb32a9
commit
d59e43d0a3
|
@ -51,6 +51,10 @@ public:
|
|||
bool ignoreUnknownSignals() const;
|
||||
void setIgnoreUnknownSignals(bool ignore);
|
||||
|
||||
protected:
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void targetChanged();
|
||||
Q_REVISION(2, 3) void enabledChanged();
|
||||
|
@ -59,9 +63,6 @@ private:
|
|||
void connectSignals();
|
||||
void connectSignalsToMethods();
|
||||
void connectSignalsToBindings();
|
||||
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
};
|
||||
|
||||
// TODO: Drop this class as soon as we can
|
||||
|
|
|
@ -44,6 +44,7 @@ set(qml_sources
|
|||
regexpBindings.qml
|
||||
AliasBase.qml
|
||||
aliasAssignments.qml
|
||||
Connections.qml
|
||||
|
||||
qtbug103956/SubComponent.qml
|
||||
qtbug103956/MainComponent.qml
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import QtQuick
|
||||
|
||||
Rectangle {
|
||||
property string hello
|
||||
|
||||
id: root
|
||||
|
||||
Connections {
|
||||
target: root
|
||||
function onHelloChanged(argument) {}
|
||||
}
|
||||
}
|
|
@ -25,6 +25,7 @@
|
|||
#include "specialproperties.h"
|
||||
#include "regexpbindings.h"
|
||||
#include "aliasassignments.h"
|
||||
#include "connections.h"
|
||||
|
||||
#include "signalhandlers.h"
|
||||
#include "javascriptfunctions.h"
|
||||
|
@ -150,6 +151,7 @@ void tst_qmltc::initTestCase()
|
|||
QUrl("qrc:/qt/qml/QmltcTests/regexpBindings.qml"),
|
||||
QUrl("qrc:/qt/qml/QmltcTests/AliasBase.qml"),
|
||||
QUrl("qrc:/qt/qml/QmltcTests/aliasAssignments.qml"),
|
||||
QUrl("qrc:/qt/qml/QmltcTests/Connections.qml"),
|
||||
|
||||
QUrl("qrc:/qt/qml/QmltcTests/qtbug103956/SubComponent.qml"),
|
||||
QUrl("qrc:/qt/qml/QmltcTests/qtbug103956/MainComponent.qml"),
|
||||
|
@ -890,6 +892,12 @@ void tst_qmltc::aliasAssignments()
|
|||
}
|
||||
}
|
||||
|
||||
void tst_qmltc::connections()
|
||||
{
|
||||
QQmlEngine e;
|
||||
PREPEND_NAMESPACE(Connections) created(&e);
|
||||
}
|
||||
|
||||
void tst_qmltc::signalHandlers()
|
||||
{
|
||||
QQmlEngine e;
|
||||
|
|
|
@ -39,6 +39,7 @@ private slots:
|
|||
void specialProperties();
|
||||
void regexpBindings();
|
||||
void aliasAssignments();
|
||||
void connections();
|
||||
|
||||
void signalHandlers();
|
||||
void jsFunctions();
|
||||
|
|
Loading…
Reference in New Issue