Commit Graph

36923 Commits

Author SHA1 Message Date
Thiago Macieira
9a04453b50 Fix the fix for mmap() overflow check
The code I introduced in 4ee7425794 only
dealt with systems that reasonably used a 64-bit off_t parameter. Turns
out that we don't turn on largefile support on 32-bit Android, which
meant that the fix caused a regression.

[ChangeLog][QtCore][QFile] Fixed a regression that caused QFile::map()
to succeed or produce incorrect results when trying to map a file at an
offset beyond 4 GB on 32-bit Android systems and on some special Linux
configurations.

Task-number: QTBUG-69148
Change-Id: I2c133120577fa12a32d444488bac3e341966f8d7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-25 12:40:04 +00:00
Paul Wicking
fdb780b897 Doc: Make reference to platform styles version agnostic
Remove platform/version specific reference to avoid outdated docs.

Task-number: QTBUG-64304
Change-Id: Ief9d5db95fa1f865fd826a6426b1621e81bdb6ce
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-25 10:46:00 +00:00
Oliver Wolff
41ed77e59b tst_qtextcodec: Use qt_test_helper functionality
The helper application is only needed for Unix platforms, so there is no
need to build it for other configurations.

Change-Id: I4ebb896c66d3ded016f72fdbe631ec2f1276db22
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 10:27:42 +00:00
Timur Pocheptsov
c575977645 Fix MSVC builds with /Zc:wchar_t-
208c71768 introduced a problem for our users, who build on Windows with
/Zc:wchar_t-, which makes wchar_t a typedef for the type 'unsigned short',
preventing them from switching to more recent versions of Qt. While MSDN
recommends against this option, we can add more #if-ery to avoid compiler's
bailing out on a constructor's redefinition.

Task-number: QTBUG-65101
Change-Id: I62a1d9b2572f3d4b1f70bcbc3e52e795b1944558
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-25 09:44:36 +00:00
Edward Welbourne
dcd35d13e0 Rework the start-of-time fileTimes() test to add another test-case
Turned it into a data-driven test, with the old start-of-time as one
row, in order to add a regression test for an alleged MS API bug in
Windows XP.

Task-number: QTBUG-12006
Change-Id: I632ecc854f50f4183a990c8a27826ede9bd20e55
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-25 09:21:42 +00:00
Friedemann Kleint
ad8a7f0c50 xcb: Fix build when xinput2 is not available
Fix the #ifdefs.

Amends 3bc0f1724a.

Task-number: QTBUG-68501
Task-number: QTBUG-51385
Task-number: QTBUG-32476
Change-Id: Icc6421fe2e91a3b29bcec8cb1a8a91cb71ae3172
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-25 09:14:55 +00:00
Edward Welbourne
09f254fcc0 Fix two "unused variable" warnings
Change-Id: Iafced3ffcc24303a1034805b46eb49bd076d1e79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-25 09:09:29 +00:00
Andre de la Rocha
54e117d27d WinRT: Fix invisible element being included in the UI Automation tree
When an element is not visible then it should not be shown in the element
tree at all when using tools like Inspect. Also, the IsOffscreen property
was hardcoded to false instead of reflecting the actual object offscreen
state.

Task-number: QTBUG-69537
Change-Id: Ic8f55486685837cf5e21b3499085bb669c1dc6c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-07-25 08:50:13 +00:00
Kai Koehne
f493324066 qdoc: Fix CONFIG documentation table
Amends 591edbb11c

Change-Id: Ic31d733a1f2d386daa05afa865cb61a987f45578
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 07:37:19 +00:00
Jędrzej Nowacki
6970d4048f tst_QCommandLineParser: Add missing QVERIFY
QCommandLineParser::addOption returns false in case of an error.
Tests should check it.

Change-Id: I3507e1c236a15a7c0a77c0c80f8dba65b664a535
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-25 07:26:45 +00:00
Ulf Hermann
e883ef6197 rcc: Add a --list-mapping option to output both resource and real paths
The --list option outputs only the file system paths, but does not tell
us where those files end up in the resource file system. This is
unfortunate because the resource paths are possibly the most interesting
thing to be expected from a listing of resource files. Add an option
that outputs a full mapping.

This is also useful for tools that need to resolve files for resource
paths from outside the application using the resources.

[ChangeLog][Tools][rcc] Added a --list-mapping option which shows a
mapping of resource paths to file system paths.

Change-Id: I0cb57fe091ef78b4a9eca8be2fc53278ae50cc11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 07:08:31 +00:00
Mikhail Svetkin
d1dcc4d8cd corelib/tools: add qMakeArray() API
This function can be used to create std::array without the need
to explicitly provide the size of array. It also has a specialization
that allow to generate sorted array at compile time. Sorted array can
be beneficial for example in binary search.

