OSDN Git Service

kde/Katie.git
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 months agodrop QTime methods that have QElapsedTimer equivalent
Ivailo Monev [Wed, 7 Jun 2023 10:25:38 +0000 (13:25 +0300)]
drop QTime methods that have QElapsedTimer equivalent

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoMerge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie
Ivailo Monev [Wed, 7 Jun 2023 06:18:23 +0000 (09:18 +0300)]
Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie

14 months agoreplace use of QTime as timer with QElapsedTimer
Ivailo Monev [Wed, 7 Jun 2023 06:16:34 +0000 (09:16 +0300)]
replace use of QTime as timer with QElapsedTimer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove redundant file existence check in QDir::rename()
Ivailo Monev [Tue, 6 Jun 2023 06:01:40 +0000 (09:01 +0300)]
remove redundant file existence check in QDir::rename()

if the source does not exists renaming will fail anyway, also the check is
subject to race-condition

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agode-duplicate definition
Ivailo Monev [Mon, 5 Jun 2023 17:56:15 +0000 (20:56 +0300)]
de-duplicate definition

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQPolygonF::toPolygon() optimization
Ivailo Monev [Mon, 5 Jun 2023 17:52:34 +0000 (20:52 +0300)]
QPolygonF::toPolygon() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove redundant QLineEdit and QLineEditPrivate destructors
Ivailo Monev [Mon, 5 Jun 2023 17:19:22 +0000 (20:19 +0300)]
remove redundant QLineEdit and QLineEditPrivate destructors

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQImage::colorTable() method optimization
Ivailo Monev [Mon, 5 Jun 2023 16:02:51 +0000 (19:02 +0300)]
QImage::colorTable() method optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agodither_to_Mono() function optimization
Ivailo Monev [Mon, 5 Jun 2023 16:00:26 +0000 (19:00 +0300)]
dither_to_Mono() function optimization

only the mono image formats use color tables and the table has two colors only

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoinitialize the QGuiPlatformPlugin pointer in qt_guiPlatformPlugin() function
Ivailo Monev [Mon, 5 Jun 2023 02:31:38 +0000 (05:31 +0300)]
initialize the QGuiPlatformPlugin pointer in qt_guiPlatformPlugin() function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoget rid of the (no so internal) QFileDialog hooks
Ivailo Monev [Mon, 5 Jun 2023 02:06:18 +0000 (05:06 +0300)]
get rid of the (no so internal) QFileDialog hooks

assuming that the QGuiPlatformPlugin hooks work the exported functions are
redundant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agominor QFileDialog optimization and documentation update
Ivailo Monev [Sun, 4 Jun 2023 15:44:25 +0000 (18:44 +0300)]
minor QFileDialog optimization and documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agocopyright QDebug to me
Ivailo Monev [Sat, 3 Jun 2023 07:47:01 +0000 (10:47 +0300)]
copyright QDebug to me

rewrote it, see 29a872456828a5a01d61520db399f2537ee9bbf4

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQJsonDocument::fromJson() optimization
Ivailo Monev [Thu, 1 Jun 2023 08:28:07 +0000 (11:28 +0300)]
QJsonDocument::fromJson() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agouse the stored native filepath in QFileSystemEngine::removeDirectory()
Ivailo Monev [Wed, 31 May 2023 04:04:20 +0000 (07:04 +0300)]
use the stored native filepath in QFileSystemEngine::removeDirectory()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQDir and QDirIterator friendship has been broken
Ivailo Monev [Wed, 31 May 2023 03:41:21 +0000 (06:41 +0300)]
QDir and QDirIterator friendship has been broken

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agostatic QFile::exists() method optimization
Ivailo Monev [Wed, 31 May 2023 02:50:49 +0000 (05:50 +0300)]
static QFile::exists() method optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agouse QFile::encodeName() and QFile::decodeName() in QStatInfo
Ivailo Monev [Wed, 31 May 2023 02:50:30 +0000 (05:50 +0300)]
use QFile::encodeName() and QFile::decodeName() in QStatInfo

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQSettings documentation correction
Ivailo Monev [Wed, 31 May 2023 01:55:27 +0000 (04:55 +0300)]
QSettings documentation correction

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove unused QT_MOC definition
Ivailo Monev [Wed, 31 May 2023 01:38:06 +0000 (04:38 +0300)]
remove unused QT_MOC definition

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove scripttools component leftovers
Ivailo Monev [Wed, 31 May 2023 01:34:30 +0000 (04:34 +0300)]
remove scripttools component leftovers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agodo not copy the float in QDataStream::operator<<()
Ivailo Monev [Wed, 31 May 2023 01:27:20 +0000 (04:27 +0300)]
do not copy the float in QDataStream::operator<<()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove redundant QT_MOC guard in qvariant header
Ivailo Monev [Wed, 31 May 2023 00:38:51 +0000 (03:38 +0300)]
remove redundant QT_MOC guard in qvariant header

