Commit Graph

34270 Commits

Author SHA1 Message Date
Thiago Macieira
4d31fc919b QNetworkInterface: add a Linux backend directly using AF_NETLINK
This allows us a lot greater detail in getting information than relying
on getifaddrs() function. It is also the only way of getting some extra
information we'll need in the future, like address lifetimes.

The parser will also be helpful if we want to add a network interface
monitor in the future, though I currently have no clue how to do the
equivalent on macOS and Windows.

This commit does not remove the support for getifaddrs() on Linux, but I
will no longer add features to it. Note that Android does not support
getifaddrs(), so this may be an improvement if AF_NETLINK works there.

Change-Id: I3868166e5efc45538544fffd14d8e6f993e1eb91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-07 22:15:32 +00:00
Friedemann Kleint
fad8f34033 Extend blacklisting in qnetworkreply
- Blacklist ioHttpRedirectPostPut for Windows
- Amend 84396a3f93:
  Keys need to be on subsequent lines

Task-number: QTBUG-62583
Change-Id: I6360ec7bd87de65a3294a0d22148f13579fcd292
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-07 19:45:18 +00:00
Helio Chissini de Castro
159b3306d6 Change fallthrough detection order to fix clang detection
Clang compiler defines fallthrough, but wrongly detects QT_HAS_CPP_ATTRIBUTE(fallthrough).
This makes compiler breaks compilation due clang be expecting
clang::fallthrough.
Change the order makes the exceptions. clang/gnu, been tested before
the generic, setting then proper defines at end.

LLVM-bug: https://bugs.llvm.org/show_bug.cgi?id=33518
Change-Id: Ic287e9028936af3bdade5c1ee319ca8914b36ea7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-07 19:37:06 +00:00
Gabriel de Dietrich
3f519ffa15 QCocoaMenuItem: Don't clear NSMenuItem.action when setting submenu
Contrarily to what the comment stated, we actually rely on automatic
menu validation, even for submenu items. This is visible in the menu
delegate's validateMenuItem: and itemFired: methods.

This solves the last visible issue in BigMenuCreator where, under
ASP/ASP, ASP/SAP, SAP/ASP and SAP/SAP, all A*S submenus would be
disabled. The cause was an incorrect target/action setup.

Menurama still behaves as expected.

Change-Id: I2599d6fb0d51f56f5d36f03b69647e35ff6c550a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-07 19:36:39 +00:00
Gabriel de Dietrich
5d6878f234 QMainWindow: Clear menubar parent when new one is set
In QMainWindow::setMenuBar(), we hide and schedule the current
menubar, if any, to be deleted later. However, it remains installed
as its whole ancestry's event filter, which could conflict with the
newly assigned menubar until the old menubar is destroyed. In our
case, we have noticed issues with the Cocoa QPA plugin.

We force uninstalling the old menubar as event filter by setting its
parent to null, pending its deletion shortly after.

This fixes BigMenuCreator's empty menubar when calling it with only
the "--new-menubar" option. It also fixes QTBUG-34160 example which
was not behaving as well as it should.

Task-number: QTBUG-34160
Change-Id: Ifefb72affad01e7b7371005442074afd6a39a5b8
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-11-07 19:36:29 +00:00
Gabriel de Dietrich
7986e1e2f0 QMenuBar: Update title on change
When one of the menubar actions changed, we would omit to
update several properties on the platform menu, most notably
its title.

Manual tested with BigMenuCreator, where the sequence

    menu->addAction(action);    // A-operation
    action->setMenu(submenu);   // S-operation

would result in an "Untitled" menubar item on macOS, and this
regardless of when the submenu is populated.

Change-Id: I43989f36f6bf3f0b7056310ac986c06f8e02f128
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-07 19:36:18 +00:00
Gabriel de Dietrich
237b1c1d68 QMenuPrivate: Use in-class initializers where possible
Change-Id: I5347cb41443baf96e28bd399c84983a801b10fcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-11-07 19:36:01 +00:00
Gabriel de Dietrich
b02bd4bbad QMenuPrivate: Rearrange member variables
This saves 32 bytes per instance on 64-bit macOS, from 888
down to 856 bytes.

Change-Id: I2592631aa3566d2eab72bad338aacfe76bee8ef3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-11-07 19:35:54 +00:00
Timur Pocheptsov
16b76456be QSsl: use QT_CONFIG(feature) instead of hardcoded constant
The test OPENSSL_VERSION_NUMBER >= 0x1010000000L was introduced before
1.1 support. Now a couple of conditional inclusions can be converted
into QT_CONFIG(opensslv11).

Task-number: QTBUG-64275
Change-Id: I627e6b06f334deac70c827e463ecbfad879dfc24
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-07 15:28:30 +00:00
Tor Arne Vestbø
14218b880a macOS: Replace deprecated use of qSort with std::sort
Change-Id: Ic93f4ccb3ec2f09a4198ae9892923aae4ee00dc9
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-11-07 15:26:19 +00:00
Allan Sandfeld Jensen
6a02958f21 Fix narrowing warning on MSVC
Task-number: QTBUG-64307
Change-Id: I26032b71dc8fe316dddb8ce2adf6fd0a75ecf226
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-11-07 15:19:01 +00:00
Tor Arne Vestbø
31cc29e9be Disable Xcode main thread checker by default
Xcode 9 introduced the main thread checker, which detects invalid
use of AppKit, UIKit, and other APIs from background threads.

https://developer.apple.com/documentation/code_diagnostics/main_thread_checker

In our case these are accesses to e.g. [UIView layer] and
[UIScreen scaleFactor] from the render thread of QtQuick,
things we should look at, but that might not be easily solvable.

In any case, these are not warnings the user can do anything about,
so in lack of a per-library disable of the checker, we have to
globally disable it for the whole Xcode project.

Task-number: QTBUG-63822
Change-Id: Ibfcdf23891cf6bfbbc9b9b3349e4c256c273c7de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-11-07 14:53:59 +00:00
Tor Arne Vestbø
c3aa422df6 QWidget: Propagate window file path after create
Task-number: QTBUG-63340
Change-Id: Ic21964a33ee2910200627fe8a8c8ec2454e2e20c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-07 14:53:55 +00:00
Tor Arne Vestbø
59c5f7bd9d macOS: Fall back to QWindow::icon for application icon if not set
There are three ways to set the application (Dock/task switcher) icon:

 1. By setting an ICON in the project file
 2. By calling QGuiApplication::setWindowIcon
 3. By calling QWindow::setIcon

The third one was not working on macOS, despite being documented as
such: "The window icon might be used by the windowing system for example
to decorate the window, and/or in the task switcher."

We now update the application icon based on the active window,
unless a global application icon has been set using ICON, or
via QGuiApplication::setWindowIcon. The reason for not allowing
the window's icon to override a global application icon is that
the developer may have intended to set the document icon for a
window (to represent QWindow::filePath), and we don't want that
to affect the Dock icon of the application.

The role of QGuiApplication::setWindowIcon is a bit dubious in this,
as it's documented as "This property holds the default window icon",
which would indicate it should follow the same logic as above by not
letting it override the global ICON set in the project file, but this
would not allow runtime switching of the application icon, so the
QGuiApplication property is left as is. The property should probably
have been named QGuiApplication::applicationIcon initially.

Task-number: QTBUG-63340
Change-Id: I94d3710a8586bb729af42f59a915b8f49dded101
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-07 14:39:12 +00:00
Laszlo Agocs
421df7570b Enable glyph cache workaround for GC2000 as well
The glyph cache resize is clearly doing something that is not actually
legal with OpenGL ES. Until this gets investigated properly, add the
Vivante GC2000 (found in the commonly used i.MX6 quad) to the list since
reports show that the issue occurs there as well.

Task-number: QTBUG-49490
Change-Id: Ia890346d8dbb1691bc113e2ef522713ba6709393
Reviewed-by: Louis Kröger <louis.kroeger@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-11-07 14:13:50 +00:00
Kai Koehne
75bbbfdc6c Remove BSD-OLD, FDL-OLD license headers
All code should be using the license header in header.BSD or header.FDL
now. If modules still use outdated headers, they should be fixed or
as a stop-gap measure add header.BSD-OLD, header.FDL-OLD files locally.

Change-Id: If462f1646ab413c18d2d3c61197773dca2a036ec
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-11-07 13:53:38 +00:00
Michael Winkelmann
ab9f4d5db6 Revamp QtConcurrent examples to C++11
I updated signals and slots and for each loops to the new syntax and
replaced most free functions with std::function.

Task-number: QTBUG-60641
Change-Id: I7693f81f71c7f53fcbe83189a0de2fb76ddf99a8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-07 09:42:34 +00:00
Timur Pocheptsov
d4b3ce9a28 qudpsocket.pro - fix dependencies
Similar to the problem found in QTcpSocket auto-test recently.
While the failure on CI looks differently (apparently, server process
starts but does not print anything), fixing the dependency does not
hurt and at least fixes the 'make check' scenario.

Change-Id: I8f29f3e492d22410533407a527f5fc8f664e7f5c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-11-07 09:23:38 +00:00
Eirik Aavitsland
b084837ffc Update bundled libpng to version 1.6.34
This fixes an upstream bug in the existing version 1.6.32 which would
cause certain valid png files to be rejected.

The remaining diff to clean 1.6.34 is archived in the qtpatches.diff file.

[ChangeLog][Third-Party Code] libpng was updated to version 1.6.34

Task-number: QTBUG-63950
Change-Id: Ie6f2a09c78a93b6e5623848776b75650bb5bca66
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-11-07 09:16:59 +00:00
Friedemann Kleint
28c1e17aef QWinEventNotifier: Fix exit crash
Make sure the wait handle is unregistered even though
there is no event dispatcher in QWinEventNotifier::setEnabled().

Task-number: QTBUG-64152
Task-number: QTCREATORBUG-19175
Change-Id: I608b95adc7cb874bc52dc5bf0e9f51b443b54ebc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-11-07 08:13:50 +00:00
Timur Pocheptsov
28937559b1 tst_qxmlsimplereader::inputFromSocket - fix race condition(s)
This test was failing recently on Windows 7, mingw, x86. It's not
failing now and attempts to reproduce the failure on CI's VM were
unsuccessful. Anyway, just reading the code is enough to spot
race-conditions: two threads are accessing two shared boolean
variables without any protection.

It's unclear if these races were the reason why the test was failing,
but we fix them for good anyway. Also, a failure to start a thread
or to start listening on a TCP socket is not treated as XML-related
failure anymore and QSKIPped instead.

Change-Id: I5115ce6c33cafc91485f8cf6e7e268d954976556
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-06 19:14:41 +00:00
Christian Ehrlicher
2937ab9e32 QHeaderView: Skip hidden sections on cascading resize
When a section is hidden, QHeaderViewPrivate::cascadingResize() does
resize a section even it is hidden. This leads to space between the
neighbor sections and also some unneeded calculations.

Task-number: QTBUG-54601
Change-Id: Ie139417ae2c77ef25e66cf628bfe400185f88ee8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-06 18:18:17 +00:00
Christian Ehrlicher
b4f4c384d9 QHeaderView: Honor maximumSectionSize property during resizeSections()
Resizing a QTreeeView section with double click or
resizeColumnToContents() does not respect the maximumSectionSize when
the resize mode is Interactive or Fixed. Since the documentation of
maximumSectionSize states that it should honor this property for those
cases either the documentation or implementation is incorrect.
This patch fixes the latter.

Task-number: QTBUG-64036
Change-Id: Ic14c8e444d50b9c50a117efed19d0bca7ec1cf82
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-06 18:18:09 +00:00
Robert Szefner
0445065645 Run oraArrayBind() test only for Oracle DBMS
This test contains Oracle specific queries and will fail for other DBMS.
Currently it doesn't fail, because it is skipped for drivers that doesn't
support BatchOperations and only QOCI supports batch operations.

Change-Id: I8f1e7c7244726fa11c841023dec186553747a6b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-06 17:03:18 +00:00
Friedemann Kleint
eb5994df13 tst_QWidget::multipleToplevelFocusCheck(): Avoid overlapping
The test showed flakyness on Linux. It has been observed that its
windows overlap. Position the windows beside each other.

Change-Id: I4ff1b9cafaf753a6844b3dfabb576a07f74b396a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-11-06 14:39:18 +00:00
Morten Johan Sørvig
5194817941 Cocoa: optimize backingstore flush on 10-bit displays
Qt draws the backing store to the window using CoreGrahics,
which will trigger a slow RGB32 -> RGB64 conversion
when the output display is a deep color display.

