summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/io/qtemporaryfile.cpp1
-rw-r--r--src/corelib/kernel/qtranslator.cpp1
-rw-r--r--src/gui/text/qtextdocument_p.cpp2
4 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 928bf13835..4a21ab88d8 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 4a9aafcf0b..c96d0504f4 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 33827926c6..5687a6c3a3 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 8ff15106e3..d30ff78b8f 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)
{