Results 1 to 1 of 1

Thread: Auto checkout files using Perforce

  1. #1
    Join Date
    Feb 2010
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Auto checkout files using Perforce

    At work we use QtCreator and I am trying out Perforce for our source control. The problem I have is whenever files are modified in QtCreator they aren't automatically checked out so you have to first make the file writeable and then in P4v checkout the files to the default changelist. This can be a pain (in my last company we used Visual Studio which handled this perfectly - all we needed to do was modify the files and build so when we went in P4v the files were all there waiting in the changelist).

    Is there any way to get this setup using QtCreator? The version control / Perforce tab in Options doesn't seem to give me any options to do this. 'Automatically open files when editing' seems like the closest but that doesn't work.

    Any help is appreciated, thanks.

    Just some further info, the docs here states that there is a Perforce sub-menu with Describe, Edit File, Opened and Pending Changes options. I can't see this at all...

    http://doc.qt.nokia.com/qtcreator-2....orce-functions

    Thanks


    Added after 28 minutes:


    As usual, after posting I immediately made progress.

    In QtCreator->Tools->Options->Perforce I hadn't set my p4 client correctly. I'll list the style for my settings here for reference in case anyone else has the same problem:

    P4 command: /home/path/to/p4
    p4 port: xxx.xxx.xxx.xxxppp (where x makes up the IP address and p makes up the port)
    p4 client: my_workspace_name
    p4 user: my_username

    You also need to make sure the project you're in is controlled by a Perforce server (i.e. use p4 or p4v to get the code from the server).

    Once that is done, you just need to close QtCreator and re-open it and you will have the Perforce menu. Files are automatically checked out as you edit and save them.

    One little inconvenience is whenever you modify a file for the first time you get the following prompt "warning: you are changing a read-only file" and have to click on the "make writable" button. Is there anyway to automatically do this?

    But at least everything appears to be checking out ok.
    Last edited by JonnyJP; 3rd May 2012 at 09:07.

Similar Threads

  1. Qt-creator + Perforce
    By lenny in forum Qt Tools
    Replies: 0
    Last Post: 19th March 2012, 12:15
  2. Help Checkout from qt gitrious
    By seanasl in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2012, 23:41
  3. Auto-discovery of include files is not working
    By Forte Systems in forum Newbie
    Replies: 2
    Last Post: 3rd June 2010, 16:11
  4. Replies: 1
    Last Post: 11th November 2009, 10:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.