diff --git a/qt/qml/PropertySelector/PropertySelector.cpp b/qt/qml/PropertySelector/PropertySelector.cpp index 7ad988b..55e04a2 100644 --- a/qt/qml/PropertySelector/PropertySelector.cpp +++ b/qt/qml/PropertySelector/PropertySelector.cpp @@ -110,7 +110,7 @@ using namespace cpp::qmltypes; ///@brief constructor ///@param parent the parent item -PropertySelector::PropertySelector(QQuickItem *parent) +PropertySelector::PropertySelector(QObject *parent) :QObject(parent) { } @@ -286,9 +286,9 @@ void PropertySelector::prepareRules() auto context = QQmlEngine::contextForObject(target()); const QString objectName = context->objectName().isEmpty() ? QStringLiteral("unnamed") : context->objectName(); //FIXME: broken auto switchContext = QQmlEngine::contextForObject(this); - qWarning(QString("PropertySelector target %1 (%2) does not have a property '%3' requested from %4, line %5:%6") + qWarning() << QString("PropertySelector target %1 (%2) does not have a property '%3' requested from %4, line %5:%6") .arg(target()->metaObject()->className(), objectName, start->property, - switchContext->baseUrl().toString(), QString::number(start->location.line), QString::number(start->location.column)).toLatin1() ); + switchContext->baseUrl().toString(), QString::number(start->location.line), QString::number(start->location.column)).toLatin1(); } else { PropertyRules rules {prop, start, end, end, nullptr}; m_properties.append(rules); diff --git a/qt/qml/PropertySelector/PropertySelector.h b/qt/qml/PropertySelector/PropertySelector.h index 55c3311..d4d8ba1 100644 --- a/qt/qml/PropertySelector/PropertySelector.h +++ b/qt/qml/PropertySelector/PropertySelector.h @@ -30,7 +30,6 @@ #ifndef PROPERTYSWITCH_H #define PROPERTYSWITCH_H -#include #include #include #include @@ -51,7 +50,7 @@ class PropertySelector : public QObject, public QQmlParserStatus ///@brief the maximum number of conditions supported static const int MaxConditionCount = 32; - PropertySelector(QQuickItem *parent = nullptr); + PropertySelector(QObject *parent = nullptr); QObject *target() const; Q_SLOT void setTarget(QObject *target);