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

Support for P4CONFIG is still missing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P5: Not important
    • None
    • Qt Creator 4.0.3, Qt Creator 4.2.0-beta1
    • OS X El Capitan
      Version 10.11.5

      Shell: zsh

    Description

      This feature doesn't work in either Qt Creator git or 4.0.3, at least on Mac. There are three issues that I have discovered so far:

      1. the QProcess used in PerforceChecker is using an empty QProcessEnvironment, so it never picks up the P4CONFIG environment variable;
      2. the working directory used to test the Perforce settings in Qt Creator is not set, which means the test always fails when using P4CONFIG;
      3. the QProcessEnvironment of the QProcesses used in PerforcePlugin is only ever set when the OverrideDiffEnvironment flag is set. This means that using P4CONFIG only actually works when running a Diff command.

      Whilst investigating this issue, it seems like the system environment is expected to be set on the QProcesses used by default, otherwise how could P4CONFIG ever be detected? The QProcess::processEnvironment documentation states:

      If no environment has been set, the environment of the calling process will be used.

      It looks like either the environment of our calling process is being cleared, or the documentation is wrong.

      Attachments

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

        Activity

          People

            hunger Tobias Hunger
            nathan.collins Nathan Collins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes