OSDN Git Service

kde/Katie.git
7 months agoremove QGraphicsItem binary compat bits master
Ivailo Monev [Fri, 22 Sep 2023 16:07:41 +0000 (19:07 +0300)]
remove QGraphicsItem binary compat bits

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
7 months agoremove redundant checks in QGraphicsTextItem::sceneEvent()
Ivailo Monev [Fri, 22 Sep 2023 15:05:21 +0000 (18:05 +0300)]
remove redundant checks in QGraphicsTextItem::sceneEvent()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoremove redundant QGraphicsView::focusNextPrevChild() reimplementation
Ivailo Monev [Thu, 14 Sep 2023 02:38:22 +0000 (05:38 +0300)]
remove redundant QGraphicsView::focusNextPrevChild() reimplementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoupdate tables data to CLDR v43
Ivailo Monev [Fri, 8 Sep 2023 06:29:22 +0000 (09:29 +0300)]
update tables data to CLDR v43

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoupdate exported classes references
Ivailo Monev [Fri, 8 Sep 2023 06:17:25 +0000 (09:17 +0300)]
update exported classes references

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoupdate URL TLDs table data
Ivailo Monev [Fri, 8 Sep 2023 06:04:03 +0000 (09:04 +0300)]
update URL TLDs table data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agowarn when library fails to load and QT_DEBUG_PLUGINS environment variable is set
Ivailo Monev [Fri, 1 Sep 2023 21:08:43 +0000 (00:08 +0300)]
warn when library fails to load and QT_DEBUG_PLUGINS environment variable is set

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agodrop config support
Ivailo Monev [Fri, 1 Sep 2023 01:38:33 +0000 (04:38 +0300)]
drop config support

with QGuiPlatformPlugin and the QApplication settings and getters in
place it is simply redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoadd note about platforms that are not open-source
Ivailo Monev [Thu, 31 Aug 2023 03:03:50 +0000 (06:03 +0300)]
add note about platforms that are not open-source

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agofix DnD retrieval of some image formats
Ivailo Monev [Tue, 29 Aug 2023 15:48:34 +0000 (18:48 +0300)]
fix DnD retrieval of some image formats

with the introduction of QImageWriter::formatForMimeType() and the related
QImageReader and QImageWriter methods the assumption that the image format
(plugin name) equals everything after the slash can be dismissed and
properly handled

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoQStatInfo optimization
Ivailo Monev [Mon, 28 Aug 2023 23:17:48 +0000 (02:17 +0300)]
QStatInfo optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agonew QFileSystemWatcher methods to get and set the poll interval
Ivailo Monev [Mon, 28 Aug 2023 17:31:06 +0000 (20:31 +0300)]
new QFileSystemWatcher methods to get and set the poll interval

I had the idea for it for quite some time and its about time I put it
to the test

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agopass the source text length to QString::fromUtf8() from QTranslator::translate()
Ivailo Monev [Sun, 27 Aug 2023 17:50:45 +0000 (20:50 +0300)]
pass the source text length to QString::fromUtf8() from QTranslator::translate()

otherwise QString::fromUtf8() will call qstrlen() to figure out the string
length

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoQKeySequence::toString() optimization
Ivailo Monev [Sun, 27 Aug 2023 17:41:54 +0000 (20:41 +0300)]
QKeySequence::toString() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agomake sure the bottom of QKeySequence::operator[] is really unreachable
Ivailo Monev [Sun, 27 Aug 2023 14:08:40 +0000 (17:08 +0300)]
make sure the bottom of QKeySequence::operator[] is really unreachable

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agofix regression since 4614dddd4277c66d112f18c93070e54bc223538c
Ivailo Monev [Sun, 27 Aug 2023 02:28:48 +0000 (05:28 +0300)]
fix regression since 4614dddd4277c66d112f18c93070e54bc223538c

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoremove unused QWidgetExceptionCleaner struct
Ivailo Monev [Thu, 24 Aug 2023 19:05:21 +0000 (22:05 +0300)]
remove unused QWidgetExceptionCleaner struct

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoremove declaration of non-existing qt_app_fonts_hash() and qt_app_palettes_hash(...
Ivailo Monev [Wed, 23 Aug 2023 02:55:21 +0000 (05:55 +0300)]
remove declaration of non-existing qt_app_fonts_hash() and qt_app_palettes_hash() functions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoQIcon::hasThemeIcon() optimization
Ivailo Monev [Tue, 22 Aug 2023 19:52:11 +0000 (22:52 +0300)]
QIcon::hasThemeIcon() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agosmart QGuiPlatformPlugin instance caching
Ivailo Monev [Tue, 22 Aug 2023 05:27:11 +0000 (12:27 +0700)]
smart QGuiPlatformPlugin instance caching

once QCoreApplication/QApplication instance is created the environment
lookup stops, this trick can be applied to other environment variable
checks

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agofix possible crashes in case QCursor is used when qt_x11Data is null
Ivailo Monev [Tue, 22 Aug 2023 04:13:11 +0000 (11:13 +0700)]
fix possible crashes in case QCursor is used when qt_x11Data is null

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoapply palette from the QGuiPlatformPlugin instance if it is not null
Ivailo Monev [Mon, 21 Aug 2023 00:18:50 +0000 (03:18 +0300)]
apply palette from the QGuiPlatformPlugin instance if it is not null

palette from the config overrides even the platform plugin still (as it is
with the style for example)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agodo not cache the QGuiPlatformPlugin instance from qt_guiPlatformPlugin()
Ivailo Monev [Sun, 20 Aug 2023 23:35:15 +0000 (02:35 +0300)]
do not cache the QGuiPlatformPlugin instance from qt_guiPlatformPlugin()

plugin lookup is affected by several things including environment variables
(QT_PLUGIN_PATH, QT_PLATFORM_PLUGIN, XDG_CURRENT_DESKTOP and
DESKTOP_SESSION which can be changed at any time by a setenv() call) and
plugin paths (QT_PLUGIN_PATH, QCoreApplication::pluginPaths() and the
related QCoreApplication methods to change the plugin paths during runtime)
so caching an instance of the plugin while beneficial is subject to not
being able to load a plugin that may be available only after environment
variable or plugin paths change

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agohange the home and source URLs
Ivailo Monev [Sun, 20 Aug 2023 17:19:44 +0000 (20:19 +0300)]
hange the home and source URLs

too bad package systems do not have a feature for this (not for git
repositories anyway)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agocheck if there is platform plugin for XDG_SESSION_DESKTOP from qt_guiPlatformPlugin()
Ivailo Monev [Sun, 20 Aug 2023 13:32:15 +0000 (16:32 +0300)]
check if there is platform plugin for XDG_SESSION_DESKTOP from qt_guiPlatformPlugin()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agodrop startup notification support
Ivailo Monev [Fri, 18 Aug 2023 21:16:29 +0000 (00:16 +0300)]
drop startup notification support

essentially non-operational for Katana applications (KApplication has a
hack to steal the DESKTOP_STARTUP_ID environment variable) and it is by
no means Katie's responsibility to do startup notification

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agoreplace QLocalePrivate::bcp47Name() and QLocalePrivate::measurementSystem() with...
Ivailo Monev [Fri, 18 Aug 2023 16:54:57 +0000 (19:54 +0300)]
replace QLocalePrivate::bcp47Name() and QLocalePrivate::measurementSystem() with their body

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
8 months agodo not convert QByteArray objects to QLatin1String
Ivailo Monev [Fri, 18 Aug 2023 14:04:56 +0000 (17:04 +0300)]
do not convert QByteArray objects to QLatin1String

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agobetter rich text detection from Qt::mightBeRichText()
Ivailo Monev [Thu, 17 Aug 2023 15:06:05 +0000 (18:06 +0300)]
better rich text detection from Qt::mightBeRichText()

because Katana uses its own markup for text the first tag may not be valid
HTML tag but there may be valid tags after the first tag

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoconst-ify the private QTextCodec data pointer
Ivailo Monev [Sat, 12 Aug 2023 19:38:20 +0000 (22:38 +0300)]
const-ify the private QTextCodec data pointer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoremove QByteArray TODO
Ivailo Monev [Sat, 12 Aug 2023 19:24:38 +0000 (22:24 +0300)]
remove QByteArray TODO

there is such method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoreplace qbytearray_insert() function with its body and de-duplicate code
Ivailo Monev [Sat, 12 Aug 2023 19:20:39 +0000 (22:20 +0300)]
replace qbytearray_insert() function with its body and de-duplicate code

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agodrop MDI support
Ivailo Monev [Fri, 11 Aug 2023 10:46:50 +0000 (13:46 +0300)]
drop MDI support

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoadd mirrors of the repository to the package files
Ivailo Monev [Thu, 10 Aug 2023 16:35:05 +0000 (19:35 +0300)]
add mirrors of the repository to the package files

too bad package systems lack a feature for that, Debian does not need it
tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoversion bump
Ivailo Monev [Wed, 9 Aug 2023 20:21:37 +0000 (23:21 +0300)]
version bump

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoexport the test component event classes 4.13.0
Ivailo Monev [Tue, 8 Aug 2023 08:34:18 +0000 (11:34 +0300)]
export the test component event classes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoremove non-operational QTestLogger bits
Ivailo Monev [Tue, 8 Aug 2023 08:24:53 +0000 (11:24 +0300)]
remove non-operational QTestLogger bits

QTestLogger::errorLogElement is always null

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoremove light XML log mode leftovers
Ivailo Monev [Tue, 8 Aug 2023 08:15:15 +0000 (11:15 +0300)]
remove light XML log mode leftovers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agounexport private test component classes, export public classes
Ivailo Monev [Tue, 8 Aug 2023 08:10:40 +0000 (11:10 +0300)]
unexport private test component classes, export public classes

some of the test component classes really should not be public, notably
those related to logging

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agodrop lightxml and xunit test log modes
Ivailo Monev [Mon, 7 Aug 2023 18:03:37 +0000 (21:03 +0300)]
drop lightxml and xunit test log modes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agohandle list of map/hash(s) as special case in QJsonDocumentPrivate::variantToJson()
Ivailo Monev [Mon, 7 Aug 2023 17:37:58 +0000 (20:37 +0300)]
handle list of map/hash(s) as special case in QJsonDocumentPrivate::variantToJson()

apparently JSON does support mixed types in arrays but QJsonDocument does
not

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoalways use the custom line-reading code in QFile::readLineData()
Ivailo Monev [Mon, 7 Aug 2023 12:53:02 +0000 (15:53 +0300)]
always use the custom line-reading code in QFile::readLineData()

sequential or not read() is read(), positioning should be done before that.
it is also faster than calling QFile::readData() multiple times which was
done for non-sequential files (regular files)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agogetSettingsPath() function optimization
Ivailo Monev [Mon, 7 Aug 2023 12:14:38 +0000 (15:14 +0300)]
getSettingsPath() function optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agosimplify QSettings value setters and getters
Ivailo Monev [Mon, 7 Aug 2023 12:14:26 +0000 (15:14 +0300)]
simplify QSettings value setters and getters

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoremove unused qjsondocument header inclusion
Ivailo Monev [Mon, 7 Aug 2023 08:43:47 +0000 (11:43 +0300)]
remove unused qjsondocument header inclusion

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agorework QSettings to use QString instead of QVariant
Ivailo Monev [Sun, 6 Aug 2023 19:41:57 +0000 (22:41 +0300)]
rework QSettings to use QString instead of QVariant

as optimization for the common use case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agotranslations update
Ivailo Monev [Thu, 3 Aug 2023 02:14:17 +0000 (05:14 +0300)]
translations update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoadapt QDateTimeEdit to locale changes
Ivailo Monev [Wed, 2 Aug 2023 10:44:29 +0000 (13:44 +0300)]
adapt QDateTimeEdit to locale changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agouse custom widget for the time of QDateTimeEdit
Ivailo Monev [Wed, 2 Aug 2023 08:02:11 +0000 (11:02 +0300)]
use custom widget for the time of QDateTimeEdit

unsuitable for timers (time intervals) but displays localized time,
for reference:
a973169ee45c68490b56b51f49b053d949ed81a7

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoupdate the QDateTimeEdit button text on date change
Ivailo Monev [Wed, 2 Aug 2023 07:19:36 +0000 (10:19 +0300)]
update the QDateTimeEdit button text on date change

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agocorrect assignment in QDateTimeParser::parseFormat()
Ivailo Monev [Wed, 2 Aug 2023 05:51:35 +0000 (08:51 +0300)]
correct assignment in QDateTimeParser::parseFormat()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agounexport QDateTimeParser
Ivailo Monev [Wed, 2 Aug 2023 05:51:07 +0000 (08:51 +0300)]
unexport QDateTimeParser

no longer required by QDateTimeEdit and the related classes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoemulate plurals for QDateTimeEdit
Ivailo Monev [Wed, 2 Aug 2023 03:28:56 +0000 (06:28 +0300)]
emulate plurals for QDateTimeEdit

QDateTimeEdit is used mostly for timers so the plurals will fit nicely,
writing other QDateTimeEdit-like widgets to use QLineEdit or QComboBox
for partciluar purposes would be piece of cake

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoremove non-operational QDateTimeParser bits
Ivailo Monev [Wed, 2 Aug 2023 02:35:26 +0000 (05:35 +0300)]
remove non-operational QDateTimeParser bits

with the QDateTimeEdit rewrite (see the previous commit) the parser has
only one mode

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoreimplement QDateTimeEdit
Ivailo Monev [Tue, 1 Aug 2023 07:15:32 +0000 (10:15 +0300)]
reimplement QDateTimeEdit

no date/time parsing and it has different look based on what is being
edited:
https://ibb.co/w6hTwCk

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoassume the time spec of QDate and QTime is Qt::LocalTime in QLocale::toString() methods
Ivailo Monev [Tue, 1 Aug 2023 06:21:53 +0000 (09:21 +0300)]
assume the time spec of QDate and QTime is Qt::LocalTime in QLocale::toString() methods

for compat

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoadd note about the tst_QFileInfo::fileTimes() test
Ivailo Monev [Tue, 1 Aug 2023 06:20:52 +0000 (09:20 +0300)]
add note about the tst_QFileInfo::fileTimes() test

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoreturn different status based on the error from trc tool
Ivailo Monev [Tue, 1 Aug 2023 05:16:06 +0000 (05:16 +0000)]
return different status based on the error from trc tool

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoimplement -fuzzy and -obsolete options for trc tool
Ivailo Monev [Tue, 1 Aug 2023 05:07:04 +0000 (05:07 +0000)]
implement -fuzzy and -obsolete options for trc tool

-fuzzy to be used (potentially) by Katana

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoformat qmimedata source file
Ivailo Monev [Tue, 1 Aug 2023 01:53:01 +0000 (01:53 +0000)]
format qmimedata source file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoQMimeData::formats() optimization
Ivailo Monev [Mon, 31 Jul 2023 22:49:14 +0000 (01:49 +0300)]
QMimeData::formats() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agomark the warning case in QTranslator::loadFromData() as unlikely
Ivailo Monev [Mon, 31 Jul 2023 22:48:47 +0000 (01:48 +0300)]
mark the warning case in QTranslator::loadFromData() as unlikely

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agooptimize generateItem() function
Ivailo Monev [Mon, 31 Jul 2023 10:53:44 +0000 (10:53 +0000)]
optimize generateItem() function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agooptimize QFontEngine::getGlyphPositions() and its callers
Ivailo Monev [Mon, 31 Jul 2023 10:40:14 +0000 (10:40 +0000)]
optimize QFontEngine::getGlyphPositions() and its callers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoignore the transformation when loading fonts from QFontEngineFT
Ivailo Monev [Mon, 31 Jul 2023 10:16:57 +0000 (10:16 +0000)]
ignore the transformation when loading fonts from QFontEngineFT

no transformation is set (outline scaling is done by
QFreetypeFace::addGlyphToPath()) thus the transformation can be ignored and
potentially speeding up loading a bit (glyphs are cached anyway tho)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoconst-ify the argument of QFontEngine::loadKerningPairs()
Ivailo Monev [Mon, 31 Jul 2023 10:05:54 +0000 (10:05 +0000)]
const-ify the argument of QFontEngine::loadKerningPairs()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agodo not link the KtGui component to KtXml
Ivailo Monev [Mon, 31 Jul 2023 09:55:35 +0000 (09:55 +0000)]
do not link the KtGui component to KtXml

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agoshush compiler warning
Ivailo Monev [Mon, 31 Jul 2023 02:25:45 +0000 (02:25 +0000)]
shush compiler warning

the QString length is checked by the above QString::isEmpty() call but the
compiler knows not what it does

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agodrop QVarLengthArray<T> and replace it with QStdVector<T> internally
Ivailo Monev [Sun, 30 Jul 2023 20:59:14 +0000 (20:59 +0000)]
drop QVarLengthArray<T> and replace it with QStdVector<T> internally

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agopartially revert a551f78d117b1e576aab029a9b04feb1c47c7d65
Ivailo Monev [Sun, 30 Jul 2023 17:58:35 +0000 (17:58 +0000)]
partially revert a551f78d117b1e576aab029a9b04feb1c47c7d65

fixes Plasma::RunnerContext test failure

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
9 months agooutput GMT from QLocale::toString() when the QDateTime spec is Qt::LocalTime
Ivailo Monev [Sat, 22 Jul 2023 05:14:18 +0000 (08:14 +0300)]
output GMT from QLocale::toString() when the QDateTime spec is Qt::LocalTime

note that because QTime and QDate carry no information how the objects
came to be (the time spec) it is next to impossible (without other
changes) to figure out if the time zone string should be GMT/UTC or the
local time zone abbreviation, bad design?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoinitialize QLabelPrivate member
Ivailo Monev [Wed, 12 Jul 2023 23:30:14 +0000 (02:30 +0300)]
initialize QLabelPrivate member

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoget rid of QWidgetItemV2
Ivailo Monev [Wed, 12 Jul 2023 23:12:59 +0000 (02:12 +0300)]
get rid of QWidgetItemV2

round 2, see 6d3fe9312c47aa09cceeb89feabae438ed55fdf6

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agohandle QDateTimeParser::TimeZoneSection enum in QDateTimeEditPrivate::convertToPublic()
Ivailo Monev [Tue, 11 Jul 2023 01:29:03 +0000 (04:29 +0300)]
handle QDateTimeParser::TimeZoneSection enum in QDateTimeEditPrivate::convertToPublic()

introduced in:
3c69bcc12b1c245a437c293c9d2d3cd49155dbc5

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoupdate URL TLDs table data
Ivailo Monev [Mon, 10 Jul 2023 00:19:40 +0000 (03:19 +0300)]
update URL TLDs table data

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agodo not warn if XDG_RUNTIME_DIR is not set
Ivailo Monev [Sat, 8 Jul 2023 01:22:24 +0000 (04:22 +0300)]
do not warn if XDG_RUNTIME_DIR is not set

happens often enough, if current user is changed via `sudo` for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoimplement debug operator for QPalette
Ivailo Monev [Thu, 6 Jul 2023 20:22:40 +0000 (23:22 +0300)]
implement debug operator for QPalette

beware that it will dump quite a lot of data, something along the lines of:
QPalette(
  -> group=Active, role=WindowText, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Active, role=Button, brush=QBrush(QColor(ARGB 1, 0.25098, 0.247059, 0.243137) , SolidPattern )  )
  -> group=Active, role=Light, brush=QBrush(QColor(ARGB 1, 0.310628, 0.304158, 0.304158) , SolidPattern )  )
  -> group=Active, role=Midlight, brush=QBrush(QColor(ARGB 1, 0.257237, 0.251865, 0.251865) , SolidPattern )  )
  -> group=Active, role=Dark, brush=QBrush(QColor(ARGB 1, 0.0915999, 0.0896773, 0.0896773) , SolidPattern )  )
  -> group=Active, role=Mid, brush=QBrush(QColor(ARGB 1, 0.162005, 0.158633, 0.158633) , SolidPattern )  )
  -> group=Active, role=Text, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Active, role=BrightText, brush=QBrush(QColor(ARGB 1, 1, 1, 1) , SolidPattern )  )
  -> group=Active, role=ButtonText, brush=QBrush(QColor(ARGB 1, 0.909804, 0.901961, 0.890196) , SolidPattern )  )
  -> group=Active, role=Base, brush=QBrush(QColor(ARGB 0, 0, 0, 0) , SolidPattern )  )
  -> group=Active, role=Window, brush=QBrush(QColor(ARGB 1, 0.188235, 0.184314, 0.184314) , SolidPattern )  )
  -> group=Active, role=Shadow, brush=QBrush(QColor(ARGB 1, 0.066392, 0.0650034, 0.0650034) , SolidPattern )  )
  -> group=Active, role=Highlight, brush=QBrush(QColor(ARGB 1, 0.0941176, 0.282353, 0.501961) , SolidPattern )  )
  -> group=Active, role=HighlightedText, brush=QBrush(QColor(ARGB 1, 1, 1, 1) , SolidPattern )  )
  -> group=Active, role=Link, brush=QBrush(QColor(ARGB 1, 0.313725, 0.556863, 0.847059) , SolidPattern )  )
  -> group=Active, role=LinkVisited, brush=QBrush(QColor(ARGB 1, 0.556863, 0.47451, 0.647059) , SolidPattern )  )
  -> group=Active, role=AlternateBase, brush=QBrush(QColor(ARGB 1, 0.141176, 0.137255, 0.137255) , SolidPattern )  )
  -> group=Active, role=NoRole, brush=QBrush(QColor(ARGB 1, 0, 0, 0) , SolidPattern )  )
  -> group=Active, role=ToolTipBase, brush=QBrush(QColor(ARGB 1, 0.0627451, 0.188235, 0.313725) , SolidPattern )  )
  -> group=Active, role=ToolTipText, brush=QBrush(QColor(ARGB 1, 0.768627, 0.819608, 0.878431) , SolidPattern )  )
  -> group=Disabled, role=WindowText, brush=QBrush(QColor(ARGB 1, 0.377111, 0.372473, 0.368856) , SolidPattern )  )
  -> group=Disabled, role=Button, brush=QBrush(QColor(ARGB 1, 0.220218, 0.21677, 0.213336) , SolidPattern )  )
  -> group=Disabled, role=Light, brush=QBrush(QColor(ARGB 1, 0.293324, 0.287205, 0.287205) , SolidPattern )  )
  -> group=Disabled, role=Midlight, brush=QBrush(QColor(ARGB 1, 0.238911, 0.233921, 0.233921) , SolidPattern )  )
  -> group=Disabled, role=Dark, brush=QBrush(QColor(ARGB 1, 0.0803693, 0.0786908, 0.0786908) , SolidPattern )  )
  -> group=Disabled, role=Mid, brush=QBrush(QColor(ARGB 1, 0.142214, 0.139239, 0.139239) , SolidPattern )  )
  -> group=Disabled, role=Text, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Disabled, role=BrightText, brush=QBrush(QColor(ARGB 1, 1, 1, 1) , SolidPattern )  )
  -> group=Disabled, role=ButtonText, brush=QBrush(QColor(ARGB 1, 0.422553, 0.417899, 0.412055) , SolidPattern )  )
  -> group=Disabled, role=Base, brush=QBrush(QColor(ARGB 0, 0, 0, 0) , SolidPattern )  )
  -> group=Disabled, role=Window, brush=QBrush(QColor(ARGB 1, 0.165164, 0.161715, 0.161715) , SolidPattern )  )
  -> group=Disabled, role=Shadow, brush=QBrush(QColor(ARGB 1, 0.0583505, 0.0571298, 0.0571298) , SolidPattern )  )
  -> group=Disabled, role=Highlight, brush=QBrush(QColor(ARGB 1, 0.165164, 0.161715, 0.161715) , SolidPattern )  )
  -> group=Disabled, role=HighlightedText, brush=QBrush(QColor(ARGB 1, 0.377111, 0.372473, 0.368856) , SolidPattern )  )
  -> group=Disabled, role=Link, brush=QBrush(QColor(ARGB 1, 0.167926, 0.240345, 0.329473) , SolidPattern )  )
  -> group=Disabled, role=LinkVisited, brush=QBrush(QColor(ARGB 1, 0.242588, 0.215061, 0.26804) , SolidPattern )  )
  -> group=Disabled, role=AlternateBase, brush=QBrush(QColor(ARGB 1, 0.123873, 0.120424, 0.120424) , SolidPattern )  )
  -> group=Disabled, role=NoRole, brush=QBrush(QColor(ARGB 1, 0, 0, 0) , SolidPattern )  )
  -> group=Disabled, role=ToolTipBase, brush=QBrush(QColor(ARGB 1, 0.0627451, 0.188235, 0.313725) , SolidPattern )  )
  -> group=Disabled, role=ToolTipText, brush=QBrush(QColor(ARGB 1, 0.768627, 0.819608, 0.878431) , SolidPattern )  )
  -> group=Inactive, role=WindowText, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Inactive, role=Button, brush=QBrush(QColor(ARGB 1, 0.25098, 0.247059, 0.243137) , SolidPattern )  )
  -> group=Inactive, role=Light, brush=QBrush(QColor(ARGB 1, 0.310628, 0.304158, 0.304158) , SolidPattern )  )
  -> group=Inactive, role=Midlight, brush=QBrush(QColor(ARGB 1, 0.257237, 0.251865, 0.251865) , SolidPattern )  )
  -> group=Inactive, role=Dark, brush=QBrush(QColor(ARGB 1, 0.0915999, 0.0896773, 0.0896773) , SolidPattern )  )
  -> group=Inactive, role=Mid, brush=QBrush(QColor(ARGB 1, 0.162005, 0.158633, 0.158633) , SolidPattern )  )
  -> group=Inactive, role=Text, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Inactive, role=BrightText, brush=QBrush(QColor(ARGB 1, 1, 1, 1) , SolidPattern )  )
  -> group=Inactive, role=ButtonText, brush=QBrush(QColor(ARGB 1, 0.909804, 0.901961, 0.890196) , SolidPattern )  )
  -> group=Inactive, role=Base, brush=QBrush(QColor(ARGB 0, 0, 0, 0) , SolidPattern )  )
  -> group=Inactive, role=Window, brush=QBrush(QColor(ARGB 1, 0.188235, 0.184314, 0.184314) , SolidPattern )  )
  -> group=Inactive, role=Shadow, brush=QBrush(QColor(ARGB 1, 0.066392, 0.0650034, 0.0650034) , SolidPattern )  )
  -> group=Inactive, role=Highlight, brush=QBrush(QColor(ARGB 1, 0.0980087, 0.224735, 0.373404) , SolidPattern )  )
  -> group=Inactive, role=HighlightedText, brush=QBrush(QColor(ARGB 1, 0.878431, 0.870588, 0.858824) , SolidPattern )  )
  -> group=Inactive, role=Link, brush=QBrush(QColor(ARGB 1, 0.313725, 0.556863, 0.847059) , SolidPattern )  )
  -> group=Inactive, role=LinkVisited, brush=QBrush(QColor(ARGB 1, 0.556863, 0.47451, 0.647059) , SolidPattern )  )
  -> group=Inactive, role=AlternateBase, brush=QBrush(QColor(ARGB 1, 0.141176, 0.137255, 0.137255) , SolidPattern )  )
  -> group=Inactive, role=NoRole, brush=QBrush(QColor(ARGB 1, 0, 0, 0) , SolidPattern )  )
  -> group=Inactive, role=ToolTipBase, brush=QBrush(QColor(ARGB 1, 0.0627451, 0.188235, 0.313725) , SolidPattern )  )
  -> group=Inactive, role=ToolTipText, brush=QBrush(QColor(ARGB 1, 0.768627, 0.819608, 0.878431) , SolidPattern )  )
)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoreplace local constant with the enum for in QPalette data stream operator
Ivailo Monev [Thu, 6 Jul 2023 19:35:56 +0000 (22:35 +0300)]
replace local constant with the enum for in QPalette data stream operator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoimplement debug operator for QRegExp
Ivailo Monev [Thu, 6 Jul 2023 17:26:48 +0000 (20:26 +0300)]
implement debug operator for QRegExp

to properly log KDirLister name filters for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agouse QSTACKARRAY() macro in QString::replace()
Ivailo Monev [Wed, 5 Jul 2023 06:00:23 +0000 (09:00 +0300)]
use QSTACKARRAY() macro in QString::replace()

so that the array is zero-initialized

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoreplace QVarLengthArray<T> with QStdVector<T> in QTextEngine
Ivailo Monev [Wed, 5 Jul 2023 01:19:16 +0000 (04:19 +0300)]
replace QVarLengthArray<T> with QStdVector<T> in QTextEngine

will happen everywhere eventually

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoinclude qhash header in qstdcontainers_p header
Ivailo Monev [Wed, 5 Jul 2023 01:18:25 +0000 (04:18 +0300)]
include qhash header in qstdcontainers_p header

for qHash() function reference

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agosave and restore the device position in QSvgIOHandler::option()
Ivailo Monev [Wed, 5 Jul 2023 00:31:52 +0000 (03:31 +0300)]
save and restore the device position in QSvgIOHandler::option()

that will shush gwenview

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agodo not recurse into sub-directories from QStatInfo::dirInfos()
Ivailo Monev [Sun, 2 Jul 2023 06:47:06 +0000 (09:47 +0300)]
do not recurse into sub-directories from QStatInfo::dirInfos()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agocompare the clean paths of QStatInfo
Ivailo Monev [Sun, 2 Jul 2023 06:07:23 +0000 (09:07 +0300)]
compare the clean paths of QStatInfo

to match what QFileInfo does

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoQFileSystemWatcher optimization
Ivailo Monev [Sun, 2 Jul 2023 05:46:10 +0000 (08:46 +0300)]
QFileSystemWatcher optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoconvert path to QByteArray via QFile::encodeName() in QStatInfo::dirInfos()
Ivailo Monev [Sun, 2 Jul 2023 05:09:54 +0000 (08:09 +0300)]
convert path to QByteArray via QFile::encodeName() in QStatInfo::dirInfos()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoregister socket error and state enums as metatypes
Ivailo Monev [Wed, 28 Jun 2023 16:31:34 +0000 (19:31 +0300)]
register socket error and state enums as metatypes

makes no sense to have to register types externally that the socket classes
use (connect) internally

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agopass the size of the QByteArray object to QString::fromLocal8Bit() in QFile::decodeName()
Ivailo Monev [Sat, 24 Jun 2023 16:44:33 +0000 (19:44 +0300)]
pass the size of the QByteArray object to QString::fromLocal8Bit() in QFile::decodeName()

for paths with spaces

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoadd leading slashes for any URL with file scheme
Ivailo Monev [Sat, 24 Jun 2023 11:15:52 +0000 (14:15 +0300)]
add leading slashes for any URL with file scheme

for the case of KUrl and anything using it - it can start with a
environment variable reference (such as $HOME) instead of leading slash

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agonew QUrl::AddTrailingSlash enum for KUrl
Ivailo Monev [Fri, 23 Jun 2023 20:06:35 +0000 (23:06 +0300)]
new QUrl::AddTrailingSlash enum for KUrl

optimized QUrlPrivate::toEncoded() while at it (only for the case
when the URL includes port)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoremove encoded QUrl getters and setters
Ivailo Monev [Thu, 22 Jun 2023 12:22:05 +0000 (15:22 +0300)]
remove encoded QUrl getters and setters

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoremove obsolete and unused QUrl methods
Ivailo Monev [Thu, 22 Jun 2023 10:44:14 +0000 (13:44 +0300)]
remove obsolete and unused QUrl methods

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agocall QUrlPrivate constructor
Ivailo Monev [Thu, 22 Jun 2023 00:59:16 +0000 (03:59 +0300)]
call QUrlPrivate constructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
10 months agoremove redundant destructors
Ivailo Monev [Wed, 21 Jun 2023 16:52:26 +0000 (19:52 +0300)]
remove redundant destructors

lots of these..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
11 months agoprint the QPluginLoader error string from QFactoryLoader::instance()
Ivailo Monev [Thu, 15 Jun 2023 02:19:37 +0000 (05:19 +0300)]
print the QPluginLoader error string from QFactoryLoader::instance()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
11 months agorename QDeclarativeView, QDeclarativeComponent and QDeclarativeLoader Status enum
Ivailo Monev [Sun, 11 Jun 2023 16:10:51 +0000 (19:10 +0300)]
rename QDeclarativeView, QDeclarativeComponent and QDeclarativeLoader Status enum

partially fixes kdelibs build when CMAKE_UNITY_BUILD is set to ON (build
fails due to enum clashes with stuff defined in X11 headers)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
11 months agochoose boundary reason based on the previous/next char only QTextBoundaryFinder:...
Ivailo Monev [Sat, 10 Jun 2023 08:42:35 +0000 (11:42 +0300)]
choose boundary reason based on the previous/next char only QTextBoundaryFinder::boundaryReasons()

the start and end of the text were considered as boundaries for compat only

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
11 months agosimplify QDeclarativeTextInput::moveCursorSelection()
Ivailo Monev [Sat, 10 Jun 2023 06:31:46 +0000 (09:31 +0300)]
simplify QDeclarativeTextInput::moveCursorSelection()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
11 months agoscope the monotonic clock check to QElapsedTimer::isMonotonic()
Ivailo Monev [Wed, 7 Jun 2023 19:18:50 +0000 (22:18 +0300)]
scope the monotonic clock check to QElapsedTimer::isMonotonic()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>