Commit Graph

47279 Commits

Author SHA1 Message Date
Joerg Bornemann
97551b90b9 CMake: Actually evaluate AUTODETECT expressions in features
Very simple AUTODETECT expressions worked fine, but expressions with
parentheses, for example, were not correctly evaluated.

Change-Id: Ibec4fa55474e149a701f861838fdea41d31beca0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:51 +02:00
Joerg Bornemann
7e7c9ba455 CMake: Support configure tests of type 'linkerSupportsFlag'
Task-number: QTBUG-86155
Change-Id: I3764d99cd4ad1c432b499ec9ba7c4c48391fa421
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:46 +02:00
Joerg Bornemann
48cf015906 CMake: Implement configure -optimize-size
This configure switch controls the feature 'optimize_size'.

This isn't merely a mapping to CMAKE_BUILD_TYPE=MinSizeRel, because
we potentially want to combine -optimize-size with -force-debug-info,
which maps to CMAKE_BUILD_CONFIG=RelWithDebInfo.

Task-number: QTBUG-85373
Change-Id: I1a9343ebc54816f52e90e9d33ea3df4c99b1ec9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:42 +02:00
Joerg Bornemann
c8fda317ea CMake: Fix configure setting superfluous features
Command line options like -debug result in setting the variable
INPUT_debug. INPUT_debug is mapped to the CMake argument
-DCMAKE_BUILD_TYPE=Debug. INPUT_debug also matches the feature
'debug', and the CMake argument -DFEATURE_debug=ON was passed.

Do not pass -DFEATURE_xxx CMake arguments for inputs that are already
handled.

Change-Id: If096dff1c6dd694545c6f671f5f3512a43c3ec50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:38 +02:00
Joerg Bornemann
e66f5e491e CMake: Document more configure argument mappings
Change-Id: Icda71c14cde638e874cc2e6406527b9c98535165
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:32 +02:00
Alexandru Croitor
dac557295b CMake: Fix tst_moc to build when tests are built as part of Qt tree
tst_moc uses qt_wrap_cpp, which tries to dispatch to qt6_wrap_cpp
depending on the value of QT_DEFAULT_MAJOR_VERSION. That value is only
set in Qt6CoreConfigExtras.cmake.in, which is not loaded as part of
the qtbase build unless something does find_package(Qt6Core).

Set the QT_DEFAULT_MAJOR_VERSION to 6 before including the
Qt6CoreMacros in the qtbase top-level project.

Change-Id: I7b81d89d965f755e51727007e68771ac3931ac55
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-23 11:04:20 +02:00
Alexandru Croitor
bf3d834ab4 CMake: Fix creation of host-qmake wrapper when cross-compiling
The -host prefix was added to the 'preliminary' directory rather than
the actual wrapper shell script. This caused it to be overwritten
every time by the cross-compiled qmake binary.

Change-Id: I103811c6aa9181fa701e3e7ecaf828ecdd1e3c90
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-23 11:04:07 +02:00
Alexandru Croitor
5138a970f3 CMake: Workaround building DBus 'car' example with qmake
While trying to implement instructions for building examples with
qmake in the CI, an issue has surfaced.

When building examples with CMake with -DBUILD_EXAMPLES=ON in the CI,
the examples are built in-source, aka source dir == build dir.
This means that the header files generated by qdbusxml2cpp will be
placed in the qtbase source dir.

The instructions that try to build examples with qmake build the
examples in a separate build dir after building the examples with CMake.

Unfortunately the qtbase/examples/dbus/remotecontrolledcar/car example
includes the generated DBus adaptor header via a statement like
  #include "car_adaptor.h"
and the compiler prefers to pick up the header file from the example
source dir (the one generated by CMake), rather than the one generated
by qmake in the example build dir.

Because CMake's DBus integration uses different flags than qmake's
DBus integration, the generated header file code is not compatible
with the qmake generated cpp file, and the example fails to link when
building with qmake, because it can't find an appropriate constructor
symbol.

In an ideal world, we wouldn't do in-source builds with the CMake
build, but that leads to other issues which I currently don't recall.

To circumvent the issue, adapt the CMake DBus qt6_add_dbus_adaptor
function to allow not passing the problematic '-l' flag by making it
optional. This shouldn't break existing code, but allows us to
generate a compatible header that will be used by qmake and succeed in
linking the example.

Task-number: QTBUG-85986
Change-Id: I06759f79aeb66bb32da7f158f55dd4734c4a9887
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-23 11:04:04 +02:00
Marc Mutz
dcf856ca7a QStringTokenizer: use sliced() instead of mid()
The code was developed against the narrow-contract version of mid(),
but not updated when mid() became wide-contract.

Change-Id: I038054fb3f5acc0085c48fbf36af13dd14c917b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-23 10:38:24 +02:00
Marc Mutz
e2be114f64 [trivial] tst_qstringapisymmetry: remove remnants of from() experiment
Reduce the scopes so that also the result of 1-arg-sliced() can be
called 'sliced'.

Change-Id: Ie156f76838f8650d6926d3c198007aaf12f90734
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 10:38:16 +02:00
Marc Mutz
60dd5451a2 Port QLatin1String to qsizetype and add narrow-contract substring functions
QLatin1String::mid() etc were changed from narrow to wide contract,
but the narrow-contract replacements weren't added. This blocks using
the narrow-contract functions in QStringTokenizer.

As a drive-by, Q_REQUIRED_RESULT -> [[nodiscard]] and Q_DECL_CONSTEXPR
-> constexpr. Also centralize most Q_ASSERT()s in a single function,
verify(), in an attempt to reduce the amount of string data generated
from the asserts in assertive builds.

[ChangeLog][QtCore][QLatin1String] Added from(), sliced(), first(n),
last(n) functions.

[ChangeLog][QtCore][QLatin1String] size_type/size() is now qsizetype
(was: int). This makes QLatin1String(ptr, 0) ambiguous now between the
(ptr, ptr) and (ptr, qsizetype) constructors.

Change-Id: Ie195f66ae1974eb0752c058aa9f3b0853ed92477
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 10:38:01 +02:00
Edward Welbourne
ba2b644213 Drop spurious const from parameter
Quanifying a parameter passed by value (which is correct for QTime,
there is no need to pass it by reference) as const is pointless.

Change-Id: I86850f65dfac28ffcc4a8633dd6d212259bb33d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 09:56:10 +02:00
Edward Welbourne
14f3f419b0 Fix crash on serializing default-constructed QTimeZone
The serialization code neglected to check against null.  Sinze zones
are saved either by IANA ID or in our special OffsetFromUtc format,
representing an invalid zone by a string that cannot possibly be a
valid IANA ID will do.

Fixes: QTBUG-86019
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I6882026403d00f8b254aab34c645f1cf8f9fcc2d
Reviewed-by: Taylor Braun-Jones <taylor@braun-jones.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 09:55:29 +02:00
Allan Sandfeld Jensen
33031020e1 Fix mistake in AESHASH algorithm
The read data wasn't encoded into the state correctly.

Change-Id: Ib0a3b50bfeb56968de5c5e8353b28383cb586271
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 08:52:23 +02:00
Paul Wicking
55d0bcaf92 Ignore clang-format for GUI snippets
Among other things, this allows for ignoring proper indentation
of code that's contained in a wrapper function which serves the
purpose of compiling the snippet only. This is useful because
the extra indentation is included in the output generated by QDoc.

Task-number: QTBUG-84470
Change-Id: I3d702e82169a87447939f357cbee15cb0f74a391
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-08-23 05:30:38 +00:00
Marcel Krems
9a921d78e8 Fix CaseSensitivity handling for QRegularExpression in QSortFilterProxyModel
setFilterRegExp retains the caseSensitivity() while setFilterRegularExpression did not.
Change setFilterRegularExpression to also retain the case sensitivity.

Fixes: QTBUG-83313
Pick-to: 5.15
Change-Id: I46f494d320aee99d50612f01f63558c693276989
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-08-23 02:35:37 +02:00
Marcel Krems
d9d813b6d1 Fix truncation warning in qversionnumber.h
qversionnumber.h(390): warning C4310: cast truncates constant value

Change-Id: I26f525db84d1c3691d9ac3f91f67be0bc4034b41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 02:35:19 +02:00
Marcel Krems
8c9205988d QVariant::metaType(): Add missing \since Qt 6.0
Amends a68e4f3b96

Change-Id: Ice8f83e11e03db1d76e12ffd2b548a6b69684842
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-23 02:35:11 +02:00
Marcel Krems
09d3ebcce8 QSizePolicy: Fix warning about mixing different enums
warning: C5054: operator '&': deprecated between enumerations of different types

Pick-to: 5.15
Change-Id: I4e48a44f089d3eaca5d3f876da01335051192b28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 02:35:05 +02:00
Marcel Krems
be83b626d7 QPixelFormat: Fix warning about mixing different enums
warning: C5054: operator '+': deprecated between enumerations of different types

