QtGui: add missing qrgb.h to painting.pri

Change-Id: I7124bf4e4675307c633bf705092aad1ee3360761
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QRegularExpression: take into account the subject's start position and offset

This will enable the matching over QStringRefs.

Change-Id: I77729433d201982659a8c2aab939b2d15f1c8aca
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QRegularExpression: lift common code in the autotest

Unify the code paths which test the normal match, the partial
match and the global matches. Not only does this remove the duplication,
but it will also enable the corresponding tests to be run over QStringRefs.

Change-Id: Ia2cbe7a540bbe864b0975c9353697bc06c99c397
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QRegularExpression: add overloads matching over a QStringRef

[ChangeLog][QtCore][QRegularExpression] Support for matching
using QStringRef as the subject's string type has been added.

Change-Id: Idb956bbbdf4213f9ebe035db32cd37cf3370c6bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Do not draw combo box items as checked

QComboBox sets the checked styleoption state before asking the style to
paint it's items. I suspect this checked state was only meant
to be used as an indicator of the current item for some styles.
For Fusion this case seems to have been forgotten.

Now the code tries to align with how qgtkstyle does it.

Change-Id: I26d8e86bc0d490d5b820df0239ee3f7bdd4208b1
Task-number: QTBUG-40976
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QRegularExpression: strenghten tests of matching at an offset

Instead of simply doing a match against a string S at offset O > 0
(and checking the result), test that the results never change when matching
against the substring starting at (O - i) at offset i, 0 <= i <= O.

Change-Id: Ib7fd648ca0a36b93d145267ebfb792c46ca4e4f5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Remove the enum for specifying {In|Out|InOut|OutIn} subtypes.

Instead we can just use the QEasingCurve::Type enum.
This reduces code size and should simplify the code a bit.

Change-Id: I34eb62b7921634c91785c7b8c7c12741e6284fa1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QPdf: Extract Method is_monochrome()

The old code repeatedly evaluated QImage::colorTable(), which returns
a vector by value.

Instead, factor the checks performed on the color table into
a helper function and pass the color table to it, reducing
the number of evaluations from three to one.

Also makes the code more readable, because the condition now
fits on a single line.

Change-Id: I82773c235047e76b87c8a9d630f7df9440430351
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
QTextFormat: use qHash(double/float) instead of own implementation

The implementation of hash(float) does not treat +0 and -0 the same,
thus violating the property required of hash functions that they
produce equal hash values for equal input.

Simply use the qHash() FP functions which recently became available
and which do not have that problem.

This was found by unrelated code review. I'm not aware of any user-
visible issue this fixes.

Change-Id: I458c384aaf112e29cea677022969b62a34263cfb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
qPremultiply(QRgb): let the compiler see all versions

Use a template helper function and template specialization
to select which of the two versions (64bit / 32bit) to
use. This makes the compiler see both versions on all
platforms, enabling better syntax checking should either
of the two change. It also will fail to compile on platforms
where the word size is neither 4 nor eight bytes now...

And, of course, it's always satisfying to remove a use of
the preprocessor.

Change-Id: I4870411f99eb3b1a2c0c170fa53fa3c9b026da15
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QColor: remind to remove copy ctor for Qt 6

Change-Id: Ib3fc880ec5c856cc9a7573349f63052f0a00734b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>