Silence warnings about copying/clearing memory types which g++
considers non-trivial, for example:
windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess]
memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength);
qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&data, 0, sizeof(data));
^
qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&data, 0, sizeof(data));
by introducing a cast.
Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This allows distinguishing between these tools and tools for the host,
when cross compiling.
While mac tools normally only are available on macOS, there are third
party efforts to port them to other platforms. In these cases, it
might be useful to use a prefix (either some sort of triplet prefix,
or an absolute path) to distinguish between the host build platform
compilers/tools and the ones for the cross target.
The use of this variable matches the one used in a lot of other
mkspecs, and shouldn't cause any issues for those who aren't setting
it.
Change-Id: Iaeba571d955ea79ed1249989fcc525eb1eaf1f5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Do allow people to build from git using the Qt License Agreement 4.0.
The license agreement text is the same as in the installers, except
that some Unicode characters got normalized to their ASCII variants,
and things have been properly wrapped.
[ChangeLog][Licensing] The commercial preview license in the git
checkout has been replaced by the Qt License Agreement 4.0 text.
This makes it explicit that commercial customers of The Qt Company
can use the git version under commercial terms. However, support
is (still) only provided for builds from released branches of Qt.
Task-number: QTBUG-52222
Change-Id: I9e99b68e236a09610b798ba7a841e5a9d1ce6898
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
androiddeploytqt is the only official way of deploying applications to the
device, so it is therefore part of the "platform". It therefore needs to live
in qtbase.
Change-Id: I52d7c4427275aacec792b71284a0c10edaf7ab69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
In tst_QDateTime::springForward(), we test correct handling of times
in the gap; these are formally invalid and a mktime() implementation
may reasonably reject them causing our date-time code to produce an
invalid result. So handle that case gracefully in the tests, only
insisting on consistency between the two ways of preparing the date.
In one test, package the repeated code I was going to adapt into a
macro to save repeitition.
Task-number: QTBUG-68832
Task-number: QTBUG-68839
Change-Id: Ib8a16ff007f4e75ab2ccff05b1ccf00a45e50dc8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Android doesn't use the proper zone-abbreviation, so just check it
starts with the right date-time. Revised the way the #if-ery for that
is handled, to avoid repetition of the (now more complex) condition in
the two tests affected.
Task-number: QTBUG-68833
Change-Id: Iceb5469f46c69ba5cdbaf7ca050ad70f2bb74f44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Have a test expect what it does produce rather than fail what we can't
fix.
Task-number: QTBUG-68837
Change-Id: Icda7bd9968682daf97d46d597f8bb0433560cde2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They used different messages for the same excuse, which weren't well
worded in any case; and their #if-ery was differently decorated.
Change-Id: I28f5032693aff1036cb086ac4032c669110a5cb5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
If a device fails to open during the plugin startup, we exit the handler
constructor early and leave the d member as nullptr.
However the recently added m_handler->isFiltered() call after m_handler
is instantiated assumes that d is always valid, which triggers a crash
in the forementionned situation. Fix it to check for d's validity first.
This can occur when a device is connected then disconnected right after,
so that it's gone by the time we get the notification from udev.
Change-Id: Ia755868338f92b91c181be8557e06e087d70fcc6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This correctly silents the warning about incompatible function types,
it amends the previous fix - 6108d8f515
Task-number: QTBUG-68330
Change-Id: I9eda42817740f491b16ac19c553f35fb1c7aa755
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
We had something like this already in Qt4: QT_X11_NO_MITSHM
The logic from 67227aeffd not always
works. There can still be cases that xcb_shm_attach_checked()
returns with no errors on remote clients.
Task-number: QTBUG-68783
Change-Id: Idd27ac66eb8f1114e3d1e1ddaaab2b00f235c561
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It appears that in the 5 years since we deprecated this function, people
have not stopped using it. The removal of qt5_use_modules() caused lots of
troubles in packages still using it when they were compiled against Qt 5.11.0.
Instead, let's revive this function and keep it for the Qt5 life time.
See discussion on qt-development mailing list:
http://lists.qt-project.org/pipermail/development/2018-June/032837.html
Change-Id: Ic263e3bb6706268cb9ea38a0711665f166a3aa9e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QString::sprintf(), like the C printf-family, always includes two
digits in any exponent it outputs. Up to 5.6, number() and arg()
taking a double did the same; but changes at 5.7 to enable opting out
of the leading zero this implies for a single-digit exponent
accidentally opted out of it in args() and number(). This commit
fixes number() and arg() to include QLocaleData::ZeroPadExponent in
the flags they pass down to the C locale's doubleToString(), restoring
the prior behavior, including consistency with sprintf().
[ChangeLog][QtCore][QString] Formatting of doubles with single-digit
exponent, by number() or args(), now includes a leading zero in that
exponent, consistently with sprintf(), as it did up to 5.6.
Task-number: QTBUG-63620
Change-Id: I10c491902b8556e9f19e605177ead8d9fd32abd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If there is a parent (typically an itemview) then StatusTip events
should be sent to that. However in the case of there not being a parent
then the event should be sent to the QHeaderView itself.
Task-number: QTBUG-68458
Change-Id: I2a8c11c973210c7adf1bf29443f224f968a357a9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
We detect whether or not we're running inside a sandbox and bail out if
so. We use runtime lookup of the property, so that static analysis of the
application will not mistakenly think we're using the API in sandboxed
situations.
Change-Id: I5f5c42f5a4a44b62de061d945b62ac63167ece09
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The QMAKE_MANIFEST variable was ignored for VS linkers that support
the /MANIFEST:embed option.
Task-number: QTBUG-59967
Change-Id: I1cdb60ec3a7a5f117942952d4632378ff142daa5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
wayland-scanner.prf uses it as a trigger, so this is needed to make dynamic
non-prefix builds work.
amends 427e5d61b7.
Task-number: QTBUG-68773
Change-Id: Ia7d3bc39cb2b0f225e827f64eb17d061d594b265
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
There were several issues here:
We were attempting to use MIT-SHM functions over SSH connection,
which is not supported. X server should detect this and return with
an appropriate error message. It does actually return BadAccess for
non-fd code path, but Qt was stubbornly trying to repeat this action
and always falling back to malloc (during window resizing). For fd
code path we were hitting X server bug, which would result in window
freeze [1].
During the initialization we check if xcb_shm_attach_checked() fails,
and disable MIT-SHM if it does. We use this logic to detect if we
are running remotely, as there are no public APIs for it. This way
we can avoid X server bug and avoid needless calling of code path
which will _always_ fail on a remote X11 connection.
[1] https://lists.x.org/archives/xorg-devel/2018-June/057011.html
Task-number: QTBUG-68449
Task-number: QTBUG-68783
Change-Id: I7ab3dcf0f323fd53001b9f7b88c2cb10809af509
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Added by accident in 0ac2dca977, but
apparently no one is compiling with ICC.
Change-Id: I052407b777ec43f78378fffd153116c06362bfd7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We need -Zc:__cplusplus in order to enable the __cplusplus macro having
the correct value. This causes configure to now print:
Checking for C++14 support... yes
Checking for C++1z support... yes
and
Using C++ standard ..................... C++1z
Change-Id: I5d0ee9389a794d80983efffd152c95a4d9d8adbc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 23b139038a.
The commit causes a regression on Ubuntu where the DPI setting of
the display is ignored.
Task-number: QTBUG-68620
Change-Id: Id176f8cda0daef1755abb3aa9382476cc4ed7d71
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
macOS 10.14 (Mojave) and iOS 12 has been added, and older defines for
platforms below our deployment target have been removed.
Change-Id: Ib7b3e657d11136179b669a94da56963d4716bcb7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The bug was that we are accessing memory beyond 32 bytes. It is
not safe to cast xcb_generic_event_t to Xlib's XI2 structs before
we have memmoved bits to the expected layout (for details see
QXcbConnection::xi2PrepareXIGenericDeviceEvent). We do this memmove
later in the stack, when processing the XI2 events. Here at the
compression step we can simply extract the necessary sourceId by
reading the sourceId offset in the data.
Task-number: QTBUG-68033
Change-Id: I6962bbb8f8b0834d6f780f62017fefa2de7f47df
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Lock the width of the rating column to prohibit the contents to escape
the bounds of the column upon resize.
Task-number: QTBUG-68652
Change-Id: I5c744833b19a8e5bcf88ef1b9ab657ac81f5aa50
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
ENOENT (no such file or directory) is a benign error, since it could
happen also out of a race condition. All the other errors in the
inotify_add_watch(2) man page indicate bugs in Qt or resource
exhaustion, so those remain being printed.
Task-number: QTBUG-68586
Change-Id: I04b94079b6da48f39a82fffd1535c08d8a3d8c33
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
All the other highdpi scaling uses rounding, and not using it here may
offset the compositing by a line.
Task-number: QTBUG-67994
Change-Id: I2f5f328c091d0e85c40b1663e22c82f364df65e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Setting it too early can cause issues, as we are still doing
lots of work here as e.g. calling hide() on children.
But the flag is required when we delete the declarative data,
so set and reset it when destroying that data.
Amends c579f49e2a
Task-number: QTBUG-68637
Change-Id: I7ed35828c26912aa6d703ba6025e46b7911353fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use C++11 member init
* Use auto where appropriate
* Replace foreach with range-for
* Replace last Qt4-style connects
* Sort includes to common style
* Fix some Clang warnings
Task-number: QTBUG-60635
Change-Id: I61c98b34b954e416dd175b56ca589125217083de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The default value for CONFIGURATION_BUILD_DIR includes EFFECTIVE_PLATFORM_NAME,
but when overriding it in 554e44b77 we only used the CONFIGURATION variable.
This left the .app in iOS builds in Debug instead of Debug-iphoneos,
breaking deployment from within Qt Creator, which had this directory
hard-coded.
We now include EFFECTIVE_PLATFORM_NAME to restore the original
destination for the .app bundle.
Task-number: QTBUG-68705
Change-Id: If304193d3e351e19fb84d250a62ae331af6966c6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>