Commit graph

858 commits

Author SHA1 Message Date
Ivailo Monev
db628e4423 drop support for changing QDataStream precision
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-19 01:16:15 +03:00
Ivailo Monev
fa121a8f02 track watched files and directories only in QFileSystemWatcherEngineUnix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 15:14:10 +02:00
Ivailo Monev
279e569c51 reuse QFontDatabase object in tst_QCssParser::extractFontFamily_data()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 19:57:27 +02:00
Ivailo Monev
f95d0b9ec5 update tables data to CLDR v42
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 19:46:31 +02:00
Ivailo Monev
163c75e844 remove redundant QFontInfo class
QFontDatabase::font() does the same (i.e. resolves the font)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-17 14:40:02 +02:00
Ivailo Monev
99cec4d89e drop support for custom QEasingCurve type
use one of the animation classes instead if such is required

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-12 10:50:04 +02:00
Ivailo Monev
a19791e6ef use correct QString constructor for expected data in tst_QJsonDocument::read()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 04:22:50 +02:00
Ivailo Monev
1681ba3f1e test QTextConverter::hasFailure() in QTextCodec test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 19:08:52 +02:00
Ivailo Monev
be2a5463e1 drop effects other than fade
QComboBox animation was essentially non-operational (see
5b5fbca2ed), UI_AnimateToolBox was just
reserved and unused . there is fade effect for QMenu and QToolTip so
the relevant effect is there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 19:41:25 +02:00
Ivailo Monev
427396074d remove unused graphics effects feature
doubles as performance optimzation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 00:46:40 +02:00
Ivailo Monev
07d438624a lock QSettings files via flock()
now QSettings will behave much like opening a file via open() and the like,
see the QFile hijack test case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 17:51:00 +02:00
Ivailo Monev
71e7c743d8 add QSidebar test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-20 16:29:29 +02:00
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