Commit Graph

33652 Commits

Author SHA1 Message Date
Tor Arne Vestbø
096b56f336 macOS: Create NSView as initially hidden, to match QWindow behavior
Change-Id: I25af6635ea9b6aa3fcc642fa2da0553341aabda8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-11 13:08:24 +00:00
Gatis Paeglis
255abc1e5a xcb: add support for peeking into the XCB event queue
This will be used by the Qt X11 Extras module.

Task-number: QTBUG-50358
Change-Id: Ie095cd211c393ea6d78660b4d53cac28b435a3b2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-11 13:06:38 +00:00
Jesus Fernandez
a6c4d54eaf Add override keyword to QPlatformSurface derived classes
Change-Id: I9ce58fb48fd41f4fc340188c1df358d9ef215c3f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-11 09:06:06 +00:00
Oswald Buddenhagen
49cb039a5c make compiler invocation error messages mention host/target
it's unclear where to look for the error when the message talks about
'g++' when '${CROSS_COMPILE}g++' would have been expected. help it by
saying whether it was supposed to be the host or target compiler.

this also centralizes the error emissions in a function.

Change-Id: I454c6ff7c0e7dd945dcee0de01e2818caeeb7409
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-11 06:38:56 +00:00
Thiago Macieira
feb2415363 Fix write and read-write ioctls on certain 64-bit OS
Using int as the operation parameter was wrong. It meant any write or RW
ioctls (which have the MSB set) would be sign-extended to 64-bit when
calling the native API. Depending on the OS, the upper 32 bits were not
cleared prior to comparing with the call number, resulting in
unexpected errors.

Linux and FreeBSD operated properly; I only got the error on Darwin.

Change-Id: Iaf4157b7efa2416d898cfffd14d985af65c1ff89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-10 22:51:56 +00:00
Tor Arne Vestbø
22998e64d9 macOS: Remove dead code from Leopard times
Change-Id: I02bc0a8488763fea525771636538b9d0943b8971
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-10 20:51:39 +00:00
Tor Arne Vestbø
7fd9da94bb macOS: Log target view for backingstore flush without quotes
Change-Id: I0d5f9f9172aaa7b9b7575dce6ba59b23567b35ce
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-10 20:51:31 +00:00
Gatis Paeglis
5f1df771b6 xcb: re-factor QXcbConnection::printXcbEvent
- To use categorized logging.

- Print also non-core event types.

- Added QLoggingCategory as one of the parameters because I will
  need it in a subsequent patch.

- A call to this function in QXcbConnection::handleXcbEvent I left
  disabled from builds by default as the "handled" variable is broken.

Change-Id: I15cd71c40b5772a4352a69cdc24a0ae026626060
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-10 17:14:36 +00:00
David Faure
60ad66ce3c QSqlTableModel: avoid copying QSqlRecord instances
Profiling a large model showed that QSqlRecord was being copied and
destroyed from a few places, due to use of QMap<int, ModifiedRow>::value()
where ModifiedRow has two QSqlRecord members. This can easily be avoided
(in the common case with no modified rows) by using constFind() instead.

My testcase (iterating over a model with 126936 rows) went from 1266 ms
to 896 ms.

Change-Id: I04e98b5573ef24165bf6cff19946e5bedd0fb0ba
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-10 14:50:29 +00:00
Tero Alamäki
f4e0ffb11c Enable custom shared memory schemes on INTEGRITY
Replaced dependency to libdl.a with libshm_client.a. Defined symbols
'shm_area_password' and 'shm_area_name' internally. The build for
INTEGRITY is static only so libdl.a is not needed.

Change-Id: I7e34528835132d79ea582a30cf9ff61cdda198da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-10 12:20:33 +00:00
Allan Sandfeld Jensen
74bbb6ba8a Fix handling of mirroring upscaling in simple bilinear upscaler
Calculates the correct offsets and coordinate transforms for the
intermediate buffer. This means we can conceptually simplify our
path switches instead of having downscale routines handling mirrored
upscaling.

Change-Id: I60efa7feaba80165672ca0ce064515fdf620869d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-08-10 06:42:22 +00:00
Stephan Binner
ee29be91c0 Convert features.toolbutton to QT_[REQUIRE_]CONFIG
Change-Id: I4227e1868da21bded76a8ec55996c436c8a8d763
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:30 +00:00
Stephan Binner
e58fdbaeb0 Convert features.splitter to QT_[REQUIRE_]CONFIG
Change-Id: I2eea5004938c581beb5a7c0c01409c576c5e5b39
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:25 +00:00
Stephan Binner
39851c6905 Convert features.groupbox to QT_[REQUIRE_]CONFIG
Change-Id: I034286043a880ab777ec3f2311572bdc38e7fafc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:21 +00:00
Stephan Binner
414026ad9c Convert features.scrollbar to QT_[REQUIRE_]CONFIG
Change-Id: Id6ea899c0fddf0de636701cfdc5f01ba20024976
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:17 +00:00
Stephan Binner
d1a3e674b6 Convert features.toolbox to QT_[REQUIRE_]CONFIG
Change-Id: I7abfe0166a021c439f6ed4465631ba62660ef001
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:13 +00:00
Stephan Binner
0987bda99e Convert features.progressbar to QT_[REQUIRE_]CONFIG
Change-Id: I66d00d5bac98ff337ba5877e5f23be5e14a97551
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:08 +00:00
Stephan Binner
fab3261730 Convert features.textbrowser to QT_[REQUIRE_]CONFIG
Change-Id: I02a0c39c308204f7c67674928973275fa1247d38
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-10 05:37:03 +00:00
Gatis Paeglis
9184384bc9 xcb: use XInput2 for mouse starting from 2.0 not 2.2
53d289ec4c fixed the issue of not getting
touch events when grabbing via the plain xcb functions. And due to wanting
to support a setup where mouse events are delivered via core events it was
chosen to use mouse via XI2 only when really necessary. Thus starting only
from 2.2, the version from which the mouse+touch grabbing becomes the issue
(XI2 introduced touch support from 2.2).

The same patch states that using QT_XCB_NO_XI2_MOUSE restores to the old
behavior (grabbing via core) with broken touch grabbing. Broken only with
2.2+, not 2.0 and 2.1 since those versions of protocol do not know about touch.

All of this implies the following:

1) The user code that already depends on QT_XCB_NO_XI2_MOUSE, won't see any
behavioural difference if we will use XInput starting from 2.0 for mouse.
Mouse grabbing will continue to be done via core (xcb_grab_pointer) as
mentioned above and thus touch grabbing will continue to be broken with 2.2+.

2) The code that has never cared how we get the native events (core vs
xinput2), won't see any behavioural difference. In this case grabbing will
always be done via XI2 (XIGrabDevice) grab when XI2.0+ is available.

Since there is no difference in the outcome, we migth as well use XI2 for
mouse from 2.0, not 2.2. Extension events are always better choice than core.

Besides the broken touch grabbing issue with QT_XCB_NO_XI2_MOUSE, there are
other issues with that code path, for details see internal documentation of
xi2SelectDeviceEventsCompatibility(), where the conclusion is:

*** If your code relies on QT_XCB_NO_XI2_MOUSE, then your code needs fixing. ***

This patch also cleans up how we select XInput2 events, by separating
the QT_XCB_NO_XI2_MOUSE code path. This has two benefits - improved code
readability and will make the deprecation of QT_XCB_NO_XI2_MOUSE easier.

The patch removes some sparse comments as the behavior is now documented in
one place, see xi2SelectDeviceEventsCompatibility().

[ChangeLog][Platform Specific Changes][Linux] The QT_XCB_NO_XI2_MOUSE
environment variable is deprecated and will be removed in Qt 6. If your
application relies on behavior set by QT_XCB_NO_XI2_MOUSE, it should be
updated accordingly.

[ChangeLog][Platform Specific Changes][Linux] Pointer event delivery on
X11 is now done starting from XInput version 2.0 (when available) instead
of 2.2. XInput support can be disabled by setting QT_XCB_NO_XI2=1 environment
variable. Note that using QT_XCB_NO_XI2 would also disable tablet and touch
support.

Change-Id: I661b36d6710b9f6ec71fecc8287ba479432bff4c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-08-09 16:55:25 +00:00
Tor Arne Vestbø
0ad79dd0f0 iOS: Fix accessibility leak
Change-Id: I359ce521decbbb06376fc48689762f462c8706b0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-09 12:44:13 +00:00
Morten Johan Sørvig
c35fc43595 macOS: Make alpha-based click-trough work again
Commit 3ea04c7d made it so that we always set the
ignoresMouseEvent property on the NSWindow, based
on the WindowTransparentForInput flag.

However, this overwrites the magical secret initial
state where click-trough is determined based on window
content transparency - setting the property to false
makes the window capture all events.

Restore 5.6 behavior by not modifying ignoresMouseEvent
if we can. Toggling WindowTransparentForInput on and
off again is still broken.

Task-number: QTBUG-54830
Change-Id: I5f44ce14d9a7dc1713f9efb1ef929e2969838d90
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-09 11:31:52 +00:00
Jan Arve Sæther
37f3ed96eb Fallback to QGnomeTheme if Gtk3 does not support long-press-time
"gtk-long-press-time" was introduced in 3.14. Therefore, if the property
does not exist, we should fallback to QGnomeTheme::themeHint().

Task-number: QTBUG-61393
Change-Id: I898c0ddebdbabb300d7ad9dd275d51836ad9cf8c
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-08-09 09:06:47 +00:00
Eirik Aavitsland
123741b64c Fix build when no fontconfig
The x11 native painting experimental feature requires fontconfig to
build, so add that dependency to configure.

Task-number: QTBUG-62121
Change-Id: Iac79c17fdeaef06b2e075dc34fe554c0e7c56edf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-08-09 07:08:16 +00:00
Thiago Macieira
9312ec54db Fix QAbstractFileEngine::clone misuse
QFile::copy was assuming that the target file was native and therefore
it could simply take the file descriptor to clone. While that was not
currently a problem, in theory it could be as we do have one writeable
file engine besides QFSFileEngine (QWinRTFileEngine).

By refactoring to take the parameter as a QAbstractFileEngine, we can
ensure that the target file is a native file.

Change-Id: Ib7a1737987bf4c4a8c51fffd14d0c048fd509025
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-09 05:19:23 +00:00
Gatis Paeglis
284fff1217 xcb: cleanup leftovers in QXcbScreen::updateGeometry
That code was added by ae5f2a6672 and
later incompletely removed by c173a50719.

This patch amends c173a50719.

Change-Id: Ibfd39aaf9b49424fc54d878dc588454eb841ed97
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-08 22:21:01 +00:00
Gatis Paeglis
6c10c54aa8 xcb: tidy-up has_<extension> variable handling
Change-Id: I666c9d415e366d6b06b05e70e01456c47ac35b4a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-08-08 22:20:51 +00:00
Thiago Macieira
5d2240718c Autotest: fix blacklisted test about position on non-regular files
On BSD systems (tested on macOS and FreeBSD), you *can* lseek(2) or
ftell(3) on a pipe and get its current position. But QFile will not get
the position when the file is sequential, so we need to return 0.

Technically speaking, we ought to do the same for block devices, but if
you're redirecting stdin, stdout or stderr in the unit test to or from a
block device, you deserve the extra work to add that yourself to the
test.

Change-Id: I3868166e5efc45538544fffd14d8a74e92963fe7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-08 21:48:28 +00:00
Thiago Macieira
e94830f496 QFileSystemEngine/Unix: support UF_HIDDEN on the other BSDs
The stat::st_flags and fchflags(2) syscall are marked:
HISTORY
     The chflags() and fchflags functions first appeared in 4.4BSD.

Change-Id: I81480fdb578d4d43b3fcfffd14d4fd23bd27e37e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias C. Berner <tcberner@FreeBSD.org>
2017-08-08 21:48:25 +00:00
Thiago Macieira
6504bc6bbc QFileInfo: harmonize QFileInfo() and QFileInfo("")
If a QFileInfo was constructed with an empty path, which could happen
with QFileInfo(QFile()) or via QDir, etc., then it would issue system
calls to empty paths and could even produce warnings. This commit makes
am empty path name be the same as a default-constructed QFileInfo and
corrects the use if 0 for ownerId and groupId to match the
documentation.

[ChangeLog][Important Behavior Changes] QFileInfo on empty strings now
behaves like the default-constructed QFileInfo. Notably, path() will now
be the empty string too, instead of ".", which means absoluteFilePath()
is no longer the current working directory.

Change-Id: I8d96dea9955d4c749b99fffd14ce34968b1d9bbf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-08 21:48:23 +00:00
Thiago Macieira
d3393ce258 Add support for statx(2) on Linux
This system call, new in Linux 4.11, gives us the file birth time. It's
also extensible, representing the fourth generation of stat(2) on Linux
(the original sys_stat(), sys_newstat(), sys_stat64() and now
sys_statx()), not to be confused with glibc's __xstat function, which
wraps a call to stat64. Anyway, the new one is designed to be extensible.

Now we get birth times on ext[34] on Linux too:
 Name:   .
 Path:   . (/home/tjmaciei/src/qt)
 Size:   4096    Type: Directory
 Attrs:   readable writable executable hidden nativepath
 Mode:   drwxr-xr-x
 Owner:  tjmaciei (1000) Group:  users (100)
 Access: 2017-07-02T14:47:49.608
 Birth:  2016-05-02T13:20:33.097
 Change: 2017-07-01T13:37:08.737
 Modified: 2017-07-01T13:37:08.737

