there isn't a point to determining the values separately if they are
actually the same things.
Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
note that in principle this leaves room for a race condition, as the
first project to determine the host config is not going to be the
top-level one.
in qtbase and qtdeclarative, this is naturally serialized via the common
bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d,
qtscxml, and qtwayland all build only one bootstrapped tool each.
qtwebengine makes a fake host build to create files for gyp/gn; the
convert_dict tool is declared a host tool, but isn't actually built when
x-building anyway, and even if, it's serialized on the former. qttools
needs explicit serialization, though. no other host builds exist within
qt as of now.
Task-number: QTBUG-58126
Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set
up, leading to caching of possibly nonsensical values.
this change also necessitated that msvc-version.conf is loaded only when
toolchain.prf is, which is best done by loading the former from within
the latter. that seems quite appropriate in the first place.
Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The Carbon port has been removed since 5.0, so there's
only one framework against which we can build Qt.
Change-Id: I38ce410f50cd4eda7abcc50ac4c4c7a23b3e1f45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
instead of forcing an early load and discarding its contents again
before they could cause harm, trick qmake into not loading it at all.
Change-Id: I672ca9de362b1f23bf5cfea007053570c8534fc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
move the code before the linking of qt modules - dependency resolution
would re-order them anyway (or static linking would fail).
on the way, fix up the coding style and rename some variables.
the code to de-duplicate/normalize QTPLUGIN is pulled ahead, which means
that the automatic plugin importing wouldn't make a mess of it any more.
but this is mostly legacy anyway.
Change-Id: Id135470d027f5d84b7f30531425a65efa230f278
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it has a dependency on zlib, which needs to be explicitly linked when
linking statically.
Task-number: QTBUG-56163
Change-Id: I4564844e8a35686db48c429b259e78558d312819
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
freetype has no dependency on gui, so it needs to pull in gui's
configuration manually, as that's where the system libpng is found.
Task-number: QTBUG-58038
Change-Id: I881495f7d2a8f7c1a45d7d4c9e7698ff1d30f2a9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
that makes the log file mostly self-contained.
for code re-use, the qtSystemQuote() function was factored out.
Change-Id: Ie3469518ba384131b69f5f15c577240e2674d507
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the options may need to take effect before the regular test processing
commences (which is actually going to be the case in the next commit).
the indirection via the callback only obfuscated the code anyway.
Change-Id: I5307b0be15cf4cc2c2db391ce5b5a93f81076b5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Bring back the call to InvalidateRect() removed by change
6086c81e4d since it seems that GL Software rendering
requires it (also for single buffer mode).
Task-number: QTBUG-58178
Change-Id: I197a1b3c3906c4afa43943db30dbc07dfb656cc7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We enforce the check of saving the icon when the indicator
process name isn't available (as we might be running in a
confined world), but we're running in Unity.
Change-Id: I80d3be1a8c6eba8c391364260746e78cf89a5b98
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The regression was introduced by 593ab63860 which fixed another bug
related to window modality. To determine whether the window needs to be
(made key and ordered front) or just (ordered front), instead of calling
currentModalSession() which might change internal state of event
dispatcher we just check if cocoaModalSessionStack is empty or not.
Task-number: QTBUG-57991
Task-number: QTBUG-56166
Change-Id: I6c4f92860d8c93decd44e572af1690ed7be6f1f0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When a platform menu bar is used, the QMenuBar is hidden, so shortcuts
for QActions attached only to it do not work.
Extend the macOS-specific code to treat such menubars as visible to
other platforms, to make the shortcuts work.
The exception is made for internal QMenuBar shortcuts, which are
forwarded to the platform menu. A follow-up change will add support
for this to QDBusPlatformMenu. The updateGeometries() method is called
for platform menu bars too to make sure the internal shortcuts are
registered even if the global menu is in use.
Add two cases to the tst_QMenuBar::activatedCount() test to test
both native and non-native menu bars when possible (it now passes with
native menu bars too).
Change-Id: I2d7128512719ac199cd3f8f7ba28333d04d84ed4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This way the Qt accelerator shortcuts (i.e. Alt+F for the File menu)
will cause the matching menu to be opened on the server side.
Change-Id: I02a5b3c20c6eae130d0f133b33c9e247cff38d44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit simplifies defaultParameters() to simply construct an empty
QSslDiffieHellmanParameters and assigning the DER-form of the DH parameters
to QSslDiffieHellmanParametersPrivate's derData field.
This creates a valid QSslDiffieHellmanParameters instance, but skips any
potentially expensive verification steps.
The previous implementation of defaultParameters() would use the public
fromEncoded() method to construct an instance of the default parameters.
This triggers a verification of the passed-in data, which can be expensive.
To ensure our defaultParameters() QSslDiffieHellmanParameters instance does
pass verification, this commit adds an autotest to verify that.
Fixes QTBUG-57815.
Change-Id: I6b1d9dbbfde526b232c319195ddbad42326be27c
Task-number: QTBUG-57815
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Previously, the code grabbed the client rectangle of GetDesktopWindow(),
which is always the primary screen. Fix by using the geometry of
the QPlatformScreen. In addition, subtract x, y from the effective
size when sizes < 0 were passed in as does XCB.
Task-number: QTBUG-58110
Change-Id: I6ed439d2e1da8affd0a1475717d5570017fb1f2b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The size of flowPositions is larger by one than the number
of rows in the model so the last correct row number is
flowPositions.count()-2, not flowPositions.count()-1.
Change-Id: Idf8bbd155151d553947d5d299dd01ffaff0c95fa
Task-number: QTBUG-47694
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: David Faure <david.faure@kdab.com>
Check on QMAKE_TARGET_PRODUCT/QMAKE_TARGET_DESCRIPTION before assigning
values. This enables providing other values by for example the
Qt tool applications.
Change-Id: I62270ca38b7a9110185f6163b280409dbaf395f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When triggering a combination of keys which is causing a dead key then
it will send Key_unknown which is not a valid key to be used in a
shortcut so it should just skip past it as if it were a modifier key.
Task-number: QTBUG-57932
Change-Id: I16e004b84f3aa854f8f8f2bbdf86beb6d764de48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
To work around qmake deficiencies src/angle/src/compiler/translator.pro
contains a no-op extra compiler that "creates" glslang_tab.cpp and adds
a dependency to glslang_tab.h.
However, both files are created in one bison call, and for some reason
the .cpp file is created before the .h file. Then the dependency
glslang_tab.cpp -> glslang_tab.h results in recompiling glslang_tab.cpp
on every incremental build.
Ensure that glslang_tab.cpp is newer than glslang_tab.h.
Change-Id: I6f59e213c84af85c59c02d90ac220bd347faddd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Otherwise queued connections may complain about DeviceType not being
registered.
Change-Id: I1f93f8b34e78919e72ea99000c42da7024b6bdf3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
qHash(QHostAddress) was added in Qt 5.0 (at least the version with uint seed = 0).
op==(QHostAddress::SpecialAddress, QHostAddress) was there since QHostAddress was
added before public history. Since QHostAddress does not have a \since, the I did
not supply one for op==, either.
Since the equality operator did not have unit-tests, added one.
Change-Id: I954a0df02464338f08a12ca58d4cc0ceb013e67a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The 'showArrow' member was not init'ed.
Initialize it to true, which is the default value of the
QBalloonTip::showBalloon() function's argument of the same
purpose.
Reported as new by Coverity, but dating back all the way to
cc3875c2e4, so affects all
current branches.
Coverity-Id: 171482
Change-Id: Ica519ecda3a4ae413f606faab8c22f7072f412a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Commit f839f536 fixed a data race in the gradient cache by
reference-counting the CacheInfo objects stored in the cache. To this
end, QSpanData gained a ref-counted pointer to the CacheInfo whose
members it references to keep the object alive for as long as the
QSpanData object needs it. However, since CacheInfo is only later
defined in qpaintengine_raster.cpp, the counted pointer's payload was
chosen as CacheInfo's base class, QSharedData.
As it turns out, e.g. in the QPainter test, the data race was real and
so QSpanData ends up being the entity that destroys (at least some)
CacheInfos, either in its destructor, or in the setup() method. Since
QSharedData's destructor is not virtual, and
QExplicitlySharedDataPointer<QSharedData> knows nothing of the
CacheInfo-ness of its payload, we end up calling the destructor of the
base class, and not the CacheInfo one.
Fix by using QSharedPointer instead, which stores the correct deleter
internally. Ideally, QSpanData would contain a QSharedPointer<const
void>, but QSharedPointer's implementation is deficient in that
respect and does not compile when instantiated with void, and we can't
use std::shared_ptr, yet, so introduce an arbitrary base class,
Pinnable, to be used instead.
Change-Id: I5573c599d5464278d3a8e4248d887ef9ffcd7b70
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QLayout::replaceWidget() doesn't delete the affected item, but returns it.
Change-Id: Ibda96e4bf2432ad13ed2908c7d37547f46e29a37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
GCC 7 warns about implicit fall-throughs now.
Fix by adding the missing Q_FALLTHROUGH(), and, in one case, by
moving the existing suppressant into the correct position.
Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
C++17 adopts P0021R1[1], which makes noexcept be part of the function
pointer's type and thus be overloadable. It contains some provisions for
allowing a noexcept function pointer to cast implicitly to a non-
noexcept function pointer, but that fails in the presence of templates
and additional overloads that could match the type in question.
Fortunately, the paper proposed a test macro, so we can change our
sources now and be compatible with both C++14 and C++17 rules.
This first failed with Clang 4.0 trunk. This source incompatibility is
not our fault, it's the language's doing.
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html
Task-number: QTBUG-58054
Change-Id: I2bc52f3c7a574209b213fffd14988cf0b875be63
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
With QT_NO_PRINTER set via the feature system there is no symbol
exported at all in a packaging build. This implies that no .lib is
generated. When an application has QT+=printsupport the build will fail
due to a missing file.
For android and ios it only worked as there is no separation and linker
works against the .so file
Task-number: QTBUG-56321
Change-Id: I389adaca61669b302b6c431effed2ef6d1c499a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Change dcd2f829 introduced fake files with the extension .cbt for custom
build tools that generate code from C++ source inputs. The moc_predefs.h
header file falls into this category, because it is generated from
dummy.cpp.
It turns out that these fake files have to exist. Otherwise the
custom build step is executed on every build. That means re-moccing all
mocables on every build.
Fix this by actually creating the fake .cbt files with some
explanatory comment in them.
Task-number: QTBUG-57695
Change-Id: I251294334425d9914677787d8ba6da1169b4cca5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5fc2337d74)
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
It's supposed to be a full alignment (like Top | Right), not
just one flag.
Change-Id: I656adda83742d7e4f31955322e937e979b32747c
Reviewed-by: David Faure <david.faure@kdab.com>