Change-Id: Ifc7e06e451812fce2ab94293959db5e9cc038793
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-25 06:57:44 +00:00
Oswald Buddenhagen
80dea66424 qmake: don't drop non-existing files from .depend_command output
this allows for dynamic generation of the dependencies.

Task-number: QTBUG-61267
Change-Id: If5b8aed6b9e4bde189cc3ba6a5f13dcf8def3a1e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-25 06:53:56 +00:00
Oliver Wolff
92c5f3fb7b Add qt_test_helper feature
To avoid (even more) duplicated code, "qt_test_helper" ensures the
policy of putting a test's helper application next to the test's
own executable.
The helper executable is suffixed with "_helper" to avoid name
clashes with its folder.

Change-Id: Ic50cb1daa257e7ffc75440c10a3b90fd39424683
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 05:17:47 +00:00
Oliver Wolff
64d63d036c Change tests' default installation folder from TARGET to folder name
Instead of having tests installed into a folder named like their
target, we now use their source folder name for the installation.

An upcoming patch will rely on this behavior and simplify creation
of tests that need helper applications.

Change-Id: I17d9ff15edf502d82ab698627189532b83e72546
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 05:17:41 +00:00
Romain Pokrzywka
708fa860bc Windows QPA: Fix tablet event coords delay for tablets in pen mode
Now that the mouse mode check is only done once for the first event
after the TabletEnterProximityEvent, the m_oldGlobalPosF member has
lost its purpose and should be removed.

Worse, its value was used instead of currentGlobalPosF when in pen mode,
resulting in an unnecessary 1-frame delay in the reported positions
in the tablet events.

Task-number: QTBUG-36937
Change-Id: I6bd2db57898850a65088d9bb41fbfbd96eac54f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-24 20:46:59 +00:00
Friedemann Kleint
8d8a830f13 uic: Modernize the ui4.cpp/.h files
Apply a change from Qt Designer.
Silence clang-tidy warnings in the generated files

- use nullptr [modernize-use-nullptr]:

    Use nullptr where applicable and simplify the switch()
    statement in write() on this occasion to use member variables
    instead of accessors.

-  use '= default' to define a trivial destructor [modernize-use-equals-default]

    Check if any delete statements are required. If not, use "= default".

- use auto when initializing with new to avoid duplicating the type name [modernize-use-auto]

   Use auto.

Change-Id: I7b48872fd42a6118e7cca8510aacb9ffa7e01839
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-07-24 20:22:17 +00:00
Eirik Aavitsland
731538fdd4 Add API for reading and decoding graphical texture files
Add a framework for reading and decoding stored graphical texture file
formats. Includes decoders for the PKM and KTX formats.

This is basically the same texture file reading that was added to
qtdeclarative for 5.11, but has been refactored to be independent of
the scenegraph and opengl.

Task-number: QTBUG-67026
Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-07-24 16:46:05 +00:00
Eirik Aavitsland
1ed0b2170d Give the QGradient presets ObjectMode coordinate mode by default
ObjectBoundingMode has inconsistent behavior and is deprecated in
favor of ObjectMode.

Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-24 16:45:53 +00:00
Eirik Aavitsland
bafa5a14dd Add demo of the new QGradient presets to the gradients example
In the gradients example, allow the user to select and show
QGradient's named presets.

Change-Id: I40bc6cbe3a0316ce49d67d63511881b6f6112574
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-24 16:45:41 +00:00
Shawn Rutledge
5d0827cbe7 formatQEnum: deal with enum class types
The enum class doesn't get treated as an int automatically, the
way that a plain enum does; so there's a silly compile error which
this cast fixes.

Change-Id: I21b56337e4f724e4de1819e22bc93e9af23c51ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-24 16:25:13 +00:00
Joni Jantti
549abf9e6a Blacklist tst_Gestures::graphicsView on Ubuntu 18.04
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-69599
Change-Id: I575e6f52a539e03ab37ca62e580889854ddb9781
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:20 +00:00
Joni Jantti
05ddbacf6c Blacklist tst_QWidget_window::setWindowState
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-68864
Change-Id: I799defcec3a41d86a604bfcd4c2e1081ae4e0e53
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:13 +00:00
Joni Jantti
d2015b4d06 Blacklist tst_QWidget_window::tst_resize_count
This autotest fails on the new Ubuntu 18.04 platform.

Change-Id: I815e36f7a099ca4c83767c7a1adb0f87f5bff7b5
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:07 +00:00
Joni Jäntti
28cdd1b497 Revert "Blacklist tst_QWidget_window::setWindowState"
Wrong test was blacklisted for this commit.

This reverts commit 85607bd70d.

Change-Id: Ica5272799afec88c05e2cd137835bcdcb587836e
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:00 +00:00
Andre de la Rocha
947df4e63e Windows: Fix invisible element being included in the UI Automation tree
When an element is not visible then it should not be shown in the element
tree at all when using tools like Inspect. Also, the IsOffscreen property
was hardcoded to false instead of reflecting the actual object offscreen
state.

Task-number: QTBUG-69537
Change-Id: If6e8a4685c0505ee2b99dfbb8bf2b5d0f4112b1e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-24 13:10:52 +00:00
Mikhail Svetkin
8d4617d5a9 Fix QUrl::setPath documentation, remove default TolerantMode
Change-Id: I97f6ce5fdaba3364aab3203974a3a3d4f92c8899
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-24 10:06:27 +00:00
hjk
37e91af083 QHash: Remove reference to Qt3's QDict implementation
While it is still formally correct, it does not add much
value anymore.

Change-Id: I32431e3e73f3ca662dc4beb754f53449692c56a9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-07-24 09:23:55 +00:00
Richard Weickelt
f8c15fe63c Fix wrong relative path to qdbus_symbols.cpp
Commit d743df975d broke tst_qdbusinterface
when not using dbus-linked config option.

Change-Id: Iae5725ac781151e3a3d70032d6530bf4363daafa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-24 04:24:31 +00:00
Gatis Paeglis
3bc0f1724a xcb: fix various bugs with _NET_WM_MOVERESIZE
1) After a37785ec76 it become
apparent that we don't get mouse release event from X server
when system move/resize ends (because WM is grabbing the pointer).
The old code (before a37785ec) would wrongly deduce mouse move
as mouse release, which is why the issue was not seen before.
The solution is to subscribe to slave device events.

2) This patch also amends 2488f34ecf as
that patch was solving the issue only for 1/3 of the supported DEs.
It worked with KWin, but not with Unity and Gnome. Its worth
noting that it also worked with two other WMs that I tested -
openbox and awesomewm. The way forward is to detect when system
move/resize was started as a result of touch event and let the
QSizeGrip do the move/resize instead of WMs that are known to
have bugs.

With this patch we also need to adjust the event compression algorithm
to not treat all XI_TouchUpdate events equally. For XI_Motion we don't
care if the event that we process comes from a master or a slave device,
so we can process them as equal.

Task-number: QTBUG-68501
Task-number: QTBUG-51385
Task-number: QTBUG-32476
Change-Id: Iab4e79a289d7bc0fe26f7ae2cff7c562f51a3334
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-23 21:43:19 +00:00
Oswald Buddenhagen
9b48b3514f qmake: add line-based mode for .depend_commands
Task-number: QTBUG-48919
Change-Id: I6988fb2f26fd62ab40eb7392ccb0e033ad291fe6
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-23 17:39:21 +00:00
Oswald Buddenhagen
9c71693de4 prune dead code
msvc2013 is not supported any more.

Change-Id: Idca32f77e1b97a219d8bb4571cfd41e7334ac84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-23 17:39:09 +00:00
Edward Welbourne
27f1f84c1c Let QDir::absoluteFilePath() use isAbsolutePath() for resource paths
Using QFileSystemEntry::isAbsolute() broke handling of resource paths.
Extended QDir::absoluteFilePath() tests to cover absolute resource path
and some UNC variants also resolved in the same fix.
Amend existing filePath tests to use drives where needed.

Task-number: QTBUG-68337
Change-Id: I4f02cf67828ad93e562857118f8442037f18bab7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-23 14:28:38 +00:00
Tor Arne Vestbø
f8774c69b2 QMacStyle: Normalize how we call drawNSViewInRect
Change-Id: I351635c7cc0bb8c852626dc3c0a3caf33b25a761
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-07-23 10:04:33 +00:00
Paul Wicking
b616a8a8cd Doc: Add since version for QJsonDocument::toJson()
Task-number: QTBUG-69527
Change-Id: I10df9cc2d6fa2080e07d68b78c6220500f459380
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-07-23 09:31:23 +00:00
Giuseppe D'Angelo
a7bcd16c75 PCRE2: upgrade to upstream version 10.31
[ChangeLog][Third-Party Code] PCRE2 was updated to version 10.31.

Task-number: QTBUG-69271
Change-Id: I0be7c280029f781aa20add8f87868d59e3fa53da
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-23 07:57:20 +00:00
Joerg Bornemann
781beb6eb9 Remove transitioning include from qdnd_p.h
Now all files that use QInternalMimeData include
qinternalmimedata_p.h, and we can remove the transitioning include
from qdnd_p.h

Change-Id: I6c86cb6a5bd73076e5dd3bafc01861b75ab83845
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-23 05:50:12 +00:00
Thiago Macieira
d6e9076891 moc: align and use newlines in the generated staticMetaObjects
Change-Id: Id59bdd8f1a804b809e22fffd154078f047078d70
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-23 03:44:44 +00:00
Christian Ehrlicher
16794e98bc QTabBar: fix mixed up left and right css pseudo classes
The pseudo classes left and right for QTabBar were mixed up. This
resulted in the fact that the east (=right) tab position was selected
with QTabBar::tab::right and the west with ::left

[ChangeLog][QTabBar][QTabBar] fixed mixed up css pseudo class for
left and right

Task-number: QTBUG-18146
Change-Id: I9f485f21c0a1c54bfac757a6f530aeeeef9b08bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-22 09:14:28 +00:00
Sérgio Martins
9229452e57 Introduce QScopeGuard
A RAII style class which calls a function at end of scope.

Example usage:
    auto cleanup = qScopeGuard([] { <my cleanup code> ; });

[ChangeLog][QtCore] Introduced QScopeGuard.

Task-number: QTBUG-62894
Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-21 17:47:35 +00:00
Giuseppe D'Angelo
89bca67499 Remove a deprecation warning coming from QRegularExpression
The flag is deprecated.

Change-Id: Ice6ffafac6a5fa79675fc7cd84a9fb746f17dfb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:28:20 +00:00
Giuseppe D'Angelo
b42d305333 Remove a deprecation warning coming from QRegularExpression
The flag is deprecated.

Change-Id: Idfd7c31278032ee96b27f3f447a97ecfdd8051af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:28:12 +00:00
Paul Wicking
fc17a02c04 Doc: Correct typo from decoded to encoded
Task-number: QTBUG-62081
Change-Id: Ia07b43445661d66ef0e8fe51d8d022bd5d803327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:10:57 +00:00
Friedemann Kleint
189e40e11e Add QTextStream operators for QStringView
Change-Id: I72d597fa21521a04b7f7c0e41bd45ee9dabb6222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-20 20:51:08 +00:00
Oswald Buddenhagen
6bc6e6d388 qmake: skip license check while building qt
configure already does it for qt itself, so it's pointless to ever invoke
in default_pre.prf.

to make the exclusion work during the makespec reload during early setup,
we pull ahead the restoration of CONFIG, hoping it won't cause too many
side effects.
another change in qt5 will ensure that top-level builds are also covered.
finally, configure tests also need an explicit exclusion.

that way, attempts to re-configure build trees of commercial builds
after the day of the first configuration do not fail anymore.

Task-number: QTBUG-63452
Change-Id: I42264f64d7621784d4d67bde885a8e501f5ca413
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-20 18:07:48 +00:00
Alistair Buxton
cdf456f05e configure: Fix QMAKE_* variable assignments containing numbers
9fde78269 fixed overrides for library definitions, but failed to fix
direct overrides of variables from mkspecs, like QMAKE_LIBS_OPENGL_ES2.

Task-number: QTBUG-69176
Change-Id: I818acf25f581903c323847382ec6baab38b64330
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-20 18:05:35 +00:00
Nils Jeisecke
0aea57dfc8 Fix QGuiApplication::queryKeyboardModifiers() on macOS
To quote the documentation:

 Queries and returns the state of the modifier keys on the keyboard.
 Unlike keyboardModifiers, this method returns the actual keys held
 on the input device at the time of calling the method.

So GetCurrentKeyModifiers seems to be the correct Carbon
function to use.

[ChangeLog][QtGui][QGuiApplication] Fix queryKeyboardModifiers() on
macOS to actually return the current modifier key state

Change-Id: I11f2ef1897a39aea13df4afbfebb8172ca803a30
Task-number: QTBUG-26413
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 13:48:38 +00:00
Timur Pocheptsov
801a0cc7ac QNetworkRequest - fix the documentation
The wording was quite confusing and misleading - if not set exlicitly,
QNetworkRequest::sslConfiguration() will initialize configuration to
be equivalent of QSslConfiguration::defaultConfiguration(), not what
the documentation stated.

Task-number: QTBUG-13418
Change-Id: Id578db47ec75031376f73db42108053655fbf5c3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-20 13:27:42 +00:00
Paul Wicking
f861109ef3 Doc: Remove erroneous comma in snippet
Task-number: QTBUG-51719
Change-Id: I0621b872642aa8ad14f6af4bf1b9588450dfbb64
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-20 12:15:04 +00:00
Leena Miettinen
2ce62ed87b Doc: Update external links to Qt Creator Manual
Reflects version 4.7.

Change-Id: Ia41b5c1a7eb829ab3c6ec0d3bd9fe60dcbfed54d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-07-20 11:26:01 +00:00