necessary for use outside qmake itself.
amends f137957e08.
Change-Id: Ie069f7b6efc969ab112e1f0ecd966eb06248fb94
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
that's the only place where they are used, and this clarifies the
structure.
Change-Id: I874beb7f049b34cc73079609b8baabcc1bd3cd39
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
QMAKE_X11_PREFIX and QMAKE_XKB_CONFIG_ROOT are now configured
in qtgui, so we need to include qtgui-config.pri before accessing
them in plugins.
Task-number: QTBUG-56351
Change-Id: I2e18f0b03f826a93a9d9a1965bd024ee89656ae8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
- Provide op()(uint[], QComposeTableElement) as well, since the
standard (does|did) not specify in which order the two are called.
- Use std::lexicographical_compare to do the ... lexicographical
comparison.
- Share code by calling a new op()(uint[], uint[]) overload from all
other overloads.
- Mark all op() overloads const noexept.
- Rename from 'Compare' to 'ByKeys', as in 'sort(vector, ByKeys()))'.
- Replace a hand-rolled loop with std::equal.
- Replace a #define with a static constexpr variable.
Change-Id: I5ed487199916d0ae44ac38741fc95099bd2f8a22
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
As on other mobile platforms, fusion should be preferred as the default
theme instead of the desktop windows one. The styleHints from
QPlatformIntegration are adapted on top of fusion then.
Task-number: QTBUG-40667
Change-Id: I60836b4a199b29e63c400c2ed9bbbab7d3add902
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Slims down QCFString and leaves only one implementation of converting
back and forth between CF/NS strings and QStrings.
Change-Id: I068568ffa25e6f4f6d6c99dcf47078b7a8e70e10
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
By using _MIN for signed values, and _MAX for unsigned values, we may
detect conversion issues when serializing QVariants using QSettings.
Change-Id: I3ce58ba4b93f791f75c7ae44d1fd5030f07b2f25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This leaves a clearer separation between the foreign-window and non-foreign
window use-cases, where a single QCococaWindow can only be in one mode,
which is determined in the constructor and doesn't change after that.
There are no source or binary compatibility guarantees for the QPA classes,
meaning the helper function in QPlatformNativeInterface can be removed.
Change-Id: I3232aedca1d98c49a8f54e16750832187f9dc69a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The contentView is the root view of a NSWindow, but our m_contentView is
just the corresponding NSView of a QWindow, and doesn't always match the
contentView property of the NSWindow.
This is part of a multi part cleanup to the Cocoa platform plugin in
preparation for improved foreign-window support.
Change-Id: Ifaffb12f35544ec05e4a83964b346b47fa4b0576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This is now centralized in configure.pri except where it explicitly
needs to be overridden.
Change-Id: If829d6b5eecf9a5fc403d0a0600d12c9e5781525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The fix is trivial, but the patch adds a new QSettings tests that iterates most
of the QMetaTypes and verifies that storing and retrieving them again gives the
same value. This is a more complete test than the testVariantTypes tests, which
is limited to a subset of the QVariant types. The new tests borrows logic from
the QMetaType test machinery.
QSettings has been Q_ENUM'ified in the process, for improved debug output.
Note that on backends such as the INI backend, the metatype of the QVariant read
from the settings will be a string, so it won't match the input QVariant type,
but the result of converting that to the original value type should still work.
Task-number: QTBUG-56124
Change-Id: Ib03a26abf77c9fb449b94160d28bc4baeb095f25
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Saving strings with embedded zero-bytes (\0) as CFStrings would
sometimes fail, and only write the part of the string leading
up to the first zero-byte, instead of all the way to the final
zero-terminator. This bug was revealed by the code-path that
falls back to storing e.g. QTime as strings, via the helper
method QSettingsPrivate::variantToString().
We now use the same approach as on platforms such as Windows
and WinRT, where the string produced by variantToString() is
checked for null-bytes, and if so, stored using a binary
representation instead of as a string. For our case that
means we fall back to CFData when detecting the null-byte.
To separate strings from regular byte arrays, new logic has
been added to variantToString() that wraps the null-byte
strings in @String(). That way we can implement a fast-path
when converting back from CFData, that doesn't go via the
slow and lossy conversion via UTF8, and the resulting QVariant
will be of type QVariant::ByteArray. The reason for using
UTF-8 as the binary representation of the string is that
in the case of storing a QByteArray("@foo") we need to
still be able to convert it back to the same byte array,
which doesn't work if the on-disk format is UTF-16.
Task-number: QTBUG-56124
Change-Id: Iab2f71cf96cf3225de48dc5e71870d74b6dde1e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In case a project uses C++/CX extensions via /ZW compile flag including
qfunctions_winrt.h resulted in a compile error about duplicate
definition of Started due to namespace usages.
Change-Id: I8913522eafbabae77dd7d17187f202e555b0275f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
If len == 0, we didn't write anything to 'tmp', but get_hex_rgb()
unconditionally reads tmp[0] (aliased to name[0] in get_hex_rgb()).
Fix by terminating the tmp array, thus ensuring that the comparison
against '#' in get_hex_rgb() fails.
Introduced in a41393d0bc.
Coverity-Id: 171477
Change-Id: I53952aff7035813ed6abc74d402953bc9cfa76f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Instead of the manual logic for computing test data locations, we use the
locations from baseWritableLocation, but make sure to put them all under
'.qttest' in the home directory. This approach handles more cases for test
data, and also plays nice with locations that are not in the home directory
due to being containerized (and hence do not need a separate test data scope).
Change-Id: Iea4f21acb75c0191be35a3619c05143e8929bd6e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
A fair amount of tests are skipped if we can't write to the system scope,
eg on iOS. Without this detection they will fail.
Change-Id: I8257f1f24e69dae88925c20d2bff851e81701405
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
it does not appear that the tests actually use these flags in any way;
they don't include any (actual) d-bus headers and have no ifdefs.
and the qdbus module already pulls in the flags via QMAKE_USE (in the
case where they are defined at all, i.e., dbus-linked).
Change-Id: Ie6bc6da7d1dd96da7b73f2d0fe45576936715874
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the gl_integrations_plugin_base.pri included by this file already does
it.
Change-Id: I172401a431081da903b82e97829c2517ef6204df
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
amends 26a05fc09 (which in turn was a cleanup of 38abd6537).
Change-Id: I6159a3cfe468db048faf1c396143dd3869f7e72b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
there is no point in testing !win32 explicitly any more, as configure
will take this into account already.
Change-Id: Idfca46feece6451509b405a4afc2b7205667c5bb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
convert the ugly config.tests/[...]/freetype.pri file into a custom
callback in configure.pri, and reinstate pkg-config use for freetype.
subsequently, use QMAKE_USE for the actual library references.
this fixes in particular cross-builds, as the new configure was not
passing the necessary information to the test any more, so the old .pri
file misbehaved.
Task-number: QTBUG-54911
Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
it's now possible to declare references which don't cause linking (or
cause only linking).
make use of this in the xcb-static library.
Change-Id: Ic429e0a1200b3a333738ea8d8e576ff64b6cac21
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
this makes it possible for features added via CONFIG to use QMAKE_USE*,
as default_post.prf is processed before all features in CONFIG.
Change-Id: Id0812a0fb1aa5e658548bd2bc6003234085545e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since QCocoaEventDispatcher::processEvents() resets the interrupt
state, this may prevent a higher level event loop from returning.
For example, calling QMenu::exec() and, as a result of an action
being triggered, the application calls QCoreApplication::processEvents()
after QMenu::hideEvent(). In this case, the menu event loop can be
stuck until we run another event loop.
Task-number: QTBUG-53947
Change-Id: If7efe1c3c07f7222c695195cbb4f41715e49b02e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The "args" variable would contain the original -spec XXX flags in
addition to the -spec macx-xcode passed in the system command invocation
below. The last use of -spec takes effect, so this code was entirely
ineffective. Consequently, uikit/default_post.prf in the nested qmake
call thought it's still the top-level call and thus added xcodebuild
again, which caused an infinite recursion.
Change-Id: Ie98d8a7f3c1cd875f4a4146af9a66a66b48cc6cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
In setData(), the old code both called Private::addNode(),
which creates a QFileSystemNode and adds it to the parent's
QHash of children, and also re-purposed the old node by
taking it out of the children hash, adjusting the fileName
member of the node and putting it back into the children
hash under the new name, where it would overwrite the node
just added under the same (new) name in addNode(). Since
the hash stores naked pointers, no-one deletes the node
that was put into the hash first.
Fix by dropping the addNode() call completely.
Change-Id: I0c37917fd0ffd74716393786c69b5bb172aa372e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The layout isn't actually created until endLayout() or setLineWidth() is
called. So in the case where this was not done, the height of the line
would be 0, thus multiple lines would be placed on top of each other, at
y == 0.
[ChangeLog][QtGui][Text] Fixed QStaticText when manually breaking lines
and no text width was set.
Task-number: QTBUG-56346
Change-Id: I7f6ed6260545882f05fe39b21134315eca7401b9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Fixes the mapping of the rare multimedia Print key, adds the real
mapping of the Print Screen key.
Also adds a mapping for few other short-cut keys that were added in 5.6
Change-Id: I931bf1eed062536e1be2aa6aa6f19d773bb5ec55
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
this is, in fact, not the same as --proxies=system, and the old
configure handles this by putting special cases before the catch-all
patterns. we achieve this by trying the verbatim names (of all options,
which is admittedly a tad inefficient) before applying the -qt/-system
transformation.
Change-Id: Ic85a9d76d6e8ca95b2e1b5566f047f4b7ac38b98
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- generic --* options are defined to be booleans, without the
possibility of having an additional parameter
- -qt and -system options don't exist in the --* form
- --foo=bar options exist only in the --* form
Task-number: QTBUG-55610
Change-Id: Ib0480ac6f479df48045c9de8e854a525862ee363
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
every repo's .qmake.conf is expected to do it already.
Change-Id: I87ed75d80493d8f1c4548c5b9dadfdaf07b86d7e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
this is a relic from the early times of the modularization.
Change-Id: I9ca46fa6457bf9ca207b6be1f0637f0349569ddf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
this actually fixes the build when ssl is not enabled, as the openssl
features are in the not included network-private module.
Change-Id: Ibafae9867af493da184a45cf3981628d475d37a6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
now that the bat file is responsible for displaying the help in addition
to bootstrapping configure, the exe file should not shadow it any more.
amends c027cffbe.
Change-Id: I5c8a52f59ff455575e646fae55cd214db98a3736
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The QFileInfo 'info' is only used in code conditional on
QT_NO_FILESYSTEMWATCHER, so move the definiton into the
conditionally-compiled block, too.
Turn it into an rvalue while at it.
Change-Id: I9983bfdcd0b32d0abecf7c588973a60df9de8cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It fails on iOS as well, and likely also tvOS and watchOS.
Change-Id: Idfce98a5aeccb5680f6b4c6e66b526dd7922156d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Turn the list of newRow() calls into a for loop over a constexpr
data structure.
Fixes the GCC note:
tst_qgraphicsview_2.cpp:47:13: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
and speeds up compilation of the file from 13s to 2.5s on my
machine.
Task-number: QTBUG-38890
Change-Id: I4f0b3565c7df64b286d1d32eb3f3d6bf4df92609
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The old code is broken because it was passing signal.outputArgs as inputArgs
variable of writeArgList, fix can not be passing signal.outputArgs as outputArgs
of writeArgList since that ignores the first of the list, so i added a new function
that does the right thing
Change-Id: If54484e04880d5dcebfedb9d478ee0e9faf37baa
Task-number: QTBUG-21577
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>