It's not supported in any other filesystems I have (Linux sources show
xfs has the feature too). Even on ext4, it depends on whether the
filesystem was created with 256-byte inodes, which my /boot fs wasn't.

Change-Id: I8d96dea9955d4c749b99fffd14cda23ed60d5e72
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-08 21:48:20 +00:00
Jake Petroules
874837b4cc Fix the safety check preventing apps from running on old OSes
This fixes an issue where iOS, watchOS, and tvOS versions would be
mis-detected as 100 times their version (i.e. iOS 8.0 as iOS 800.0).
Instead of protecting the branch in (version >= 100000) with a macOS
ifdef, we can simply remove it entirely since Qt cannot be run on OSes
where the old encoding was used (macOS < 10.10).

Amends 8418a6335b

Change-Id: I32b307163c815799cb46c008b93f3b53d27c48b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-08 21:42:09 +00:00
Jake Petroules
38bfe7a279 Add NSSupportsAutomaticGraphicsSwitching key to Info.plist app templates
This will allow Qt Quick applications to use the integrated GPU on
compatible Apple hardware, which helps preserve battery life.

Change-Id: I9224bd408930e2ed3dd8a022432512e78d69c195
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-08 21:42:00 +00:00
Jake Petroules
3ec3f2a5da Sort keys in Info.plist templates
This makes editing the templates easier since they can be read
alphabetically.

Change-Id: I6af5e4f13718ba1145c2dec1f8a05bc600ea937a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-08 21:41:55 +00:00
Stephan Binner
e029923c60 Convert features.statusbar to QT_[REQUIRE_]CONFIG
Change-Id: Ifc1881388e559d3235df0202ac6d26f78ba2c691
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-08 11:42:05 +00:00
Thiago Macieira
883dfb3d15 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/kernel/qwidget.cpp

This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).

Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
2017-08-08 11:48:10 +02:00
Andy Shaw
425aa282df Win: Account for when "condition expression is constant" warning occurs
There is already some case accounting for when this warning appears with
warning level 4 and Visual C++ on Windows. However it was not catching
all the places it was coming from, so this extends it to cover those
places too.

Change-Id: I69b21440716361fda1c1ae0be0d9c17ced7f0792
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-08 08:06:03 +00:00
hjk
1e1a2c7397 QAction: Note that the QAction parent parameter is optional since 5.7
Change-Id: Id1cb5591dae55cd22621cd8e403d2056f1aa9364
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-08-08 08:00:42 +00:00
Määttä Antti
ebae7fc426 Fix reset with qoffscreensurface destruction with multimonitor support
The qoffscreensurface::setScreen crashes in create if application is
closing. This happens in multimonitor setup when one of the screens is
already destroyed and qoffscreensurface handles the screenDestroyed
signal. In this case the QGuiApplication::primaryScreen returns non-null
surface and selects the codepath that recreates the surface. The create
function calls the qGuiApp->thread function, which crashes since the
application instance has already been set to nullptr. Prevent this in
qoffscreensurface by checking the application instance in the setScreen
function.

Task-number: QTBUG-62222
Change-Id: Ibb11a270c23a39e66009b45ab83dd7d47d5ccb1f
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-08 07:57:31 +00:00
Stephan Binner
c36a5aee70 Convert features.dial to QT_[REQUIRE_]CONFIG
Change-Id: I9fea2451fe3567fdd1af1540e9a55f218f54b569
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-08 07:37:59 +00:00
Simon Hausmann
b75bc0f75c Fix failing network cookie jar tests
The test verifies that a cookie with a date in the future is not
"expired" and will be sent to the server. This test started failing
on August 7th 2017 when the test case "0003" with it's cookie expiring
August 7th 2017 started ... expiring ;-)

Bumped all suspicious cookie test cases by a hundred years.

Change-Id: I7c09069ec4999e2ea0aae7b2a2819cced0fd6a99
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-07 19:19:13 +00:00
Simon Hausmann
ea9032ceaa Revert "Ignore thaiZWJ failure on RHEL 7.2"
The blacklisting is not needed anymore as we now use -qt-harfbuzz.

This reverts commit b36e5faad4.

Task-number: QTQAINFRA-1363
Change-Id: I3ae50588204b27e6880416ae2cbc28dda53bb292
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-08-07 07:18:26 +00:00
Thiago Macieira
5a9b1425e1 QFileSystemEngine/Unix: rework the getting of nsec-precision file times
It was working on Linux because _GNU_SOURCE gets us POSIX.1-2008
compatibility, but not on macOS or the BSDs. There, we were still stuck
to full second precision.

This commit uses the template trick introduced by the futimes code
(which itself was inspired by commit 2fb42eb4af
in QtNetwork). Also note how it adds support for birth time, if the
system's stat struct has that information.

Tested to work on MacOS and FreeBSD. The manual filetest produces:
 Name:   .
 Path:   . (/usr/home/tjmaciei/src/qt/qt5)
 Size:   1536    Type: Directory
 Attrs:   readable writable executable hidden nativepath
 Mode:   drwxr-xr-x
 Owner:  tjmaciei (1001) Group:  tjmaciei (1001)
 Access: 2017-07-13T20:03:47.916
 Birth:  2017-07-13T20:03:47.916
 Change: 2017-07-13T20:04:41.648
 Modified: 2017-07-13T20:04:41.648

Linux will require support for statx(2).

Change-Id: I8d96dea9955d4c749b99fffd14cd97d7a8c6d45d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-06 23:14:26 +00:00
Thiago Macieira
04f4d87bda QFileSystemEngine::fillMetaData: simplify and comment the code
Took me a long while to understand what it did. Now that I do, I can
also answer the question left behind during the original implementation
in Qt 4.8 (commit 4fd2aced96d9095254d89f9da9c911bd88f15245 in the old
history): how to know if a file exists?

Change-Id: I8d96dea9955d4c749b99fffd14cdae135499a0d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-06 23:14:22 +00:00
Thiago Macieira
12339481ea Move Unix code from qfilesystemengine.cpp to qfilesystemengine_unix.cpp
The comment about Symbian no longer applies.

Change-Id: I8d96dea9955d4c749b99fffd14cd966f07d95948
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-06 23:14:18 +00:00
Nico Vertriest
2765b0cf3a Doc: remove linking to internal method
qimage.cpp:2127: warning: Can't link to 'isDetached()'

Change-Id: Ib8f056441bf08e315ed97caf55c510f50ebaf4ed
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-06 09:42:04 +00:00
Eskil Abrahamsen Blomfeldt
9342a8b843 Add QTextOption/QTextEdit/QPlainTextEdit::tabStopDistance property
In Qt, we have QTextOption::tabStop, QTextEdit::tabStopWidth and
QPlainTextEdit::tabStopWidth.

Neither are very good names, since the tab stop is neither a
numerical value as in the former, nor does it have any dimensions
that can be measured, as in the latter. Vertical text advances
may also be supported by Qt at some point in the future, at
which point the name would make even less sense.

At the same time, we expose the actual type of the tab stop
distance as floating point in the QTextEdit and QPlainTextEdit
API instead of always rounding it to an int.

To avoid duplicating either of these APIs in Qt Quick, we
introduce tabStopDistance as the common term instead and deprecate
the old names.

[ChangeLog][Text] Introduced tabStopDistance property in
QTextOption, QTextEdit and QPlainTextEdit as replacement for
the inconsistently named tabStop and tabStopWidth properties.
QTextOption::tabStop, QTextEdit::tabStopWidth and
QPlainTextEdit::tabStopWidth have subsequently been deprecated.

Change-Id: Ib7e01387910cddb58adaaaadcd56c0e69edc4bc2
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-06 08:16:06 +00:00
Samuel Gaist
b03706d35f Migrate QStandardPaths to use QRegularExpression
This patch updates the code from the unix implementation of
QStandardPaths to use QRegularExpression in place of the deprecated
QRegExp.

Change-Id: I51fa231dcd70ca55d1bfffb31d8f28f964ac44fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-08-05 16:45:14 +00:00
Samuel Gaist
82fbf97903 Doc: add warning against bulk random data creation to QRandomGenerator
The full documentation explains it well but a more prominent warning
will help avoid the wrong use of that class and encourage user to read
further the documentation.

Change-Id: I3178749f2b1b0350040f81eef253fd85c7ba0a5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-05 16:44:55 +00:00
Frederik Gladhorn
60bfd6a214 Fix typo
Change-Id: Ie82c0996a7b1112fe6d6d259d765737fc3fb6a22
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-05 16:44:36 +00:00
Thiago Macieira
f77117d6ca QFileSystemEngine/Windows: fix setFileTime when input date is UTC
I was getting a weird 7-hour offset when doing:

    QVERIFY(file.setFileTime(before.addSecs(-10), QFile::FileModificationTime));
    mtime = file.fileTime(QFile::FileModificationTime).toUTC();
    QCOMPARE(mtime, before.addSecs(-10));

Change-Id: I35c4da69d754686a43e675b3d215213e448df7cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-05 16:41:47 +00:00