Commit Graph

33370 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
73176d2922 Add API to disable text shaping on fonts
In the past, we had an undocumented text flag that worked with
one of the QPainter::drawText() overloads. This was never intended
as public API and served a specific cause in Qt WebKit at one point.

But there is a general need for such API, as disabling shaping features
easily gives 25% performance improvement on text rendering even for
fairly short strings.

This patch adds a new style strategy flag to disable shaping and
will just uses the CMAP and HDMX tables to get glyph indices and advances
for the characters. In Qt 6, the TextBypassShaping flag can be removed
completely and be replaced by the style strategy.

[ChangeLog][QtGui][Text] Added QFont::PreferNoShaping style strategy to support
improvements to performance at the expense of some cosmetic font features.

Task-number: QTBUG-56728
Change-Id: I48e025dcc06afe02824bf5b5011702a7e0036f6d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-26 10:51:00 +00:00
Jüri Valdmann
af7e756155 Return "en" for QLocale::c().bcp47Name()
Currently QLocale::c().bcp47Name() returns "C" which, according to [BCP47], is
not a valid language tag. In particular it does not conform to the ABNF grammar
in section 2.1 which specifies a minimum length of 2 characters for all language
tags.

[BCP47]: https://tools.ietf.org/html/bcp47

This patch changes the return value to "en" seeing as the documentation for
QLocale::Language states that the C language is identical in behavior to
English.

Task-number: QTBUG-61949
Change-Id: I2a381def8fb7156467e01d105da92bb1f4821204
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-26 08:22:51 +00:00
Jüri Valdmann
2031196ad1 Add test for QLocale::bcp47Name()
Task-number: QTBUG-61949
Change-Id: I34fece0441afb1e69ea84ae59b90c5e2b7cf133f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-26 08:22:43 +00:00
Tor Arne Vestbø
8719660416 macOS: Send expose event at drawRect and trigger updates via setNeedsDisplay
This changes the drawing model on macOS from the following:

 1. Sending synchronous expose events directly from callbacks such as
    windowDidOrderOnScreen and windowDidChangeOcclusionState
 2. Waiting for a resulting flush of the backing store, and issuing
    setNeedsDisplay as a response
 3. Waiting for the asynchronous drawRect call in response to
    setNeedsDisplay, where the backing store is finally drawn
    to the window

To the following:

 1. Issue setNeedsDisplay as a response to callbacks such as
    windowDidOrderOnScreen and windowDidChangeOcclusionState,
    when needed (in many cases this is automatic by AppKit)
 2. Send synchronous expose events from the resulting drawRect
    callback
 3. Draw the backing store to the window when flushed

The new model matches how normal Cocoa application draw in response to
drawRect, and makes the backing store flush synchronous instead of having
to trigger a async setNeedsDisplay. This gives AppKit more information
about how much time we're spending in drawRect, as the actual drawing
and flushing all happens within the synchronous expose event.

Qt applications that draw outside of drawRect, e.g. in response to timers,
are still supported by manually locking focus of the view and flushing the
window at the end of the backingstore flush.

Task-number: QTBUG-50414
Change-Id: I2efb9ff8df51ab6e840ad20c497b71f53e21e1c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 17:47:08 +00:00
Edward Welbourne
cff39f1818 tst_QTimeZone: improve readability of code and failure reports
When QCOMPARE(,) reports two 12-digit numbers, it's not always
immediately obvious what the difference is (much less what 1/3600000
of it is); nor is it obvious that (or why) a given 12-digit number is
in fact correct.  In contrast, our eyes can make sense of a
QDateTime's reported value quite well, enabling us to see what's
different; and it's possible to at least confirm the plausibility of
2-or-3 am on a spring or autumn day at a plausible transition (or even
to confirm it exactly by consulting suitable web-sites).  Also
document the actual transition happening in each case (since I *did*
consult a suitable web-site).  So prefer to QCOMPARE(,) two QDateTime
values instead of two 12-digit qint64s.

Where a that would be unsuitable, at least compare the difference to
zero, to make the error easier to understand (except when one of the
twelve-digit numbers consists entirely of 9s; that, for once, actually
is easy to see).

Write various multiples of 3600 as the relevant intelligible whole
number times 3600, rather than premultiplying, to make it obvious to
reders what's going on.

None of this changes what is actually tested.

Change-Id: I488e751283a55d4623c93612af13ad631144900d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 14:09:03 +00:00
Edward Welbourne
37b0a4d2e1 Fix a loop-test and the bogus data the loop expected
A loop initialized i = 0 and used i > 2 as its condition; it didn't
get very far.  Consequently, the test it was in never checked whether
CET's 2011 transitions happened at the times expected - which they
didn't, as the times in question were in fact the times at which
Pacific/Auckland had its transitions that year.

Change-Id: I94d1f8df615c5bcfe48e73d41b4c7faf2beccb96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 14:08:55 +00:00
Edward Welbourne
3ff2d70a15 Rework qAppFileName() on MS-Win to handle problems gracefully
Using a stack buffer and then a growing realloc() buffer can be tidily
packaged by using a QVLA.  Passing the reported name length to
QString::fromWCharArray() saves the need for 0-termination, even if it
has been missed.  This also degrades gracefully to produce an empty
QString when GetModuleFileName fails (returning 0).

Change-Id: If58f5ad8505f66fb67e59572af1ceb60a068f0ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-25 14:08:47 +00:00
Alexandru Croitor
03bb4fe6b1 Fix WebEngine build when VULKAN_SDK environment variable is present
Instead of expanding the VULKAN_SDK environment variable at Makefile
processing time, expand it at qmake time, so that a resolved include
path is passed to WebEngine's build system GN.

Task-number: QTBUG-61823
Change-Id: I63bd661350883d22af2ccdeb7c360ed0d8d881c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-07-25 13:48:41 +00:00
Timur Pocheptsov
410148ef1e tst_QSslSocket::ephemeralServerKey - fix for OpenSSL 1.1
The original test is quite unfortunate - it has cipher names hardcoded,
and it fails with OpenSSL 1.1 - no matching cipher found for 'RC4-SHA'
and QSslContext::initSsl fails with 'Invalid or empty cipher list'.
We skip this test entry for 1.1.

Change-Id: I810b80a62d9e27a60db71fd412af0c80630d976c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-25 13:29:32 +00:00
Sérgio Martins
4034c3a3d2 Don't call QVariant::fromValue<T>() with T=QVariant
Could be unwrapped further but that's a different topic.

Change-Id: I8f3414374dd6f114ab368c7508f725cece74ce34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 13:26:17 +00:00
Jesus Fernandez
28d1d19a52 Add QDebugStateSaver to QVectorPath operator<<
&operator<<(QDebug &, const QVectorPath &) was modifying the QDebug
state without restoring it after finishing.

Change-Id: I28c377bc99bfeb5a7bc67ca9affa8123f04583df
Coverity-Id: 11375
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-25 12:39:23 +00:00
Jesus Fernandez
a493170a94 Fix memory leak
CID 10994 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK)

The font database was not destroyed in the destructor.

Coverity-Id: 10994
Change-Id: Ibd4cb0b65d1e554593295a3654e8d8c946551cc2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-25 12:14:39 +00:00
Gatis Paeglis
5be8445f11 doc: minor cleanup in QPlatformWindow::setGeometry()
This patch amends a4c8129.

This is more consistent with other parts in QPlatformWindow docs.

Change-Id: I26d7a91849f3fde3ab2a0f3c81e00a5f9c830707
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 12:03:29 +00:00
Stephan Binner
7964b7468d Convert features.tabbar to QT_[REQUIRE_]CONFIG
Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:24:02 +00:00
Stephan Binner
2d02c4c799 Convert features.dockwidget to QT_[REQUIRE_]CONFIG
Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:58 +00:00
Stephan Binner
4d70a501db Convert features.tabwidget to QT_[REQUIRE_]CONFIG
Change-Id: Iab985564fd2069188df01f8ff3e00add86eb86f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:54 +00:00
Stephan Binner
16f375f549 Convert features.itemviews to QT_[REQUIRE_]CONFIG
The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all.

Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:49 +00:00
Stephan Binner
163863f77d Convert features.combobox to QT_[REQUIRE_]CONFIG
Change-Id: I2f415de8556289a6461a645d559be17089c43c99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:45 +00:00
Stephan Binner
3ade30a2af Convert features.calendarwidget to QT_[REQUIRE_]CONFIG
Change-Id: I93c2e00828a233f004c599bd0702d0a470ae29ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:41 +00:00
Stephan Binner
9a0e8895d6 Convert features.datawidgetmappper to QT_[REQUIRE_]CONFIG
Change-Id: Icabee2b146a16b489ff6aa40261a694f74268dc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:37 +00:00
Stephan Binner
43b7c0c609 Convert features.dirmodel to QT_[REQUIRE_]CONFIG
Change-Id: I8e2c6b49857ffb292c4b08ccab560c59665cc3a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-25 11:23:33 +00:00
Tor Arne Vestbø
185d87708b Fix tst_QAbstractItemView::task200665_itemEntered
Moving the cursor is not synchronous.

Change-Id: I6b820af026585e1fcfef845cc712fa8f6812e941
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-25 10:54:40 +00:00
Friedemann Kleint
4f599c5ea1 Enable IAccessible2 for MinGW
MinGW 5.3 is able to compile the IAccessible2 classes. All that is needed
is some way to provide the missing IIDs, which is done via specialization
of a function template (similar to the MinGW's __uuidof operator).

[ChangeLog][Windows][Accessibility] MinGW builds now support IAccessible2.

Change-Id: I218a4b89c81b54aa96f7c743544388631ca9a53e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-07-25 10:06:43 +00:00
Allan Sandfeld Jensen
a06148e341 Improve symmetry of variant json conversions
Make QVariant::toJsonValue do conversions as well as
QJsonValue::fromVariant.

Change-Id: I175d43677061470691e2e0104a800be355fbbd3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 09:00:46 +00:00
Friedemann Kleint
1044074a49 Fix some qdoc warnings for 5.10
src/corelib/io/qfiledevice.cpp:741: warning: Can't link to 'setFileName()'
src/corelib/io/qfiledevice.cpp:772: warning: Can't link to 'setFileName()'
src/corelib/io/qfiledevice.cpp:790: warning: No such parameter 'time' in QFileDevice::setFileTime()
src/corelib/io/qfiledevice.cpp:790: warning: Undocumented parameter 'fileTime' in QFileDevice::setFileTime()
src/corelib/io/qfileinfo.cpp:1344: warning: Can't link to 'FileTime'
src/corelib/kernel/qcoreapplication.cpp:2007: warning: Can't link to 'isTranslatorInstalled()'
src/gui/opengl/qopenglextrafunctions.h:468: warning: No documentation for 'QOpenGLExtraFunctions::glBlendBarrier(void )'
src/gui/opengl/qopenglextrafunctions.h:494: warning: No documentation for 'QOpenGLExtraFunctions::glGetGraphicsResetStatus(void )'
src/gui/opengl/qopenglextrafunctions.h:475: warning: No documentation for 'QOpenGLExtraFunctions::glPopDebugGroup(void )'
src/sql/models/qsqlquerymodel.cpp:217: warning: Unknown command '\override'

Change-Id: Ide0ce911f6faf964fda8f32fac433da7d2cb11de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 08:58:20 +00:00
Thiago Macieira
1c6d5b0696 QFileSystemEngine: Remove the remainder of Windows XP functions
The attempt at loading these functions at runtime with WinRT always
failed, so stop trying.

Change-Id: I658f552684924f8aa2cafffd14cfc5179ac08498
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-25 01:01:02 +00:00
Thiago Macieira
325b46ce62 QFileSystemEngine: remove dynamic finding of Windows XP functions
(one of them is even from Windows 2000)

We just need to link to userenv.dll now. WinRT is not affected.

Change-Id: I658f552684924f8aa2cafffd14cfc4b785a1d55c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-25 01:00:54 +00:00
Andy Shaw
fcfee98f62 QLineEdit: Don't move the cursor after internalInsert() has done so
internalInsert() will set the cursor to the right position which accounts
for any input mask set on the control as well. Therefore it will already
be placed at the next correct position and should not be changed again
after that.

Task-number: QTBUG-40943
Change-Id: Ic0f5fad6999ddd367e435ec4409a5db5b9eacb7b
Reviewed-by: Daniel Teske <qt@squorn.de>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-24 09:51:17 +00:00
Joerg Bornemann
3becc8527e Let QWindowsPipeWriter::write only warn about unexpected errors
Do not print a critical message when the pipe connection dropped as this
can happen with regular QLocalSocket usage as demonstrated in
qtremoteobjects.

Change-Id: If79915ce5d83b8cae5e090c04e893dafcb5a88a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-24 06:26:49 +00:00
Alex Blasche
2e2fa2a283 Fix documentation for QDBusError::Other
Change-Id: I12c29833599793f0d42de6742109926ba78d5a6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-24 06:14:10 +00:00
Tor Arne Vestbø
593719aab5 macOS: Blacklist flakey test tst_QMenu::tearOff()
Change-Id: Id220f10f4ff756230155c7c8f37713d53ed3ca0c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-24 03:49:37 +00:00
Tor Arne Vestbø
58685a48a6 macOS: Blacklist tst_QMenu::pushButtonPopulateOnAboutToShow
It's flakey/failing on macOS, the menu is opened but opened above
the button, so the intersection test fails.

Change-Id: I6b13a1b0df2b07fa36bbb73071cdeb55547ac93a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-24 03:49:30 +00:00
Frank Meerkoetter
c4e8726042 Fix warning about self assign
...tst_qlineedit.cpp:1938:9: warning: explicitly assigning value of variable of type 'Qt::Key' to itself
-Wself-assign]
    key = key;
    ~~~ ^ ~~~

Change-Id: I18a46f61e13f6e2c74edce869a1c36a7f3a0fb70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-23 12:18:03 +00:00
Gatis Paeglis
0cd54e3cec xcb: use default member initialization in struct
... for better localization. This is not possible in C, but in
C++ a struct has the same features as a class. Thus, use default
member initialization feature (available since C++11).

Change-Id: I91522c3a4fe4270c37bb6e85fddeb5970a847352
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-22 12:25:10 +00:00
Tor Arne Vestbø
f948f96e91 macOS: Blacklist tst_QComboBox::task_QTBUG_56693_itemFontFromModel
Counting draw calls in the style is not a reliable way to count
italic items in the combobox.

Task-number: QTBUG-62080
Change-Id: I6cb6d54535f073f66cfcf61bb19eb645284c835d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-22 06:22:26 +00:00
Thiago Macieira
b28b3af385 QFileSystemEngine::id/Windows: Fix use with directories
The Microsoft documentation says that CreateFile cannot be used to
create directories, so you can only use it on a directory with
OPEN_EXISTING and FILE_FLAG_BACKUP_SEMANTICS. This commit implements
that.

Change-Id: I658f552684924f8aa2cafffd14cfc0e5660a4a62
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-22 00:39:28 +00:00
Tor Arne Vestbø
ab5c28ac55 Fix tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet
Don't assume signals will not be emitted during show. The test should
focus on testing that changing the model results in change signals. What
happens before that is not under test, and not stable.

Change-Id: I71e62abc15fc81c069d7685e4342e795449c3632
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-21 22:10:28 +00:00
Thiago Macieira
b91a6ef9cd Deprecate and remove the unused bearer support in QNetworkProxy
This hasn't done anything since at least Qt 5.0. It's possible it was
only used in Symbian, which we removed before the 5.0 release. This only
served to make the tst_QNetworkProxyFactory test slow.

[ChangeLog][QtNetwork][QNetworkProxy] The functions related to
QNetworkConfiguration are deprecated. They've performed no action since
Qt 5.0, so code using them can safely stop doing so.

Change-Id: I84e45059a888497fb55ffffd14d31b7c2978a04e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-21 18:25:42 +00:00
Błażej Szczygieł
f9afae9e08 QListView: Fix item movement in icon mode
Since b13aa15e10 the event must not be
accepted when calling "canDrop()" method. Inside it "dropOn()" method
is called which requires not accepted event. Otherwise the event will
be ignored later in "QListView::dragMoveEvent()". On next movement it
will be accepted again - the event is now ignored, so "dropOn() method
will work properly.

If "filterDragMoveEvent()" returns false for any reason, the event
acceptance is not changed - the same behavior as before.

Task-number: QTBUG-61951
Change-Id: I2d49ce5b15300c42e2efc745e8e32d3d17f34a2f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-07-21 16:01:50 +00:00
Thiago Macieira
d819d6864a QFileSystemWatcher/kqueue: make the fd duplication + FD_CLOEXEC atomic
The original fd was already FD_CLOEXEC due to qt_safe_open.

Change-Id: Ief61d358e2b54a0fac37fffd14d2394ee02da059
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-21 15:52:42 +00:00
Tor Arne Vestbø
2e3e8cec89 macOS: Blacklist tst_QMenu::layoutDirection
It's failing when enabling synchronous expose events, but likely
due to making assumptions about expose behavior. Will be looked
at in more detail once the expose event patch is in, so we can
move forward.

Task-number: QTBUG-62092
Change-Id: Ie76b5f11ccf841981a42d2eda19fbcda8b43c36c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-21 13:31:19 +00:00
Stephan Binner
e70258a155 Convert features.listview to QT_[REQUIRE_]CONFIG
Change-Id: I707a839bcfc7ad481342d1adb98c9b593f5ca6e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-21 10:36:28 +00:00
Timo Aarnipuro
5cae29ffc7 Move toString calls after their definition
Move two functions that are using toString(const QString &str) from
qtestcase.h to qtest.h. This fixes compilation on INTEGRITY platform.

Task-number: QTBUG-61702
Change-Id: I5a433126741c7a52621616c5b98203e7d642b330
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-21 06:10:02 +00:00
Jake Petroules
8418a6335b Add a safety check to prevent apps from running on unsupported OSes
Although Qt declares its minimum supported OS version to the compiler
and linker, the OS ignores this information when loading shared
libraries, so instead of failing with a useful error message, the
program will simply crash at runtime. This attempts to bring that
failure as early in the lifecycle as possible, and provide a better
error message as well.

Change-Id: Ic58b44f8895eac718c94e62cad6e2506dbea8a7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-21 04:58:07 +00:00
Jake Petroules
6e2eeee7f5 qmake: fix warning about duplicate references in project file
Task-number: QTBUG-59301
Change-Id: I2562b862465a52ecc56f551bcdb98fa7279ebfcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-20 21:24:29 +00:00
Jake Petroules
922e410ebb Fix 32-bit build on macOS
Some customers still need this for interoperability with legacy code.
Let's continue to keep it working in 5.9.x, and then move to
64-bit exclusive features (thus dropping 32-bit entirely) in 5.10.

Task-number: QTBUG-58401
Change-Id: Ibb7200c1885e9caba70439df5f7c86c81b1312b5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-20 21:18:22 +00:00
Giuseppe D'Angelo
548c2fbb3a QHash: make MSVC happy about the iterators passed to is_permutation
MSVC warns about iterators being passed to certain Standard Library
algorithms. dbd55cdaf3 introduced
a usa of std::is_permutation in a public header, which is causing
such a warning to be emitted.

To suppress the warning, Microsoft suggests to either use the 4-arg
std::is_permutation overload (which however is not available
in MSVC 2013) or to use a Standard Library extension, which we are
already using elsewhere in Qt to deal with the same problem. However,
that extension requires the iterator to be moved by size_t quantities,
which isn't the case for QHash::iterator, and therefore generates
more warnings about loss of precision (size_t -> int).

Therefore, go with the 4-arg std::is_permutation, only on MSVC >= 2015.

Change-Id: Idfcff28d14e0f1fde5d77f1deb9eec27c87ff5cd
Task-number: QTBUG-61902
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-20 20:53:34 +00:00
James McDonnell
82f701ed00 Skip EGL surface re-creation when the buffer size is unchanged
Skip EGL surface re-creation when a sequence of unprocessed resizing
requests leaves the buffer size unchanged.  In this situation, the
buffers won't be resized.  Recreating the surface without resizing the
buffers leads to screen providing incorrect information about the
buffers.

Change-Id: I1f75ab99eb1dffe0bcf9660bf014f047407b0c1b
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2017-07-20 20:04:26 +00:00
Daniel Teske
854fdaaf76 QLineEdit: Add selectionEnd() and selectionLength()
Getting the end position of the selection was not possible.

[ChangeLog][QtWidgets][QLineEdit] Added selectionEnd(), selectionLength(),
complementing selectionStart().

Change-Id: Iaecc624063d7c043f9502351f07eb76f869e86f1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-20 13:46:26 +00:00
Simon Hausmann
d39ec44e19 Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-07-20 13:46:11 +00:00