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

QMetaType: type QMap<int,QFlags<Qt::AlignmentFlag>> has more than one typedef alias: ColumnAlignmentMap, ColumnAlignmentMap

    XMLWordPrintable

Details

    • Linux/X11
    • eabb3fd2f0 (qt/qtbase/dev) eabb3fd2f0 (qt/tqtc-qtbase/dev) 3c6154d8b3 (qt/qtbase/6.3) 3c6154d8b3 (qt/tqtc-qtbase/6.3) cbc19427e2 (qt/qtbase/6.2) cbc19427e2 (qt/tqtc-qtbase/6.2) 260294346b (qt/qtbase/dev) 260294346b (qt/tqtc-qtbase/dev)

    Description

      After commit " QVariant: use a typedef name when saving user types to QDataStream" 46dc8e453ae1d0c1eb749cfebe686995f3a6cfd0 https://codereview.qt-project.org/c/qt/qtbase/+/373506 I'm seeing the following warning:

       

      QMetaType: type QMap<int,QFlags<Qt::AlignmentFlag>> has more than one typedef alias: ColumnAlignmentMap, ColumnAlignmentMap

      Example code:

      using ColumnAlignmentMap = QMap<int, Qt::Alignment>;
      Q_DECLARE_METATYPE(ColumnAlignmentMap)
      
      ColumnAlignmentMap column_alignment1;
      column_alignment1.insert(0, Qt::AlignCenter);
      column_alignment1.insert(1, Qt::AlignRight);
      column_alignment1.insert(2, Qt::AlignLeft);
      
      QSettings s;
      s.beginGroup("Test");
      s.setValue("column_alignments", QVariant::fromValue<ColumnAlignmentMap>(column_alignment1));
      ColumnAlignmentMap column_alignment2 = s.value("column_alignments").value<ColumnAlignmentMap>();
      s.endGroup();
      
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: