But keep qtnamespacemacros.h for now, some modules include it
explicitly, so need to change those to include qtconfigmacros.h first.
The plan is to move QT_SHARED, QT_STATIC and QT_CONFIG macros there too.
Change-Id: I945b3dfffbd9cd394a6cf42a36df6657d1703d5b
Pick-to: 6.4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTranslator builds a list of "candidate" names in order to find out
the translation file to load. Part of the name comes from the UI
languages, as determined by the QLocale object passed to load()
(via QLocale::uiLanguages()).
On UNIX this list of languages is processed by adding a lowercase
version of each language. In other words, if the list is something
like:
{"en-Latn-US", "en-US", "en"}
then it is changed to contain:
{"en-Latn-US", "en-latn-us", "en-US", "en-us", "en"}
(The last element is not needlessly duplicated, since it's already
fully lowercase.)
I am not sure why this is done only on UNIX: the commit introducing
this behavior predates public history. If I have to take a guess, it's
done because the language is then used to assemble a file name that
QTranslator tries to open. On UNIX file names are case sensitive, so
if the translation file is called "translations_en_us.qm" it would
fail to load under a "en-US" locale (the "-" -> "_" processing is done
later).
But what about Windows? In principle, turning the names in lowercase
is not necessary as Windows' filesystem is case insensitive; a
translation file called "translations_en_us.qm" will still be loaded
if opened as "translations_en_US.qm"...
... *except* if the file is in the resource system! In that case,
filesystem access is still case sensitive, and will fail to load the
translation file (which instead would load just fine on UNIX).
Plug this silly cross-platform difference by also lowercasing on
Windows.
Change-Id: I2573721e33d9da08f60a5bb56e35e4553cbe4efe
Pick-to: 5.15 6.2 6.3 6.4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
... and simply use the public methods of the base class instead.
We can't completely remove it, so we just add it to removed_api.cpp
By removing the setQuery() method in the QSqlTableModel class, we
open up name lookup to the base class, where the const ref overload
was already deprecated in 14f9f00fdb,
and the proper replacements were provided.
[ChangeLog][QtSql][QSqlTableModel] The setQuery(const QSqlQuery &)
method is removed, because QSqlQuery cannot be copied correctly.
Use the public setQuery() overloads of the base QSqlQueryModel class
instead. They allow passing of QSqlQuery by rvalue ref, or creation
of the query by specifying query string and database object.
Task-number: QTBUG-105048
Change-Id: I6f47067af6b4769578d4de9dbdbbbc7504ddf4ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Returning QSqlQuery instance by value does not make much sense,
because it cannot be copied correctly. Also, its copy constructor
and copy-assignment operators are deprecated from Qt 6.2.
[ChangeLog][Potentially Source-Incompatible Changes][QSqlQueryModel]
QSqlQueryModel::query() now returns a reference to the const QSqlQuery
object associated with the model.
Task-number: QTBUG-105048
Change-Id: I04a2aa377b17d770d2a9855040f8c730190484d8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... to prevent compilation errors when built with
QT_DISABLE_DEPRECATED_BEFORE >= 0x060200
This commit amends 14f9f00fdb
Task-number: QTBUG-105048
Pick-to: 6.4 6.3 6.2
Change-Id: I33c586508353ccb4c0af3f5da0cdaf9abe9f590e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Use activateWindow() that is documented as the right way to raise a window.
Task-number: COIN-892
Change-Id: Ic9aadee0d3a526fd8e46e5b1099b5b0861700207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
I can't reproduce the test failing after hundreds of iterations on
OpenSUSE, and the test hasn't flaked at all in our CI in the last 6
months according to our dashboards.
Fixes: QTBUG-70612
Change-Id: I2397f3db5caf97f674de7d75fd99bd14c14166a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
I can't reproduce the issue after hundreds of iterations on OpenSUSE,
and the test hasn't flaked at all in the last 3 months according to our
dashboards.
Task-number: QTBUG-66371
Change-Id: I9c4daf851e09fbcb47a6ab39418e7b213ccd9dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Changed the behavior in which key events are delivered to targets.
Before the change, in case of a EMSCRIPTEN_EVENT_KEYUP event, the key
code and text were not filled in correctly as they should. This resulted
in wrong behavior when event targets expected these codes being available.
Fixes: QTBUG-105213
Change-Id: Ie66b5d6d395d08af655fcb00f1f616ad43d6bea4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
While dropping the extra "does", rewrite as "doesn't"
as common contractions are preferable in particular in
negations. Reflow the remainder of the paragraph.
Fixes: QTBUG-105517
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I1ad2d5ca753cb1d3a38cf96bdd6e52d2af80151b
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
The qlalr outputs need to be added to the consuming target.
Change-Id: I9600729103298cf7e0a712d5f3dc49c5f4c729f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
...if the double-conversion CMake package cannot be loaded.
The find_path call must specify the header exactly as it is included.
The select_library_configurations call always failed, because the
command expects the presence of DOUBLE_CONVERSIONS_LIBRARY_DEBUG,
DOUBLE_CONVERSIONS_LIBRARY_RELEASE, or both.
Upstream double-conversion's MSVC build system does not specify a naming
scheme for the debug build, and there are no debug/release binaries to
download that suggest a naming scheme. Therefore we assume the usual
'd' suffix for the debug library like we do everywhere else.
Lastly, we need to set DOUBLE_CONVERSION_INCLUDE_DIRS.
Fixes: QTBUG-105501
Pick-to: 6.2 6.3 6.4
Change-Id: I71ff5238f353541b8bf5ac6792b86134deba20d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
These headers were generated before extracting qoverload.h. This amends
ff8de321e2.
Change-Id: I8f0e8dc3725f9776b8f6dc96782c97b0b5566b9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QVariant(QMetaType::Type) is deleted since Qt 5 (sic!). Suggest usage of
the constructor taking a meta-type instead.
Pick-to: 6.2 6.3 6.4
Change-Id: I50949dac9dfc35c80108debdeabc791afe0998b6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Change listing:
- change names of abbreviated structures/variables (e.g. KeyTbl
-> WebToQtKeyCodeMappings)
- add constants for commonly used magic strings ("Dead", StringTerminator)
- use common idioms for common tasks (find_if, std::optional)
- use binary search as facilitated by the sorted array instead of a full
search - this optimizes the code at no cost
- remove dead code (double translateEmscriptKey in
QWasmEventTranslator::getKey, remove sticky dead key support as it was
write-only, remove the dead setIsMac and g_usePlatformMacSpecifics,
remove the dead getWindowAt).
- cull the public interface on QWasmEventTranslator as some functions are
only used internally (translateEmscriptKey)
- simplify / shorten functions by short-circuiting
- modernize definitions (= default)
- auto-format the changes using clang-format
The file is now much easier to read and understand.
Change-Id: I5ea2bdafd9b9abc009feeb5516ddd87fb0ca212e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
No need for the memset here. = {} works too, these are all C structs in
practice.
Change-Id: I44e407d38ef8808412cfef232db7e325a44ce9d1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...except robustness.
Have the appropriate compile and runtime checks. This way we still
compile with any older (1.0, 1.1, 1.2) headers, and can function
at runtime with a plain 1.0 implementation. With Vulkan 1.2+ we
can start filling out the additional, version-specific (1.1, 1.2,
1.3) feature structs.
Task-number: QTBUG-105158
Change-Id: I0ba87f0f467bc11782e9203ff11f1ce494aaaf63
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
ownMethodIndex works for all kind of methods, also for constructors.
Therefore, remove the assertion there (that checks for non constructors)
and add a test in qtbase so it does not happen again.
The test broken by the assertion is in qtdeclarative:
tst_QJSEngine::newQMetaObject().
Also rename QMetaMethodPrivate::ownConstructorIndex() to
ownConstructorMethodIndex() as the previous naming implied that
ownMethodIndex() could not be used for constructors.
amends b73ab954df
Task-number: QTBUG-105360
Change-Id: I0244993ed79bee055645b5443f5d02e1c089a6c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Those were workarounds to passing a comma to a macro, but there are ways
around it. The simplest is to just use variadic macros; another, which
has been applied to Q_DECLARE_METATYPE for a long time, is to define an
alias to the thing you're trying to use.
Change-Id: Ie4bb662dcb274440ab8bfffd17097fbf0c53eabc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The code introduced by 54d5ca0c27
did not work since the variables parentIndex/numRows
were local to the lambda and the outer code would not wait.
Move the widgets population into the lambda to fix this.
Modernize the remaining code a bit.
Pick-to: 6.4 6.3 6.2
Change-Id: I2a09878987df9edb9ff04f0ac4ad82af1a8b52c8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
There are three characters with diacritics that have been missing from
the mapping table+ I acute, I grave and Y acute. Added those to the
mapping table in QWasmEventTranslator.
Pick-to: 6.4
Change-Id: Iab53e79b84cee39e4a050b05b9eff54f3ad64f6c
Reviewed-by: David Skoland <david.skoland@qt.io>
Add the support of pre-cooked content for the LD version script. The
content can be generated without using the perl script at configure
or build time.
Change-Id: I1316e114a1d5550b2fdcf3482a51f336fb311a29
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add the qt_sync_skip_header_check and qt_sync_stop_processing pragmas
to:
qtbase/src/corelib/global/qsystemdetection.h
qtbase/src/corelib/global/qprocessordetection.h
qtbase/src/corelib/global/qcompilerdetection.h
to avoid checking by synqt. These files were previously blacklisted
in syncqt.profile.
Change-Id: I268a3063e7eafb9a78e9e8d1cb67cd2def490b35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add headersclean_check that allows to run all module-specific
'_headersclean_check' targets in single command. Also add
dependency on input header files for the headers clean custom
commands.
Also adjust the '_headersclean_check' target names to match
the naming of module targets - the 'Qt' prefix is removed.
Change-Id: I17c3442c3c51ce99cd9b38c85d606e9ababbb013
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][CMake] The target-based variant of qt6_add_resource gained
the option BIG_RESOURCES. This can be used instead of
qt6_add_big_resources, which is not target-based.
Fixes: QTBUG-100268
Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Previously configuration would not error out if you configured Qt
with -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug -GNinja
instead you would get an error like
CMake Error at cmake/QtBaseConfigureTests.cmake:51 (message):
Failed to find compiled architecture detection executable at
qtbase/build/config.tests/arch/RelWithDebInfo/architecture_test.exe
Note that Qt code tries to find the arch test in a RelWithDebInfo
directory but due to using single-config Ninja,
CMAKE_CONFIGURATION_TYPES is ignored, and the executable is placed
in a non-config specific folder.
Error out early in such a case, and mention that for multi-config
builds, the Ninja Multi-Config generator should be used.
Pick-to: 6.4
Change-Id: I0192185123be563671cbe154f968a03b7458e327
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The metal profiler reports many redundant state changes of
MTLDepthStencilState which can be reduced by checking if the current
depthStencilState is the same as already set before setting it again.
Pick-to: 6.4
Change-Id: Ie14f0491ad2cb1c3ce13c1cf3992d06561fbb826
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The intialSize bug has been fixed in Qt Wayland Client, and thus
this test will now start XPASSing.
Pick-to: 6.4
Task-number: QTBUG-66818
Change-Id: I4b9cb8bd9306a67f04295eb23f09574dad0e97f7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Use qCWarning instead of qWarning, to give users more control over
debug output if needed.
Fixes: QTBUG-105332
Change-Id: I830dd160f75eb9885d80b80336bfb27da676e4bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This amends commit fc2e40e88d.
For Qt plugins, we do not add 'dlltarget' to INSTALLS but only 'target'.
In this case we must add the .dll.debug file to 'target' like we did
before fc2e40e88d.
Fixes: QTBUG-105374
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: If495548dfca55d02e1c5884e03e281e27ee07ccd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
All supported CMake versions provide this file, and we did not modify
it.
Pick-to: 6.4
Change-Id: I4b21a99159ba8315491dc64ab737b7e5a28a6966
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
And instead base the isValid function on the success of registering
callbacks.
The registerReceiver call has no way to report failures so I assume it
always succeeds.
Task-number: QTBUG-104188
Change-Id: I2b002f791d03f2ebc72fe5cfa215f8f8a1dabdf8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The closing parenthesis ends up in the output.
As the fix to QDoc is rather involved, clean up the docs
to fix the symptom.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105339
Change-Id: I35a1e7615125781d950649213c08e5760b0235e7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
There was a typo in the used macro name.
This commit amends 0a3ff69738
Pick-to: 6.4
Change-Id: I6b8cb1e3872cb96780af26bfaf722d83d17ba4fe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Reorder the class declarations, moving private sections last
- Make constructors explicit
- Add space to the comments
- Introduce auto
- Replace slot MainWindow::showWindowTitle() by a direct
connection to slot QWidget::setWindowTitle().
Pick-to: 6.4 6.3
Change-Id: Ic229162434dfef5f2767d0b4e186759ca0f821f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The meta object is actually uint, even though we end up treating it as
int elsewhere. I've also replaced one flags use with quint32.
That leaves int in this file for meta type IDs only. Replacing them with
QMetaTypeInterface pointers is left as an exercise for the reader.
Task-number: QTBUG-103548
Change-Id: Ie4bb662dcb274440ab8bfffd17096e0f85e4ea5a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Even though the meta object format stores 32-bit integers, which means
we can't have anywhere near 2 billion properties, methods, method
parameters, etc. This suppresses the warning that we may be trying to
allocate a negative amount of data in
qdbusmetaobject.cpp:438:60: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
Task-number: QTBUG-105388
Task-number: QTBUG-103548
Pick-to: 6.2 6.3 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd17096df93614be8e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Also suppresses the warning that we may be trying to allocate -1 items
in call to new[].
Task-number: QTBUG-105388
Task-number: QTBUG-105471
Pick-to: 6.2 6.3 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd17096d3606354647
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This is required to make the header file self-contained from the
syncqt procedure point of view.
Change-Id: Ic32e12bc914c62b907bbc75909d9b4e26994d696
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>