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

QDir() behavior is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.1
    • Core: I/O
    • None
    • Windows 10 x64
      Qt 5.7.1 x86 VS2013

    Description

      Empty QDir() returns user home dir while program working dir should be returned. This breakes QFileInfo behavior as well.

      Code:
      #include <QCoreApplication>

      #include <QDir>
      #include <QDebug>

      int main(int argc, char *argv[])

      { QCoreApplication a(argc, argv); qDebug() << QDir().absolutePath() << a.applicationDirPath(); return 0; }

      Attachments

        1. 123.png
          123.png
          45 kB
        2. 2.PNG
          2.PNG
          51 kB
        3. 3.png
          3.png
          50 kB
        4. QTBUG-57651_2.ZIP
          0.6 kB
        5. QTBUG-57651.ZIP
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            samdavydov Sam Davydov
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes