This fixes a long-standing issue for Qt packages, where the
paths detected at configure time do not necessarily match the
paths on the user's machine. Hence they have been stripped
manually from qconfig.pri so far, preventing moc from resolving
some includes.
The same logic in configure is left alone for the time being,
since the paths there are also used to filter paths returned
by pg_config and mysql_config. I expect that this will
eventually be removed too in a bigger refactoring going on
right now in dev.
Asking the compiler for implicit paths only works for non-msvc
builds - that is, gcc, clang and icc fortunately have a
compatible way to retrieve the paths. MSVC works
solely on environment variables, which will be taken into
account by a separate patch.
[ChangeLog][qmake] The implicit compiler directories that
moc needs for resolving include files are now determined
when qmake runs. So far QMAKE_DEFAULT_INCDIR was determined
at configure time, which might be wrong for relocated
installations.
Task-number: QTBUG-52687
Change-Id: If0706e8c56a5aca2b6e777e79e90342c498726f3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The test was half-ported from Qt 4 and #ifdefed out depending
on WINVER. When it became active, it failed since it queries the window
handle too early in the process.
Move the code sending the message into showEvent() to ensure a window
handle exists and parent the listview properly to prevent a leaking
toplevel.
Change-Id: I74aa9ddfd0e88dd31e9258400fc3e473b6e0d92e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Set the error mode flag SEM_NOOPENFILEERRORBOX when calling Win32 API
SHGetFileInfo() to prevent it from prompting to insert media
as does QStorageInfoPrivate::mountedVolumes().
Task-number: QTBUG-32457
Task-number: QTBUG-48823
Change-Id: I01a2f99b5a75b39dd729509ca319f634e3dcd695
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
A cast is not a conversion. If the value is not already a string type
we are just getting an empty string for all metatypes that can be
converted to string.
Change-Id: I4643cc9fd509c21568fdc2133403c3ed8cb38a10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
it ends up in QtGui via two different routes (freetype and the png
handler), and we really don't want to have two copies of it in there.
Change-Id: I40760bcb6c615b90ed9f402450bb657c77884613
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
We need to be careful about calling textDidChange on the input
delegate, since that will reset the internal IM state in UIKit
and stop any ongoing text composition or spell checking.
For that reason we set m_inSendEventToFocusObject to true whenever
we send an IM event to Qt, to not call the abovementioned method when
callbacks from UIKit is the reason for changing the text.
But until now we never applied the same protection for key events.
This lead to ligatures not working correctly (e.g when using Korean
IM), since UIKit composes ligatures by first selecting the characters
that can be truncated, then do a deleteBackwards, then insert the ligature.
And deleteBackwards leads us to send backspace key events, which
ends up in a textDidChange call, which confuses UIKit.
This patch will ensure we don't call textDidChange as a result of
sending key events.
Task-number: QTBUG-52486
Change-Id: Ida268edae517f55a5b5f975340a5d3821f7b8f52
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We only track left and right mouse buttons when dragging. But
some applications may do this with other mouse buttons.
In this case, instead of tracking which button was pressed and
which one was released, we just ask Cocoa for the current state.
Change-Id: I0df7799b7ae6d7816377f881bc0ede867737d245
Task-number: QTBUG-53374
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
While dealing with Coverity's CID 11424 ('missing initializer'), it was
recommended (by Marc, thanks) to get rid of Command's default ctor,
since it's apparently not needed at all (replacing QVector with std::vector also).
Change-Id: Ibe9d2789c67431a9810feb7db4fa1bce0b61921c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Qt XML parser doesn't like these comments and it breakes QtCreator's manifest editor
Task-number: QTCREATORBUG-16139
Change-Id: I6459926b32c39eb6d1ee8a9b5a5ade9b6f72924a
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
I'm not sure how one of my machines has this problem and the other
doesn't (same distribution and same compiler version). Must be operator
error. But this is required to compile QtGui when QtCore was compiled in
LTO mode.
qversiontagging.cpp used to be built with -fno-lto before commit
629ceec208. This commit restores that
functionality, but not the clang "-no-integrated-as" part.
Change-Id: Ie9fd7afe060b4e4a8052fffd144fb9c1a1166854
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We can't depend on the application/library ignoring the signal for us,
so we do it. O_NOSIGPIPE exists on the BSDs and I'll add it to Linux. If
it isn't supported, then we need to ignore SIGPIPE globally.
Change-Id: I25d85d86649448d5b2b3fffd1450f6afeaea8b18
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Most composition modes require an alpha-channel to be meaningful, but
not all, and there is no requirements of specific formats.
Change-Id: I11e930ccc07e9ff5df06dbda6745e4afb79f5e08
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Qt 3/4 had NIS configure options and tests for NIS defines,
those were used in QPrintDialog at the time to support
NIS-printers. As the implementation went away a long time ago
and no NIS featueres are implemented anywhere in Qt, the
configure options and config.tests for NIS can be removed.
Change-Id: Ie920e6a422540bf938623265b6ee68c793aeff84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This routine is often called to down-convert pixmaps and backing
stores to RGB32.
This patch replaces a comparison in each pixel, with a single AND in
each pixel and a comparison at each line. The new form is also auto-
vectorized by at least GCC.
Change-Id: I3e07585a3ec12f888321d35da57ac99b561dbec4
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The performance optimization of falling back to flushing windows the normal
(raster) way once no render-to-texture widgets are visible has issues with
fullscreen windows, presumably due to the compositor's special handling of
such windows. Disable our smartness and stick with composeAndFlush for
ever in case the window is fullscreen.
Change-Id: Ifb31e0d36bd0a3933fcfe55a9a7d502513d6e3cf
Task-number: QTBUG-53515
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It is assumed that this happens automatically but that is not always the
case. Do not become stuck with a non-functional D3D11-backed EGL environment.
Instead, try again as if QT_ANGLE_PLATFORM=d3d9 was requested.
Task-number: QTBUG-52056
Change-Id: I12ac6ca5f1d06f9504d05120d8e1053e97edfab3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Until now the check didn't use pkgconfig at all, but using pkgconfig
alone does not work for some devices (special cases), so we have to
use a combination of both here.
Change-Id: Ia19a279d80a65352c467661d91a3762448c23ae6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
If the client has responded to an earlier auth fail sensibly, further
use of the socks connection probably means we have fresh credentials.
So treat AuthenticatingError like Uninitialized. This makes
tst_QNetworkReply::authenticationCacheAfterCancel(*+socksauth) work
again.
Task-number: QTBUG-51545
Change-Id: I237ca5a3194b093cc6480dd33aa7709b7b584941
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Add -lexecinfo for backtrace(3) on NetBSD and OpenBSD. Without,
qlogging.cpp linking will result in undefined references to backtrace
and backtrace_symbols. The behavior required is identical to FreeBSD so
no additional fixes are required (see src/corelib/global/global.pri:41)
Change-Id: I3cfd1d75f1fb5b8505c08a880f91e7b39a5a650d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Compile fix for NetBSD's use of statvfs having f_flags.All other BSDs use
statfs instead of statvfs, so the f_flags define needs to be prevented
on NetBSD.
Fix obtained from Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports
maintainer.
Change-Id: Ifbd7ba0cba7f6cf280f5984c64abd7649f667332
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The local variable isEmpty triggers a compile warning with GCC:
variable ‘isEmpty’ set but not used [-Werror=unused-but-set-variable],
so remove the variable assignment and declaration.
Error is triggered on FreeBSD and NetBSD with gcc.
Change-Id: I37bdb3408ad69093708f2d4bdb04392da66e04e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On NetBSD, ffsll needs to be defined to compile. The fix adds the
according Q_OS_NETBSD define to the list of operating systems
needing the define.
Fix obtained from NetBSD port maintainer Kamil Rytarowski <n54@gmx.com>
via IRC.
Change-Id: I966a7b3fba43fb56e72f19f6b7f7cacc19c3c6cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
GCC creates a warning "enumeral and non-enumeral type in conditional
expression" as the types of the two arguments don't match. Fix
the compile warning by converting the first argument to (long) to match
the type of the second parameter.
Fix confirmed to work on NetBSD and FreeBSD, obtained from
Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports maintainer.
Change-Id: I777dd066a0a8cc8a46e34bd39b256882080a7773
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On NetBSD, the types uint64_t, uint32_t and uint8_t
are already defined in sys/types.h which leads to compile errors.
Those types need to be properly undefined before defining
them with the Qt code.
Change-Id: Icd58f421619f15b899cf5c5de1cfb22a519a4e4b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Besides FreeBSD and NetBSD, OpenBSD uses kqueue too, so
add the according Q_OS_OPENBSD define here to make that work.
Patch obtained via OpenBSD qt ports maintainer Vadim Zhukov
<persgray@gmail.com> from OpenBSD qt ports patches.
Change-Id: Ib9e6f6303b661beb88666bd3c2bf36a77e929f9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
OpenBSD iconv is in -liconv, so it needs to be added here. NetBSD
has iconv in libc, so only OpenBSD is affected.
Patch obtained from Vadim Zhukov <persgray@gmail.com>,
OpenBSD qt ports maintainer.
Change-Id: Icce25d154857f0ce161b5f6b7ddac3c150a02bb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
FreeBSD 9.3 is still supported and uses gcc as the default
compiler, therefore FreeBSD ports require patching the mkspecs
back. To avoid patching, move the mkspecs back to the right
place and adapt the path in the qmake.conf/qplatformdefs.h
[ChangeLog][FreeBSD] The freebsd-g++ mkspec was moved back and no
longer requires the "unsupported/" prefix, matching the FreeBSD
ports tree, as FreeBSD 9.3 still defaults to using GCC. Users of
GCC that did not previously use the ports patch will need to adapt their
build scripts and drop the "unsupported/" prefix.
Change-Id: Ideda4a33cccf5381000f6f50b6ae92a5c24ba9d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having the debug info in separate files is very helpful, especially on
memory constrained 32bit systems. When the debug info is compiled into
the object files, processes can run out of memory when trying to load
them.
Change-Id: I1808a32e855d6a62e17e1b734c511b31db5f03f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This function is optimized in a way that it returns bad results with the
arm msvc compiler.
Task-number: QTBUG-52007
Change-Id: Ica4517dfb7dde5a78d563f9253c4c907090c9459
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Add convenience QWindowsWindow::formatWindowTitle() and use
that in QWindowsIntegration::createPlatformWindow().
Task-number: QTBUG-53394
Change-Id: I76ebade97c5af71ffa3d11075511b94a54a3dbf8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
A port was being assigned to qint16 instead of quint16.
Change-Id: I9414e2dcca52beab1bc17ef61cfff56db8ab83a0
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
The freebsd-icc mkspec was intended to be used with the Intel
compiler, which nowadays is still only available in version
8.1.038 (https://www.freshports.org/lang/icc/) and for i386 only
while the current version is around 17. On FreeBSD the port
was actually never supported by Intel anyway.
Change-Id: I03b1939be63eef4363bd6b074a6b739365f495ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 5f542f3cca,
since it breaks streaming of types derived from QList and
the docs state that this should be possible without providing
custom op<</>> for such types.
Task-number: QTBUG-53376
Change-Id: I2bde714ac384f2aed67ad30decea702fb79aef1b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If no read was established before (no IO pending) the function
will fail. In this case there is no need to assert though.
Change-Id: Iaa18e4124389783fc2b8363a85c60a308903a713
Task-number: QTBUG-53424
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Both checks are not relevant in Qt's context and were skipped before but
they sneaked back in with the latest ANGLE update.
Change-Id: Ic44de5468a3254afd76ef4804d97d245676daeb1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Affects systems like the NVIDIA DRIVE CX. This did not show up so far
because there was no error when Q_PROCESSOR_ARM was not set.
Task-number: QTBUG-53493
Change-Id: I107155b6dc1a881eca6f57374ad8db4458875243
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This has been fixed in 5.6.1 but we can afford the extra test
to guard against regressions.
The setup for this test is two menus, one parent of the other.
The submenu is tearable. We open the parent menu, open its
submenu and then move the mouse cursor straight over the
submenu's tear-off area. The submenu should stay open even
after a short delay.
Change-Id: Ia8ad326d78dde31b6dd91b0ebacf0db1898715d4
Task-number: QTBUG-53068
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The old code failed to reliably detect new QScreens and connect their signals to
its own slots. For example, if the QApplication added a new screen at the
beginning of the screen list (which happens if the new screen is primary), the
signal-connecting loop would actually instead add the now second screen to
QDesktopWidget's list *again*, and connect its signals, but not connect any
signal to the new, first screen.
Furthermore, QDesktopWidget would miss geometry changes because QWidget (and
hence QDesktopScreenWidget) automatically shrinks when the screen it is on gets
smaller.
To fix all of this, QDesktopScreenWidget now keeps its own record of the screen
and its geometry, and it always scans over the entire screen list without
relying on any ordering guarantees on behalf of QApplication.
Change-Id: I2ee8361adf643849f43b7dd9a95966920fd13528
Task-number: QTBUG-52101
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>