diff options
Diffstat (limited to 'tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp')
-rw-r--r-- | tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp index a3cf66da18..8dcf104035 100644 --- a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp +++ b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** 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 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. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** 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. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -147,7 +142,7 @@ void tst_QPixmapCache::setCacheLimit() QVERIFY(QPixmapCache::find(key, p1) == 0); QPixmapCache::setCacheLimit(1000); key = QPixmapCache::insert(*p1); - QCOMPARE(getPrivate(key)->isValid, true); + QVERIFY(key.isValid()); QCOMPARE(getPrivate(key)->key, 1); delete p1; @@ -189,7 +184,7 @@ void tst_QPixmapCache::setCacheLimit() key2 = QPixmapCache::insert(*p1); QCOMPARE(getPrivate(key2)->key, 1); //This old key is not valid anymore after the flush - QCOMPARE(getPrivate(key)->isValid, false); + QVERIFY(!key.isValid()); QVERIFY(QPixmapCache::find(key, &p2) == 0); delete p1; } @@ -233,7 +228,7 @@ void tst_QPixmapCache::find() //at that time the first key has been erase because no more place in the cache QVERIFY(QPixmapCache::find(key, &p1) == 0); - QCOMPARE(getPrivate(key)->isValid, false); + QVERIFY(!key.isValid()); } void tst_QPixmapCache::insert() @@ -313,7 +308,7 @@ void tst_QPixmapCache::replace() p2.fill(Qt::yellow); QPixmapCache::Key key = QPixmapCache::insert(p1); - QCOMPARE(getPrivate(key)->isValid, true); + QVERIFY(key.isValid()); QPixmap p3; QVERIFY(QPixmapCache::find(key, &p3) == 1); @@ -321,7 +316,7 @@ void tst_QPixmapCache::replace() QPixmapCache::replace(key, p2); QVERIFY(QPixmapCache::find(key, &p3) == 1); - QCOMPARE(getPrivate(key)->isValid, true); + QVERIFY(key.isValid()); QCOMPARE(getPrivate(key)->key, 1); QCOMPARE(p3.width(), 10); @@ -438,7 +433,7 @@ void tst_QPixmapCache::clear() for (int k = 0; k < numberOfKeys; ++k) { QVERIFY(QPixmapCache::find(keys.at(k), &p1) == 0); - QCOMPARE(getPrivate(keys[k])->isValid, false); + QVERIFY(!keys[k].isValid()); } } |