Commit graph

8097 commits

Author SHA1 Message Date
Ivailo Monev
baeeb19d75 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>
2023-08-27 20:50:45 +03:00
Ivailo Monev
b3e5a0e7d1 QKeySequence::toString() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 20:41:54 +03:00
Ivailo Monev
6eb9bec4aa make sure the bottom of QKeySequence::operator[] is really unreachable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 17:08:40 +03:00
Ivailo Monev
c05116aeca fix regression since 4614dddd42
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 05:28:48 +03:00
Ivailo Monev
930b84f6ac remove unused QWidgetExceptionCleaner struct
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-24 22:05:21 +03:00
Ivailo Monev
e0855757c2 remove declaration of non-existing qt_app_fonts_hash() and qt_app_palettes_hash() functions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 05:55:21 +03:00
Ivailo Monev
4d763d1c74 QIcon::hasThemeIcon() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 22:52:11 +03:00
Ivailo Monev
3a767e2043 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>
2023-08-22 12:27:11 +07:00
Ivailo Monev
48f864a5f4 fix possible crashes in case QCursor is used when qt_x11Data is null
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 11:13:11 +07:00
Ivailo Monev
1d8cc1be87 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>
2023-08-21 03:18:50 +03:00
Ivailo Monev
0d219c845c 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>
2023-08-21 02:35:15 +03:00
Ivailo Monev
0140df36db 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>
2023-08-20 20:19:44 +03:00
Ivailo Monev
543dd63b00 check if there is platform plugin for XDG_SESSION_DESKTOP from qt_guiPlatformPlugin()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-20 18:39:45 +03:00
Ivailo Monev
198625f679 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>
2023-08-19 00:16:29 +03:00
Ivailo Monev
9c5f99c4ca replace QLocalePrivate::bcp47Name() and QLocalePrivate::measurementSystem() with their body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 19:54:57 +03:00
Ivailo Monev
7b7f5e2870 do not convert QByteArray objects to QLatin1String
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 17:22:28 +03:00
Ivailo Monev
e1f487bd60 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>
2023-08-17 18:06:05 +03:00
Ivailo Monev
0c717a4fb8 const-ify the private QTextCodec data pointer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 22:38:20 +03:00
Ivailo Monev
fb0efaa977 remove QByteArray TODO
there is such method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 22:24:38 +03:00
Ivailo Monev
806043ae3d replace qbytearray_insert() function with its body and de-duplicate code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 22:20:39 +03:00
Ivailo Monev
e1c257e698 drop MDI support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 14:02:20 +03:00
Ivailo Monev
639c4ac8df 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>
2023-08-10 19:40:58 +03:00
Ivailo Monev
9671ad6f47 version bump
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 23:22:30 +03:00
Ivailo Monev
0f6a33782b export the test component event classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 11:34:18 +03:00
Ivailo Monev
d5b194b53a remove non-operational QTestLogger bits
QTestLogger::errorLogElement is always null

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 11:24:53 +03:00
Ivailo Monev
09050f82c1 remove light XML log mode leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 11:15:15 +03:00
Ivailo Monev
fbf784fbe2 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>
2023-08-08 11:10:40 +03:00
Ivailo Monev
eb9c8ebd43 drop lightxml and xunit test log modes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 21:03:37 +03:00
Ivailo Monev
b57c20755a 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>
2023-08-07 20:37:58 +03:00
Ivailo Monev
7c840afcb1 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>
2023-08-07 15:53:02 +03:00
Ivailo Monev
7ad0934eae getSettingsPath() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 15:14:38 +03:00
Ivailo Monev
c0e446a031 simplify QSettings value setters and getters
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 15:14:26 +03:00
Ivailo Monev
8f57ac6334 remove unused qjsondocument header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 11:43:47 +03:00
Ivailo Monev
1c185797eb rework QSettings to use QString instead of QVariant
as optimization for the common use case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 00:12:50 +03:00
Ivailo Monev
b72c37176a translations update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 05:14:17 +03:00
Ivailo Monev
e1b60d98b9 adapt QDateTimeEdit to locale changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 13:44:29 +03:00
Ivailo Monev
90137d4df9 use custom widget for the time of QDateTimeEdit
unsuitable for timers (time intervals) but displays localized time,
for reference:
a973169ee4

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 11:05:08 +03:00
Ivailo Monev
d76eb99a8e update the QDateTimeEdit button text on date change
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 10:19:36 +03:00
Ivailo Monev
747eb83bed correct assignment in QDateTimeParser::parseFormat()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 08:51:35 +03:00
Ivailo Monev
c1eb4855ef unexport QDateTimeParser
no longer required by QDateTimeEdit and the related classes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 08:51:07 +03:00
Ivailo Monev
a973169ee4 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>
2023-08-02 06:29:03 +03:00
Ivailo Monev
260f37c25e 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>
2023-08-02 05:35:26 +03:00
Ivailo Monev
24690f5507 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>
2023-08-02 04:16:01 +03:00
Ivailo Monev
9688b3520f 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>
2023-08-01 09:21:53 +03:00
Ivailo Monev
c888e37af5 add note about the tst_QFileInfo::fileTimes() test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 09:20:52 +03:00
Ivailo Monev
fb2849a589 return different status based on the error from trc tool
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 05:16:06 +00:00
Ivailo Monev
db07b8b18f implement -fuzzy and -obsolete options for trc tool
-fuzzy to be used (potentially) by Katana

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 05:07:04 +00:00
Ivailo Monev
b79d6326b9 format qmimedata source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 01:53:01 +00:00
Ivailo Monev
67f7b1029d QMimeData::formats() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 01:49:14 +03:00
Ivailo Monev
0fc9e64535 mark the warning case in QTranslator::loadFromData() as unlikely
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-01 01:48:47 +03:00