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

QDir::homePath() does not work as documented on non-Windows OS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.8.4, 5.0.0
    • Fix Version/s: 5.0.1
    • Component/s: Core: I/O
    • Environment:
      Ubuntu 10.04 LTS, VxWorks 6.9.2
    • Commits:
      05b4000e01ff5785739617c3069fbe0b0d36a606

      Description

      Checking QString home.isNull() is never true if HOME environment variable is not set, it's empty (""). Should use isEmpty() instead.

      QString QFileSystemEngine::homePath()
      {
      QString home = QFile::decodeName(qgetenv("HOME"));
      if (home.isNull())
      home = rootPath();
      return QDir::cleanPath(home);
      }

        Attachments

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

          Activity

            People

            Assignee:
            papetaja Pasi Petäjäjärvi
            Reporter:
            papetaja Pasi Petäjäjärvi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes