Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48433

Property type conflicts with major versions

    XMLWordPrintable

Details

    Description

      Pre-condition: the same type exists in different major versions:

      • qtquickcontrols1/plugin.cpp:
        qmlRegisterType<QQuickExclusiveGroup>("QtQuick.Controls", 1, 0, "ExclusiveGroup");
        
      • qtquickcontrols2plugin.cpp:
        qmlRegisterType<QQuickExclusiveGroup>("QtQuick.Controls", 2, 0, "ExclusiveGroup");
        

      Consider the following variations to import the two modules:

      • A
        import QtQuick.Controls 1.4
        import QtQuick.Controls 2.0
        
      • B
        import QtQuick.Controls 2.0
        import QtQuick.Controls 1.4
        
      • C
        import QtQuick.Controls 1.4
        import QtQuick.Controls 2.0 as C2
        
      • D
        import QtQuick.Controls 2.0 as C2
        import QtQuick.Controls 1.4
        
      • E
        import QtQuick.Controls 2.0
        import QtQuick.Controls 1.4 as C1
        
      • F
        import QtQuick.Controls 1.4 as C1
        import QtQuick.Controls 2.0
        

      Test snippets:

      • 1
        ApplicationWindow {
            visible: true
            // all ok :)
            ExclusiveGroup { }
        }
        
      • 2
        ApplicationWindow {
            visible: true
            ExclusiveGroup { id: grp }
            // C,E: ok
            // A,B,D,F: Unable to assign QQuickExclusiveGroup to QQuickExclusiveGroup
            property ExclusiveGroup eg: grp
        
      • 3
        ApplicationWindow {
            visible: true
            // A,B,D,F: ok
            // C,E: Cannot assign object to property
            property ExclusiveGroup eg: ExclusiveGroup { }
        }
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpnurmi J-P Nurmi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: