Commit Graph

32137 Commits

Author SHA1 Message Date
Robin Burchell
571eb37ac9 QAndroidPlatformScreen: Add missing override
Missed in b018a5ecef.

Reported-by: Anton Kudryavtsev <antkudr@mail.ru>
Change-Id: Id833fbd77c571923571e59b0c609b56c69308d90
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2017-04-14 11:30:07 +00:00
Robin Burchell
6bf9972621 QMovie: Add lastError and lastErrorString getters
QMovie has an error signal, but it is not possible for users to
"catch" all errors, for instance, if they occur at construction time, and
furthermore, it may not be convenient to add interception of the signal
just to find out what the error was.

[ChangeLog][QtGui][QMovie] Added lastError and lastErrorString accessors,
as a convenience over connecting to the error() signal.

Change-Id: I9c6ef70694c67986ecd30b5dc1b321c4dfa5c315
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-04-14 09:10:34 +00:00
Robin Burchell
01a4d09ef6 QMovie: Make sure to pass on QImageReader errors when they occur
If a file cannot be opened for some reason (like running out of FDs),
emit the error signal.

Change-Id: I9586dda34b2f2cef73593c6dcb855b29d63c2dbc
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-04-14 09:10:27 +00:00
Jake Petroules
401d9b5278 Remove the Windows XP style from public accessibility
Later, the Windows XP style will be removed entirely by means of
being merged with the Windows Vista style (which inherits from the
XP style).

There was actually no reason for these styles being separate
classes in the first place, because both result in the same
appearance for controls on the running version of Windows.
Therefore, the windowsxp style merely appears as a "broken"
version of the windowsvista style, with only minor differences
based on the additional metrics that the vista style provides.
The windowsxp style does NOT, and never did, allow users to get
a Windows XP style appearance on Windows 7 and above (which is
currently Qt's minimum supported platform). Therefore, now that
Qt no longer supports Windows XP, the windowsxp style is unusable.

[ChangeLog][QtWidgets] The windowsxp style is no longer available
as a separate style, because it did not (and cannot) actually
provide an XP-style appearance on currently supported Qt platforms.

Change-Id: I513d9bce3f247f97cfb28dfee88fe888469e0a6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-13 21:39:09 +00:00
Olivier Goffart
4b0d6704d9 DockWidgets: Allow to have floating dockwidgets side by side
Based on what MS VisualStudio can do, allow to have. We can now
drop the QDockWidgets on floating ones so that they are next to eachother

This is activated when QMainWindow::GroupedDragging and
QMainWindow::AllowNestedDocks are both set.

[ChangeLog][QtWidgets][QDockWidget] When QMainWindow::GrouppedDragging
and QMainWindow::AllowNestedDocks are both enabled, floating dock widgets
acquired the ability to be dropped together side by side.

Change-Id: I48765c72ef80ef15aa31b91ae582cbb01dea41d6
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-04-13 17:44:58 +00:00
Olivier Goffart
60be2fb6a1 QMainWindow: move the separator handling in another class
So it will be re-used by QDockWidgetGroupWindow

The Layout template argument can be the QMainWindowLayout,
or the QDockWidgetGroupLayout. They have a function
dockAreaLayoutInfo which return a QDockAreaLayout* or a
QDockAreaLayoutInfo*, respectively. These two class
have the same interface as far as QMainWindowLayoutSeparatorHelper
is concerned. (QDockAreaLayout forward most of its call to
the relevant QDockAreaLayoutInfo)

The code is mostly moved without modification, but there is a change in
startSeparatorMove, because we don't have access to the layoutState to
set the fallbackToSizeHints variable, so instead, we do that from
QMainWindowLayout::hover.

Change-Id: Ic5fa3ee2def3d0155195f751d4770b207732139f
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-04-13 17:44:33 +00:00
Friedemann Kleint
46458ce3ef uic: Port Ui classes to QVector
Regenerate the ui4* files after a change in qttools replacing
QList by QVector in the Dom* classes with the exception of
QList<DomProperty *> since that affects the public interfaces
of QAbstractFormBuilder.

Change-Id: I0922127fb911a5abc125d93ef97a0b22ff94788a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-04-13 12:43:00 +00:00
Friedemann Kleint
11361f903a qsystemtrayicon_win.cpp: Clean obsolete code
No longer dynamically load API that is present on Windows 7.
Increase the WINVER and related defines locally to keep MinGW 5.3
building. Remove all if clauses checking fore Windows Vista and below.

Task-number: QTBUG-51673
Change-Id: I0feedb95537aea2453d48ef784f7852c4e33347f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-12 11:53:08 +00:00
Giuseppe D'Angelo
9dff809b45 Array-backed containers: add shrink_to_fit for STL compatibility
Side note: QHash has squeeze(), but there's no shrink_to_fit on
std::unordered_map.

[ChangeLog][QtCore][QByteArray] Added shrink_to_fit().

[ChangeLog][QtCore][QString] Added shrink_to_fit().

[ChangeLog][QtCore][QVarLengthArray] Added shrink_to_fit().

[ChangeLog][QtCore][QVector] Added shrink_to_fit().

Change-Id: Ifd7d28c9bed70727be6308f0191a188201784f61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-12 11:32:18 +00:00
Marc Mutz
58a4f41af2 QDate/Time: add toString(QStringView) overloads
[ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads
taking the format as a QStringView.

Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-12 11:12:09 +00:00
Marc Mutz
d68c162c1b QLocale: add toString(Q(Date|QTime)+, QStringView format) overloads
While at it, change the interface of qt_repeatCount() to just take
a single QStringView, since QStringView::mid() is so cheap. Add some
\internal docs.

[ChangeLog][QtCore][QLocale] Added toString(QDate/QTime/QDateTime)
overloads taking the format string as a QStringView.

Change-Id: Ic078796677a6db06227c8a3e276dbdb1039ceead
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-12 11:12:04 +00:00
Marc Mutz
9c243d2637 QByteArray: add missing inline keywords
Inline member functions that are not defined in the class body must be
marked with the inline keyword. Otherwise, MinGW complains about any
use of such functions before they are defined with its infamous error
message:

  'char QByteArray::at(int) const' redeclared without dllimport attribute after being referenced with dll linkage

Fix it for all such functions.

Change-Id: Iae76a7ed18e7b2d5cb5e217e154f647be4a2d9c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-11 14:59:49 +00:00
Giuseppe D'Angelo
7af5a3a39e QRegularExpression: streamline some wording in the documentation
Change-Id: Ic1adbf9358ef6fbdaaee52471cd8ed9ca895a9d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-04-11 14:50:03 +00:00
Nikita Krupenko
34f46588aa Add button layout for dialogs on Android
It used macOS layout before, but it differs from the actual layout in
Android/Material Design: affirmative actions are on the right side,
dismissive actions are directly to the left of the affirmative actions
and neutral actions are on the left side.

[ChangeLog][Platform-specific Changes][Android] Android dialogs now have
more appropriate button layout, with affirmative actions on the right.

Task-number: QTBUG-58060
Change-Id: I0755f80261410c64cf4f854b7f2a72e2d959db28
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-04-11 14:39:16 +00:00
Robin Burchell
b018a5ecef QAndroidPlatformScreen: Use an event rather than a QTimer
It looks like the origins of this timer may come from QFbScreen. QFbScreen,
however, changed away from a timer in d7068cbe1b.

There are other reasons to avoid a timer in this case, though: a timer may be
pre-empted by application events (like other timers), which may mean a
significant amount of time could pass between starting the timer and pushing the
contents out to the actual screen (in doRedraw).

This has the effect that flush becomes synchronous, which matches the
behavior of the other platforms as far as I can tell.

Change-Id: Ic67ae6c82945a247dceac44ee1bf7d2940f79d07
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-11 14:26:16 +00:00
Marc Mutz
e91726ef9e QSslSocket/macOS: optimize QUuid usage
- don't create a QString, a QByteArray suffices
- perform the mid() operation on a view type (QLatin1String),
  not on a container
- use QStringBuilder

Change-Id: Ifd74f2bc98606425f9f6cb4da8618e8066a8b12e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2017-04-10 18:00:15 +00:00
Marc Mutz
30efb14313 Make QStringView::storage_type public
... so users of QStringView::utf16() can use it, without having to
revert to decltype()/auto.

Change-Id: Ie09696b9354d3917914f8e2692769cfd35b01ae1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-10 14:23:50 +00:00
Oliver Wolff
13bb46bc3a winrt: Use hostnames for socket connections
Using IP addresses does not work for every use case on WinRT. The
workaround that is in place for VPN connections uses the host name
directly but has the disadvantage that it:
    1) does a host lookup nevertheless and ends up using the host name
    afterwards.
    2) needs a set environment variable to be activated.

