This also includes variables only used in Q_ASSERT, those
don't generate warnings anymore even when asserts are disabled.
Change-Id: Ia557120d442c100c9437b106a01a4079d48640af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This removes the need for doing two separate iteration to find
entries in the hash. Also QMultyHash can now be replaced by
plain QHash.
Change-Id: Ie704e74c1dbb0c8e40d22a7cd572fcc8a3bfcd5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The wording was slightly ambiguous giving readers the idea that it will
scan for a \0 terminator in the data; however what actually happens is
that readBytes() gets the length of the string from a quint32 in the
stream right before the data, and readBytes() always adds a
null-terminator.
Fixes: QTBUG-3287
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie22500a9c191ffd590a6b57babeb67577c24dddb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Inside the do-while loop the if body is executed if `eof` is true, which
means the continue statement is redundant because the while loop
condition contains `!eof`, so the do-while body doesn't get executed
again after that.
Change-Id: If0685eb482f29b88e9c8660886392483a3bd75ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By first checking if the list has any matches before potentially making
it detach.
Change-Id: I7a42c2910ef6efc45033e562573414a3a9ef972e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use a lambda instead of a struct with operator(), it's only used in one
place and a lambda is more optimizable.
Change-Id: If3917f4819a7c886a08ad1396d92fcbcf606cbcb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just so memory leak checkers won't complain.
Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb9ddf0eb0a2a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Detecting if a member exists is very easy and saves us from running the
test at CMake time. Saves about 350 ms.
Change-Id: I2b24e1d3cad44897906efffd178007fdcdd18e37
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Just roll everything up into qt_message().
Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb9867131b795
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This is an extension point when you have more than 65535 program
headers. Hopefully no one has that many.
Change-Id: Ifbf974a4d10745b099b1fffd177710fae9c31b97
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We always allocated them in the constructor function, and never tested
them for nullptr, so just manage them as regular members.
As a drive-by, apply const to read-only variables in relevant code.
Pick-to: 6.6
Change-Id: If0a3ac8982582f2adf5187a3c0357f4da93467fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
91dcc76fc1 might have fixed the underlying issue, so we no longer
need the XFAIL codepath at all.
Fixes: QTBUG-114720
Change-Id: I67ccbed67a0536b679c50c26eb0b3e51c93dceeb
Pick-to: 6.6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We don't have a good way to detect whether the button is modified or
not, to bail out of using the native dialog helpers.
Document that this API shouldn't be used to modify the standard
buttons (they are standard after all), and recommend the explicit
APIs for adding custom buttons instead.
Pick-to: 6.6
Fixes: QTBUG-112525
Change-Id: I38c8ef5e1717a85f0db59c9e705d0775982ffb57
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For better integrations with Qt Creator, add a custom target with
the Jar files so they are shown under the project files. Since
source_group() is not supported, add_custom_target() is used.
Pick-to: 6.6 6.5
Change-Id: Ie527fdce918d526ee6e8953e27d4e0f4131a9828
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Make sure the Mimer SQL include files and libraries are found
to enable the Mimer SQL QtSql plugin.
Fixes: QTBUG-111219
Pick-to: 6.6
Change-Id: Ieee0e26f3689dd373fda81c98180066927d25b40
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This lets us testFlag() instead of using raw bit-field operations.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I2c26e9a24728e81baa42cf14c75271a015460913
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Its methods act on their parameters without changing the converter, so
can all be const. Its instances thus have no non-const members to
exercise, so can always be const.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ifcdb2f2159c2cfcd7998dd118aa327a32d299ccf
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The two were in the same files but mostly unrelated to one another -
aside from the converter defaulting to the dumper for output.
Furthermore, the dumper actually uses QDebug and QTextStream, not
QDataStream; rename it to reflect this reality.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Id65c120c319b555039f7fd186ed262f35ff5260a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
I overrode clang-tidy where it uglified or obfuscated and did some
clean-up provoked or made possible by its changes. Konrad pointed out,
in review, a constructor that could be = default; it could, in fact,
vanish entirely as a result.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I9b7744a3abaa29e6f9e0689d0f6985bfd88cd0fd
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
A couple more compilation units could use Qt::StringLiterals. Prefer
QL1SV for the code constants, to keep code small. Convert fpToString()
to take QL1SV instead of const char *, with suffix empty by default.
Also rearranged some spacing, some if it suggested by clang-tidy.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I03d810d52afcd4a760d18f2553914b75af716b74
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Examples are usually a good way to get to know a new codebase, do not
teach developers who are new to Qt about the 3-arg connect() to begin
with.
Drive-by changes:
- `this` can't be implicitly captured with [=] in a lambda, instead
capture by reference
- Update docs related to the sqlbrowser example; the overloaded signal
it mentions has been removed in Qt6
- In the sqlbrowser example, rename addConnection() (no-arg) overload to
openNewConnectionDialog, suggested in code review
Change-Id: I30c9f35bda4ac2f460d767ab7f84422ae3ed09f7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
rowsAboutToBeMoved() and rowsMoved() signals aren't emitted for
QSortFilterProxyModel, which meant the two connections in the
ObservingObject's constructor didn't trigger the slots, which let the
test pass (the store/checkPersistentFailureCount stayed at 0).
- Instead connect to layoutAboutToBeChanged() and layoutChanged()
respectively, these two are emitted for QSFPM
- Use PMF syntax
- Verify m_persistent{Proxy,Source}Indexes aren't empty
Change-Id: I8b83989de02c2bfb22bde9b230cb5b68814f74b6
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>