On Thursday 07 February 2013 20:15:29, Alexander Sokolov wrote:
> Qt guys promises that porting on Qt5 will be easy, but not for us. As you
> know in Qt5 libraries was splitted. We are using "#include <Module/Header>"
> form for includes (
https://github.com/Razor-qt/razor-qt/wiki/Coding-Style section Including
> headers).
> In Qt5 modules are changed, as result we we should to add #ifdef for
> includes directivies in the all files.
> I talked wit ABBAPOH (author of the andromeda and Qt5 mime module) and he
> said that we understand next passage incorrectly.
> *
>
> *
> >
> > *In public header files, always use this form to include Qt headers:
> > #include <QtCore/qwhatever.h>. The library prefix is neccessary for Mac OS
> > X frameworks and is very convenient for non-qmake projects.*
>
>
http://qt-project.org/wiki/Coding-Conventions
>
> This only for Qt headers itself, but in the end-users programs programmers
> should to use simple "#include <Header>" form in that case porting on Qt5
> will be real easy.
>
Well, fixing headers is the easy part:
find . -name '*.cpp' -or -name '*.h' -exec sed -i -e 's:\(#include\s*<\)Qt[^>]*/:\1:' '{}' \;
Now if someone could get CMake to work with both Qt4 and Qt5 for at
least the libraries...