Instead of doing a host lookup we now use the same approach that is used
if a proxy with the HostNameLookupCapability is present. In this case the
lookup is skipped and the direction is made using the hostname.

The big advantage of hostname over ip addresses on WinRt is, that
Windows handles everything related to lookup and proxies (it uses the
system proxy in this case), so we do not have to take care of that.
As the WinRT backend falls back to the "connectToHostByName" in any
case no further adaptions are needed.

QT_WINRT_USE_THREAD_NETWORK_CONTEXT cannot be completely removed though
as the creation of the network context should not be done
unconditionally.

This change partially reverts e9fa435652

Task-number: QTBUG-59989
Change-Id: I5dc7481b7499192641470b4b5a6642509a4b4f38
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-10 05:20:16 +00:00
Marc Mutz
3ded791062 Mark qCompareStrings() functions pure
Change-Id: I73945aceeb1e3e2794c285ca6379bee3d94013a6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-04-09 05:26:21 +00:00
Gatis Paeglis
fff55558cf cleanup: remove references to unknown classes
Google did not find anything. I guess it is just some
development side product.

Change-Id: Idc44870e71bad1c13858210c7830e08573442cca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-08 08:09:37 +00:00
Marc Mutz
de3785b8bc QVersionNumber: add fromString(QStringView/QLatin1String) overloads
The parsing code anyway operated on a QByteArray created from
toLatin1(), so expose this to the user by providing a QLatin1String
overload.

Also provide a QStringView overload, since we can. Port one user (in
qmake) to the new overload.

[ChangeLog][QtCore][QVersionNumber] Added QStringView and
QLatin1String overloads of fromString().

Change-Id: Idbff44c3997f5cfa86ea1bce8b3da4b700a3d9cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-08 05:40:52 +00:00
Marc Mutz
f5d8ad61a4 qmake: use new QString::arg(QStringView) overload
Add ProString::toQStringView() to avoid creating QStrings just to pass
them to QString::arg() (single-arg; multiArg() does not, yet, accept
QStringViews).

I could have used the existing toQStringRef() function, but QStringRef
is a tad more complex to copy and quite a bit less future-proof.

Change-Id: I344c46f301768e844c487d36ce3e6cb276de8843
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 18:33:23 +00:00
Marc Mutz
cdbe9d1483 QMakeEvaluator: port a QString::split() to a QStringRef::split() loop
Change-Id: I91a65776124f88a7e2e4778dbe9154b597f52212
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 18:33:18 +00:00
Jesus Fernandez
18cdf8e90b Adds a list of supported platforms in PI mkspec
Change-Id: I7e67ffc41c7a389750e1ab342a570a1dda8ff077
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-07 10:18:51 +00:00
Martin Smith
7e1658f2ec doc: Correct include guard
It should be QCOCOAWINDOWFUNCTIONS_H, not QXCBWINDOWFUNCTIONS_H.

Change-Id: I296e1db28f3727c6aba6de4f02cf26808f72a8a1
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-07 10:09:00 +00:00
Gatis Paeglis
f57322f70e xcb: remove x11FilterEvent() code path
This is a legacy code that was there to support
IM plugins using the Qt4's QInputContext::x11FilterEvent.
Updating IM plugins to the new API is a trivial task,
external plugins have had enough time to switch to
the new API QInputContext::filterEvent(). The 'fcitx'
plugin did the required changes in Oct 2014. AFAIK
this was the only remaining plugin that still used
x11FilterEvent.

Change-Id: I7702bcd7017d2d24a1ed07fdebac8b61ca178161
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-07 09:25:07 +00:00
Marc Mutz
399ab058c9 Add front()/back() to QString, QStringRef, QByteArray and QLatin1String
These STL-compatibility functions are present on our generic
containers, but not on the string classes.

[ChangeLog][QtCore][QString/QStringRef/QByteArray/QLatin1String] Added
front() and back() for STL compatibility.

Change-Id: I536019396b319abd1e2daf9c64ebab4e7a35b334
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:32:32 +00:00
Marc Mutz
5dc1e08c8c Add qConvertTo{Utf8,Latin1,Local8Bit,Ucs4}() and corresponding QStringView methods
Like the qt_compare_strings()/qCompareStrings() split, distinguish
between the internal and exported functions.

Because of the circular dependency between qstring.h and qvector.h,
the inline toUcs4() function has to be in qvector.h.

At some point, we need to refactor the headers so qvector.h is lower
in the dependency chain than qstring.h. It's not the first time this
bites.

Change-Id: Ief9f3bd92c83cdd1f31c51c700f42e146916eefd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 08:54:16 +00:00
Jesus Fernandez
86005ea257 Replace Q_DECL_OVERRIDE with override in imageformats
Change-Id: I7280cdf674b2a202f9ef7ff2bb9b6732e09a5a76
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-07 08:45:51 +00:00
Liang Qi
191a210478 Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-04-07 09:38:34 +00:00
Marc Mutz
dea78262e5 tst_QStringApiSymmetry: Add tests for truncate() and chop()
All good.

Change-Id: Id791a04fd5e2c9bc7f54660eaaa95d6db61a5674
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:34:49 +00:00
Marc Mutz
95db1f6cae Optimize comparisons of QChar with QLatin1String, QString, and QStringRef
Instead of blindly calling the general compare function with a 1-char
string, compare size() and front() to 1 and the QChar, respectively.

Change-Id: I6c83c0772d16294ce6dd7eb058513d717208d6cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:32:39 +00:00
Marc Mutz
95263dbf7a Add a test for container API symmetry
Akin to the successful tst_QStringApiSymmetry, add such a test for
generic containers, too. Yes, we have tst_collections, but it's a
cut'n'paste mess that makes it hard to systematically perform
cross-class checks for consistency. This new test, still in its
infancy, uses templates and thus ensures that exactly the same checks
are run on all containers.

Starting out with front()/back(), which the string classes were found
to lack, we will build this test up, as we did and continue to do with
the string API one.

Change-Id: I07323340b5612ecc658232b2776d788018010d0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:32:24 +00:00
Marc Mutz
5e93361888 Add a test for consistency of hash values between QString{,Ref,View}
Change-Id: I64a169fd6c8e2444bfe67e3ecd5375ea7b6a81ee
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:30:17 +00:00
Liang Qi
5d6073be27 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	mkspecs/linux-icc/qmake.conf
	mkspecs/macx-icc/qmake.conf
	mkspecs/win32-icc/qmake.conf
	src/gui/painting/qgrayraster.c

Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
2017-04-07 10:24:33 +02:00
David Faure
e5a2c87dc7 xcb_egl: fix clang error due to m_connection now being unused
Change-Id: I00846d26013d31856f049659069852d749d54b8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-04-07 07:27:21 +00:00
Sami Nurmenniemi
bbb67ca32c Fix tst_Collections for gcc/arm
- Alignment test was not compiling or passing on GCC / arm
- Using C++11 alignas() enforces maximum limit for the alignment, which
  at least on GCC / arm is __BIGGEST_ALIGNMENT__ multiplied by 8
- On GCC 6.2.0 / x86_84, maximum alignment accepted by alignas is 128
- On GCC 5.3.0 / arm, maximum alignment accepted by alignas is 64
- This change calculates biggest tested alignment on ARM targets
  and compilers supporting alignas() to the value calculated
  from __BIGGEST_ALIGNMENT__

Task-number: QTBUG-55492
Change-Id: If2b70000ff9cdc5ae8c5a00e39f79efcc6ba1221
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 05:54:04 +00:00
Sami Nurmenniemi
5c6d132408 Fix tst_QDirModel for qemu
QTBUG-43818 does not affect only Android, it can be reproduced also
with qemu.

Change-Id: I6364c09b3c7f860b34899e26056ad562b7c338f2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-07 05:53:47 +00:00
Thiago Macieira
97d7d80e73 Disable MSVC warning 4577 in headersclean
This warning is added in MSVC 2015 and is printed when we use noexcept
in modules we turned exceptions off.

Task-number: QTBUG-59645
Change-Id: Id92f4a61915b49ddaee6fffd14ae3b943ccd2bce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 01:51:44 +00:00
Marc Mutz
f672bd6316 Extend the check for null and empty QString hashing to QString{Ref,View}
Change-Id: I5c41287991f6dd2eeb3d54699da0f653bfac59be
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 22:19:41 +00:00
Samuel Gaist
c608ffc56a Improve pair-like class handling in tests
Currently when doing comparison with pair-like classes the fallback
toString method is called which returns a Q_NULLPTR thus not allowing
proper diagnostic of the values that triggered an error. This patch
adds support for QPair and std::pair to improve the tests output
readability.

[ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and
std::pair on failure.

Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 21:46:32 +00:00
Sami Nurmenniemi
0624085b73 Don't set margin on offscreen window if it has a parent
Offscreen platform had window frame margins set to 2 by default unless
Qt::FramelessWindowHint had been set. Margins must not be set to 2 if
the window has a parent. This change fixes two tests in
tst_QWindowContainer for offscreen platform.

Change-Id: Ib1577c301ea3a3b240bfa7c46ff12510dd2bcef0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-06 13:29:01 +00:00
Liang Qi
c50f6a8329 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-04-06 14:35:54 +00:00
Sami Nurmenniemi
60f6e4428f Fix tst_QFile for qemu
Qemu does not report /proc/self/maps size correctly. Added expected
failure for it

Change-Id: I4019884702b8f9a33717b02e79c9e0c042b2449f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:19:55 +00:00
Sami Nurmenniemi
42b3ed763f Fix network tests on qemu/arm
Function if_indextoname fails on qemu because SIOCGIFNAME is not
supported. Expect failure if emulation is detected.

Change-Id: I53b41286d82458661e7fa723af385f323582ce7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:19:46 +00:00
Liang Qi
0fc569184c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
	src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/widgets/widgets/qtabbar.cpp

Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
2017-04-06 14:16:31 +02:00
Marc Mutz
6f41600422 Port internal class QXmlUtils to QStringView
... and adapt callers.

In one case, port a use of QString::toLatin1() to QStringRef::
toLatin1() so together with this change and the addition of
QString::arg(QStringView) we can drop one more QStringRef::toString().

Change-Id: Iba898af8cc2a9e1a811e271789359395f595ad32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 12:06:26 +00:00
Marc Mutz
e1e6506c8d QString: add QStringView/QLatin1String overload of (non-multi) arg()
Use the new overload directly in QXmlStream*.

Saves 129B in QtCore text size on optimized GCC 6.1 Linux AMD64
builds, even though we added two more functions.

[ChangeLog][QtCore][QString] Added arg(QStringView),
arg(QLatin1String) overloads.

Change-Id: Idf7236dcab763824593f34182e4e0b16b5ed4321
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 12:06:18 +00:00
Marc Mutz
0a5b610679 QText{En,De}coder: mark ctors explicit
C++11 allows these to be called implicitly.

Change-Id: Ife62ce4df4c294623e84fb0c0751ae9b4f6d1020
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:05:56 +00:00
Marc Mutz
c928d08267 QTextCodec: add QStringView overloads
[ChangeLog][QtCore][QTextCodec] Added fromUnicode()
and canEncode() overloads taking QStringView.
[ChangeLog][QtCore][QTextEncoder] Added fromUnicode()
overload taking QStringView.

Change-Id: I2599f25570480d967921ccd4414e092bfc90d821
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-06 12:05:33 +00:00