diff options
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r-- | tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/global/qflags/qflags.pro | 1 | ||||
-rw-r--r-- | tests/auto/corelib/global/qflags/tst_qflags.cpp | 28 | ||||
-rw-r--r-- | tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp | 82 | ||||
-rw-r--r-- | tests/auto/corelib/global/qglobal/tst_qglobal.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp | 6 | ||||
-rw-r--r-- | tests/auto/corelib/global/qhooks/tst_qhooks.cpp | 12 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/app/app.pro | 2 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/app/main.cpp | 15 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 33 | ||||
-rw-r--r-- | tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/global/qrand/tst_qrand.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/global/qtendian/tst_qtendian.cpp | 14 |
13 files changed, 169 insertions, 80 deletions
diff --git a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp index 75c61612c5..34eb8161e3 100644 --- a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp +++ b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tests/auto/corelib/global/qflags/qflags.pro b/tests/auto/corelib/global/qflags/qflags.pro index 9e80d5634b..3f78bc045b 100644 --- a/tests/auto/corelib/global/qflags/qflags.pro +++ b/tests/auto/corelib/global/qflags/qflags.pro @@ -3,3 +3,4 @@ TARGET = tst_qflags QT = core testlib SOURCES = tst_qflags.cpp DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 +contains(QT_CONFIG, c++11): CONFIG += c++11 c++14 diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp index 4c74ac166b..1f2e7ca0cd 100644 --- a/tests/auto/corelib/global/qflags/tst_qflags.cpp +++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -94,6 +94,16 @@ void tst_QFlags::testFlagMultiBits() const template <unsigned int N, typename T> bool verifyConstExpr(T n) { return n == N; } +Q_DECL_RELAXED_CONSTEXPR Qt::MouseButtons testRelaxedConstExpr() +{ + Qt::MouseButtons value; + value = Qt::LeftButton | Qt::RightButton; + value |= Qt::MiddleButton; + value &= ~Qt::LeftButton; + value ^= Qt::RightButton; + return value; +} + void tst_QFlags::constExpr() { #ifdef Q_COMPILER_CONSTEXPR @@ -115,6 +125,10 @@ void tst_QFlags::constExpr() QVERIFY(verifyConstExpr<Qt::MouseButtons(Qt::RightButton) | 0xff>(0xff)); QVERIFY(!verifyConstExpr<Qt::RightButton>(!Qt::MouseButtons(Qt::LeftButton))); + +#if defined(__cpp_constexpr) && __cpp_constexpr-0 >= 201304 + QVERIFY(verifyConstExpr<testRelaxedConstExpr()>(Qt::MiddleButton)); +#endif #endif } diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp index c0b4ff654a..71a3419963 100644 --- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp +++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -41,14 +41,22 @@ class tst_QGetPutEnv : public QObject Q_OBJECT private slots: void getSetCheck(); + void intValue_data(); + void intValue(); }; void tst_QGetPutEnv::getSetCheck() { const char varName[] = "should_not_exist"; + bool ok; + QVERIFY(!qEnvironmentVariableIsSet(varName)); QVERIFY(qEnvironmentVariableIsEmpty(varName)); + ok = true; + QCOMPARE(qEnvironmentVariableIntValue(varName), 0); + QCOMPARE(qEnvironmentVariableIntValue(varName, &ok), 0); + QVERIFY(!ok); QByteArray result = qgetenv(varName); QCOMPARE(result, QByteArray()); @@ -57,12 +65,20 @@ void tst_QGetPutEnv::getSetCheck() QVERIFY(qEnvironmentVariableIsSet(varName)); QVERIFY(qEnvironmentVariableIsEmpty(varName)); + ok = true; + QCOMPARE(qEnvironmentVariableIntValue(varName), 0); + QCOMPARE(qEnvironmentVariableIntValue(varName, &ok), 0); + QVERIFY(!ok); #endif QVERIFY(qputenv(varName, QByteArray("supervalue"))); QVERIFY(qEnvironmentVariableIsSet(varName)); QVERIFY(!qEnvironmentVariableIsEmpty(varName)); + ok = true; + QCOMPARE(qEnvironmentVariableIntValue(varName), 0); + QCOMPARE(qEnvironmentVariableIntValue(varName, &ok), 0); + QVERIFY(!ok); result = qgetenv(varName); QVERIFY(result == "supervalue"); @@ -72,9 +88,61 @@ void tst_QGetPutEnv::getSetCheck() QVERIFY(qunsetenv(varName)); QVERIFY(!qEnvironmentVariableIsSet(varName)); QVERIFY(qEnvironmentVariableIsEmpty(varName)); + ok = true; + QCOMPARE(qEnvironmentVariableIntValue(varName), 0); + QCOMPARE(qEnvironmentVariableIntValue(varName, &ok), 0); + QVERIFY(!ok); result = qgetenv(varName); QCOMPARE(result, QByteArray()); } +void tst_QGetPutEnv::intValue_data() +{ + QTest::addColumn<QByteArray>("value"); + QTest::addColumn<int>("expected"); + QTest::addColumn<bool>("ok"); + + // most non-success cases already tested in getSetCheck() + +#define ROW(x, i, b) \ + QTest::newRow(#x) << QByteArray(#x) << (i) << (b) + ROW(auto, 0, false); + ROW(0, 0, true); + ROW(1, 1, true); + ROW(010, 8, true); + ROW(0x10, 16, true); + ROW(-1, -1, true); + ROW(-010, -8, true); + // ROW(0xffffffff, -1, true); // could be expected, but not how QByteArray::toInt() works + ROW(0xffffffff, 0, false); + const int bases[] = {10, 8, 16}; + for (size_t i = 0; i < sizeof bases / sizeof *bases; ++i) { + QTest::newRow(qPrintable(QString::asprintf("INT_MAX, base %d", bases[i]))) + << QByteArray::number(INT_MAX) << INT_MAX << true; + QTest::newRow(qPrintable(QString::asprintf("INT_MAX+1, base %d", bases[i]))) + << QByteArray::number(qlonglong(INT_MAX) + 1) << 0 << false; + QTest::newRow(qPrintable(QString::asprintf("INT_MIN, base %d", bases[i]))) + << QByteArray::number(INT_MIN) << INT_MIN << true; + QTest::newRow(qPrintable(QString::asprintf("INT_MIN-1, base %d", bases[i]))) + << QByteArray::number(qlonglong(INT_MIN) - 1) << 0 << false; + }; +} + +void tst_QGetPutEnv::intValue() +{ + const char varName[] = "should_not_exist"; + + QFETCH(QByteArray, value); + QFETCH(int, expected); + QFETCH(bool, ok); + + bool actualOk = !ok; + + QVERIFY(qputenv(varName, value)); + QCOMPARE(qEnvironmentVariableIntValue(varName), expected); + QCOMPARE(qEnvironmentVariableIntValue(varName, &actualOk), expected); + QCOMPARE(actualOk, ok); +} + QTEST_MAIN(tst_QGetPutEnv) #include "tst_qgetputenv.moc" diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index 0b7b7b23f4..69bf7598fc 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp index 131b37f821..e6b2f8a116 100644 --- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp +++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2011 Thiago Macieira <thiago@kde.org> -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -17,8 +17,8 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** diff --git a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp index cf2f138a51..b5930790e4 100644 --- a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp +++ b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Volker Krause <volker.krause@kdab.com> -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro index a7f6e68448..4789efc478 100644 --- a/tests/auto/corelib/global/qlogging/app/app.pro +++ b/tests/auto/corelib/global/qlogging/app/app.pro @@ -12,5 +12,5 @@ SOURCES += main.cpp DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_MESSAGELOGCONTEXT -gcc:!mingw: QMAKE_LFLAGS += -rdynamic +gcc:!mingw:!haiku: QMAKE_LFLAGS += -rdynamic diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp index 33b16ed8e5..0a78b60ff9 100644 --- a/tests/auto/corelib/global/qlogging/app/main.cpp +++ b/tests/auto/corelib/global/qlogging/app/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -73,6 +73,7 @@ int main(int argc, char **argv) qSetMessagePattern("[%{type}] %{message}"); qDebug("qDebug"); + qInfo("qInfo"); qWarning("qWarning"); qCritical("qCritical"); diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 140b349c64..a65a72313f 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2015 The Qt Company Ltd. ** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com> -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -11,9 +11,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -24,8 +24,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -730,10 +730,11 @@ void tst_qmessagehandler::qMessagePattern_data() << "static destructor" << "debug tst_qlogging 65 MyClass::myFunction from_a_function 34" << "debug tst_qlogging 75 main qDebug" - << "warning tst_qlogging 76 main qWarning" - << "critical tst_qlogging 77 main qCritical" - << "warning tst_qlogging 80 main qDebug with category" - << "debug tst_qlogging 84 main qDebug2"); + << "info tst_qlogging 76 main qInfo" + << "warning tst_qlogging 77 main qWarning" + << "critical tst_qlogging 78 main qCritical" + << "warning tst_qlogging 81 main qDebug with category" + << "debug tst_qlogging 85 main qDebug2"); QTest::newRow("invalid") << "PREFIX: %{unknown} %{message}" << false << (QList<QByteArray>() @@ -765,9 +766,9 @@ void tst_qmessagehandler::qMessagePattern_data() << "A DEBUG qDebug " << "A qWarning "); - QTest::newRow("pid") << "%{pid}: %{message}" + QTest::newRow("pid-tid") << "%{pid}/%{threadid}: %{message}" << true << QList<QByteArray>(); // can't match anything, just test validity - QTest::newRow("threadid") << "ThreadId:%{threadid}: %{message}" + QTest::newRow("qthreadptr") << "ThreadId:%{qthreadptr}: %{message}" << true << (QList<QByteArray>() << "ThreadId:0x"); @@ -877,6 +878,7 @@ void tst_qmessagehandler::setMessagePattern() //qDebug() << output; QByteArray expected = "static constructor\n" "[debug] qDebug\n" + "[info] qInfo\n" "[warning] qWarning\n" "[critical] qCritical\n" "[warning] qDebug with category\n"; @@ -908,10 +910,13 @@ void tst_qmessagehandler::formatLogMessage_data() << QtDebugMsg << BA("main.cpp") << 1 << BA("func") << BA("") << "msg"; // test the if conditions - QString format = "[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{if-category}%{category}: %{endif}%{message}"; + QString format = "[%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{if-category}%{category}: %{endif}%{message}"; QTest::newRow("if-debug") << format << "[D] msg" << QtDebugMsg << BA("") << 0 << BA("func") << QByteArray() << "msg"; + QTest::newRow("if_info") + << format << "[I] msg" + << QtInfoMsg << BA("") << 0 << BA("func") << QByteArray() << "msg"; QTest::newRow("if_warning") << format << "[W] msg" << QtWarningMsg << BA("") << 0 << BA("func") << QByteArray() << "msg"; diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index e2e62624b2..9a50df379c 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp index f44c4dc86a..fd4934054b 100644 --- a/tests/auto/corelib/global/qrand/tst_qrand.cpp +++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp index bfa998927e..5726535c5b 100644 --- a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp +++ b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ |