Commit Graph

51901 Commits

Author SHA1 Message Date
Andy Shaw
e5aada1ba7 Doc: Add a note about a limitation in QDockWidget on macOS
Pick-to: 6.1 5.15
Change-Id: I3599304d2dab9a6e64f110644b22e65494f3c0a8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-06-08 12:56:38 +02:00
Kai Köhne
a880c791ec Fix MSVC compiler warning in code snippets
Fixes
 warning C5046: 'testObject::MyTestObject::toString': Symbol involving type with internal linkage not defined

Change-Id: I9925eb15e262f29e636c019c87311a6ea2c47505
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-06-08 08:33:56 +02:00
Lorn Potter
6ab665b9f3 wasm: fix up compiler message
It's Emscripten compiler, not wasm compiler.

Change-Id: I39e754be9486500d9bba71006642fbdb1261c84c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-06-08 09:26:04 +10:00
Lorn Potter
1b4fe5d388 wasm: fix threaded builds
set the thread pool size default to 4

Change-Id: I038a81610c82ac4d162c044d0e1f58196cffc7b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-06-08 08:10:43 +10:00
Volker Hilsheimer
14e09ada69 Fix rearranging of icons in listview via drag'n'drop
Since 0f1008a593, views record if they
moved the item in the model, and prevent the deletion of the source item
in QAbstractItemView by setting the dropEventMoved private data member.

However, QListView in icon mode is special: it doesn't rearrange the
model, it repositions the icons in the view. While the dropEventMoved
logic was applied to the drag event filter to prevent deletion, the
variable was never set in the filterDropEvent handler. The drop event got
ignored, breaking rearranging of icons.

Fix this by setting the dropEventMoved member in filterDropEvent.

Fixes: QTBUG-94226
Pick-to: 5.15 6.1
Change-Id: I963f5db0f81bcd0d25eef05d9a265be00a5871f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-06-08 00:10:42 +02:00
Volker Hilsheimer
efdaba37d6 QAItemView: in MultiSelection, press deselects only if no drag can start
In MultiSelection mode, items are by default toggled on press, which
follows the example of standard Windows controls. However, when dragging
is enabled, then the press might be the beginning of a drag'n'drop
operation, and deselecting the item on press breaks the selection and user
experience.

Don't toggle the selection for presses on an already selected item that
might get dragged; instead, wait for the release event.

Extend the test case slightly to cover the special case. Dragging a
selection in a drag-enabled and MultiSelection item view wasn't possible
before either.

Fixes: QTBUG-59888
Change-Id: Ibd3e95a71ea63dd1e9bc3c8a723eafa9a1c21afa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2021-06-08 00:10:42 +02:00
Karsten Heimrich
8654192f8f Switch-ify QFSFileEngine::fileName and update implementation
Adapt to coding guidelines and use raw string literals.

Change-Id: Ice9a87cafb22e01a361ad44221d561a298e5af05
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-06-08 00:05:44 +02:00
Assam Boudjelthia
b216b360ac Android: Use the new runOnAndroidMainThread() call
Remove the [&] capture in runOnAndroidMainThread() for void type.

Replace the old private QtAndroidPrivate::runOnAndroidThread()
with QAndroidApplication::runOnAndroidMainThread().

Task-number: QTBUG-90501
Change-Id: I41eaf1ea9ee68b22861bf498f12a97a02515cc47
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-06-07 22:43:01 +03:00
Assam Boudjelthia
c08b9a49ba Android: don't call qmlimportscanner if no qml dir exist
If only qtbase is installed, androiddeployqt might call qmlimportscanner
which will fail to find a qml dir under the Qt install path. Thus, we
check if the qml dir exists before calling qmlimportscanner otherwise
throw a warning.

Fixes: QTBUG-89588
Change-Id: I706eb2a233e9ab5b250652cd46aae75cab178648
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-06-07 18:40:27 +00:00
Assam Boudjelthia
1365a1c7a7 Android: fix androidtestrunner passing when output file doesn't exist
Task-number: QTBUG-88508
Change-Id: If19d2b272b1760228b6a1e6e1af6db3bfbf0ec1e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2021-06-07 18:40:27 +00:00
Mårten Nordheim
6765dbf77a QTimeZonePrivate: make windowsId return a QByteArrayView
In debug this cuts off about 4 seconds off of the qtimezone test on my
machine. In release it's about 300-400 milliseconds.

Change-Id: I92ec18794247e3846704a7c8e87a8c34fdae5e3c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-06-07 20:23:17 +02:00
Volker Hilsheimer
dc5e8aa81c QAbstractItemView: don't toggle extended selection on Ctrl+Press
In ExtendedSelection mode, a Ctrl+Press might be both the start of
a selection toggle, or the start of a Ctrl+Drag operation.

If we already toggle on the press, then it's impossible to drag the
existing selection while the Control key is pressed. Ignore Ctrl+Press
events and let the corresponding release event toggle the selection.

Adjust the relevant test cases accordingly. The QItemDelegate test
case used a click+control event incorrectly, such an event doesn't
change the clicked state and should not be eaten, and now it does
change the selection, so fix the test.

Task-number: QTBUG-59888
Change-Id: Ia76126e31c28bc97d3e93e54965bdb1d0b8ac6a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-06-07 20:23:17 +02:00
Edward Welbourne
ad554707dc Simplify QDate::weekNumber()
Eliminate two local variables and don't even compute the year if we
don't need it.

Change-Id: If968c619750cead317641885a0fb9b9974954782
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-06-07 18:43:17 +02:00
Topi Reinio
c1ab14496a Doc: CSS: Update selectors for target highlighting
Certain targets on the generated HTML still use the obsolete
<a name=""> method of creating an anchor. Add a rule for a
replacement <span> element, using the id attribute.

This ensures that the highlighting animations continue to work
after the use of obsolete HTML is dropped from QDoc.

Change-Id: I2b70470b08d0e0f70702ad2820f4e065f2c08ff5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-06-07 16:44:23 +01:00
Topi Reinio
fade72913f Doc: Fix QRgbaF documentation
Template parameters were missing from the \fn statements.

Task-number: QTBUG-93995
Change-Id: I742f49c6f9686d3ed3a9d330dda32506d76ba287
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2021-06-07 15:44:23 +00:00
Topi Reinio
e33ea267f7 Doc: QtCore: Fix more documentation warnings
* Omit 'Bluetooth' enum value in QPermission::PermisionType (sic)
    as that seems to be unimplemented.

  * Comment out \sa links to internal/undocumented functions.

  * Fix incomplete template parameters in \fn commands for
    QProperty methods.

Task-number: QTBUG-93995
Change-Id: Ic8e63fca22c9c72325c76f90f537b221f56ebace
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-06-07 17:44:23 +02:00
Fabian Kosmale
1924f78df6 QProperty: Fix source_location feature testing
The presence of the source_location header does not guarantee the
availablility of std::source_location. For instance, if using clang 11
with a modern libstdc++, the source_location header is available, but
std::source_location is not available as it would  require
__builtin_source_location, which clang does not implement.

Consequently, we need to explicitly check the feature test macro
instead, and only use std::(experimental::)source_location when it is
defined.

Task-number: QTBUG-94194
Pick-to: 6.1
Change-Id: If6fda9a1b98244b1f2944fff6fe1991def30fc0f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-06-07 17:14:14 +02:00
Edward Welbourne
1a49d7d1e0 Report unused enum members after CLDR data scan
We should at least know when members of QLocale's enums aren't adding
any value, and it may make sense to deprecate the unused ones.

Change-Id: Icf202f81d2a35904c13ccdc202d41985bcb3f2e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-06-07 17:14:14 +02:00
Edward Welbourne
cce3445e70 Always include standard name in QLocale::uiLanguages()
Previously, for locales other than the system locale, no entry was
added to the list for the actual locale whose variants - with and
without likely sub-tags - were being appended. In most cases the
standard name will in fact coincide with the variant without likely
sub-tags, so this was unlikely to cause a problem, but it should be
present regardless.

At the same time, turn tst_QLocale::uiLanguages() into a data-driven
test and add another row to its table.

Change-Id: I5cb2d805d78fc3415d82b169caa6154b0f284708
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-06-07 17:14:14 +02:00
Edward Welbourne
b2871765ce Fix augmentation of UI language list
Previously, the augmentation wasn't being applied to the system
locale, due to a mistaken test claiming the locale's name didn't
resemble the string from which it was constructed. The test dates from
before various fixes to likely sub-tag processing that should make it
redundant now. This makes QLocalePrivate::rawName() also redundant
(and its conversion of QLatin1String to QByteArray relied on '\0'
termination which wasn't actually present in the various codes).

Expanded the test of systemLocale() to also test uiLanguages() turns a
single entry into the list we expect; and add two new test-cases.
(The test uses a mock system locale class, making this independent of
the platform backend.)

Fixes: QTBUG-92234
Pick-to: 6.1 5.15
Change-Id: I0cdf6eae152a42dc377f4ea3e62c282ff4be1764
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-06-07 17:14:14 +02:00
Volker Hilsheimer
6829719575 macOS: allow Qt::AA_DontShowShortcutsInContextMenus overrides
Following the discussion in QTBUG-69452, the resulting change in
cc33dd0797, and the documentation of
QAction::shortcutVisibleInContextMenu, the intention is that the
attribute allows the overriding of the platform default.

However, QAction did ask both the attribute and the platform
integration, making the override impossible. Instead, ask only
the attribute, but default the value of the attribute to what the
platform integration provides.

[ChangeLog][QtGui][QAction] The shortcutVisibleInContextMenu property
defaults to the value of the Qt::AA_DontShowShortcutsInContextMenus
attribute, which in turn defaults to the platform integration. To
override the default, set the application attribute after
instantiating QApplication, or override the default for each
QAction instance.

Task-number: QTBUG-73990
Pick-to: 5.15 6.1
Change-Id: Iaba330913555d93d05efe1b3965a6aea39db5554
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-06-07 17:14:14 +02:00
Joerg Bornemann
33aa461ec9 Remove legacy code path from qt_add_resource
All repos use the updated version of qt_add_resource, and we can remove
the legacy code path.

Change-Id: I15ba64a08c3fad9712a5cf05715594b1ee755bfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-07 14:17:46 +02:00
Joerg Bornemann
d23613acf7 Prevent overly deep build dir hierarchy on Windows
On Windows, building Qt with Ninja Multi-Config failed in a reasonably
named build dir. The reason for that is our deep build dir hierarchy,
created with add_subdirectory, and long target names like
QNetworkListManagerNetworkInformationBackend within that hierarchy.

Rename said target to QNLMNIBackend, and set AUTOGEN_BUILD_DIR to a
short string that does not repeat the target name.

Pick-to: 6.1
Fixes: QTBUG-94211
Change-Id: Iea6fee012fa46d9bfb01142b60e6cb5273893c50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-07 14:17:46 +02:00
Fabian Kosmale
f6f7d22c6c QMetaType: Avoid instantiating QMetaType in Q_DECLARE_METATYPE
Having a call to QMetaType::fromType in struct QMetaTypeId causes issues
if Q_DECLARE_TYPEINFO is used later, as it will already cause an
instantiation of QTypeInfo. Instead, use QtPrivate::typenameHelper to
obtain the name. We cannot use QMetaTypeForType::getName, as that would
cause similarissues with QMetaTypeId2. However, QMetaTypeId2 is only
used for builtin metatypes, which do not use Q_DECLARE_METATYPE. And
even if a user would use Q_DECLARE_METATYPE with them, the worst that
happens is a superfluous type normalization.

Fixes: QTBUG-94124
Change-Id: Ie4a993411214fd009a604de44306131c647095eb
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-07 14:17:46 +02:00
Friedemann Kleint
cafdb8d3ee Expose the native interfaces of QScreen/QWindow
Add the macros.

Task-number: QTBUG-84220
Change-Id: Ica23b9e4d5c1ca072acb5356e6f2be28d5199fa6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-06-07 12:17:46 +00:00
Assam Boudjelthia
19a154f57b Use new permission api for http example
Change-Id: I265ec42205a193e9862eef26e73805bbf4188640
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-06-07 14:59:14 +03:00
Zhang Hao
8ee2186830 Clarify the QLineEdit document of editingFinished signal
QLineEdit gets focus and don't type any character when QLineEdit
lost focus, document say QLineEdit will issue editingFinished signal.
In fact,QLineEdit doesn't issue editingFinished signal.
Fix this by clarify the document.

Fixes: QTBUG-94057
Pick-to: 6.1
Change-Id: I88eed2ec7a28823598dc46f1df26fd305eb99c1f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-06-07 11:51:45 +00:00
Fabian Kosmale
f6fb118c94 QProperty: Do not involve semi-destroyed QObjects in bindings
Once we're in ~QObject, only methods of QObject are still valid.
Notably, no setter of any derived class is still valid. Thus, to be safe
we must no longer react to binding changes of those properties. To
ensure that this happens for QObjectCompatProperty properties, we
explicitly clear the binding storage.
Fixes a particles3d example crash.

Change-Id: I10d2bfa5e96621ce039d751cffaf3ac41893623e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-07 13:14:00 +02:00
Volker Hilsheimer
0ebe5c9ef6 QAbstractItemView: Don't change selection if editor ate release event
If a QItemDelegate implementation eats a release event (which they don't
do by default), then don't change the selection.

Task-number: QTBUG-59888
Change-Id: Ia08637627ce1da34ff9bdac63dfc72e5f53befac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-06-07 09:45:16 +02:00
Ulf Hermann
ab52b176f4 Avoid unnecessary work when linking observers
We already do most of the work of setFirstObserver() in the method body
before.

Change-Id: Ia31f19ca656675dddb692609d8875c5d48e967f1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-05 09:22:34 +02:00
Albert Astals Cid
67a00f7706 Use icon themes in QPrintPreviewDialog [if they exist]
I've renamed a few of the qrc icons to the names most common icon themes use
for similar actions (the action themselves are not part of the icon naming spec
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
since it's not been updated in a while).

Task-number: QTBUG-85879
Change-Id: I23bb300dbf4e953517516c97b8af118859aeb6fa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-06-05 02:25:51 +02:00
Karsten Heimrich
ded82d1b07 Implement QFileInfo::junctionTarget(), adjust auto-test
The change in 004e3e0dc2 introduces
Windows junction awareness, though users were still unable to resolve
the junction target. This change adds the ability to solve this.

Fixes: QTBUG-93869
Change-Id: I9f4d4ed87b92e757f7b6d8739e2a61b58c096f63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-05 01:16:06 +02:00
Karsten Heimrich
0564ebdb36 Unify behavior for long path or UNC prefix removal
Split the code out of QDir::fromNativeSeparator into a separate
reusable function to remove the above-mentioned prefixes. Fixes
and unifies behavior if the prefix was given with slashes instead
of backslashes. Add a couple more test cases.

Fixes: QTBUG-93868
Pick-to: 5.15 6.0 6.1
Change-Id: Ibd94ae283e2fb113f9c2db97475fbc7d89522bbf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-06-05 01:16:06 +02:00
Albert Astals Cid
a1d967357f QTextHtmlParser::parseEntity: Remove const that prevents automatic move
Reported in https://testresults.qt.io/codechecker/daily_diffs/qtbase/dev/qtbase-dev-20210604-57bb7cac64

Change-Id: I3365879d18ceb0977c5fc24e2c11c9339afaafd6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-04 23:54:38 +02:00
Lorn Potter
75b0e8d599 wasm: fix network crash on abort
Also work around emscripten bug #8238

emcripten_fetch_close() does not abort the network
request, but instead just free’s the emscripten_fetch_t
object. onsuccess or onerror will still be called, but
now with a stale pointer to the deleted emscripten_fetch_t
object.

See https://github.com/emscripten-core/emscripten/issues/8234

Work around this by setting the userData to null when
we want to abort or are done with the request. The
onerror and onsuccess callbacks can then check this
field (on the the still valid emscripten_fetch_t), and
bail out on the (from the Qt side) aborted request.

Call emcripten_fetch_close() from on error and onsuccess;
this should be the point when the emscripten request
is done, and there will be no more callbacks.

Pick-to: 5.15
Fixes: QTBUG-87813
Change-Id: Ie9b8a29037eb150c23741683588b0f0bfd5d8c63
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-06-05 07:08:21 +10:00
Assam Boudjelthia
107a8058ae Move notification example from androidextras to qtbase
Refactor android notification example to fit in qtbase. The example
demonstrates how to use JNI and work with Java APIs and add custom
Java code to a Qt app targeting Android.

Task-number: QTBUG-84382
Change-Id: I5fcbbf77b36eb47a0acaa13835ef3d773e63885c
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-06-04 22:21:12 +03:00
Assam Boudjelthia
c6e13056b5 Increase the timeout for test targets for enforce exit code yaml
Amends 01e35a2145.

Task-number: QTBUG-94127
Change-Id: Ic464b2df32bee045f30cf6532c672a6450c433fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-04 18:16:09 +00:00
Ulf Hermann
d7f7d84365 QProperty: Refresh the observers after evaluating bindings
Evaluating bindings may actually break bindings, and remove observers.
Therefore, we need to re-fetch for notifying afterwards.

Fixes: QTBUG-94220
Change-Id: I96a78a825f983f58f1a574bf886e643f54453fdc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-04 20:04:43 +02:00
Kai Köhne
0078a78254 doc: Remove vertical space before youtube video links in offline mode
The vspan was originally added for iframes. They are not needed
(and look weird) for normal images/links.

Pick-to: 6.1
Fixes: QTBUG-92266
Change-Id: I9da2b52234b2e49bc0cdef4bf8f0865fb092bb31
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-06-04 15:48:34 +00:00
Kai Köhne
c9a9692830 Fix inclusion of Qt6Network plugins in static builds
The generated CMake file Config.cmake in cmake/Qt6Network/
is generated from the target name. If it doesn't end with "Plugin",
then it won't be found by Qt6NetworkPlugins.cmake, which is looking
for Qt6*PluginConfig.cmake files.

Fixes: QTBUG-94108
Change-Id: I43f7056b2caede14509c9ec66b10e2037033762b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-04 17:48:34 +02:00
Kai Köhne
cda75ef27a Bring back qt_finalize_executable
qt_finalize_executable was renamed to qt_finalize_target in commit
c4df673dd9. Anyhow, app wizards in Qt Creator 4.15 already use
it, so let's keep it as an synonym API for the time being.

Fixes: QTBUG-94156
Change-Id: I468443c80c027ac49a21208a9b15af1dbb4a5f84
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-04 16:44:08 +02:00
Cristian Adam
20b3eb0fd8 CMake: Add support for building with clang-cl
qmake had support for building with clang-cl as the win32-clang-msvc mkspec.

Task-number: QTBUG-89642
Task-number: QTBUG-88081
Change-Id: I0709c289f90fedb121620d1e67ef841602219816
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-04 16:25:17 +02:00
Joerg Bornemann
6d82d0c532 Remove CMake compatibility functions for old API
All repositories define QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS by now,
and we can remove QtCompatibilityHelpers.cmake altogether.

Change-Id: I4d8104246e96a4514d5651c104607d651d208d95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-04 14:27:20 +02:00
Alex Trotsenko
f03e9164c0 QProcess: untangle platform-specific details
- add missing #ifdef in header file;
- split some functions (writeData(), _q_canWrite(), cleanup()) into
  their platform-specific implementations.

Change-Id: I4e7c1c377ec8468ed120d38acf2543eef9316c01
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-06-04 14:50:47 +03:00
Kai Köhne
467b39d52c Fix license information for libjpeg-turbo
Fix the license metadata in that libjpeg contains parts under three
different bsd-like licenses. Also, do include the IJG, zlib
license texts in the metadata.

[ChangeLog][Third-Party Code] Clarified that libjpeg-turbo is actually
covered by three licenses, not only IJG.

Pick-to: 6.1 6.0
Change-Id: I6c4e3e8577bdf83e7e73474b34b0553cbe1d9b6d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-06-04 13:50:47 +02:00
Assam Boudjelthia
965fc1148d JNI: Add calls to get field IDs
Task-number: QTBUG-92952
Change-Id: Ie68ede4b00a411064a29925b28b1f60a84d2d678
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-06-04 10:46:57 +03:00
Fan RuiJie
dc794f7622 Fix misplacement of placeholder text in QLineEdit with RTL content
The placeholder text was rendered in the wrong position after clicking
on the clear button in a QLineEdit with right-to-left content. The
button was still taking up space while it was fading out, so the first
paintEvent rendered the placeholder with space reserved for the clear
button. Once the button gets hidden, no new update was issued, so
garbage was left behind.

Fix this by not giving a fading-out clear button any margin space. The
result of this is that the placeholder text is visible underneath the
fading-out clear button. This is preferable to the placeholder text
being first rendered next to the fading-out clear button, and then
popping to the edge when the clear button is hidden (which would have
been the result of issuing a complete update for the line edit at the
end of the fade-out animation).

Fixes: QTBUG-93742
Pick-to: 6.1 6.0 5.15
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: Id0429362a60bba6839aa02068b00edb15e3ab8ab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-06-04 03:34:26 +00:00
Fabian Kosmale
57bb7cac64 Revert "Use Pressed/Released eventpoint state with native gesture begin/end"
This reverts commit 0336f08fec.

Reason for revert: This breaks tst_qquickpinchhandler;
We no longer seem to construct a QNativeGestureEvent of type
EndNativeGesture with it.

Change-Id: I942fa099d5c5a1c757accde0c67e407809ce2d72
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-06-03 21:55:32 +00:00
Timur Pocheptsov
fd217e7f00 QDtls(Cookie) autotests - use the proper API to detect DTLS support
Instead of relying on some string comparisons and the current knowledge
of which backend supports DTLS, use the proper API we already have in
place to test if a particular class is supported by the active backend.

Change-Id: I58ca0f7b7fcef68ec375cd64b83e51d4335817da
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-06-03 20:08:32 +02:00
Niclas Rosenvik
7920c03ff1 Fix support for using system supplied md4c library
Add FindWrapSystemMd4c.cmake so that the old md4c target can be used
as well as the new one and set WrapSystemMd4c_FOUND.
Link to the imported target WrapSystemMd4c::WrapSystemMd4c if the
system library is used.
Add qt_find_package line to find the package in configure.cmake.
Fix the condition for enabling system-textmarkdownreader, it includes
testing for textmarkdownreader because even if the code would compile
correctly without it, it looks strange when the output says
"textmarkdownreader no" and under "using system libmd4c yes" even if
libmd4c is not used.
Use system include when system-markdownreader is enabled.
Add library mapping for libmd4c.

Change-Id: Id5d5b13d6691a8c1cdf627238887977c847c1e67
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-03 20:08:32 +02:00