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

you know Getting a location path by [QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)] ,If the name of app is xxx.xxx.exe, getting AppConfigLocation path is xxx not be xxx.xxx

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.9.3
    • Location
    • None
    • Windows

    Description

      //get C:\Users\Administrator\AppData\Local\xxxx

      QString strAppConfigDirPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); 

      #ifdef Q_OS_WIN

      // When processing QT to get standard paths, if the name is xxx. xxx. exe, the suffix of. xxx. exe will be removed instead of. exe. Now we need to reorganize the paths.

      strAppConfigDirPath = strAppConfigDirPath.mid(0,strAppConfigDirPath.lastIndexOf('/') + 1);

      QString strAppName = qApp->applicationFilePath();

      QFileInfo fileinfo(strAppName);

      strAppName = fileinfo.fileName();

      strAppName = strAppName.mid(0,strAppName.lastIndexOf("."));

      Attachments

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

        Activity

          People

            paangele Paolo Angelelli
            sunew 苏 新健
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes