Commit graph

7986 commits

Author SHA1 Message Date
Ivailo Monev
dcddc9b718 remove redundant QCompleter::event() reimplementation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-18 04:06:34 +02:00
Ivailo Monev
6b1d9fe048 remove unused QPdf::generateLinearGradientShader() method
USE_NATIVE_GRADIENTS is never defined

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-18 03:26:33 +02:00
Ivailo Monev
699f8f95b1 remove unused QFontSubset::toTruetype() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-18 01:26:21 +02:00
Ivailo Monev
db92f4ae56 correct logic in isStyleMatch() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 22:15:19 +02:00
Ivailo Monev
5e55866122 load the application font as last resort instead of adding it to each patterns
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 21:26:19 +02:00
Ivailo Monev
4897f79893 remove now bogus QFont test
italic/oblique are handled as enum (QFont::Style) and hint for fontconfig
what kind of slant to match (if style name is not specified that is) which
means exact style match or nothing. trying to substitute, mix and match
such style names in QFontDatabase was bad idea to begin with (not my idea)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 20:50:11 +02:00
Ivailo Monev
c6c621b9fe do not add the last resort font to the pattern when loading font
the default QApplication font is the last resort font

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 20:37:30 +02:00
Ivailo Monev
e8ee198ae3 minor QFont documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 20:36:13 +02:00
Ivailo Monev
706673c71c do not add fonts with empty style to the database
Source Code Variable font has such entries for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 21:44:47 +02:00
Ivailo Monev
99a6715db2 query and set font pixel size from QFontDatabase
note that font pixel size is DPI-scaled, it being -1 means scale it to the
DPI of the paint device for example and Katie supports only scalable fonts
for a reason

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 19:09:54 +02:00
Ivailo Monev
995f46c975 preperations to drop QFontInfo
since I do not care about qt compat only normal and regular style
names are matched as equal, for now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 18:39:31 +02:00
Ivailo Monev
dc830212a1 resolve family aliases from QFontDatabase methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 16:30:48 +02:00
Ivailo Monev
a4e2c2edb0 fix font style matching in QFontDatabase::font() and test case it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 14:47:52 +02:00
Ivailo Monev
90b1be03c7 set the pitch of the font from QFontDatabase::font()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 14:41:30 +02:00
Ivailo Monev
78556dafb5 export qt_getClipRects() only for the QRegion test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 14:32:27 +02:00
Ivailo Monev
57b03e40f6 move qt_getClipRects() function to qregion source file, where it belongs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-17 14:30:53 +02:00
Ivailo Monev
7d03dc89ed lock before accessing the custom meta types global static in QMetaType::type()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 22:17:47 +02:00
Ivailo Monev
052eca6bf7 Revert "always allocate QGlyphLayout data on the heap"
will have to wait until the QTextEngine redo

This reverts commit 4a5239046a.
2022-11-16 21:27:57 +02:00
Ivailo Monev
4a5239046a always allocate QGlyphLayout data on the heap
much easier to calculate the glyph array data size and also no
possibility for stack corruption

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-16 19:18:02 +02:00
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