I'm about to go to sleep, so I dug a bit further. The problem lies in the
way QT Creator handles the .user file (which, aside, uses an extension
claimed by Visual Studio on Windows).

The .user file contains many configuration options for QT Creator generally.
Most of these are "host platform neutral". The notable exception is the
build configuration information. *That* information is *also* host platform
neutral, but QT Creator (2.3.0) handles it using the wrong strategy. The
problem, in brief, is that Qt Creator on Windows host does not know about
the various Qt versions on Mac host and vice versa. I assume (but I have not
checked) that the same is true for Linux host.

In my opinion, this is a bug. Before I file a bug report on this, I want to
explain *why* I think it is a bug and what I believe ought to be happening
here.

Qt manages multiple build settings already. For each build setting, it
records the Qt Version that is required to perform that build. A given Qt
Version may be present on one or more host (build) platforms, but it is not
necessarily present on the build platform where Qt Creator is currently
being run.

When Qt Creator is presented with a Build Configuration that has an
unrecognized Qt Version, it shows the Qt Version to "invalid Qt version". I
assume that this behavior is defensive - we obviously don't want to go doing
builds using a Qt Version that is not present on the build host. The problem
is that Qt Creator then *saves* this change back to the .user file. In the
process, it destroys information that is useful to versions of Qt Creator
that run on other platforms.

In my opinion, the following would be better behavior:

   1. Qt Creator should at least know the *names* of all known Qt Versions -
   even versions that cannot be built on the current build host.
   2. When Qt Creator is presented with a build configuration that relies on
   a Qt Version that is not supported by the current build host, it should:
      - [Silently] skip the build of that configuration
      - Identify the Qt version as unavailable in the "Build Settings", by
      graying-out those versions in the drop list.
      - Leave that entry in the .user file alone unless the user changes it
      in the Build Settings page
      - Most importantly: NOT alter the Qt Version that was previously
      stored unless the user has used the drop list to change the entry.

That is: Qt Creator should simply leave unknown build configurations alone
so that they can continue to be used on other platforms. Ideally, Qt Creator
should at least know the *names* of all known Qt Versions so that it can
distinguish between "suspicious and probably bad" versions and "versions not
buildable on this platform", but that is a change that could come in a later
version.


At least in the .user files that I have examined, this change would allow
the .user file to be used successfully on multiple platforms, and we could
then remove the warning about loading "foreign" .user files.

Does this seem like a reasonable statement of desired behavior?  If so, I
would be willing to look into the .user file further to see if there may be
some other dependency/issue with cross-platform use that I have failed to
consider. If it looks okay, I'd be willing to implement this change against
Qt Creator trunk and supply a patch.


shap
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to