diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 928bf138352..4a21ab88d89 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -655,7 +655,7 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) #if !defined(Q_ASSERT) # if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) -# define Q_ASSERT(cond) qt_noop() +# define Q_ASSERT(cond) do { } while (false && (cond)) # else # define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) # endif diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index 4a9aafcf0bc..c96d0504f45 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -222,6 +222,7 @@ static bool createFileFromTemplate(NativeFileHandle &file, } Q_ASSERT(false); + return false; } //************* QTemporaryFileEngine diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 33827926c69..5687a6c3a35 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -273,6 +273,7 @@ static uint numerusHelper(int n, const uchar *rules, uint rulesSize) } Q_ASSERT(false); + return 0; } class QTranslatorPrivate : public QObjectPrivate diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 8ff15106e34..d30ff78b8fe 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -125,14 +125,12 @@ static bool isValidBlockSeparator(QChar ch) || ch == QTextEndOfFrame; } -#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) static bool noBlockInString(const QString &str) { return !str.contains(QChar::ParagraphSeparator) && !str.contains(QTextBeginningOfFrame) && !str.contains(QTextEndOfFrame); } -#endif bool QTextUndoCommand::tryMerge(const QTextUndoCommand &other) {