Ivailo Monev
4e1d48fa13
build fix for the case when QT_NO_TEMPORARYFILE is defined
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 00:34:47 +02:00
Ivailo Monev
392f9eabf8
adjust expected result in QFontDatabase test case
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 22:55:07 +02:00
Ivailo Monev
d01d9549d9
compiler warning fix
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 21:28:05 +02:00
Ivailo Monev
9ee07bb1cd
plug QFontDatabase memory leak
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 21:25:36 +02:00
Ivailo Monev
ca3cf1d93f
query fontconfig directly from QFontDatabase
...
since fontconfig has its own cache mainting internal QFontDatabase cache
is kinda redundant, have to leak check still but font tests pass
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 20:35:15 +02:00
Ivailo Monev
fc836182d5
scale the fontconfig weight value to QFont::Weight in QFontDatabase
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 05:25:01 +02:00
Ivailo Monev
b90d8bf1ba
remove compat QFontDatabase methods
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 05:06:44 +02:00
Ivailo Monev
aa39dbb344
add case-sensitivity test for QFontDatabase
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 04:14:44 +02:00
Ivailo Monev
605c6280ab
test case for converting QFont from and to QString
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 01:45:16 +02:00
Ivailo Monev
b59672856d
add config file for testing X 16 bit depth support
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 01:19:32 +02:00
Ivailo Monev
98653b029b
update comment in QVariant test data
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-19 01:07:52 +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
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
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
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
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
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
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
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
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
Ivailo Monev
1396f53698
benchmark painting on and of mono image formats
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-11 01:05:18 +02:00
Ivailo Monev
f91411694a
merge QRasterPixmapData into QPixmapData
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-09 23:06:30 +02:00
Ivailo Monev
e9f970bbd2
build fix QDataStream test case
...
only that test case and QVariant::save() were using the char* operators
of QDataStream
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 17:05:26 +02:00
Ivailo Monev
7f04979b7e
fetch the owner and group from the QFile file descriptor in QFileInof tests
...
much more reliable comparison
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 15:22:23 +02:00
Ivailo Monev
d8c00c3e71
verify that the group name is not empty in tst_QFileInfo::group()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 15:10:35 +02:00
Ivailo Monev
3f76b6db66
set the QDataStream byte order to big endian in tst_QVariant::loadBrokenUserType()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 15:02:56 +02:00
Ivailo Monev
d0742df56c
use custom format for translations
...
the code for translating strings in kdelibs (see
kdelibs/kdecore/localization/kcatalog.cpp) has finally made me roll my
own - locking global mutex, saving and restoring environment variables
on every string translation is not very good, is it?
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-02 05:23:31 +02:00
Ivailo Monev
df060ed6f6
always read data without intermediate buffer from QIODevice::read()
...
the main user of QIODevice is QFile and it uses O_DSYNC/O_SYNC for
unbuffered I/O meaning the QIODevice buffer does not benefit it because the
filesystem cache already does that
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 21:34:16 +02:00
Ivailo Monev
12198d2ebb
drop support for mapping QFile via mmap()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 19:13:33 +02:00
Ivailo Monev
8ddb0f0985
merge QAbstractFileEngine into QFile
...
the behaviour of QTemporaryFile changes slightly, e.g. downcast to QFile
and open() with flags does not work like before - if you down-cast
better be sure you want to call the down-casted method (it is like a
C-style cast)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 11:23:39 +02:00
Ivailo Monev
9222708c38
remove unused QContiguousCache class
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 08:07:22 +02:00
Ivailo Monev
737752f597
remove unused and ambiguous QDataStream operators
...
QByteArray has implicit char* operator which could result in code that is
sub-optimal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 07:30:05 +02:00
Ivailo Monev
ea8c0aa792
remove tst_QMainWindow compat test case
...
test was failing because of the previous commit but 4.1, 4.2 and 4.3 are
very old releases anyway
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 02:25:15 +02:00
Ivailo Monev
bec8e7280c
use QDataStream::HostEndian as byte order by default for QDataStream and do not byte-swap QString data when streaming it
...
both are breaking changes, any data stored via QDataStream will not load
now by default unless the byte order is explicitly set to big endian
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 02:02:49 +02:00
Ivailo Monev
ed93b0562e
set the byte order to big endian when testing with big endian data in QDataStream test cases
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 03:42:08 +02:00
Ivailo Monev
8a7d49c5d6
set the byte order to big endian when testing with big endian data in QDataStream test cases
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-31 02:53:34 +02:00
Ivailo Monev
e096f539fe
use the QDataStream byteorder member for swap check
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-30 22:30:09 +02:00
Ivailo Monev
e3b199f8b7
the test data in tst_QVariant::loadUnknownUserType() is big endian
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-30 21:29:20 +02:00
Ivailo Monev
647c50ce1a
build fix for the case when QT_NO_CALENDARWIDGET or QT_NO_DATETIMEEDIT is defined
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-30 03:04:43 +02:00
Ivailo Monev
03a6481de8
QFileInfo no longer requires abstraction
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-30 02:51:53 +03:00
Ivailo Monev
36eec68361
use only native filesystem iterator in QDirIterator
...
now that QAbstractFileEngine is becoming internal there is no point in
using the abstraction class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 23:34:17 +03:00
Ivailo Monev
f23acad20e
merge QFSFileEngine into QAbstractFileEngine
...
that finally happened
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 21:42:58 +03:00
Ivailo Monev
d7f76da3b1
remove unused MyEngine class in QFile test
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 21:09:08 +03:00
Ivailo Monev
5095872672
remove unused EngineWithNoIterator class in QDirIterator test
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 21:07:10 +03:00
Ivailo Monev
f459bca48a
do not use resource in QDir benchmark
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 04:02:49 +03:00
Ivailo Monev
e98c96fdf3
adjust expected data in QDir benchmark
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 04:02:24 +03:00
Ivailo Monev
5bebb9e7da
remove broken benchmarks
...
require example sources
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 03:58:09 +03:00