mayhaps the MOC tool was choking on it at some point

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agouse proper QString constructor for test string in QJsonDocument tests
Ivailo Monev [Tue, 30 May 2023 22:27:46 +0000 (01:27 +0300)]
use proper QString constructor for test string in QJsonDocument tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agodrop the QVarLengthArray<T> pre-allocation feature
Ivailo Monev [Tue, 30 May 2023 17:37:04 +0000 (20:37 +0300)]
drop the QVarLengthArray<T> pre-allocation feature

note that it was optimistically increasing the size by 2x from
QVarLengthArray<T>::append() aswell

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agocalculate the data size before allocating storage for QDBusMetaObjectPrivate in QDBus...
Ivailo Monev [Tue, 30 May 2023 07:26:41 +0000 (10:26 +0300)]
calculate the data size before allocating storage for QDBusMetaObjectPrivate in QDBusMetaObjectGenerator::write()

part of it may be allocated on the stack, part of it on the heap (depending
on the number of methods, properties, etc.). fixes heap-use-after-free in
case other container is used (e.g. QVector<int>) and optimizes it a bit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoformat qvarlengtharray header file
Ivailo Monev [Tue, 30 May 2023 06:25:23 +0000 (09:25 +0300)]
format qvarlengtharray header file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoassume malloc() does not fail in QVarLengthArray<T>::reallocData()
Ivailo Monev [Tue, 30 May 2023 06:09:51 +0000 (09:09 +0300)]
assume malloc() does not fail in QVarLengthArray<T>::reallocData()

even when malloc() is called with 0 as size it returns non-null pointer
(some random garbage)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agodebug type build fix
Ivailo Monev [Tue, 30 May 2023 06:07:29 +0000 (09:07 +0300)]
debug type build fix

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoupdate addresses in QtNetworkSettings::serverIPs()
Ivailo Monev [Tue, 30 May 2023 04:57:48 +0000 (07:57 +0300)]
update addresses in QtNetworkSettings::serverIPs()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoadjust QSocketNotifier test to 719cdd159a65e0067f09781e22eb09c2911423b2
Ivailo Monev [Tue, 30 May 2023 04:50:37 +0000 (07:50 +0300)]
adjust QSocketNotifier test to 719cdd159a65e0067f09781e22eb09c2911423b2

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agouse QVarLengthArray<T>() instead of QSTACKARRAY() for potentially large buffers
Ivailo Monev [Mon, 29 May 2023 23:37:12 +0000 (02:37 +0300)]
use QVarLengthArray<T>() instead of QSTACKARRAY() for potentially large buffers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoreplace static table and enums with the values they map to in parseFont() function
Ivailo Monev [Mon, 29 May 2023 21:38:40 +0000 (00:38 +0300)]
replace static table and enums with the values they map to in parseFont() function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoformat qsvgiohandler source file
Ivailo Monev [Mon, 29 May 2023 17:35:24 +0000 (20:35 +0300)]
format qsvgiohandler source file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQSvgIOHandler::loadDevice() optimization
Ivailo Monev [Mon, 29 May 2023 17:05:01 +0000 (20:05 +0300)]
QSvgIOHandler::loadDevice() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agosimplify and optimize QSvgIOHandler
Ivailo Monev [Mon, 29 May 2023 16:58:37 +0000 (19:58 +0300)]
simplify and optimize QSvgIOHandler

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agorequire subType to be passed to QPpmHandler::canRead()
Ivailo Monev [Mon, 29 May 2023 16:17:08 +0000 (19:17 +0300)]
require subType to be passed to QPpmHandler::canRead()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agorequire libdeflate and unbundle it
Ivailo Monev [Mon, 29 May 2023 15:39:48 +0000 (18:39 +0300)]
require libdeflate and unbundle it

