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

Perforce integration only works when starting qtcreator from the project directory

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Not Evaluated
    • Resolution: Cannot Reproduce
    • Qt Creator 9.0.0
    • None
    • None
    • Ubuntu 22.04, Plasma
    • Linux/X11

    Description

      After enabling the Perforce plugin and setting up the options in the configuration dialog, the perforce integration was still not working (editing a file wouldn't make it writable).

      I did some debugging and here's what happens on startup:

      Perforce::Internal::PerforcePluginPrivate::getTopLevel: Creating PerforceChecker for workingDirectory ""
       Perforce::Internal::PerforcePluginPrivate::setTopLevel: "Perforce repository: /home/kdab/src/qt-creator/build" 

      Obviously this isn't a perforce repository, and getTopLevel/setTopLevel is never called again after opening the last session with a cmake project in perforce, so nothing works.

      Same test, but starting QtCreator from the toplevel directory of the project sources:

      Perforce::Internal::PerforcePluginPrivate::getTopLevel: Creating PerforceChecker for workingDirectory "" 
      Perforce::Internal::PerforcePluginPrivate::setTopLevel: "Perforce repository: /home/kdab/customername/workspacename" 
      Perforce::Internal::PerforcePluginPrivate::managesDirectoryFstat: ("fstat", "-m1", [...]) 

      => we're good to go, everything works.

      This is debug output I added myself in the QtCreator 8.0.2 sources, but the bug also happens in QtCreator 9 (installed from online binaries)

      Attachments

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

        Activity

          People

            orgads Orgad Shaneh
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes