[Qt-creator] Minimizing compile-time conditionals in Qt Creator

Orgad and Raizel Shaneh orgads at gmail.com
Tue Aug 28 10:08:09 CEST 2012


On Tue, Aug 28, 2012 at 11:05 AM, Konstantin Tokarev <annulen at yandex.ru>wrote:

>
>
> 28.08.2012, 11:56, "Christian Kandeler" <christian.kandeler at nokia.com>:
> > However, most of the time that is not the case, such as in
> > this example:
> >      QStringList rc(QLatin1String(".svn"));
> >      #ifdef Q_OS_WIN
> >          rc.push_back(QLatin1String("_svn"));
> >      #endif
> >      return rc;
> > The code would compile on any platform, but we hide it from the compiler
> > and Qt Creator's code model on all of them except Windows. This means
> > that if, for instance, you are developing on Linux and you are using
> > Creator's refactoring support to rename the rc variable in the above
> > example, Creator will miss the occurrence inside the #ifdef'ed block, as
> > that one is not part of the code model.
>
> I think this issues is a fault of Qt Creator. While I understand that it
> may be
> impossible to parse disabled block completely in some cases (not in this
> one
> btw), it would be very desirable to support basic things like code
> navigation and
> variable renaming for disabled blocks too. Otherwise maintaining
> cross-platform
> code (not only for desktop platforms!) is sometimes painful.
>

+1

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120828/cf8af61f/attachment.html>


More information about the Qt-creator mailing list