cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.
defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.
DirectWrite: Fix advances being scaled to 0
Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.
Conflicts:
configure
mkspecs/features/uikit/device_destinations.sh
mkspecs/features/uikit/xcodebuild.mk
src/corelib/global/qglobal.cpp
src/corelib/global/qnamespace.qdoc
src/plugins/platforms/cocoa/qcocoamenuitem.h
src/plugins/platforms/windows/qwindowsservices.cpp
src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
As usual, the requested format may not be available, so clients should
check the actual format to confirm triple-buffering.
Change-Id: Icf073cc9ddf2c912eb5c3ce0ac80d1694d1c56d7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
[ChangeLog][QtGui][QTextDocument] Fixed a bug that would return a wrong
position when searching backward from the end of the document.
Task-number: QTBUG-48182
Change-Id: I6e88f808a50cb840f61e7bc579e2a28c5300089d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
... by replacing them with C++11 range-for loops.
Then mark the plugin as QT_NO_FOREACH.
Change-Id: I80a18334b1e0c5bbd44dfe45eea80591d478a8d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Just one Q_FOREACH needed porting to C++11 range-for here.
Change-Id: I30ddd2a80cbb3245e23accc7843e67574fb2db17
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... by replacing them with C++11 for-each loops.
In clearHash(), replace iteration over QHash::keys() with
iteration over the hash itself. Also use the new const-
iterator overload of QHash::erase() to save one attempted
detach (in QHash::find()).
Mark the plugin as QT_NO_FOREACH.
Saves almost 2KiB (1.4%) in text size on optimized GCC 6.1 Linux
AMD64 builds.
Change-Id: I9bb3154130687c0061ea09b04ab5f627a4d2296c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- port Q_FOREACH to C++11 range-for
- mark types held in Qt containers as shared
- port inefficient QLists to QVectors
(required adding an artificial default ctor to one of the payload types)
- fix algorithmic mistake:
* don't use a QMap to sort a vector of QXmlStream{Attribute,NotationDeclaration},
constructing a QString key from the QStringRef name(). Use std::sort with a
lambda. Since this code is used in two places, and we don't yet require poly-
morphic lambdas, factor the code into a helper function template that also
takes care of adding the const to the return type so the range-for doesn't
detach the container.
Fixes errors reported by my local tree's static checks.
Change-Id: I3de97d9b03c87455aa6030998e9ca26c6c79a2e3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- port from Q_FOREACH to C++11 range-for
Fixes errors reported by my local tree's static checks.
Change-Id: Ib8522ed424ba227d84f9664c3282f95f6bee547c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The documentation for this method explicitly states that the initial
color+alpha is used, but its implementation used a QColor constructor
that ignores the alpha value.
Change-Id: I71721386e7fae0761e079d8840ec0124a8c14e33
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
the public win32/opengl.prf references it, so it must be public as well.
Change-Id: I95f6571bd3cdb7d35b2182bebf663e50140e065e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
now that configure.bat takes care of printing the help screen itself,
there is no compelling reason to ship configure.exe in the source
packages any more. consequently, always bootstrap it.
Change-Id: I5bf0946549e3c426c1a4a94b1c22f6c0f4b4993c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This reverts commit 53f0b43a4b.
{QAbstractAnimation::}{updateCurrentValue()} had been modified to
{QVariantAnimation::}{updateCurrentValue()} in a previous patch.
Change-Id: Ibaccf51de816966f16b8f3109e0c20626d5102a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
All loops trivially not modifying the iterated-over
container.
Saves ~9.4KiB in text size across all plugins and libs
(statically) linking in QtPlatformSupport (optimized
GCC 6.1 Linux AMD 64 build).
Change-Id: I2d91da1f78d9b33d4c5e4a1627560d8e705a9b9a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... by replacing them with C++11 range-for loops.
Saves ~1.7KiB in text size across all plugins and libs
(statically) linking in QtPlatformSupport (optimized
GCC 6.1 Linux AMD 64 build).
Change-Id: I492bf2d6afe9bccdc1237003388fcb83a2261dba
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As noted by Mat Sutcliffe <oktal3700@gmail.com>, there were
no relational operators for Latin1String/QLatin1String and
String/QLatin1String mixed comparisons, leading to implicit
conversions from QL1S to QString in Entry::op==(QL1S).
This patch fixes half of the issue, by providing the operators
for Latin1String/QLatin1String. In doing so, it cleans up their
definition (non-members, non-friends, delegating to existing
QL1S operators where possible, passing both {Q,}Latin1String by
value, as they're both Trivially Copyable and small).
A follow-up patch will deal with String/QLatin1String
comparisons. It will be not quite as straight-forward as
this patch, since we don't, yet, have QStringView, the
UTF-16 equivalent of QL1S, available.
Amends a5159cc50a.
Change-Id: I596358eb3ccf847b7680f171f9992f3fad80132c
Reviewed-by: Mat Sutcliffe <oktal3700@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Prevent QAbstractSpinBoxPrivate::interpret() from bailing out
in focus changes after text has been entered.
Task-number: QTBUG-55249
Change-Id: I250b3c50f7db5de2e9356038df20f18ee059df11
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
emitChanged() will be invoked when the system notifies the application
about a clipboard change. Hence, there is no need to call it previously
and cause two signals on the same change to be emitted.
Change-Id: I99605c9a71054e0610006dbeaaa90c5fb2f46755
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
In addition to setting the clipboard, we also need to store the mimedata
being passed. Otherwise requesting the mimedata returns a different
object, causing comparisons to fail.
Change-Id: I2ffea76e78be091cb98426e387619ac6788ea270
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QErrorMessage autotests managed to create a scenario where the options
are not initialized yet, causing a crash later on.
Change-Id: Iabad6f181f2bfdc81a9c73f0e67c8ba70753fec6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use the correct method of QMetaEnum to convert enum values to names.
QMetaEnum::valueToKey() should be used, because it takes an enum value
as an argument, while QMetaEnum::key() takes an index of the enum value.
Change-Id: Ie895fcc935e8835e3d9c416ca34be8bfe82fd74e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Previously we hardcoded the minimum windows version to the initial
Windows 10 release. However features have been added which require a
higher SDK version (eg drag and drop). Deploying such a package might
fail during distribution to consumer devices.
Hence introduce WINRT_MANIFEST.minVersion and
WINRT_MANIFEST.maxVersionTested as variables for the manifest file. If
nothing is specified, both values will be set to the UCRTVersion
environment variable, implying the development setup from which qmake
has been invoked.
Change-Id: I1dcf1e75c67c4ab2fd5a3fdcc32c8783a336e6ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Passing a string literal to QWindow::setObjectName() is rude:
it wants a QString.
Change-Id: Ic4c1079889002f0d5f1028c443456a8be0b7b0fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The endptr from reading the exponent of a 'g' form snprintf result
should not be past the end of the string we're reading from. It has
nothing to do with the 'e' sign.
Task-number: QTBUG-54482
Change-Id: I8bdee917b8d21fdc94c255548ad7e008431a07fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qt_div_255 does a fast rounded division, the form of rounding is however
only valid for positive integers.
Correct one case where it was used incorrectly and add it one place
it would be valid, and adds a comment to the function.
We were using the optimization (x*a + y*(255-a))/255 ==
(x-y)*a/255 + y but that makes the division by 255 potentially
negative.
Change-Id: Ie53aa82b66ef801f5d43f8d2ec48880cb4972f69
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On macOS, even if pkg-config is present in the path, configure will by
default correctly ignore it and set no-pkg-config. However, this was not
propagated to qmake when invoked from config.test, so tests which rely on
that did not work.
This was leading to pkg-config (installed from homebrew) to be used in
the libpng test, so it succeeded. But the later Qt build would fail to
find png.h from homebrew, as it correctly ignores pkg-config.
Task-number: QTBUG-55011
Change-Id: Ic6fb866bea0551f528da56cb545174dcd9bacf0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
This allows setting of variables, like FOO=bar.
Yes, it's intentional that there are no quotes.
Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
(cherry picked from commit e79200bf7f)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
On RHEL 6.6, mysql_config --libs returns "-rdynamic" among other arguments.
The configure test (config.tests/unix/mysql) would end up passing that
to qmake. qmake responds with "***Unknown option -rdynamic ..."
Change-Id: Ib1300e62aec8a5d866359f3eaea88d9648c872b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
(cherry picked from commit d7e27e4d26)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
amends fc1092cf, necessary because of (the earlier) a28364bc1.
Change-Id: I5c86bcb27854994e59228fd205c799396464554d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Store the result of the comparison before the calling QWidget::setParent()
passing the flags which can modify q->data->window_flags.
Previously, this led to the condition triggering when a child window
was becoming top level, causing the geometry to be changed (notably for
fullscreen windows on Windows, where fullscreen is merely emulated).
Amends change 5e99b07a07.
Task-number: QTBUG-54906
Change-Id: I9369d7d9f886451cfdb933746a4572593ffa074a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
there is no point in doing that, as we don't load it in that case
anyway. in fact, it would lead to caching a new result in every run.
Change-Id: Ia5cb27fa8a5d705d7f32a785b1e3b944f92d8929
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
as these tests do nothing but validating the command line, caching the
result is more confusing than anything else.
also make the tests silent, so they don't clutter an otherwise fully
cached configure run.
Change-Id: Ifc3d65278769b36a056650f077fd6274a7e192e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
implement it in configure.exe and fix it in configure.sh.
Change-Id: I30764f4cba4bad0f23bfb40ce7a2ca614e1afd71
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the function is (nowadays) only called when the condition is true.
Change-Id: I014f736c28c37b066a3f62e22f9002c025734386
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
write them to the top-level build dir, not the qtbase build dir.
the old files will be still used for a smooth migration.
Task-number: QTBUG-46974
Change-Id: I6eae678ffc7dfb921ecd9e9012e79e3b915ad3fa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
instead of saving the files away and restoring them afterwards, use the
new and shiny discard_from() function to throw away everything the files
might contain.
strictly speaking, this is not precise, as the pris may also use *=, -=,
and possibly other operations which cannot be trivially undone, but the
purpose is essentially to discard the special outputs of some features
which may affect subsequent tests, for which this is sufficient.
as a side effect, the failure to load qmodule.pri is not fatal any more
(like for qconfig.pri), to save the pointless effort of ensuring that it
exists.
Change-Id: I07625b60c4f2e27b21206b2c16d24ab111737395
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this function discards all values that come from a specific file. it
will be needed for configure bootstrapping, but is too obscure to
document it for general use.
Change-Id: I62c18aeb1847712e33d0599dbb0b90ffa1722438
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the inherited arguments may contain the '--' argument, which turns
additional arguments into configure arguments. the simplest fix for
that is injecting additional arguments at the front, not at the end.
Change-Id: I7cc00a42f0148e5ccbbeda2ad59fa8c63749f02d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>