summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp4
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp6
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp6
-rw-r--r--tests/auto/gui/text/qfontdatabase/FreeMono.ttfbin0 -> 267400 bytes
-rw-r--r--tests/auto/gui/text/qfontdatabase/LED_REAL.TTFbin4708 -> 0 bytes
-rw-r--r--tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt34
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp2
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp6
8 files changed, 18 insertions, 40 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index bfe2fbc9f7..0f642bcc10 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -45,6 +45,8 @@
#include <qicon.h>
#include <qiconengine.h>
+#include <algorithm>
+
class tst_QIcon : public QObject
{
@@ -421,7 +423,7 @@ void tst_QIcon::availableSizes()
QList<QSize> availableSizes = icon.availableSizes();
QCOMPARE(availableSizes.size(), 3);
- qSort(availableSizes.begin(), availableSizes.end(), sizeLess);
+ std::sort(availableSizes.begin(), availableSizes.end(), sizeLess);
QCOMPARE(availableSizes.at(0), QSize(32,32));
QCOMPARE(availableSizes.at(1), QSize(64,64));
QCOMPARE(availableSizes.at(2), QSize(128,128));
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index b684231e10..5decbc86fc 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -55,6 +55,8 @@
#include <QTimer>
#include <QTemporaryDir>
+#include <algorithm>
+
typedef QMap<QString, QString> QStringMap;
typedef QList<int> QIntList;
Q_DECLARE_METATYPE(QImage::Format)
@@ -559,7 +561,7 @@ void tst_QImageReader::supportedFormats()
{
QList<QByteArray> formats = QImageReader::supportedImageFormats();
QList<QByteArray> sortedFormats = formats;
- qSort(sortedFormats);
+ std::sort(sortedFormats.begin(), sortedFormats.end());
// check that the list is sorted
QCOMPARE(formats, sortedFormats);
@@ -576,7 +578,7 @@ void tst_QImageReader::supportedMimeTypes()
{
QList<QByteArray> mimeTypes = QImageReader::supportedMimeTypes();
QList<QByteArray> sortedMimeTypes = mimeTypes;
- qSort(sortedMimeTypes);
+ std::sort(sortedMimeTypes.begin(), sortedMimeTypes.end());
// check that the list is sorted
QCOMPARE(mimeTypes, sortedMimeTypes);
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index b10b5704c3..c9f8a1f681 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -57,6 +57,8 @@
# include <unistd.h>
#endif
+#include <algorithm>
+
typedef QMap<QString, QString> QStringMap;
typedef QList<int> QIntList;
Q_DECLARE_METATYPE(QImageWriter::ImageWriterError)
@@ -342,7 +344,7 @@ void tst_QImageWriter::supportedFormats()
{
QList<QByteArray> formats = QImageWriter::supportedImageFormats();
QList<QByteArray> sortedFormats = formats;
- qSort(sortedFormats);
+ std::sort(sortedFormats.begin(), sortedFormats.end());
// check that the list is sorted
QCOMPARE(formats, sortedFormats);
@@ -359,7 +361,7 @@ void tst_QImageWriter::supportedMimeTypes()
{
QList<QByteArray> mimeTypes = QImageWriter::supportedMimeTypes();
QList<QByteArray> sortedMimeTypes = mimeTypes;
- qSort(sortedMimeTypes);
+ std::sort(sortedMimeTypes.begin(), sortedMimeTypes.end());
// check that the list is sorted
QCOMPARE(mimeTypes, sortedMimeTypes);
diff --git a/tests/auto/gui/text/qfontdatabase/FreeMono.ttf b/tests/auto/gui/text/qfontdatabase/FreeMono.ttf
new file mode 100644
index 0000000000..d7ce52ddc7
--- /dev/null
+++ b/tests/auto/gui/text/qfontdatabase/FreeMono.ttf
Binary files differ
diff --git a/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF b/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF
deleted file mode 100644
index f87ea95e0e..0000000000
--- a/tests/auto/gui/text/qfontdatabase/LED_REAL.TTF
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt b/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt
deleted file mode 100644
index 06a5b40313..0000000000
--- a/tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Font: LED Real (led_real.ttf)
-Created By: Matthew Welch
-E-Mail: daffy-duck@worldnet.att.net
-Web Address: http://home.att.net/~daffy-duck
- (PGP public key available here)
-
-LED Real, like all of my fonts, is free. You can use it for most
-personal or business uses you'd like, and I ask for no money. I
-would, however, like to hear from you. If you use my fonts for
-something please send me a postcard or e-mail letting me know how
-you used it. Send me a copy if you can or let me know where I can
-find your work.
-
-You may use this font for graphical or printed work, but you may not
-sell it or include it in a collection of fonts (on CD or otherwise)
-being sold. You can redistribute this font as long as you charge
-nothing to receive it. If you redistribute it include this text file
-with it as is (without modifications).
-
-If you use this font for commercial purposes please credit me in
-at least some little way.
-
-About the font:
-
-Unlike most LED/LCD style fonts mine could be recreated with an
-actual LED. I created this font working from memories of the good
-old Speak and Spell display. Since I don't have an actual Speak
-and Spell to work from I had to just do as well as I could in its
-spirit. Be warned that some characters look just like others. The
-( and the <, for instance. Also C and [. Most of these will be
-pretty clear in context. To see all the sections of the LED "lit
-up" at once use character 127 (hold down alt and type 0127 on the
-numeric keypad). This font is, of course, monospaced.
-
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index 28db0ba291..fa5c81a2f0 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -83,7 +83,7 @@ private:
};
tst_QFontDatabase::tst_QFontDatabase()
- : m_testFont(QFINDTESTDATA("LED_REAL.TTF"))
+ : m_testFont(QFINDTESTDATA("FreeMono.ttf"))
{
}
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index 7adaac9fac..d3f5ce4a7d 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -100,6 +100,12 @@ void tst_QFontMetrics::same()
const QString text = QLatin1String("Some stupid STRING");
QCOMPARE(fm.size(0, text), fm.size(0, text)) ;
+ for (int i = 10; i <= 32; ++i) {
+ font.setPixelSize(i);
+ QFontMetrics fm1(font);
+ QCOMPARE(fm1.size(0, text), fm1.size(0, text));
+ }
+
{
QImage image;
QFontMetrics fm2(font, &image);