Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-17749

Project working directory from run settings initially not applied

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • Qt Creator 4.3.0-rc1
    • Qt Creator 4.2.0
    • None
    • Windows 7 and Windows 10
      Qt 5.8 MinGW and MSVC2015 32bit

    Description

      The working directory setting from project's run configuration seems not to be applied after a fresh installation on Windows.

      Steps to reproduce:

      • Installation from scratch
      • Create a new empty QtQuick project
      • Add a `qDebug() << engine.baseUrl();` debug output right after initializing the engine in main.cpp
      • Debug output is *user's home directory*

      I guess this is due to the fact that empty QDir() uses the current working directory as base path, and as the working dir is not set from the Qt Creator session it falls back to the user dir.

      Steps to temp. fix the issue:

      • Open the projects run configuration
      • Check the checkbox "Run in terminal" and uncheck it again
      • From now on the baseUrl is correctly set to the *shadow build directory*, as it was the case with Qt Creator 4.1

      Interestingly, the setting is persistent somewhere outside of the project files, after closing Qt Creator, deleting the shadow build directory, clearing the .pro.user file and re-opening Qt Creator, the correct working directory is still applied.

      I tested this on latest Qt 5.8 MinGW and MSVC2015 32bit, they both have the same behavior.

      Probably related: https://bugreports.qt.io/browse/QTBUG-57651

      Attachments

        Issue Links

          Activity

            People

              hunger Tobias Hunger
              alexleutgoeb Alex Leutgöb
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: