Commit Graph

31807 Commits

Author SHA1 Message Date
Oswald Buddenhagen
28e9867a3c don't try to timestamp injected qvulkanfunctions.h
the target of the injected forwarding header doesn't exist at qmake
time, as it is generated by an extra compiler, so the touch() calls in
qt_module_headers.prf would fail.

the error scenario described in ce942a226 is not applicable to
gui/vulkan, as no bootstrapped modules are involved. therefore, we can
just suppress the timestamping.

Change-Id: I1c9b6fcdf3717069fdbb654e3cb5d73b199192f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-22 15:49:19 +00:00
Laszlo Agocs
1d647a22f3 xcb: Fix embedded Vulkan windows
Widget windows choose a visual via the GLX or EGL path. Vulkan windows
use the default, simple visual chooser. When having a parent, the
different visuals can cause a BadMatch. Avoid this by taking the parent's
visual.

This way the hellovulkanwidget example is now functional on xcb as well
(tested on Jetson TX1 with L4T 24.2).

While we are at it, stop forcing RGB888 in the format, unless nothing
was set.

Change-Id: I39ab87e3219c04d4f547325d13d4873d70564411
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:41:10 +00:00
Laszlo Agocs
a653669b20 Add license attribution for vk.xml
Same license as the existing OpenGL stuff.

Change-Id: I6d0a77a7213f496971b5c3a8676dedb8e4377ceb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:41:03 +00:00
Laszlo Agocs
8d72aba9e3 Introduce QVulkanWindow
A convenience subclass of QWindow that provides a Vulkan-capable
window with a double-buffered FIFO swapchain.

While advanced use cases are better served by a custom QWindow
subclass, many applications can benefit from having a convenient
helper that makes getting started easier.

Add also three examples of increasing complexity, and a variant that
shows embeddeding into widgets via QWindowContainer.

[ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of
QWindow.

Task-number: QTBUG-55981
Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 15:40:57 +00:00
Robin Burchell
66e162e8f1 QImageReader: Pass up information about resource errors on open
If a system runs out of FDs, there is no sense in trying to autodetect
the format - as the real problem is the lack of FDs, not the
non-existent file.

Change-Id: I3302340859c3cc62995ac1b7b3c7b6e6326cb43e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-03-22 15:40:55 +00:00
Laszlo Agocs
108956b53e Fix up QVulkanInstance docs
Remove HTML tags.
Fix notes that predate the introduction of deviceFunctions().
Add a note about the function wrappers being auto-generated.

Change-Id: If99022ce74313c6bb33c3bb7bd6840b6cf26b3be
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-22 08:53:24 +00:00
Thiago Macieira
ceb859bf03 Implement a counted QT_FATAL_WARNINGS
[ChangeLog][QtCore][Logging] If you set QT_FATAL_WARNINGS to a number
greater than 1, Qt will stop the application at that nth warning,
instead of on the first one. For compatibility reasons with previous
versions, if the variable is set to any non-empty and non-numeric value
different from 0, Qt will understand as "stop on first warning".

Change-Id: I0031aa609e714ae983c3fffd14676f1826f34600
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-21 18:46:46 +00:00
Gabriel de Dietrich
6445aa4b06 QCursor: Add equality operators
[ChangeLog][QtGui][QCursor] Added equality operators.

Change-Id: Iedeab4673b2a77ad2e51a0d50297b12bba3b9505
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-21 17:22:41 +00:00
Olivier Goffart
464c0a5824 Windows QPA: Fix MinGW developer build
Fix warning:
qwindowswindow.cpp: In member function 'void QWindowsWindow::setWindowState_sys(Qt::WindowStates)':
qwindowswindow.cpp:1965:74: error: suggest parentheses around arithmetic in operand of '^' [-Werror=parentheses]
             if ((newState & Qt::WindowMinimized) && (oldState ^ newState & Qt::WindowMaximized))

This is actually a real bug. What was meant was to check if the Maximized flag
was changed.  This code path is for the case in which the windows becomes
minimized, and the maximized state changed.

Amends change a02959bb5b.

Task-number: QTBUG-57882
Change-Id: I1cd32a7080240e4462d3cd4f129c6c1a08409996
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-03-21 07:08:47 +00:00
hjk
5707528be0 Use fromUtf8() instead of fromLatin1() for QT_RESTRICTED_CAST_FROM_ASCII
The change does not change legally observable behavior as the result
of using QT_RESTRICTED_CAST_FROM_ASCII is only defined for (a part of)
the 7-bit range where Latin1 and UTF-8 are the same.

This change does not intend to lift the 7-bit restriction on string
literals for which the use of QT_RESTRICTED_CAST_FROM_ASCII is
well-defined even though in practice it works now for any UTF-8,
which is the presumed encoding outside that range nowadays.

Change-Id: If9a4199235396a43f8f26d7591907b21120823ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-21 06:37:12 +00:00
Alexander Volkov
8a3e8856e5 qmake: Add test functions for comparing version numbers
qmake really lacks version comparing functions:
users either use ugly constructions to compare versions
by components, such as
greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4):
or even incorrectly compare versions as strings:
!lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"):

