Commit graph

7767 commits

Author SHA1 Message Date
Ivailo Monev
4b19a3adfc add thread-safety test for QFontDatabase
it basically tests fontconfig thread-safety but QFontDatabase is documented
as thread-safe (as it should be) so why not add test case for it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 16:01:25 +02:00
Ivailo Monev
44800c3c2d QFontDatabase test review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 15:35:45 +02:00
Ivailo Monev
78dfee1ace do not assume FcObjectSetCreate(), FcPatternCreate() and FcFontList() return non-null pointers in QFontDatabase constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 15:29:57 +02:00
Ivailo Monev
7a2ee5aa48 replace hardcoded QFont::Unstretched value with the enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 15:26:25 +02:00
Ivailo Monev
affd5c2ef3 assume the codec MIB is in the table in QTextCodec::mibEnum() and add test for it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 05:05:56 +02:00
Ivailo Monev
19901408bc remove unused headers inclusions in qfont source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 20:17:42 +02:00
Ivailo Monev
70214a96d4 use the QPixmap::scaled() method in QMoviePrivate::next()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 20:09:54 +02:00
Ivailo Monev
3340e95259 use QVector for the QMetaMethod list in qInvokeTestMethods() function
operator new may throw if the method count is zero, a test case should have
atleast one method tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 19:34:24 +02:00
Ivailo Monev
92d354c9c3 move QTextConverter::ConversionFlag documentation bellow QTextConverter documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 19:12:08 +02:00
Ivailo Monev
93759701d8 move constructor and destructor to the top in qfontdatabase source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 17:59:57 +02:00
Ivailo Monev
51f2253d73 read PNG rows directly into QImage allocated memory
KAT format is still faster, benchmark result:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     449,473.586 CPU ticks per iteration (total: 224,736,793, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     12,192,500.92 CPU ticks per iteration (total: 6,096,250,460, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     4,553,239.292 CPU ticks per iteration (total: 2,276,619,646, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     1,847,145.64 CPU ticks per iteration (total: 923,572,823, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     19,422,744.28 CPU ticks per iteration (total: 9,711,372,141, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     12,389,194.51 CPU ticks per iteration (total: 6,194,597,257, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     653,286.280 CPU ticks per iteration (total: 326,643,140, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     2,728,198.060 CPU ticks per iteration (total: 1,364,099,030, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     2,455,954.036 CPU ticks per iteration (total: 1,227,977,018, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     10,524,974.96 CPU ticks per iteration (total: 5,262,487,482, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     8,238,501.942 CPU ticks per iteration (total: 4,119,250,971, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     74,886,112.602 CPU ticks per iteration (total: 37,443,056,301, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     63,337,570.664 CPU ticks per iteration (total: 31,668,785,332, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     1,950,330.16 CPU ticks per iteration (total: 975,165,082, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     13,089,959.61 CPU ticks per iteration (total: 6,544,979,808, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     5,447,284.922 CPU ticks per iteration (total: 2,723,642,461, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     3,342,337.962 CPU ticks per iteration (total: 1,671,168,981, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     20,326,863.998 CPU ticks per iteration (total: 10,163,431,999, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     13,279,201.09 CPU ticks per iteration (total: 6,639,600,546, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     1,498,119.28 CPU ticks per iteration (total: 749,059,644, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     3,641,910.638 CPU ticks per iteration (total: 1,820,955,319, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     3,370,265.894 CPU ticks per iteration (total: 1,685,132,947, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     9,147,455.174 CPU ticks per iteration (total: 4,573,727,587, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     9,729,368.638 CPU ticks per iteration (total: 4,864,684,319, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     75,966,954.086 CPU ticks per iteration (total: 37,983,477,043, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     64,719,740.840 CPU ticks per iteration (total: 32,359,870,420, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 17:55:11 +02:00
Ivailo Monev
1007042f65 cache system fonts on per QFontDatabase object basis
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 16:11:43 +02:00
Ivailo Monev
1bee581895 drop support for registering custom QVariantAnimation interpolators
even the declarative component inherit and use internal animation classes
methods for interpolation, if anything there should be more interpolators
(e.g. for QVariant::LongLong and QVariant::ULongLong)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-15 01:06:52 +02:00
Ivailo Monev
3e9e8d5dc5 qconfig header update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 23:26:22 +02:00
Ivailo Monev
1b102cb371 remove unused QErrorMessage class
Katana uses KMessageBox or system notifcations for such things

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 23:22:22 +02:00
Ivailo Monev
385e7a50fc do not store the hinting flags in QFontEngineFT
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 21:08:39 +02:00
Ivailo Monev
d6ec585fad translations update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 20:38:47 +02:00
Ivailo Monev
15e9e1c902 update URL TLDs table data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 20:38:04 +02:00
Ivailo Monev
6cdfca5cff Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie 2022-11-14 20:36:12 +02:00
Ivailo Monev
9766124b53 prepare genlocale.py script for CLDR v42
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 20:35:44 +02:00
Ivailo Monev
cce704ec85 FreeBSD package footprint file update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 19:03:15 +02:00
Ivailo Monev
1edff9ee60 add QChar enum for unicode v15.0
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 18:24:04 +02:00
Ivailo Monev
9a8561b0af update unicode data tables to v15.0
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 18:21:40 +02:00
Ivailo Monev
89d9fd45dc include system locale header for setlocale() and LC_CTYPE in qkeymapper_x11 source file
fixes build on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 17:58:00 +02:00
Ivailo Monev
a84c05a9a7 remove unused qsettings header inclusion in qcommonstyle source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 17:18:09 +02:00
Ivailo Monev
6eef4940f7 remove redundant Q_EXPORT_PLUGIN2() macro
its PLUGIN argument is unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:47:25 +02:00
Ivailo Monev
841adcdf44 README update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:37:03 +02:00
Ivailo Monev
9e87457f4b remove now unused plugin verification section and data
it should've been added even if QT_NO_PLUGIN_CHECK was defined btw, now
only ELF header is checked tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:36:36 +02:00
Ivailo Monev
d2e041543b remove redundant handle check in QLibrary::unload()
QLibraryPrivate::unload() does the same check

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:25:55 +02:00
Ivailo Monev
c328d1e068 compiler warnings fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:16:59 +02:00
Ivailo Monev
3234186784 remove redundant QSettings forward-declaration in qlibrary_p header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 15:16:50 +02:00
Ivailo Monev
4a9d75fb3d replace internal loadDocument<T>() function with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 14:43:19 +02:00
Ivailo Monev
ef8a3415fc QIconLoader doesn't need QObject as base class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 14:37:58 +02:00
Ivailo Monev
50ac8979f9 Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie 2022-11-14 14:29:05 +02:00
Ivailo Monev
5a91af85ad replace QCursorData::setBitmap() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 14:28:50 +02:00
Ivailo Monev
9b64aa02a1 remove resource system leftovers in QPixmapIconEngine::addFile()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 05:53:41 +02:00
Ivailo Monev
ace0ae90d2 use the stored pixmap mask in QCursor::handle()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 02:41:39 +02:00
Ivailo Monev
acb4248b61 QCursor rewrite
X may or may not copy the pixmaps so handles have to be kept until cursor
data destruction

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 02:33:31 +02:00
Ivailo Monev
a51c78828a ensure the QVariant type is QVariant::String in ini_settings_read() for compat
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-14 01:08:36 +02:00
Ivailo Monev
c9fd04afee do not register QColor, QVector2D, QVector3D and QVector2D interpolators as external
now the interpolators global mutex will be held 4 times less when the
GUI component library is loaded and 4 more times when it is unloaded

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:48:23 +02:00
Ivailo Monev
617ddafb48 document internal QFontDatabase methods as such
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:45:37 +02:00
Ivailo Monev
8de57f9a7b mark qt_FcPatternToQFontDef() function as static
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:12:08 +02:00
Ivailo Monev
e8fc06840c Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie 2022-11-13 22:08:44 +02:00
Ivailo Monev
67b4a9f516 initialize values in QFont streaming operator
if they are not read from the QDataStream (e.g. premature end of data or
corrupt data) they will end up being zero tho because that is what
QDataStream sets them to on failure, perhaps it should not

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:52:32 +02:00
Ivailo Monev
34411b3cc5 QFontDatabase::families() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:41:53 +02:00
Ivailo Monev
351b862eba remove QApplication::fontDatabaseChanged() signal
it indicates that QFontDatabase has cached the fonts, not that system font
was added or removed which QFontDatabase should have signal for no
QCoreApplication/QApplication

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 22:08:26 +02:00
Ivailo Monev
edf4fe200b QJsonDocument optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 20:14:34 +02:00
Ivailo Monev
bc0040b970 drop support for storing types that are not QString-convertable via QSettings
I am not interested in custom types feature at all - QMainWindow for
example saves its state via QDataStream. ofcourse it involves conversion
but that is the case with QVariant aswell. there is also the qreal type
thing - it may be float, it may double. streaming QRectF has to be done
in such a way to account for both cases but here is the catch - if
conversion fails there has to be fallback which QSettings::value() kinda
covers for types that are not composed of several more types.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 19:29:01 +02:00
Ivailo Monev
2ae0376a53 QDebug documentation update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 18:49:13 +02:00
Ivailo Monev
29a8724568 QDebug rewrite to use QByteArray as internal buffer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 15:54:04 +02:00