Disable NSWindow dynamicDepthLimit and force the depthLimit
to WindowDepthTwentyforBitRGB for the common case of
8-bit-per-component raster surfaces.

This was benchmarked by resizing a simple QRasterWindow
test case which fills the window area using QPainter::fillRect().

Before:

67.1%  rgba64_image_mark_rgb32
10.8%  __vImageCopyBuffer_block_invoke
6.0%   madvise
5.0%   _kernelrpc_mach_vm_deallocate_trap
4.1%   qt_memfill32(unsigned int*, unsigned int, int)

After:

30.7%  __vImageCopyBuffer_block_invoke
20.3%  madvise
12.3%  __vOverwriteChannelsWithScalar_ARGB8888_block_invoke
12.2%  qt_memfill32(unsigned int*, unsigned int, int)
4.6%   _kernelrpc_mach_vm_deallocate_trap

The test program now spends significantly more of its
time allocating/deallocating the backing store (madvise),
and running the Qt paint event (qt_memfill32).

Task-number: QTBUG-47660
Change-Id: I878be7a0e6eee4ad798f7a53f7f9f79b7950af26
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-11-06 14:31:53 +00:00
Allan Sandfeld Jensen
7df4dcff2c Fix memory corruption on scaled emojis
Bitmap glyphs are returned prescaled, which means we should include
the transform in their bounding box.

Additionally painting them should stick the smallest rect to avoid
writing outside the allocated area, and assert in debug builds.

Task-number: QTBUG-64239
Change-Id: I5f877d36566891323f528018f910798344ba4ce2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-11-06 14:03:44 +00:00
Friedemann Kleint
c8fa698e99 tst_QNetworkReply: Blacklist ioHttpRedirectPolicy for Linux
Task-number: QTBUG-62583
Change-Id: I9723a465f1d36aec823ce3459fd03b9492a3b778
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-06 13:12:29 +00:00
Ulf Hermann
525f8516c2 Remove qml-debug configure flag and feature
The feature belongs to qtdeclarative and will be added there.

Change-Id: I2faf89f6caf841958e60efed8ff3882e530f0720
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-11-06 11:37:05 +00:00
Edward Welbourne
d46412665f Remove some unnecessary namespace prefixing
QWinTimeZonePrivate is based on QTimeZonePrivate, so can reference its
members without prefix.

Change-Id: I7b6bc33f70c4a497ec0caf897d48886a21f8fd65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-06 09:54:45 +00:00
Edward Welbourne
90a78c9724 Fix typo in tst_QTimeZone::testEpochTranPrivate()
The milli-seconds since epoch value for an invalid transition is,
of course, invalidMSecs(), not invalidSeconds().
Added a comment while I was at it, explaining why we expect a
transition before the epoch, if such transitions are supported.

Change-Id: I0f376f9d69c0e6e79a309dc011943baa41175135
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-06 09:54:20 +00:00
Liang Qi
8e860f836b Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2017-11-06 14:25:20 +00:00
Ulf Hermann
1a0b4b9f26 Modernize use of 'http' feature
Exclude QHttp(Multi)Part from being built if http is disabled, and
replace the exclusion macros. Use the qmake project files to exclude
source files, and QT_REQUIRE_CONFIG(http) in headers.

Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-11-06 09:39:57 +00:00
Robert Loehning
3e5dde4766 Testlib: Fix developer-build with clang 4
"implicit conversion increases floating-point precision: 'float' to
'double'"

Change-Id: Id6f4315316e63c849f1a5ddb6c77abc2bab0b2a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-11-06 08:45:37 +00:00
Gatis Paeglis
ba3a26ea9f mouse handling: fix issue when mixing QTest::mouse* APIs
... that become apparent after switching qtestlib to use enhanced mouse
event (a37785ec76). With the old code path,
where QGuiApplication was deducing event type it would deduce mouse release
event even when there wasn't one. The new code path doesn't do that, which
revealed an obscure problem when mixing QTest::mouse* APIs (where QWindow
overload goes through QWindowSystemInterface API and QWidget overload goes
through QApplication::notify() and sets mouse_buttons from there). What
happened in this specific test case "./tst_qtreeview selection statusTip" was:

// tst_QTreeView::selection sets mouse_buttons = Qt::LeftButton from QApplication::notify
QTest::mousePress(widget, Qt::LeftButton, ..)

// tst_QTreeView::statusTip
QTest::mouseMove(window, )

The old code path sees that position and state has changed, creates a fake
mouse event, which gets deduced as mouse release even if there wasn't one.
And by luck this happened to set mouse_buttons=Qt::NoButton. So when we use
mouse_buttons later to create QMouseEvent everything works as expected. With
the enhanced mouse we don't clear the pressed button from mouse_buttons (set
in tst_QTreeView::selection) as this is done only from press/release events,
then pass it to QMouseEvent and later because of that QApplicationPrivate::
pickMouseReceiver() returns nullptr.

The fix here is to use e->buttons when constructing QMouseEvent, instead of
relying on mouse_buttons which gets changed from various places and has other
issues that can not be solved without invalidating the current documentation
of QGuiApplication::mouseButtons() (e.g QTBUG-33161). Tests and any Qt code
in general should avoid using the fragile QGuiApplication::mouseButtons() API.
This patch does not affect the old code path (it continues working as before)
and fixes the issue described above for the enhanced mouse API. The enhanced
mouse API actually is better in a way that it does not get affected by button
state from test functions that run earlier, as opposed to the old code path
where every subsequent test function uses mouse_buttons in whatever state it
was left by the test functions that run earlier.

Not relying on mouse_buttons when creating QMouseEvent helped also to discover
other logic error. This caused an in incorrect button state for a mouse move
event that is generated for a release event that simultaneously changes a mouse
position.

Task-number: QTBUG-64043
Change-Id: I6ad8e49d8437ab0858180c2d0d45694f3b3c2d60
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-11-05 17:36:08 +00:00
Thiago Macieira
ed48a03b21 QSysInfo: add a function that returns the boot ID
[ChangeLog][QtCore][QSysInfo] Added machineUniqueId() and
bootUniqueId().

Task-number: QTBUG-63425
Change-Id: I0b48fc8e90304e0dacc3fffd14e91064020d165b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-05 18:34:09 +00:00
Thiago Macieira
16fba4a28f QSysInfo: add a function that returns a somewhat permanent unique ID
We can use the D-Bus / systemd machine-id file (which is a UUID without
the dashes) on systems with D-Bus. On Windows, there's a value in the
registry that is filled when Windows is installed, like on Linux. For
BSD systems, the kernel has a UUID we can use too, so extract that.

Task-number: QTBUG-63425
Change-Id: I27eaacb532114dd188c4ffff13d32f2e3c1d74bb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-05 18:34:07 +00:00
Allan Sandfeld Jensen
dfbf5a7779 Cleanup of qcompositionfunctions
Remove long unused preload defines, make sign of alpha more consistent
and use the RGB64 define structure more.

This is preparing for trying to unify the declarations in case we need
a third form with floating points for HDR.

Change-Id: I47fc283aff1fe31a1eaba17e0413bc1e722f6a06
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-11-05 18:20:15 +00:00
Liang Qi
a7e4b645dc Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/corelib/global/minimum-linux.S
	src/network/access/qhttpthreaddelegate.cpp
	src/widgets/kernel/qwidgetwindow.cpp

Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
2017-11-05 18:02:18 +01:00
Tony Sarajärvi
b5b1e1036f Extend blacklisting in qnetworkreply
While removing insignificant flag in commit
38a0909d4e and blacklisting
autotests that still failed, qtbase builds didn't
verify VS2017. That broke qt5 builds which do build VS2017.

Task-number: QTBUG-64264
Change-Id: I5fdfa5dac6192f449a05146a9a422e428a710c84
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-11-05 16:03:09 +00:00
Eirik Aavitsland
e45ffd7bf6 Xinput: Avoid misdetecting certain trackballs as tablets
The algorithm triggers on the word "cursor" in the device name, which
would also happen for devices from the manufacturer Cursor Controls.

Task-number: QTBUG-48034
Change-Id: I9645c0d0bc1fa951d0ea00480572fd0df0220eb5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-11-05 16:02:47 +00:00
Jesus Fernandez
d2b8a01ab0 Fix indentation
Tabs and white spaces were mixed.

Change-Id: I498944334b68b5c23a61e6f4ba6a0e8df77799c6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-05 07:06:29 +00:00
Jake Petroules
cd542a82b0 Remove references to obsolete platforms
ultrix and reliant have not seen a release since 1995. dgux not since
2001. bsdi not since 2003. irix not since 2006. osf not since 2010.
dynix... unclear, but no later than 2002. symbian needs no mention.
All considered obsolete, all gone.

sco and unixware are effectively obsolete. Remove them until someone
expresses a real need.

Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-05 06:33:53 +00:00
Gabriel de Dietrich
385589ef45 QCocoaMenu: Attach menu items when updating the menubar
Instead of waiting for the menu delegate to update each item,
we can attach an NSMenu to its NSMenuItem as soon as we update
the current window's menubar. This is safe to do because we
know that this is going to be the main menubar right after, so
we're not orphaning any NSMenuItem from its NSMenu at the wrong
moment.

By doing this, we also ensure that all menus from the active
menubar are reachable by the key-equivalent dispatching logic,
even before we display the actual menu.

This was shown in BigMenuCreator where, under the menubar's ASP
and SAP menus, all A*S submenus would be disabled. Furthermore,
on the same menus, SAP would show the same issue.

Added test in Menurama as well.

Change-Id: If6e7311072e6b53ad1cbced73623d1832aa0df8e
Task-number: QTBUG-57076
Task-number: QTBUG-63712
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-05 01:39:30 +00:00
Robert Szefner
b35a27676b QPSQL: Fix check for minimum supported PostgreSQL version
According to Qt documentation http://doc.qt.io/qt-5/sql-driver.html#qpsql
minimum supported version of PostgreSQL is 7.3

Change-Id: I30cffaddc29fd56b534bfd259cc235ea1204a21f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-04 20:58:18 +00:00
Robert Szefner
ff914ea59c QPSQL: Fix handling binary data for PostgreSQL 9.x and later
Set byte_output to 'escape' mode for server version 9 and later,
no matter what version of client library we use.
Since setting byte_output doesn't depend on client version anymore,
we can move it to separate function.

This fixes qtbase\tests\auto\sql\kernel\qsqldatabase
tst_QSqlDatabase::psql_escapeBytea() test
(before this change test did not pass on PostgreSQL 9.6)

Change-Id: I37aaa18267d7e6459c00010ed899536c01e8124e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-04 20:58:08 +00:00
Robert Szefner
435c4b2ccb QPSQL: Fix detection of PostreSQL version 9.x and later
Fixed parsing version string for PostgreSQL.
PostgreSQL versioning changed since version 10, see link:
https://www.postgresql.org/support/versioning

Extended QPSQLDriver::Protocol enum for PostreSQL 9.x and later,
added underscore to item names to separate major and minor version.
Changed long switch-case statements to if-else.

Change-Id: Ib19ae7ba426f262e80c52670e7ecb3532ff460a0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-11-04 20:57:42 +00:00
Gatis Paeglis
ad36da8ff4 testlib: start sharing common helper functions
... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This
header file is a convenient staging area for helper APIs, eventually
some could be moved to public QTest API.

This header file utilizes the same pattern as other qtestlib header
files - wrapping functions with QT_${LIBNAME}_LIB to automatically
enable certain APIs based on what is in the projects dependencies,
e.g. QT += widgets.

Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-04 20:11:22 +00:00
Gatis Paeglis
01f5f77c66 tests: skip tst_QMenuBar::check_cursorKeys* on Unity
This test is flaky on Unity due to regression introduced by QTBUG-39362.
Skip the test functions until QTBUG-39362 is resolved.

These test functions do not fail on Gnome and KDE, so the functionality
tested by check_cursorKeys* will be covered by other linux distributions
in CI.

Change-Id: Ifd1a7779a9728142424f4956dd6466c822ccde91
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-11-04 20:11:14 +00:00
Tor Arne Vestbø
8ba1f91d4e macOS: Add logging of screen add/remove/changes
Change-Id: Ic9c9ac307441dde98bb43d656466a03805746917
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-04 16:46:09 +00:00