QtScriptedStateMachine and qt5



  • I have a problem to compile the following for qt5
    "https://qt.gitorious.org/qt-labs/scxml/source/master:":https://qt.gitorious.org/qt-labs/scxml/source/master:

    I get the following error:
    @C:\Develop\OpenView3D\3rdparty\qt5\qtstatemachine\src\qstatemachine.cpp:1879: error: cannot convert 'const char*' to 'const QByteArrayData* {aka const QArrayData*}' in initialization
    };
    ^
    @

    And this is the lines in the source where the error is. (line 1879 is here line 6)
    @
    static const char qt_meta_stringdata_QtSignalEventGenerator[] = {
    "QtSignalEventGenerator\0\0execute()\0"
    };

    const QMetaObject QtSignalEventGenerator::staticMetaObject = {
    { &QObject::staticMetaObject, qt_meta_stringdata_QtSignalEventGenerator,
    qt_meta_data_QtSignalEventGenerator, 0 }
    };
    @


  • Moderators

    Last update to that repository was almost 2 years ago...

    I think something like this might help you:
    @
    const QByteArrayData *data = qt_meta_stringdata_QtSignalEventGenerator;
    const QMetaObject QtSignalEventGenerator::staticMetaObject = {
    { &QObject::staticMetaObject, data,
    qt_meta_data_QtSignalEventGenerator, 0 }
    @



  • Thanks that worked. I had to do like this, though.
    @
    const QByteArrayData data = (QByteArrayData) qt_meta_stringdata_QtSignalEventGenerator;
    @


  • Moderators

    Yep, have not checked it with a compiler ;) I'm glad this helped you. Have fun!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.