kdelibs requires too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoimplement option for imgconv utility to save the raw image via QDataStream
Ivailo Monev [Mon, 29 May 2023 05:46:53 +0000 (08:46 +0300)]
implement option for imgconv utility to save the raw image via QDataStream

mostly for testing purposes (e.g. what compression format can compress the
data quick and with decent compression ratio?)

on a side note that an actual raw image format

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQTextStream documentation update
Ivailo Monev [Mon, 29 May 2023 01:31:06 +0000 (04:31 +0300)]
QTextStream documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoreturn QString from QFileSystemEngine::getLinkTarget() and rename it
Ivailo Monev [Sat, 27 May 2023 16:02:33 +0000 (19:02 +0300)]
return QString from QFileSystemEngine::getLinkTarget() and rename it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoset the QIODevice error from QFile
Ivailo Monev [Sat, 27 May 2023 06:19:48 +0000 (09:19 +0300)]
set the QIODevice error from QFile

much like QAbstractSocket the error string is now shared with QIODevice

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agouse the static QFile::setPermissions() method in QStandardPaths::writableLocation()
Ivailo Monev [Sat, 27 May 2023 05:59:59 +0000 (08:59 +0300)]
use the static QFile::setPermissions() method in QStandardPaths::writableLocation()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agostatic QFile methods optimizations
Ivailo Monev [Sat, 27 May 2023 05:45:03 +0000 (08:45 +0300)]
static QFile methods optimizations

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoremove redundant QIODevicePrivate member
Ivailo Monev [Sat, 27 May 2023 05:08:16 +0000 (08:08 +0300)]
remove redundant QIODevicePrivate member

QFile already caches if the fd is sequential in the metadata. QProcess,
QAbstractSocket and other classes simply return true from reimplementation
of QIODevice::isSequential()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoreplace hardcoded enum value in QAbstractSocketEnginePrivate::setError()
Ivailo Monev [Sat, 27 May 2023 03:57:52 +0000 (06:57 +0300)]
replace hardcoded enum value in QAbstractSocketEnginePrivate::setError()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agorequire all QAbstractSocketEngine::initialize() arguments
Ivailo Monev [Sat, 27 May 2023 03:49:44 +0000 (06:49 +0300)]
require all QAbstractSocketEngine::initialize() arguments

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoQFileSystemEntry optimization
Ivailo Monev [Sat, 27 May 2023 03:37:23 +0000 (06:37 +0300)]
QFileSystemEntry optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agogenlocale script comment correction
Ivailo Monev [Sat, 27 May 2023 02:44:57 +0000 (05:44 +0300)]
genlocale script comment correction

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoFreeBSD footprint file update
Ivailo Monev [Sat, 27 May 2023 02:25:20 +0000 (05:25 +0300)]
FreeBSD footprint file update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoupdate tables data to CLDR v43
Ivailo Monev [Sat, 27 May 2023 01:02:04 +0000 (04:02 +0300)]
update tables data to CLDR v43

hacks included

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agopass the scalable icons support QIconLoader member to QIconTheme
Ivailo Monev [Fri, 26 May 2023 02:38:48 +0000 (05:38 +0300)]
pass the scalable icons support QIconLoader member to QIconTheme

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agopreperations to conditionally check for scalable icons from icon loader
Ivailo Monev [Fri, 26 May 2023 02:15:15 +0000 (05:15 +0300)]
preperations to conditionally check for scalable icons from icon loader

some icon themes provide both scalable and non-scalable icons

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoadd QIcon benchmark
Ivailo Monev [Fri, 26 May 2023 01:49:37 +0000 (04:49 +0300)]
add QIcon benchmark

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
14 months agoconst-correct QIconLoader methods
Ivailo Monev [Fri, 26 May 2023 01:18:41 +0000 (04:18 +0300)]
const-correct QIconLoader methods

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