Hello!

I wanted to take the time to explain what I am currently working on for post-2.5
(targeting 2.6), hoping for some feedback...

Note that all I describe here is work-in-progress(TM)!

I am currently working on changing the target we have in Qt Creator. Since
Targets were introduced they are used to group sets of build- and run
configurations based on the platform a developer is targeting. I am currently
changing this to have each Target in a project refer to one specific
device/system configuration instead.

To do so I am adding a "Profile", which is basically a collection of settings
describing one Target. The list of settings can be extended by plugins
(via ProfileInformation objects). This Profile currently contains:
 * some data like a name, icon, etc.
 * a system root (from ProjectExplorer plugin)
 * a tool chain (from ProjectExplorer plugin)
 * a device (a generalization of the Linux devices we have had for a while,
   also from the ProjectExplorer plugin)
 * a Qt version (from the QtSupport plugin)
 * a mkspec (from the Qt4ProjectManager plugin)
 * a debugger (from the Debugger plugin)
 
The plugins can provide default values for the settings they add, hide the
setting for a specific profile, and warn about issues they have with any given
profile (e.g. the tool chain not producing code compatible with the Qt version
in use).

Profiles are either auto-detected by Qt Creator (non-editable, but cloneable) or
manually added (fully editable). Currently we auto-detect two kind of profiles:
One with all the stuff we can pick up in the path and those profiles
(eventually) registered by the SDK.

With this you are able to set up separate profiles
 * for all the different devices you have (using e.g. "Phone 1" and "Phone 2"
   as devices),
 * for different firmware versions of the same kind of device (using different
   system roots, compilers, mkspecs, etc. and devices),
 * for different compiler versions on your desktop (different tool chains)
 * for different Qt versions (different Qt versions, maybe even tool chains and
   mkspecs)
 * for all kinds of other stuff;-)

All the "magic" we have in Qt Creator will be in the one place where these
profiles are set up. So you won't have compilers being hidden in the build
settings anymore (FYI: we do only show the compilers that can produce code for
a Qt version when building with qmake (provided you did not remove Qt from
CONFIG in your .pro-File)), etc. Way better for those who like to meddle while
the auto-detection should work fine for those who do not.


When setting up a project you are still using targets as before to group build-
and run settings. But now the list of available targets is based on the profiles
that are defined and is on longer a built-in list. This should make switching
between different configurations much easier I hope. The profiles can be used in
all projects set up, so it should reduce the amount of configuration needed and
simplify updating configurations shared by a set of projects.

Why this refactoring?
 * It concentrates all the magic in one setup dialog, so that creator should be
   simpler to understand
 * Settings are more reusable
 * Switching between different devices is becoming simpler (not only switching
   between different _types_ of devices)
 * I hope to be able to make some of the build steps more reusable.
 * Make it easier to attach the debugger to running applications
 * Less code for us to maintain;-)

Why talk about this now?

Because we have some plugins pending for merge that are effected by the
changes I am doing. These are of course the platform plugins for android  as 
well as
the QNX one. I want to wait for those to get merged before I merge my changes, 
so
that the inclusion of these plugins is not delayed. So I would appreciate 
getting
those plugins merged soon.

Of course I also want feedback from our users and developers.

Status:

The basics are there (I just pushed a Work-in-Progress state into gerrit at
https://codereview.qt-project.org/#change,24049 ).

Missing pieces are currently
 * importing builds (currently working on that),
 * having a way for the SDK to register profiles,
 * making sure not too many settings are lost when reading configurations from
   existing projects and creator settings,
 * LOTS AND LOTS OF TESTING. Use at your own risk, you have been warned!
 * cleaning up the history of this patch-set to make a review possible. The
   current set of patches in gerrit is basically a straight dump of my work
   repo! Please look at the total diff, not the individual steps I took to get
   there.

Best Regards,
Tobias

Tobias Hunger
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to