• Cristian Adam's avatar
    Perforce: fixed invalid setTopLevel calls · 30db0202
    Cristian Adam authored
    When using P4CONFIG one can user multiple p4 workspaces.
    
    For every workspace one needs to have a p4config.txt file,
    which contains the P4CLIENT, P4USER, P4PORT variable values.
    
    Qt Creator will query on various directories for p4 configuration.
    "p4 client" command will give an error if a p4config.txt file is
    not present. p4 will try to connect to localhost when P4PORT is
    not set and give and error, but it will take a long time to
    timeout.
    
    This timeout gives the impression that P4 does a lot of work and
    Qt Creator will sometimes freeze.
    
    The solution to this timeout is to set P4PORT and P4USER. In
    this case "p4 client" will give back the same generic "Root:"
    variable e.g. c:\p4, which will be seen as a valid path and
    PerforcePlugin::setTopLevel will be called and thus setting the
    path of the current workspace, which is not valid.
    
    Fortunately in this case "Client:" and "Host:" variables in the
    output given by the "p4 client" have the same value. "Client:"
    will probably never have the same value as the "Host:" value,
    thus making it safe to ignore these invalid "p4 client" calls.
    
    Change-Id: Iafb2640cccd7bd10c455d33ea9d36c5eae2e2951
    Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
    30db0202
Name
Last commit
Last update
..
Perforce.json.in Loading commit data...
Perforce.mimetypes.xml Loading commit data...
annotationhighlighter.cpp Loading commit data...
annotationhighlighter.h Loading commit data...
changenumberdialog.cpp Loading commit data...
changenumberdialog.h Loading commit data...
changenumberdialog.ui Loading commit data...
pendingchangesdialog.cpp Loading commit data...
pendingchangesdialog.h Loading commit data...
pendingchangesdialog.ui Loading commit data...
perforce.pro Loading commit data...
perforce.qbs Loading commit data...
perforce.qrc Loading commit data...
perforce_dependencies.pri Loading commit data...
perforcechecker.cpp Loading commit data...
perforcechecker.h Loading commit data...
perforceeditor.cpp Loading commit data...
perforceeditor.h Loading commit data...
perforceplugin.cpp Loading commit data...
perforceplugin.h Loading commit data...
perforcesettings.cpp Loading commit data...
perforcesettings.h Loading commit data...
perforcesubmiteditor.cpp Loading commit data...
perforcesubmiteditor.h Loading commit data...
perforcesubmiteditorwidget.cpp Loading commit data...
perforcesubmiteditorwidget.h Loading commit data...
perforceversioncontrol.cpp Loading commit data...
perforceversioncontrol.h Loading commit data...
promptdialog.ui Loading commit data...
settingspage.cpp Loading commit data...
settingspage.h Loading commit data...
settingspage.ui Loading commit data...
submitpanel.ui Loading commit data...