Results 1 to 6 of 6

Thread: Duplicate a Qt Creator project

  1. #1
    Join Date
    Nov 2009
    Posts
    129
    Thanks
    4
    Thanked 29 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Duplicate a Qt Creator project

    What’s the simplest foolproof way to duplicate a Qt Creator project?

    In more detail: I have a project at a certain stage of development. Before adding more complexity, I want to duplicate the project and work on the duplicate, so I can compare any performance problems or bugs I encounter to see if they were introduced by the new code or were already present in the “base” version (as well as preserving the possibility of an easy retreat to the older version if things go badly).

    Up to now, I’ve been copying the folder containing the source and build folders to a new location, then doing search and replace for the project and folder names in the copied .pro and .pro.user files with a text editor. Is there a more straightforward (and less error-prone) way?

  2. #2
    Join Date
    Oct 2009
    Posts
    151
    Thanks
    6
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Duplicate a Qt Creator project

    Being a simpleton, under Windows I just make a copy of the project folder before I try anything exotic. If it goes wrong I simply delete the project folder and rename the copy.


    You could set up your PC to dual boot with Linux.
    Under linux there are a number of code management systems that can be freely downloaded - GIT, Subversion etc (there may also be windows versions) these maintain a full change history so you can roll backwards and forwards between different iterations.

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Duplicate a Qt Creator project

    Quote Originally Posted by Coises View Post
    Up to now, I’ve been copying the folder containing the source and build folders to a new location, then doing search and replace for the project and folder names in the copied .pro and .pro.user files with a text editor. Is there a more straightforward (and less error-prone) way?
    Use a version control system like SVN or git which seems to become very popular last days.

  4. #4
    Join Date
    Jul 2006
    Location
    Catalunya - Spain
    Posts
    117
    Thanks
    16
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Duplicate a Qt Creator project

    Quote Originally Posted by JD2000 View Post
    Under linux there are a number of code management systems that can be freely downloaded - GIT, Subversion etc (there may also be windows versions) these maintain a full change history so you can roll backwards and forwards between different iterations.
    Also in Windows : TortoiseSVN / Tortoisegit

    Use any SCM you feel confortable. It's useful and will save you a lot of pain.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,365
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Duplicate a Qt Creator project

    For such a simple usecase I'd suggest subversion (or even cvs) and not git which is a little harder to grasp for beginners.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Duplicate a Qt Creator project

    Personally, I use TortoiseSVN on Windows. I prefer to have a seperate repository for each project, so my directory structure is like:

    <projdir>/Repo
    <projdir>/Branch
    <projdir>/Trunk

    Where 'repo' is the storage area for SVN, Branch is for my experimental, learning and new features, and Trunk is the latest "stable" version. I create all the functionality in the branches, and then merge the changes into the trunk as they work.

    It makes tracking changes very easy, and if you decide to abandon a feature for whatever reason, you can just copy the trunk to another branch and work on something else, going back to the former whenever or never.

    Like others, SVN is intended to use a server, but since there's only ever me using it, I just use a local directory and its quite happy. It also means I can just backup the "repo" dir and ignore the rest, and is typically much smaller as its configured to ignore all the non-essential files and files which can be easily rebuilt.

    [ I don't know if this is the best way to use a VCS, but it's how I use it ]

Similar Threads

  1. How to remove duplicate enteries from QStringList.
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 7th March 2019, 15:02
  2. QMake, partitioning, and duplicate targets
    By dhjdhj in forum Qt Tools
    Replies: 3
    Last Post: 3rd August 2009, 19:28
  3. Replies: 13
    Last Post: 6th February 2009, 21:27
  4. Remove Duplicate Lines in a file
    By nmuntz in forum Qt Programming
    Replies: 4
    Last Post: 12th January 2009, 00:04
  5. Replies: 3
    Last Post: 22nd June 2006, 16:27

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.