Add test functions versionAtLeast and versionAtMost which use
QVersionNumber to compare version numbers by components.

Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 21:56:01 +00:00
Thiago Macieira
b71b8ff283 headersclean: Move it from MSVC 2013 to all MSVC versions
Our headers ought to be clean in all compiler versions.

Change-Id: I4a7dc1fe14154695b968fffd14aba9ff9995c618
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 21:54:14 +00:00
Liang Qi
dd613e65ea Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-03-20 10:56:29 +00:00
Friedemann Kleint
62c7ca2de3 Windows QPA: Fix compiler warning when Vulkan is not present
qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)':
qwindowsnativeinterface.cpp:104:12: error: enumeration value 'VulkanSurface' not handled in switch [-Werror=switch]

Amends  f1a23a5467.

Task-number: QTBUG-55981
Change-Id: Ie9bf396ab8ea1be505abfaffd5d603bb3856c089
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-20 10:54:40 +00:00
Anton Kudryavtsev
bf9a1cf939 Use new QStringList::contains(QL1S)
... to reduce text size by replacing QStringLiteral with QL1S.

Change-Id: I8166282d915f081ba816989039451466ec29e208
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 08:33:50 +00:00
Liang Qi
ae2695535a Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qfilesystemengine_win.cpp
	src/gui/text/qdistancefield.cpp
	src/plugins/platforms/xcb/qxcbconnection.h

Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
2017-03-20 09:00:44 +01:00
Anton Kudryavtsev
1dc4c3817b QStringList: add contains(QLatin1String) overload
... to avoid the expensive conversion from QString to QL1S.

[ChangeLog][QtCore][QStringList] Added contains(QLatin1String) overload.

Change-Id: Ie75839ce9e46e03fe5155a02c7dcf00277b95c8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 06:16:59 +00:00
Anton Kudryavtsev
8066ae4943 QFactoryLoader: use QStringLiteral more judiciously
Replace it with QL1S in overloaded functions.
Saves some text size.

Change-Id: Ie1436a787fb3052157880234ca180fefce5a8412
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-19 19:38:57 +00:00
Allan Sandfeld Jensen
715fd425ef Split fetchTransformedBilinear and fetchTransformedBilinear64
Split out basic fetching to share it between the two.

Change-Id: I6c27a7cea3a5c10b511232edc68bd32490514a27
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-03-19 11:56:26 +00:00
Laszlo Agocs
c1a2f97a3b Set default fbo redirect correctly for QOpenGLWidget viewports
Task-number: QTBUG-59318
Change-Id: Icf2ea4e5ebdeec31750edc8b34a9b9f6bfb64744
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-18 17:37:45 +00:00
Serge Lysenko
9ef14bcc3a Fix Windows DnD: Wrong qApp mouse buttons state after external DnD
An QApplication::mouseButtons() value could stay outdated after external
DnD operations, e.g. dragging an object outside Qt application or vice
versa. Also user can cancel DnD with Escape key.

Task-number: QTBUG-55885
Task-number: QTBUG-59539
Change-Id: Ia6deb4ae5ccfe77e6d6c2464de40cd06fc71f9b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-18 17:08:42 +00:00
Oleg Yadrov
38a55c7813 QCocoaWindow: fix geometry issue when only minimumSize is set
When only minimumSize was set and it matched to the size NSView was
created with, viewDidChangeFrame() was not called for the window and
it's internal geometry value was still (0, 0) what led to unpleasant
side effects such as QML content was not displayed until something
caused an update.

Task-number: QTBUG-58963
Change-Id: Ib12d36d405969971e7ff62b79b50c3d78928a649
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-03-18 16:42:01 +00:00
Anton Kudryavtsev
949bce97d0 QString: de-deplicate code of leftRef, rightRef, midRef
Re-use methods of QStringRef.

Change-Id: I5ff719c08c54246e9cafd4f9aa0823ff6df8433b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-18 06:51:24 +00:00
Allan Sandfeld Jensen
6cd8a90d29 Include missing errno.h
Fixes linux-clang-libc++ builds.

Change-Id: Id75c35d858123193e7d29b0bbb113d2c109a7560
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-18 00:50:37 +00:00
Olivier Goffart
7eeb88a5cd When changing screen, only update the font if dpi has changed
Generally, this might avoid unnecessary work in a quite common case.

But if high dpi scaling is set, the dpi (in logical pixels) does
not change. However this event is sent before
QGuiApplicationPrivate::processWindowScreenChangedEvent has had
time to change the geometry, and might cause a problem in QMenu

Amends f3a4b4258f.

Task-number: QTBUG-59484
Change-Id: Ie4ceedcb0754613cf239ae86b225c4139b70d0cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-17 23:14:09 +00:00
Marc Mutz
93a4bf5c8b Blacklist also tst_QSemaphore::tryAcquireWithTimeout(2s)
It has started failing recently on the CI, too.

Task-number: QTBUG-58745
Change-Id: I4c8834917e6455d00c300549ed448b06da75d5bc
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2017-03-17 20:19:20 +00:00
Laszlo Agocs
f1a23a5467 Basic Vulkan enablers
For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10
with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and
Linux aarch64 with Tegra X1 (Jetson TX1, L4T).

Introduce QPA-based Vulkan library loader, core function resolver, and
instance creation support. In addition to creating a new VkInstance,
adopting an existing one from an external engine is supported as well.

The WSI specifics are hidden in the platform plugins. Vulkan-capable
windows use the new surface type VulkanSurface and are associated with
a QVulkanInstance.

On Windows VULKAN_SDK is picked up automatically so finding vulkan.h
needs no additional manual steps once the LunarG SDK is installed.

[ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan
graphics API.

Task-number: QTBUG-55981
Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-17 16:12:03 +00:00
Louai Al-Khanji
a512c9c2f7 QPixmap: move mask functions into QPlatformPixmap
These used to be in QPixmapData in Qt4, allowing platforms to override
mask handling. Useful when native 32-bit ARGB might not be available.

Change-Id: I1fcb77222ee4bc4705a8b4c614c9d5c3938c47ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-17 14:56:53 +00:00
Jesus Fernandez
346cd79192 Make QFile::open fail when using an invalid file name
Fixes the bug in QFile which allowed opening a file with reserved
characters in its name.  If the name is a long file path, CreateFile
opens a file with a truncated name instead of failing, so we have
to catch reserved characters ourselves.

[ChangeLog][Windows] Fixed a bug that caused QFile to create
files with truncated names if the file name was invalid. Now,
QFile::open correctly fails to create such files.

Task-number: QTBUG-57023
Change-Id: I01d5a7132054cecdfa839d0b8de06460039248a3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-17 11:06:43 +00:00
Marc Mutz
208c71768c QChar: add (char16_t) and (wchar_t) ctors
... for better std C++ integration.

[ChangeLog][QtCore][QChar] Added constructors from char16_t and, on
Windows, wchar_t.

Change-Id: I2d18ea3a37e869b8ea9f4036d7200d9d13c7d929
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-17 01:14:54 +00:00
Gabriel de Dietrich
99adabdb7e QNSView: Harden logic around platform window access
Some users have reported crashes in -[QNSView mouseEnteredImpl:]
which we believe are due to null m_platformWindow. The stack
traces are like the one below or similar:

    0 libqcocoa_dylib   QNSView                 mouseEnteredImpl_ 0x1F
    1 appkit            NSTrackingArea          _dispatchMouseEntered_ 0xA2
    2 appkit            NSApplication           sendEvent_ 0xF4D
    3 libqcocoa_dylib   QNSApplication          sendEvent_ 0x4E
    4 libqcocoa_dylib   QCocoaEventDispatcher   processEvents 0x184
    5 qtcore            QEventLoop              exec 0x19C
    6 qtwidgets         QDialog                 exec 0x20B

Moreover, since 2f505b79a4, that
member is a QPointer, so we should do more systematic checks.

Change-Id: Iced447515a4ae07a62734e587f5b08d46d313071
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-16 21:41:52 +00:00
Jeremy Katz
3e0355014e warn of blacklisted GLX OpenGL renderers and vendors
Notify users when multithreaded OpenGL is disabled due to the
renderer or vendor blacklist.

Change-Id: I16a80568afe87b227575102ca839f18050613e90
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-16 18:55:52 +00:00
Lorenz Haas
4351c2af45 Fix postgres notification subscription on LISTEN failure
Register a notification only if the LISTEN call was successful. This
behaves now like the UNLISTEN case: the notification is only unregistered
if the call was successful.

Change-Id: I2b18ec3a619fea5bed0a319013ad9df4b9e15456
Reviewed-by: Matt Newell <newellm@blur.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-03-16 17:41:41 +00:00
Marc Mutz
8ea27bb1c6 Make Q_ASSERT() usable in constexpr functions
We need Q_ASSERT in (C++11) constexpr functions, and the only way to
inject them in C++11 is to use the comma operator. E.g. in
QLatin1String:

    constexpr QLatin1Char at(int i) const
    { return assert(1 >= 0), assert(i < size()), m_data[i]; }

The main problem with our existing Q_ASSERT is that while it is a
ternary expression in active mode, it was a statement in passive
mode. This is easily fixed by dropping the do-while loop and leaving
just its parenthesized exit condition. Add a cast to void, too,
ensuring that Q_ASSERT has type void in both passive and active modes.

But even in C++14 constexpr functions, which accept several
statements, Q_ASSERT needs to have a path through its conditionals
that is constexpr, but neither qt_assert(_x) nor qt_noop() are
constexpr. Nor can they be in C++11 (no void returns in C++11
constexpr functions). I fixed this by replacing qt_noop() with
static_cast<void>(0). The void cast is required so both 2nd and 3rd
arguments to the ternary are void (mixing void and non-void branches
in the ternary is only allowed if the void leg is a
throw-expression[1]).

As a drive-by, adjust to style guide, remove overparenthesization and
reverse the conditional in the ternary.

Apply it to QLatin1String where we had the problem that constexpr
functions had a narrow constract.

[1] should probably be extended to any [[noreturn]] void function,
e.g. std::terminate().

[ChangeLog][QtCore][QtGlobal] Q_ASSERT() and Q_ASSERT_X() now always
expand to expressions of type void that are usable in constexpr
contexts. This makes them usable in both C++11 and C++14 constexpr
functions.

Change-Id: I09c396bc0034ac344cfaadc6f8cbeb1b7b0cbabc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-16 14:11:16 +00:00
Allan Sandfeld Jensen
3f0ceb91f8 Add lancelot test to exercise tiled non-ARGB32PM bilinear filtering
No test were hitting the code path for tiled non-ARGB32PM bilinear
filtered scaling. In part because we were only using brushes in pixmap
mode which are always converted to RGB32 or ARGB32PM.

Change-Id: Ib466567f31ce6ee894acdf484d44b3af62dad6fc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-03-16 13:46:17 +00:00
Olivier Goffart
a02959bb5b Make QWindow's windowState a QFlags of the WindowState
This reflects QWidget API, and restores some behavior from Qt4.
Some WM can have several state at the same time. On Plasma for example,
when a window is both maximized and minimized, the "maximized" checkbox
is checked from the taskbar entry.

The API of QPlatformWindow was changed to take a QFlag and the platform
plugins were adapted.

 - On XCB: Always send the full state to the WM. And read the full state.

 - On Windows: The code was originally written with '&' in Qt4, and was changed
   to == when porting. Some adaptation had to be made so the states would be
   preserved.

 - On macOS: Only a single state can be set and is reported back for now,
   with the possibly to expand this in the future.

 - Other platforms: Just do as before with the effective state.

Task-number: QTBUG-57882
Task-number: QTBUG-52616
Task-number: QTBUG-52555
Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-03-16 12:55:19 +00:00
Timur Pocheptsov
3e3defb5c3 Secure Transport - add a missing cipher
Secure Transport supports more ciphers then we can convert into QSslCipher.
This results in our tests failing, since after the successful SSL handshake
sessionCipher is 'unknown'. This patch adds missing AES256-GCM-SHA384 and also,
to make new cipher addition easier in future, sorts cipher suites as it's done
in CipherSuite.h (ST framework's header) - grouped by RFC they were introduced
in + sorted within their group.

As a bonus (thanks to Eddy for spotting this problem) - some copy & paste (?)
typos were fixed (mismatched names).

Task-number: QTBUG-59480
Change-Id: I61e984da8b37f1c0787305a26fc289e2e7c2b4ad
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-16 08:50:12 +00:00
Thiago Macieira
fb061e586d uic & rcc: use the public API to set the hash seed
Instead of relying on a private symbol exported from QtCore.

Task-number: QTBUG-47566
Change-Id: I4a7dc1fe14154695b968fffd14abd2b21a18203b
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-16 05:05:00 +00:00
Thiago Macieira
44f406ce95 Stop using sqlite3_enable_shared_cache: deprecated on macOS
qsql_sqlite.cpp:643:5: warning: 'sqlite3_enable_shared_cache' is deprecated: first deprecated in macOS 10.7 [-Wdeprecated-declarations]

https://www.sqlite.org/c3ref/enable_shared_cache.html says to use the
flag to sqlite3_open_v2()

Change-Id: Ib499cebaa4c4489b90b9fffd149d3d5bf9434ae5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-16 02:46:01 +00:00
Tor Arne Vestbø
5e18f4ce0b Skip tst_MacNativeEvents::testChildDialogInFrontOfModalParent()
Closing the dialog at the end of the test ends the modal session via
QCocoaEventDispatcherPrivate::endModalSession(), but the actual ending
of the session is deferred to cleanupModalSessions(), and that is never called.

The result is that QCocoaWindow::setVisible of the window in testKeyPressOnToplevel
and following tests ends up calling [m_nsWindow orderFront:nil]; instead of
[m_nsWindow makeKeyAndOrderFront:nil];, leaving the window inactive and the
tests failing.

Task-number: QTBUG-58474
Change-Id: If66b2e201f658b627c2ec50a562938f59a5037ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-03-15 13:51:41 +00:00
Filipe Azevedo
7f1a220ee4 Add support for recursive filtering in QSFPM
You can now use the recursiveFiltering property to recurse into
children to find potential matching children to filter in.

Change-Id: I411a2fb29489fd56b9c881b3e6b8d1860cce630c
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-03-14 21:34:37 +00:00
Olivier Goffart
29bcbeab90 Deprecate QSignalMapper
Does not make much sense now that we can connect to lambda functions

[ChangeLog][QtCore][QSignalMapper] QSignalMapper is now marked
as deprecated.

Change-Id: I89135f23fdf16b42142a125eb7c9a86084c90bfc
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-14 16:33:59 +00:00
Olivier Goffart
7ac100ddd1 tst_QObject: Test if the new connect style works with multiple inheritance
Change-Id: I638630ef84a3aee98688dac000efd3dfa7472175
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-14 13:55:36 +00:00
Liang Qi
0c034a649f Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/widgets/qpushbutton.cpp

Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
2017-03-14 10:52:24 +01:00
Shawn Rutledge
35c8a21fe4 QTabletEvent manual test: add quit shortcut
Change-Id: I73012ec2d02856e5bbbc27d269f89b3918dd7c2d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-03-14 09:11:59 +00:00
Shawn Rutledge
68009a7d43 QTabletEvent manual test: show keyboard modifiers
Task-number: QTBUG-59415
Change-Id: Ibb7ebc29797712535d82c6eb02c78dc28ad4131d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-03-14 09:11:54 +00:00
Shawn Rutledge
550d7930d1 xcb: send keyboard modifiers with every QTabletEvent
Task-number: QTBUG-59415
Change-Id: If64a6513131fd85189e3621cb2a105e80e919ecf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-03-14 09:11:44 +00:00
Marc Mutz
e83247a2b9 Do not assume QStringRef(const QString*) to be implicit
It won't be for very much longer.

Change-Id: I30e3e0cd8c8ecf0833f759557382a3ded7bdea34
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-14 05:42:08 +00:00
Jake Petroules
2162f01111 Remove some redundant code in QAction
Only 2 bits are needed to represent -1, 0, and 1 in a signed integer,
and !(n != -1) implies n == -1 so the second condition was redundant.

Change-Id: I200a17fe4e49ebc0eaa9a1988b4625267cef61a4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-14 05:29:27 +00:00
Jake Petroules
c2c3452ba5 Add new API to control whether shortcuts are shown in context menus
Shortcuts are universally not shown on macOS or mobile platforms, making
applications look very obviously out of place.

Windows and GNOME desktop environments almost never use them.

Only KDE appears to do so commonly; default accordingly.

Task-number: QTBUG-49435
Change-Id: Ieac4cee57b15a02be5258f3d07749af6316af62b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-14 05:29:22 +00:00