Pick-to: 5.15
Change-Id: If111b076914667fb149e62e051f52f408db9a338
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-23 02:34:56 +02:00
Gatis Paeglis
4f99f87578 xcb: remove QT_XCB_NO_XI2_MOUSE code path
This code path was deprecated in 5.12 and scheduled for
removal in Qt 6. See 9184384bc9.

According to the source comments from f48170b479,
apperantly XInput2 had some issues when running on Xinerama screens
and therefore there was a check for it in xi2MouseEventsDisabled().
We plan to remove Xinerama support, therefore Xinerama handling in
xi2MouseEventsDisabled() is irrelevant.

Task-number: QTBUG-69412
Change-Id: I384d7c46337358caecccf644acc8ffbd381dc69d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-23 01:18:26 +02:00
Gatis Paeglis
7318328c2d qwsi: revert parts of 00ae1e6b7b
We actually do not need this "mode" in qwsi API. I think while
writing the patch from 00ae1e6b7b I got confused by focusing
on my test application. We can't know what the native event
filter will filter out, therefore it makes sense that we
unconditionally do filtering at qwsi level as well for user input
vs other events in QWindowSystemInterface::sendWindowSystemEvents().

Pick-to: 5.15
Pick-to: 5.12
Change-Id: Idb23152a24bf3ba3b91804427a6e78f991969c29
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-23 01:18:25 +02:00
Tor Arne Vestbø
6ece7dd09a Fix warnings in tst_moc
Change-Id: I4cbc851e59febdc533c02fb4b95d2924348086b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 01:18:13 +02:00
Giuseppe D'Angelo
2e7f11246e QLayout: make its indexOf functions take pointer-to-const
Try to fix an API mistake there: there is no reason why these
functions should take pointers to non-const widgets, as that
actually preventing reasonable code (e.g. finding out the index
of "this" inside a const method of a QWidget subclass).

Unfortunately, indexOf(QWidget*) is also virtual, meaning that
changing its signature is an API break. Hopefully, there are
only few users that override this method (Woboq says 0).

[ChangeLog][Potentially Source-Incompatible Changes]
The QLayout::indexOf(QWidget *) virtual function has changed
signature, becoming QLayout::indexOf(const QWidget *).
This is source incompatible, although the fix (for the few
users that do override indexOf() in their layouts) is
straightforward.

Change-Id: Id2183f5ecd9dc7e2a37c7355266e8494ef7929f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-08-23 00:33:01 +02:00
Andy Shaw
7ec818e74a Interbase: Fix tests when running against Firebird
Change-Id: Ibfcf6b557aed3b0cd2e0ece5cf122819a1acc0c1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-23 00:22:04 +02:00
Andy Shaw
aa2c6690fd Interbase: Close the cursor before reopening it later on
Change-Id: If21d33262b8ca53c17a7d236baaa828907116cab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-23 00:21:56 +02:00
Andy Shaw
37c68503cb QFont: Extend the string description to include the missing elements
This extends to/fromString to include style strategy, capitalization,
letter and word spacing and stretch. QFont::fromString() keeps
compatibility with strings from earlier versions as well.

Fixes: QTBUG-67687
Change-Id: I5e95a58f1cd850214af2a7d8906a214facd4e661
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-08-22 22:21:35 +00:00
Tor Arne Vestbø
81e09ae404 xcb: Fix flushing of native subwindows when not using shared memory
When using X-forwarding we're not using shared memory for the backing
store image, and end up in a code path where we first copy the updated
parts of the backing store from our client side image over to the server,
and then flush those parts from the server-side image to the window.

The problem was that this code path didn't account for the possibility
that we'd flush a sub-window at an offset, and would end up uploading
the sub-window local region directly, without applying the offset.

This problem was revealed when 79bf1b7e34 started being smarter
about what regions we flush and to what windows when we have sub
windows.

Fixes: QTBUG-81723
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I1c9c8bc53c088cdc1ae8b892e17930f4a468ccad
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-08-22 21:47:36 +02:00
Edward Welbourne
16e546e32f Properly deprecate Qt::MidButton in favor of Qt::MiddleButton
MidButton had its // ### Qt 5: remove me
upgraded to Qt 6 at 5.0; but it dates back to 4.7.0

Replace the many remaining uses of MidButton with MiddleButton in the
process.

Pick-to: 5.15
Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-22 21:47:36 +02:00
Nicolas Guichard
4b1ffab8ad QGuiApplication: fix handling of spontaneous events' modifiers
QtQuickTest synthetized events can have modifiers, but those modifiers
were not accessible globally, from QGuiApplication::keyboardModifiers
for instance.
eg. calling QML's TestCase::mouseClick with modifiers triggering a call
to QGuiApplication::keyboardModifiers did not give the expected result.

QtTest synthesised events can also have modifiers and those were
correctly handled by QApplication to set modifiers globally.

This fix moves the handling code from QApplication::notify to
QGuiApplicationPrivate::maybeSimulateModifiers and calls this function
from QGuiApplication::notify too.

The definite fix would be to do as suggested in the comment attached to
the moved code:
> Qt Test should not call qapp->notify(), but rather route the events
> through the proper QPA interface. This is required to properly
> generate all other events such as enter/leave etc.

Pick-to: 5.15 5.12
Change-Id: I734e5bbc82232b13828b1a1f82e06ee8eb695417
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-20 17:57:55 +02:00
Sona Kurazyan
35d90cb898 Resolve the remaining open ### Qt6 comments of QJsonValue
Changed QJsonValue to use QCborValue for data storage. Removed unused
internal methods.

Task-number: QTBUG-85700
Change-Id: I784fc7c0c4407f79eb7ca87a1f5116f00c26155d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-20 17:25:09 +02:00
Alex Trotsenko
a41c61fb2d QIODevice: implement a "zero-copy" strategy for buffered writes
It works as follows:

  - user calls write(const QByteArray &);
  - this function keeps a pointer to the chunk and calls a regular
    write(data, len);
  - write(data, len) calls a virtual writeData();
  - subclass calls a new QIODevicePrivate::write();
  - QIODevicePrivate::write() makes a shallow copy of
    the byte array.

Proposed solution is fully compatible with existing subclasses.
By replacing a call to d->writeBuffer.append() with d->write(),
subclasses can improve their performance.

Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.

Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-20 18:24:15 +03:00
Joerg Bornemann
729d102b1c CMake: Implement configure -optimize-debug
Task-number: QTBUG-85373
Change-Id: I3aba1fcf96e36544dd75a5e6adc5f770a9a45726
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:53 +02:00
Joerg Bornemann
2f1a55c0b1 CMake: Implement configure -linker [bfd,gold,lld]
Fixes: QTBUG-86155
Change-Id: I5ba2d3b52d9ca240b48904c492f7902a056c0292
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:49 +02:00
Joerg Bornemann
df28355981 CMake: Support configure tests of type 'compilerSupportsFlag'
Task-number: QTBUG-86155
Change-Id: Iaa5c48b6508870a0f6afdf9df66cd2e634fe19b3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:46 +02:00
Joerg Bornemann
45d3c75ab6 CMake: Fix configure -redo on Unix
One can now place a config.opt file in an otherwise empty build
directory and call 'configure -redo'. If config.opt contains the
-cmake argument, Qt will be built with CMake as expected.

To achieve that, configure must peek into config.opt and look for the
-cmake argument.

Fixes: QTBUG-86097
Change-Id: I35f76caca862e5a59c2fb850e0aeb6529c826149
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:09 +02:00
Cristian Adam
c4d3e5d7d3 CMake Build: Use EGL library as dependency for GLESv2
On QNX the feature detection of GLESv2 is failing due to missing
symbols which are part of EGL library.

Add EGL library as a dependency if it's found on the system.

This allows OpenGL ES feature detection to work on QNX.

Task-number: QTBUG-83202
Change-Id: I90531d925fadce5d893ea9244793fc02a4595ed1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 14:41:49 +02:00
Cristian Adam
73277763c1 CMake Build: Add QNX 7.1 build support
This commit allows building Qt6's QtBase using QNX 7.1 and a toolchain
file which is almost identical to what CMake has in its documentation:
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx

set(CMAKE_SYSTEM_NAME QNX)

set(arch gcc_ntoarmv7le)

set(CMAKE_C_COMPILER qcc)
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER q++)
set(CMAKE_CXX_COMPILER_TARGET ${arch})

set(CMAKE_SYSROOT $ENV{QNX_TARGET})

The only difference is the usage of q++ instead of QCC, which is no
longer present in QNX 7.1 SDK.

Task-number: QTBUG-83202
Change-Id: I51031540721275f2ee83cee9e7df4994a65db0e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 14:41:36 +02:00
Edward Welbourne
f22ad1afec Tidy up qnamespace.qdoc's enums' \omitvalue entries
Moved \omitvalue entries to the end (unless there was only one, at the
start). Sorted Qt::WidgetAttribute's to match their order in the
declaration, as there were many and their order was haphazard.

