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

QSettings key with asterisk for QT_LOGGING_CONF

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.2, 5.12.0
    • 5.11.0
    • Core: I/O
    • None
    • bd0279c4173eb627d432d9a05411bbc725240d4e

    Description

      When you use a configuration file for your logging rules and read/write this file with QSettings, you're not able to save an asterisk. The asterisk will be encoded to %2A and saved. So the whished logging rule won't be applied.

      QSettings settings("config.ini", QSettings::IniFormat);
      settings.beginGroup("Rules");
      settings.setValue("module.*", false);
      settings.endGroup();
      

      The code above will be saved in the config.ini file as:

      [Rules]
      module.%2A=false
      

      Now, If you set the QT_LOGGING_CONF environment variable to config.ini, the QLoggingCategory is not able to interpret %2A as asterisk.

      So either, QSettings will save the asterisk without encoding or the parser of QLoggingCategory can interpret the encoding.

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            beecksche beecksche
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes