Commit graph

7889 commits

Author SHA1 Message Date
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
7dadf0c316 always use QImage for QTextDocument resources
now that QPixmap always uses QImage (internally) it's better to use QImage
directly

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 03:53:25 +02:00
Ivailo Monev
c5970df16f check the time even if the serial is the same in QKeyMapper::translateKeyEvent()
apparently X11 sends key events with same serial even seconds after (if the
key is the same), also now only key presses will be considered
auto-repeated because X11 sends (fake/simulated) key release events

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 20:37:28 +02:00
Ivailo Monev
8055f383ae move the static variable outside the conditional code in QKeyMapper::translateKeyEvent()
fun fact: it is very easy to break auto-repeat code by reparenting QWidget
from a QPushButton event (KMediaWidget does it)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 10:43:02 +02:00
Ivailo Monev
bdd0750f6d correct memcmp() return value checks in QTextConverter::toUnicode()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 02:51:24 +02:00
Ivailo Monev
ba86e9594c return if ubrk_safeClone() fails in QTextBoundaryFinder assignment operator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 11:14:25 +02:00
Ivailo Monev
967b3fab87 call ubrk_following() and ubrk_preceding() with the current QTextBoundaryFinder position
I remember ubrk_following() and ubrk_preceding() causing a crash if the
position is not within the text bounds so leaving the -1 checks just in
case

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 11:03:16 +02:00
Ivailo Monev
a6ff51bb74 check for self-assignment in QTextBoundaryFinder assignment operator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 08:34:03 +02:00
Ivailo Monev
9ebc3937e3 handle strings as UTF-8 encoded from QJsonDocument
the default QString codec is US-ASCII

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 06:44:56 +02:00
Ivailo Monev
c3df7940f3 chop BOMs from QTextConverter::toUnicode()
fun fact: anything that is checking for BOMs is either not passing them
to QTextCodec/QTextConverter (e.g. Kate) when converting or was just using
QTextCodec::IgnoreHeader flag (QXmlStreamWriter used to)

okular xps generator now works btw (xml files in .xps files seem to be
UTF-16 encoded with BOM)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-26 06:42:44 +02:00
Ivailo Monev
f7ec4880bf QPngHandler::write() optimization
why allocate when it can be done without?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 02:53:41 +02:00
Ivailo Monev
43b2471624 inherit std::bitset<T> as private base class of QTimersSet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 02:05:45 +02:00
Ivailo Monev
afd4b13ff8 correct indendations in qslider source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 02:03:25 +02:00
Ivailo Monev
4088a6f2ec remove unused QSizeGripPrivate member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:46:31 +02:00
Ivailo Monev
1afaf0f663 remove unused definitions in qsizegrip source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:43:50 +02:00
Ivailo Monev
02db9e3072 correct break scope in QDockWidget::event()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:40:20 +02:00
Ivailo Monev
7e1b96ea67 QApplication and QWidgetAnimator friendship has been broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:34:00 +02:00
Ivailo Monev
93cc00de74 partial build fix for the case when QT_NO_COLORDIALOG is defined
qtconfig tool requires QColorDialog, that's why it is broken

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:17:28 +02:00
Ivailo Monev
dc999b1bb4 QT_NO_FILEDIALOG config option is no longer broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 01:03:53 +02:00
Ivailo Monev
a5dc33b512 QT_NO_FONTDIALOG config option is no longer broken
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:48:36 +02:00
Ivailo Monev
67b7e26b30 correct indentation in QWindowsStyle::drawPrimitive()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:18:59 +02:00
Ivailo Monev
954f314757 remove redundant check in QEasingCurve::setType()
since QEasingCurve instances are no longer shared and no detaching is done
the check that was optimization to avoid detaching is no longer worth it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 23:56:00 +02:00
Ivailo Monev
fed3c86456 correct repo directory name in crossdeb.sh script
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 23:48:36 +02:00
Ivailo Monev
4818b6b1ee QFontDatabase review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:59:54 +02:00
Ivailo Monev
3d8568d247 QEasingCurve review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:38:49 +02:00
Ivailo Monev
6fe67b22f9 move the QEasingCurve::Custom case to the switch in QEasingCurve::valueForProgress()
side note: only plasma and KWin set custom QEasingCurve function, both are
not used

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-25 00:26:54 +02:00
Ivailo Monev
41bea107bf translations update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 20:25:29 +02:00
Ivailo Monev
9110484400 remove resource system leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 20:03:50 +02:00
Ivailo Monev
1f543bd07d correct debug message in QTextStreamPrivate::flushWriteBuffer()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 19:48:32 +02:00
Ivailo Monev
b06742e3fc write BOM only from QTextStream, on demand
ICU finally does not generate BOMs (since idk when), I guess someone took
note. chopping BOMs from the result may have to be done only if the input
data had BOM (for compat) but let's see if that is even needed

Kate encoding tests pass now btw

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 18:44:43 +02:00
Ivailo Monev
4162528b85 consistent QTextConverter::ConversionFlag enums
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 04:02:25 +02:00
Ivailo Monev
f644e07423 remove most of the QTextStream manipulators and the ambiguous void pointer operator
most of them are unused since QTextStream is used mostly for streaming to
QFile, besides that the streaming of void pointer could result in streaming
in std::endl function pointer address or some other non-sense

I will not gut-out QTextStream yet (not in this release cycle) because I
know for a fact such change will break things that use the declarative
component (such as plasma and its applets due to nan/inf compat code in
QTextStream)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-24 00:17:33 +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
b0949ee6c5 call UCNV_FROM_U_CALLBACK_SUBSTITUTE() and UCNV_TO_U_CALLBACK_SUBSTITUTE() with NULL as context
what a surprise it is to learn that both function replace characters only
in some cases (when context is NULL or some internally set context)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 19:01:45 +02:00
Ivailo Monev
c5ef2e33dd someone's typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 04:36:08 +02:00
Ivailo Monev
7063791884 copy the other object position from QTextBoundaryFinder copy-constructor
as done by the assignment operator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 02:15:21 +02:00
Ivailo Monev
ad9656b27c QTextBoundaryFinder documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 02:12:23 +02:00
Ivailo Monev
9d4033f0d7 remove unused HB_MIN(), HB_MAX() and HB_FIXED_CONSTANT() macros defined in qharfbuz_p header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 01:44:55 +02:00
Ivailo Monev
c97ba32a27 QEasingCurve::valueForProgress() optimization
doing qreal (either float or double) math on demand is much more optimal,
also reducing the switches to one is a bonus

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 01:12:29 +02:00
Ivailo Monev
e62b8d4fdf QEasingCurve::InCurve, QEasingCurve::OutCurve, QEasingCurve::SineCurve and QEasingCurve::CosineCurve are deffinetly not internal
used by plasma system-monitor applet for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 00:54:18 +02:00
Ivailo Monev
791e945fa4 QEasingCurve documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 00:49:24 +02:00
Ivailo Monev
915fcec751 call FatalSignalHandler constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 00:34:53 +02:00
Ivailo Monev
2991e926c7 QOpacityEffect review
by starting the elapsed timer just before the fade timer the opacity
transition will be smoother at the start of the effect

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-23 00:24:22 +02:00
Ivailo Monev
69f22fa639 explicitly convert the elapsed time to double
QElapsedTimer::elapsed() returns qint64 btw

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 20:42:18 +02:00
Ivailo Monev
628f139f18 do not send move and resize events to the widget from qFadeEffect()
the position and size of the widget matter not to the effect

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 20:37:06 +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
07beadf0c6 QOpacityEffect optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 19:02:50 +02:00
Ivailo Monev
62ce7f100c set the global static variables before deleting the effect instances in qScrollEffect() and qFadeEffect()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 16:16:53 +02:00
Ivailo Monev
fe5c3dd679 snapshot the widget as QImage from QRollEffect
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 16:15:52 +02:00
Ivailo Monev
01949644ea remove declaration of now non-existing QRollEffect::run() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-22 16:15:03 +02:00