Change-Id: I41d27df0fc293f642f931177b0d8884fbbcb9b77
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-08-20 09:03:32 +02:00
Edward Welbourne
a84589cb69 QCalendarBackend: format "enum" as code where used
Also mark some internal methods as \internal.

Pick-to: 5.15
Change-Id: I0ae8dc315e5012eea2f3c35ae7d09c3cbb318ab5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-08-20 09:02:53 +02:00
Edward Welbourne
4c2fbe90ef Document QCalendarBackend::name()
Neglected previously.

Pick-to: 5.15
Change-Id: I0acd9f77d1623a1fcd8766f734c350316401b3a9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-08-20 09:02:27 +02:00
Edward Welbourne
a111dd26b1 Document the indexing used in the Unicode tables
Make clear why we don't need to assert against out-of-bounda accesses
in the generated code, provided the code point is within its bound,
(Using one table's early entries as indices into later in the same
table at which to look up indices into another table made it a little
hard to work out what was going on, especially as nothing told me
about the early / late distinction. Record what I discovered, to save
the next person to stumble into this some confusion.)

Change-Id: I8e5771a7f3d70c1911aeae1b0cabe5c47bc7e9c7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-20 09:02:00 +02:00
Andy Shaw
e1971c60f1 Doc: Mention no_testcase_installs which can be used to prevent install
Change-Id: If8044a339cab754d427fd7626dd6813c7cc99e56
Pick-to: 5.15 5.12
Fixes: QTBUG-85827
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-08-20 09:01:28 +02:00
Edward Welbourne
bddafeb2e1 Turn comments about passing QDate, QTime by value into docs
This is already changed throughout qtbase, aside from template
specializations where passing by reference is required by the
template. Revise QDate and QTime documentation to say they are best
passed by value.

Change-Id: I0b05f42b273bf1fd4c412247a9372113b7e40561
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-20 09:01:22 +02:00
Friedemann Kleint
92d4d490fe Fix a number of qdoc warnings
- Remove obsolete functions and enumeration values
- Remove QObject * parameter from QMetaProperty accessors
- Fix renamed enumerations in QSsl
- Fix list items to be \li
- Fix function signatures and variable names

Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-08-20 07:51:05 +02:00
Friedemann Kleint
1f1f000327 Fix deprecation warnings in QtSql code snippets
Use QMetaType for constructing a QSqlField, fixing:
ccode/sqldatabase/sqldatabase.cpp:91:41: warning: ‘QSqlField::QSqlField(const QString&, QVariant::Type)’ is deprecated: Use the constructor using a QMetaType instead [-Wdeprecated-declarations]

Change-Id: If420ad3d7f5d9dce05ad892cddf84a1b77a45b3f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-20 07:50:56 +02:00
Friedemann Kleint
0a4b984421 Fix qHash(const QModelIndex &index)
The default seed = 0 parameter was missing, so, it was never used.
Manifested as a failing test in Qt for Python (bug_PYSIDE-41.py).
Amends c6cdf38e75.

Change-Id: Ia3db8b6123a695d839fbec419b8d316991d18bf7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-08-20 07:50:47 +02:00
Michael Weghorn
32c09ea5b0 xdgdesktopportal: Avoid dangling pointer
Use pointer to newly inserted element in 'filterList'
since local variable 'filter' goes out of scope at the end
of the block.

This is a follow-up for commit
3e09c28101
("Filechooser portal: Implement "current_filter").
Thanks to Giuseppe D'Angelo for pointing this out in that
commit's Gerrit change.

Pick-to: 5.15
Change-Id: I9af35c46315c7f90721d0d39b0fda6384c15786a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-08-20 07:43:24 +02:00
Alex Trotsenko
c0097d1521 Remove QSslSocket::abort()
QAbstractSocket::abort() is not a virtual function and
QSslSocket::abort() does not override it. Having two alternatives
requires a dynamic typecasting and violates the principles of object-
oriented programming.

Due to the BC, we were unable to fix that in Qt5. Now, we can modify
QSslSocket::close() to handle QAbstractSocket::abort() requests and
remove the duplicate.

Change-Id: I49d6f32a571ae6e35b08cb366816f917e580dae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-08-20 08:33:09 +03:00
Paul Wicking
0a12416172 Doc: Drop dependency on qtgraphicaleffects
qtgraphicaleffects is not part of 6.0, drop the doc dependency.

Change-Id: I64a355860e0a3a92fa0ffe5ed960796f2e756d61
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-08-20 06:31:44 +02:00