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

Qt 5 to-do in QSettings

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 5.0.0 Beta 1, 5.0.0
    • None
    • Core: Other
    • None
    • 5eaf0b8ef0e0ad74e4c21cb6e688071a6cf8f66f

    Description

      qtbase/src/corelib/io/qsettings.cpp
      void QSettingsPrivate::iniEscapedStringList(const QStringList &strs, QByteArray &result, QTextCodec *codec)
      {
          if (strs.isEmpty()) {
              /*
                  We need to distinguish between empty lists and one-item
                  lists that contain an empty string. Ideally, we'd have a
                  @EmptyList() symbol but that would break compatibility
                  with Qt 4.0. @Invalid() stands for QVariant(), and
                  QVariant().toStringList() returns an empty QStringList,
                  so we're in good shape.
      
                  ### Qt 5: Use a nicer syntax, e.g. @List, for variant lists
              */
              result += "@Invalid()";
          } else {
              for (int i = 0; i < strs.size(); ++i) {
                  if (i != 0)
                      result += ", ";
                  iniEscapedString(strs.at(i), result, codec);
              }
          }
      }
      

      If this is still desirable and can be done without breaking source compatibility, it can be done for Qt 5.0.0. If not, the comment should be removed or changed to a Qt 6 to-do.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes