summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp')
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp79
1 files changed, 20 insertions, 59 deletions
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
index 6d2ed6d304..2dbb078ae0 100644
--- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
+++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.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$
**
@@ -38,17 +33,8 @@ class tst_QIcoImageFormat : public QObject
{
Q_OBJECT
-public:
- tst_QIcoImageFormat();
- virtual ~tst_QIcoImageFormat();
-
-
-public slots:
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
private slots:
+ void initTestCase();
void format();
void canRead_data();
void canRead();
@@ -71,26 +57,6 @@ private:
QString m_IconPath;
};
-
-tst_QIcoImageFormat::tst_QIcoImageFormat()
-{
-}
-
-tst_QIcoImageFormat::~tst_QIcoImageFormat()
-{
-
-}
-
-void tst_QIcoImageFormat::init()
-{
-
-}
-
-void tst_QIcoImageFormat::cleanup()
-{
-
-}
-
void tst_QIcoImageFormat::initTestCase()
{
m_IconPath = QFINDTESTDATA("icons");
@@ -98,11 +64,6 @@ void tst_QIcoImageFormat::initTestCase()
QFAIL("Cannot find icons directory containing testdata!");
}
-void tst_QIcoImageFormat::cleanupTestCase()
-{
-
-}
-
void tst_QIcoImageFormat::format()
{
{
@@ -143,7 +104,7 @@ void tst_QIcoImageFormat::canRead()
QFETCH(QString, fileName);
QFETCH(int, isValid);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.canRead(), (isValid == 0 ? false : true));
}
@@ -177,7 +138,7 @@ void tst_QIcoImageFormat::SequentialFile()
QFETCH(QString, fileName);
QFETCH(int, isValid);
- QSequentialFile *file = new QSequentialFile(m_IconPath + "/" + fileName);
+ QSequentialFile *file = new QSequentialFile(m_IconPath + QLatin1Char('/') + fileName);
QVERIFY(file);
QVERIFY(file->open(QFile::ReadOnly));
QImageReader reader(file);
@@ -214,7 +175,7 @@ void tst_QIcoImageFormat::imageCount()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.imageCount(), count);
}
@@ -242,7 +203,7 @@ void tst_QIcoImageFormat::jumpToNextImage()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
bool bJumped = reader.jumpToImage(0);
while (bJumped) {
count--;
@@ -265,7 +226,7 @@ void tst_QIcoImageFormat::loopCount()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QCOMPARE(reader.loopCount(), count);
}
@@ -293,7 +254,7 @@ void tst_QIcoImageFormat::nextImageDelay()
QFETCH(QString, fileName);
QFETCH(int, count);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
if (count == -1) {
QCOMPARE(reader.nextImageDelay(), 0);
} else {
@@ -322,7 +283,7 @@ void tst_QIcoImageFormat::pngCompression()
QFETCH(int, width);
QFETCH(int, height);
- QImageReader reader(m_IconPath + "/" + fileName);
+ QImageReader reader(m_IconPath + QLatin1Char('/') + fileName);
QImage image;
reader.jumpToImage(index);