summaryrefslogtreecommitdiff
path: root/src/libs/utils/qtcassert.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-04-17 08:01:25 +0200
committerhjk <qthjk@ovi.com>2012-04-17 09:53:44 +0200
commit5b0bf616401624e28ba1c0e94e474c2da2e6350a (patch)
tree661e3e7490e2f8b718c77f03f37bccb806ed7b18 /src/libs/utils/qtcassert.cpp
parent37e38530905b31607d07bea1ca65618d95c8f380 (diff)
downloadqt-creator-5b0bf616401624e28ba1c0e94e474c2da2e6350a.tar.gz
qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts. Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/libs/utils/qtcassert.cpp')
-rw-r--r--src/libs/utils/qtcassert.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/libs/utils/qtcassert.cpp b/src/libs/utils/qtcassert.cpp
new file mode 100644
index 0000000000..97b4332d8f
--- /dev/null
+++ b/src/libs/utils/qtcassert.cpp
@@ -0,0 +1,42 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#include "qtcassert.h"
+
+namespace Utils {
+
+void writeAssertLocation(const char *msg)
+{
+ qDebug("SOFT ASSERT: %s", msg);
+}
+
+} // namespace Utils