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>
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>
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>
Adapt to coding guidelines and use raw string literals.
Change-Id: Ice9a87cafb22e01a361ad44221d561a298e5af05
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Move collected resource objects to the beginning of the linker line to
prevent order-related issues.
Fixes: QTBUG-92250
Change-Id: Ia046f2820feb693bfadc2b60e07fa001638d4d7b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>