Commit Graph

31679 Commits

Author SHA1 Message Date
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
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
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
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
Liang Qi
77e71dac16 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-13 19:45:20 +00:00
Joerg Bornemann
70e772079f Fix parsing of the /utf8 MSVC compiler flag in VS project generator
Adding the /utf8 compiler flag resulted in undefining all preprocessor
symbols for VS project files, because the ingenious compiler option
parsing logic checked for a 'u' prefix, and "utf8" obviously matched.

The /utf8 flag is added to the additional options, because there doesn't
seem to be an XML tag for that.

Task-number: QTBUG-59431
Change-Id: I762fcdcf6caf0606b40633861e265df5edb4a9c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-13 16:43:21 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Olivier Goffart
16d1ddfc42 moc: Support signals that return movable-only type
By adding std::move where it makes sense.
This is not only good for move-only types, but for any type which
can be moved as it saves copies of the return value in any case.

[ChangeLog][moc] Move-only types are now supported as return types
of signals and slots.

Change-Id: Idc9453af993e7574a6bddd4a87210eddd3da48a9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-13 11:03:47 +00:00
Eirik Aavitsland
0d287500be xpm image format: Reject corrupt images with invalid header info
The xpm handler did not properly check that the information read from
the file header was sane.

Task-number: QTBUG-59211
Change-Id: I84099777a16b2b0c473d139f5fdec1d0cb5d515e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-13 11:15:17 +00:00
Ulf Hermann
2f10a6f04e Suppress -Wfloat-equal when defining float16 equality operators
Change-Id: Ie30fa13eb5f8eb44f0c9c21e9483c8aba40cec02
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-13 11:00:27 +00:00
Allan Sandfeld Jensen
13cfa3c88b Clean-up QRgba64 constructors
We can add basic constructors now on all supported platforms, and can
make initialization consistent on all platforms, choosing undefined
as the default.

Note this changes behavior on gcc and clang builds, but is consistent
with pre-c++11 gcc and clang builds and with msvc.

[ChangeLog][QtGui][QRgba64] The default constructor on Clang and GCC
 builds now no longer initializes with 0s, but leaves the value
 uninitialized. This is consistent with MSVC behavior and pre-C++11
 behavior of GCC and Clang.

Change-Id: Ib0e3d7f4274a13a768db62931b67877e3898945e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-13 10:46:29 +00:00
Olivier Goffart
8c0194f763 moc: put the QPrivateSignal argument in the arg array
Even if it is normaly not used, templated code might still try to access it

Task-number: QTBUG-59414
Change-Id: I9f7aadd714843059c8f89cdac48c60a3e2ca7294
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-13 10:28:42 +00:00
Sze Howe Koh
d8a123841c Doc: Add links to the signal-slot syntaxes page
Change-Id: I5443a09d18ada6de16a5cec503523b7cc284b0dc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-13 09:34:58 +00:00
Marc Mutz
b950d9b10f QGuiApplication: fix QString comparison
The code compared a QString* with a QString, which only compiled
because the QStringRef(const QString*) ctor was implicit. We're going
to fix that, and it's nice to see that the change exposes bugs like
this one.

The fix is to deref the QString* argument, which we know from previous
checks to be non-nullptr, to enable normal QString/QString comparison.

Change-Id: Idc7b214cb26e8b7c18ee1ba0a2b7236f814f0810
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-13 09:11:32 +00:00
Stephan Binner
d08deb0b4a Add feature.abstractbutton
Change-Id: Ie93c6d0a8256bc466d3419408b753d5f3738aa6b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-13 08:57:54 +00:00
Vikas Pachdha
f06f1adb6c Add QMake variables for development team and provisioning profile
Adding both development team and provisioning profile to Xcode
switches off the automatic signing

Task-number: QTBUG-38782
Change-Id: Ic869e16490c11e369b6674c815e860cac66c5afa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-13 06:42:15 +00:00
Marc Mutz
75f5e2bef2 Deprecate QString::null
It's a Qt 3 compatibility vehicle, and as such inherits the now-alien
property to distinguish empty and null strings. Particularly worrisome
is the following asymmetry:

   QString("") == QString::null          // false
   QString("") == QString(QString::null) // true

Instead of fixing this behavior, recognize that people might use it as
a weird way to call isNull(), albeit one that once was idiomatic, and
simply deprecate everything that deals with QString::null.

[ChangeLog][QtCore][QString] QString::null is now deprecated. When
used to construct a QString, use QString() instead. When used to
compare to a QString, replace with QString::isNull().

Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2017-03-12 17:41:16 +00:00
Oleg Yadrov
63a39927a0 QMacStyle: fix QTabBar tab size
A few small visual issues were introduced during recent QTabBar
restyling (see 175f33ed85)

Change-Id: Ifab8b9f24e2cad6e1a827b1061471882a1bc9f5e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-11 04:33:48 +00:00
Topi Reinio
df40b1115d Doc: Ignore QT_SYSINFO_DEPRECATED_X
QSysInfo has a customized deprecation directive that QDoc needs to
ignore to generate documentation for the deprecated functionality.

Change-Id: I1c378f14a2f842f1e9a55614d43fe509bb77fd89
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-10 08:00:58 +00:00
Thiago Macieira
ef26467eb2 Reintroduce a directed QMetaType::typeName array
Commit fb376e0fcc removed an array that
facilitated returning the names of built-in types, to avoid the jump tables
from the switch statement. This commit brings it back but makes the array a
compile-time constant string offset table.

The array is created by way of a set of C++11 constexpr functions, so we
require that compiler feature. I've tested that MSVC 2015 does support
it as well as the ICC 17 when masquerading as MSVC 2015, so I've enabled
for that too. The only compiler left out is MSVC 2013.

If we didn't need to support MSVC 2015, this could have been written
more simply with C++14 relaxed constexpr.

This also adds unit tests to confirm that QMetaType::typeName() does
return null when we said it would. We're testing QMetaType::User-1
(which we'll likely never use) and QMetaType::LastWidgetsType-1 to
select something inside the range of the built-in types.

Task-number: QTBUG-58851
Change-Id: I4139d5f93dcb4b429ae9fffd14a33982891e2ac1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-09 14:56:35 +00:00
Paul Olav Tvete
f8218637e9 Build fix for -no-feature-slider
Change-Id: Ibd7d0c2182c6a11f6d595b6d1015ee7de2d35866
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-09 10:51:42 +00:00
Oleg Yadrov
175f33ed85 QMacStyle: update QTabBar style
Task-number: QTBUG-58266
Change-Id: I135e4dae44e2e97d73b7c7c97d8e682bcf459d75
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-08 18:39:01 +00:00
Olivier Goffart
5675334b6e moc: Add support for C++17 nested namespaces (N4230)
[ChangeLog][moc] Added Support for C++17 nested namespaces

Change-Id: Ib83fc5bf48f66546fa97b49710582fbf9c984503
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-08 17:34:38 +00:00
Olivier Goffart
11d60dcad6 moc: Fix parsing of digit separator
[ChangeLog][moc] Fixed parsing errors in presence of
C++14 digit separators.

Task-number: QTBUG-59351
Change-Id: Iea38ea7388853d84b819c2beb78a59371f57bf7d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-08 12:34:12 +00:00
Stephan Binner
b53d7664c9 Add feature.abstractslider
Change-Id: Ib5d0186162fc3b750e6440c74b1181787093ef97
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-08 12:05:43 +00:00
Topi Reinio
cf7d3b524d Doc: QSizePolicy: Fix documentation warnings
warning: Can't link to 'controlType()'
warning: Can't link to 'horizontalPolicy()'
warning: Can't link to 'verticalPolicy()'

Change-Id: I6b31acebf183defee7b4ab36976034ed4a3fc98a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-08 11:11:54 +00:00
Kai Koehne
8d11df83d4 Document QT_DEPRECATED_WARNINGS
Task-number: QTBUG-58468
Change-Id: I0f822c2dd14878d70b74ddd2db89b11ba54f687b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-03-08 09:45:09 +00:00
Allan Sandfeld Jensen
2e6ec59d47 Avoid QRgba64 arrays in the generic text-rendering routines
Like in other functions, allocate arrays of quint64 instead of QRgba64
to avoid the cost of initializing large arrays on every small scanline.

Change-Id: Ie132b3157003a18a444ca5c4f94ae668d17327fd
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-03-08 09:45:05 +00:00
Timur Pocheptsov
075e669cbe QHstsPolicy: Replace bool with QFlags
As pointed out in the previous code-review:

Replace a bool ctor parameter with QFlags<enum> to conform to
Qt API Design Principles (Boolean Parameter Trap).

Since the bool with its many unwanted implicit conversions is
gone from the ctor parameter list now, drop the explicit
keyword again. It was requested because of the boolean parameter
in the first place.

Change-Id: Ibaf287a6a3e38c22f033fd5d9e024c54f30a1fd4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-08 09:42:01 +00:00
Jocelyn Turcotte
8afc6146be Windows QPA: Better recover from removed screens when fullscreen
QWindowsWindow::handleResized would call isFullScreen_sys which checks
if the window's screen geometry matches the one of the window. When
switching back from fullscreen, Windows will have set the geometry to
fill the next window, but we don't switch QScreen until later in that
function, inside handleGeometryChange. This would result in our window
to take the whole screen geometry, but the FullScreen state wouldn't
be transferred to the new screen.

Fix the issue by using screenForGeometry and check if we are fullscreen
on any screen.

Also make sure that we check the validity of m_savedFrameGeometry when
restoring after a screen remove, since we would previously restore to an
area not covered by any screen anymore.

Change-Id: I43bc02738007918e9a26c1d27a699c51d3365034
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-08 09:23:44 +00:00
Paolo Angelelli
40ace7a2a0 Fix computegles31 example
This patch fixes the example that contained problems showing up
with mesa/nouveau drivers.

Change-Id: Ic90f6028e394138781f00bcc00c145c56134f441
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-03-08 09:19:39 +00:00
Friedemann Kleint
535b142393 QWidgetWindow::event(): Call base implementation for QEvent::WindowStateChange
The base implementation takes care of updating visibility and emitting
signals.

Task-number: QTBUG-59313
Change-Id: I270b37c894420902488d89dc0c79f4c12b8d9a29
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-08 09:04:03 +00:00
Andy Shaw
32463399f7 Add documentation for QMAKE_LINK variable
Change-Id: I39f11f42750c705feabf5e1a87bcd277693af1fb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-08 07:56:29 +00:00
Marc Mutz
da730c90a3 QStyleSheetStyle: introduce class Tampered<QPalette|QFont>
... as a replacement for two QPairs and move some common
QFont/QPalette functionality into it.

Change-Id: Iaab92130dd54eaa7900ac2048014a80cbd04bfb6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-08 07:19:53 +00:00
Thiago Macieira
3a1f4b186d Stop trying to discover the system timer resolution on Windows
Let's take the beginning of the description: WaitForSingleObjectEx can
be up to 16 milliseconds early. This is proven by the fact that there
are tests doing:

    wait(waitTime);
    QVERIFY(timer.elapsed() >= waitTime - systemTimersResolution);

and failing.

Task-number: QTBUG-59337
Change-Id: Iae839f6a131a4f0784bffffd14a9a79523d69d94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-08 05:52:47 +00:00
Samuel Gaist
2d81968c3b Example: migrate treemodelcompleter example to use QRegularExpression
Update the treemodelcompleter example to use the new QRegularExpression
class in place of the deprecated QRegExp.

Change-Id: I9fa91ca6e847603de37019e4ca86fc69a51a3772
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-07 23:11:31 +00:00
Samuel Gaist
9e933de7f2 Example: fix memory leak in relationnaltablemodel example
The example creates a view on the heap but doesn't delete it on
application end. This patch uses a QScopedPointer to fix that.

Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-07 23:11:20 +00:00
Nikita Krupenko
895b4e6f89 Enable QStyleHints::useHoverEffects for KDE and other unix systems
By default, it enabled only for Gnome

Task-number: QTBUG-59298
Change-Id: Ib44f52b3175ed1904f24ec9e21f00ea3f3334287
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-07 15:22:17 +00:00
Joerg Bornemann
a12a3c6c8c Fix MSVC Makefiles when SOURCES is empty
Call sites of NmakeMakefileGenerator::writeResponseFileFiles expect that
the output is terminated with '\n'. Do not bail out if files is empty.

Task-number: QTBUG-59305
Change-Id: Id3fef8dbc506dad1868e6b352119f5f27b50a368
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 13:54:57 +00:00
Thiago Macieira
e7295c959b Add -Wfloat-equal to Qt's header clean check
Task-number: QTBUG-57649
Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-07 10:51:54 +00:00
Andy Shaw
7eb11df19e Don't call releaseKey a second time if the insertion fails
When the insertion into the cache fails then it will delete the entry
for us which already calls releaseKey(). So we should not call it a
second time.

Task-number: QTBUG-58259
Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-07 08:15:54 +00:00
Sze Howe Koh
58cc126def Doc: Replace std::bind() with lambdas in Qt Concurrent
Lambda functions provide all the benefits of std::bind() plus more

Change-Id: Iec30b20bb35ac0fae560435b323f80af2f2e5fce
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-07 04:35:23 +00:00
Giuseppe D'Angelo
9390c44338 QtXml: add some missing Q_DECLARE_TYPEINFO
Change-Id: I4b58aad1c337fe5fdfb70eb517a66b15a34dffc4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-07 01:55:44 +00:00
Jake Petroules
c0af8cef2f Don't pass -headerpad_max_install_names when using Bitcode
It is ignored (and is unnecessary to begin with) in that case,
and emits an annoying warning which this patch silences.

Change-Id: I6059969724b203d6e0e2eea81ad3e3e8f8d536d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 01:05:16 +00:00
Stephan Binner
00e6863552 Add feature.pushbutton
Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:35:07 +00:00
Stephan Binner
0884e42410 Add feature.checkbox
Change-Id: Ib387390b796c3cab6de4ce94e0d217280a300df8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:34:58 +00:00
Stephan Binner
5c62fd9a2e Add feature.dialogbuttonbox
Change-Id: I8c136024c3bf431529033a806be646d867919daa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:34:42 +00:00