Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-1386

Documentation error -> "Operations": type "Settings"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 3.2.0
    • 3.0.6, 3.1.1
    • General
    • None
    • All

    Description

      In Operations documentation:
      https://doc.qt.io/qtinstallerframework/operations.html

      • "aValue" parameter is wrong. The correct one is "value".
        Code: settingsoperation.cpp
        bool SettingsOperation::checkArguments()
        {
          const QString path = argumentKeyValue(QLatin1String("path"));
          const QString method = argumentKeyValue(QLatin1String("method"));
          const QString key = argumentKeyValue(QLatin1String("key"));
          const QString aValue = argumentKeyValue(QLatin1String("value"));
          ...
          ...
        }
        

        Code: settingsoperation.cpp

        bool SettingsOperation::performOperation()
        {
          if (!checkArguments())
            return false;
          const QString path = argumentKeyValue(QLatin1String("path"));
          const QString method = argumentKeyValue(QLatin1String("method"));
          const QString key = argumentKeyValue(QLatin1String("key"));
          const QString aValue = argumentKeyValue(QLatin1String("value"));
          ...
          ...
        }
        

        Proposed change in: `operations.qdoc`

        \row
         \li Settings
         \li "Settings" \c path \c method \c key \c value
         \li Sets or removes the value \c value of \c key in the settings file
         or registry located at \c path, depending on the value of
         \c method: \c set, \c remove, \c add_array_value, and \c remove_array_value.

      Note: Documentation indicates that using the Settings operation it is possible to write a "registry". Does it means windows registry? I tried but never was able to do it. Instead, creates a folder HKEY_CURRENT_USER\Software\...
      According to the code in: settingsoperation.cpp

        QSettingsWrapper settings(path, QSettingsWrapper::IniFormat);
      

      Does this force to write only in files? If yes, maybe documentation could be modified; It is error prone.

      Attachments

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

        Activity

          People

            arttu.tarkiainen Arttu Tarkiainen
            zancos zancos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes