rng2cpp.cpp build fail with qt5.5

Friedrich W. H. Kossebau kossebau at kde.org
Thu May 28 19:34:14 BST 2015


Hi Treeve,

thanks for reporting the error and working on a patch :)

Am Donnerstag, 28. Mai 2015, 13:31:29 schrieb Treeve Jelbert:
> thanks, the following diff fixes it
> 
> diff --git a/devtools/rng2cpp/rng2cpp.cpp
> b/devtools/rng2cpp/rng2cpp.cpp
> index 3dc3214..de65ac4 100644
> --- a/devtools/rng2cpp/rng2cpp.cpp
> +++ b/devtools/rng2cpp/rng2cpp.cpp
> @@ -23,12 +23,10 @@
>   #include <QtGlobal>
>   #include <QSharedPointer>
>   #include <QStringList>
> +#include <QSet>
> +#include <QVector>

Aha, this is why there was an offset of +2 in the build log you posted :)
But, why did you add those two lines? Are they left overs from some 
experiment, or do you think they are needed to fix this build problem you 
reported?

> -#if QT_VERSION < 0x040800
> -#   define assert(cond, what) (Q_ASSERT_X(cond, "",
> qPrintable(QString(what))))
> -#else
> -#   define assert(cond, what) (Q_ASSERT_X(cond, "", qPrintable(what)))
> -#endif
> +#   define assert(cond, what) Q_ASSERT_X(cond, "", qPrintable(what))
> 
>   static const QString ns = "writeodf";

Can you explain why this fixes it? Is it because QT_VERSION no longer works 
with Qt 5.5.0, or is it the removed outer () in the replacement the culprit? 
Why exactly did it fail before? Can you tell how all the macros are resolved 
in the end with Qt 5.5.0

Cheers
Friedrich



More information about the calligra-devel mailing list