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>
If the fbo had samples > 0 set, it would use a temporary fbo with
a default configuration losing the HDR precision.
Change-Id: I7e9966165b3100f148c4ad24738f3ee71273f29a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Replace Qt4-style connects.
* Reformat code to adhere to 80 column width.
* Touch comments to make location and style consistent.
* Rename a label in the UI form.
Task-number: QTBUG-68652
Change-Id: Icc592f7b5a013d1806bc36c45057b35472b6efbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The implementation of QTransform::transposed() had a wrong assumption
about the type of the result.
Task-number: QTBUG-68630
Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The new build system in Xcode 10 requires outputs from shell script
to be explicitly declared if they are used by subsequent build phases,
otherwise the build system may attempt to search for the file before
it has been generated, causing the build to fail.
The build phase we use for Qt preprocessing (moc, rcc, etc), does not
list these output files, so we need to disable the new build system
for now.
Change-Id: I7404c19021f57489e985bd1203ad09ce9b83b090
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QDoc links to the homepage in the navigation bar; use
index.html for linking instead of "Qt $QT_VER" to prevent
incorrect links to section titles that clash with that
string.
Task-number: QTBUG-62484
Change-Id: I53ced31b7ce35d69579a8c70cbc475e306fd3b18
Reviewed-by: Martin Smith <martin.smith@qt.io>
QWindowsWindow::requestActivateWindow() does not work correct if
QWindowsWindowFunctions::AlwaysActivateWindow is passed as a parameter
to QWindowsWindowFunctions::setWindowActivationBehavior().
When the calling process is not the active process, only the taskbar
entry is flashed. It is not correct. The window should be always
activated, even when the calling process is not the active process.
Task-number: QTBUG-37435
Task-number: QTBUG-14062
Change-Id: I7a321d7bac744a7776278210b1b5a2fd4288aa43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][Wayland] In Qt 5.11.0, support for selecting a platform plugin based
on the XDG_SESSION_TYPE environment variable was added. On gnome-shell, however,
bugs—in both Qt and gnome-shell—made many widget applications almost unusable.
So until those bugs are fixed XDG_SESSION_TYPE=wayland is now ignored on
gnome-shell.
Task-number: QTBUG-68619
Change-Id: I902acd1c4fc996f46e8431c12c0a5cdbab883abf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>