Commit Graph

25950 Commits

Author SHA1 Message Date
Marc Mutz
1005b7a0de Long live qUtf16Printable()
QString::asprintf() has the ability to take a ushort* array as
obtained from QString::utf16() and insert that into the output
with an %ls conversion.

But no-one ever used this, because just passing QString::utf16()
to QString::asprintf() creates a warning about wchar_t* expected,
but ushort* provided.

The new qUtf16Printable() macro adds the necessary casts (via void*
to prevent any "type-punned pointer" warnings) to make
passing QString::utf16() to QString::asprintf() work silently.

This should greatly reduce the need to do a round-trip via utf-8
just to print the contents of a QString.

[ChangeLog][QtCore] Added qUtf16Printable().

Change-Id: I7ddd8d2b2a2191c9faa26aca95d49850d94b287c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-21 14:25:55 +00:00
Erik Verbruggen
ecb6835a9f OSX: fix build.
Move the QT_USE_NAMESPACE up, so any use of Q* classes won't result in
compilation errors when Qt is configured to be in a namespace.

Change-Id: Id559c86798529f6cad43a75fce303c108ce820bc
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-11-21 06:09:00 +00:00
Marc Mutz
e002a55355 tst_compiler: check more cases for RANGE_FOR
Check that it works on C arrays, with auto type deduction
and with types that only provide free begin()/end()
functions that can only be found through ADL.

Change-Id: I760722a0f56c9ebe967070ff68af90b96ed77e66
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-20 20:18:07 +00:00
Marc Mutz
226ce6020e QPair: use std::type_traits for exception specifications
This should solve problems with our use of the noexcept
operator, because that's how std::pair is defined, too.

Mid-term, we should kill QPair and use std::pair instead.
It really has gotten way too complicated to implement a
C++11 pair correctly.

Task-number: QTBUG-48780
Change-Id: Ied0acd220e5131000a957dc356d6efcdd8f83828
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-20 20:17:47 +00:00
Friedemann Kleint
10bea194f8 Windows: Implement QPlatformTheme::WheelScrollLines.
Obtain the system setting via SystemParametersInfo(),
amending fac71528cc.

Task-number: QTBUG-49561
Change-Id: Ie7a956fdc6b175ad09356949645c1e8937053abd
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-20 19:12:24 +00:00
Friedemann Kleint
8928076231 Windows: Fix calculation of frame offset for layered windows.
Pass 0 window to High DPI scaling function to prevent it from
trying to find a screen and applying a screen offset.

Task-number: QTBUG-49516
Change-Id: Ib3e1919985f2c6df1dd8369f6e28b3ee1fdb7afe
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-20 19:12:15 +00:00
Friedemann Kleint
296eb88e1c Windows: Refactor cursor handling.
Applying scaling to the pixmaps used in pixmap cursors
requires applying a scale factor in a code path
now in a constructor of QWindowsWindowCursorData (nested
into QWindowsWindowCursor). This needs to be split and
the code paths for cursors created from a Qt::CursorShape
value and pixmap cursors need to be further separated.

Replace the QSharedDataPointer-based QWindowsWindowCursor
class by a simple, non-copyable class CursorHandle
managing the HCURSOR handle and pass it around using a
QSharedPointer. Split the cache in QWindowsCursor into one based
on Qt::CursorShape and one based on the cache key aggregated
from the pixmap cache keys (using QWindowsPixmapCursorCacheKey
renamed from QWindowsCursorCacheKey), simplifying the standard case
based on Qt::CursorShape.

Reuse class CursorHandle in
QWindowsOleDropSource::CursorEntryCursorEntry, which used a
similar class.

Remove QWindowsCursor::createSystemCursor().

Avoid the construction of temporary QCursor objects for the
standard cursors constructed from using resource pixmaps by
introducing a struct PixmapCursor containing pixmap
and hotspot.

Task-number: QTBUG-49511
Change-Id: I5393d64bd70f7dab68c0a8c2255c7685ac367b2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-20 19:12:01 +00:00
Edward Welbourne
8da24d8a5c Comment to point out problem with CRLF handling.
Change-Id: I6352c5c68183207b9dfd332fbecc89c1c8c16d20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:02:07 +00:00
Edward Welbourne
0c73bafe23 Simplify a loop's set-up and control.
Change-Id: Ie9e002d7d7fb269f3a99cce98e4250a866523360
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:59 +00:00
Edward Welbourne
213111f0fc Rework scan for keyword in preprocessor directive.
When looking for the keyword in a preprocessor directive, we were
checking for non-word characters to find its end.  If that check
failed (i.e. we had a word character) we would then check for EOL
(which necessarily failed, on a word character).  That made no sense.

However, we genuinely have no interest in a directive with nothing
after the keyword, so do check for EOL after the loop (once we've
skipped spaces after the keyword).

The loop itself was made needlessly complicated by, on finding the end
of the keyword, skipping over later space inside the loop.  Moved this
outside the loop.

Change-Id: Iccc2d445bf44deb75604e7fa60f2464e7397d8ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:51 +00:00
Edward Welbourne
3780b3da99 Skip spaces (after #) earlier to catch blank line or end-of-buffer.
The C preprocessor does believe in a # [nothing] line; and we may as
well give up before checking for keywords if we've run out of buffer.

Change-Id: I64dc3ad2808435389d0d7b56dcbc9d92ae72aa6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:45 +00:00
Edward Welbourne
00a855d643 Avoid having division caught up in parsing of comments.
A loop to skip space and comments was meant to break on anything else
but would have not broken on a division operator (where it should) due
to it getting caught in the check for a comment-start, without falling
back suitably when it didn't complete that check.

Managed to contrive a suitably twisted change to findDeps test to
reveal the bug; broken previously, now fixed.  Not ideal, as it relied
on another bug to fail previously - backslash-newline shouldn't end a
preprocessing directive line - but it should still pass once that's
fixed, too.  Exercising a bug in qmake usually involves code that
won't compile anyway, making it tricky to write a test that reveals
the bug but that passes once it's fixed.

Change-Id: I08a1d7cc5e3d7fd1ac0a48e5c09dfdfbb7580b11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:38 +00:00
Edward Welbourne
f1d5641d49 Readability clean-up (purely cosmetic).
Principally *(buffer + expr) -> buffer[expr] changes, with some hspace
normalization on affected lines.  Made some empty loops more visible.
Pulled out a repeated character class test as a function.

Change-Id: I03d1b633550ad1814fa383d69ea04138dd0f82cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:32 +00:00
Edward Welbourne
93466161ca Rip out the #qmake_warning "preprocessor directive".
No-one is known to use it - we don't even have a test for it.  It
plays poorly with the real preprocessor and it has not produced any
output since at least Qt 4.0 (unless qmake is invoked with at least
one -d flag, drowning the output in level 1 debug output).

This incidentally means no preprocessor directive we care about has an
underscore in its keyword.

Task-number: QTBUG-49487
Change-Id: I123a945c1dfe29d1d3ceee1129cfedc043f2e7d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:26 +00:00
Tuomas Heimonen
dfc76d57b2 tst_qnetworkcookiejar: Added TESTDATA to .pro file
Change-Id: I49058479765db2cc4dbe25a8c05edfe0af0d7d12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-20 14:41:22 +00:00
Marc Mutz
ceb71d5b3f tst_QString: add checks for sprintf's %ls
... at the cost of a bunch of warnings about
ushort*/wchar_t*.

It wasn't checked at all, which isn't really a solution,
either.

Split off the %s checks into a separate function, which
makes obvious the sorry state of sprintf non-%s, non-%d
testing that's left.

Change-Id: I6312f984bacfb568b609e34b5218b3ab9a9765c4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-20 11:09:34 +00:00
Marc Mutz
e4e10fa2d5 QString::vasprintf: remove egcs-2.91.66 workaround
We don't support that compiler anymore.

Change-Id: I6d100a2d149ce4e506c7f8be3b56a33fa9d7092f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-20 11:09:21 +00:00
Erik Verbruggen
5ff7a3d96e Add {add,sub,mul}_overflow for signed integers.
In C++, signed overflow math is Undefined Behavior. However, many CPUs
do implement some way to check for overflow. Some compilers expose
intrinsics to use this functionality. If the no intrinsic is exposed,
overflow checking can be done by widening the result type and "manually"
checking for overflow. Or, for X86, by using inline assembly to use the
CPU features.

Used in QtQml.

Change-Id: I2ef2523ccaa98f6757a45e24862a2fa730a26bb0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-20 11:08:05 +00:00
Nico Vertriest
de43d4fafd Doc: added doc about removal option qmljsdebugger by QCoreApplication
Task-number: QTBUG-46597
Change-Id: I2ed42480bd96119f04828a7a965c348f7c773acd
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2015-11-19 21:31:38 +00:00
Oswald Buddenhagen
a7965a13aa remove redundant "mac" checks
qt_framework and {app,lib}_bundle imply darwin, so there is no point in
testing for it.

Change-Id: I9fe48c26c8e271a5575b17e92df8674d3c3a3204
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-19 20:21:30 +00:00
Oswald Buddenhagen
2e6754d942 fix the determination whether to build a module as a framework
CONFIG+=qt_framework is actually put into qconfig.pri, so it's always
set in framework builds. things (sometimes) worked only by virtue of the
qt_framework checks being in "else" branches of "static" checks. use
lib_bundle instead, which triggers the actual framework build anyway.

amends b72d1db44.

Change-Id: Ib725c43476d9fb38bad940ce09905d29ff3edfa3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-19 20:21:25 +00:00
Oliver Wolff
dc3e7e45eb winrt: Merge Languages and ManifestLanguages for QLocale::uiLanguages
Task-number: QTBUG-48140
Change-Id: I904ad48e7bc48867a362e3f6c5ca1516e55ed872
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-11-19 19:59:33 +00:00
Maurice Kalinowski
536b38c1d3 Remove hardcoded capabilities in Windows 10 manifest template
While all apps need to have internetClient as a capability, the option
to provide further capabilities via qmake has been removed in the
template.

Instead we add the required items inside the prf and keep the manifest
template as generic as possible.

Task-number: QTBUG-49504
Change-Id: If26b9da277a5269a57b34e74c146b40b1b64d091
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 19:59:17 +00:00
Błażej Szczygieł
83d7e83b78 xcb: Fix slow widget resizing
It can speed up window resizing using on XCB platform
(like in Qt4 or GTK). It doesn't affect QRasterWindow,
but it affects all QWidget-based windows and OpenGL windows.

This code uses XCB Sync Protocol on all windows when it is supported.
In previous code the XCB Sync Protocol was used only when window
doesn't support OpenGL (on QRasterWindow),but QWidget can use OpenGL,
so it doesn't use the XCB Sync Protocol.

With XCB Sync Protocol which is implemented in Qt XCB plugin,
windows can be resized smoother/faster. You can see bigger difference
when you use non-composited window manager to test it:
 - Kwin without compositing and fast style,
 - Marco,
 - Xfwm4,
 - Openbox.

Task-number: QTBUG-46641
Change-Id: Ia18dee94616e64ba7e11bd4b062d2326ec530748
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-19 19:30:44 +00:00
Samuel Nevala
dd3be4fbac winrt: Use handleExtendedKeyEvent when handling back button.
QWindowSystemInterface::handleKeyEvent runs the shortcut override
unconditionally; use QWindowSystemInterface::handleExtendedKeyEvent
instead, because it allows bypassing the override (as the back button
press is not a valid shortcut). This also prevents an unnecessary mutex
lock.

Change-Id: I8d8bb957e1556ac47e031cfe6fca6481f7c3220d
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 16:19:49 +00:00
Morten Johan Sørvig
97c8f6aa9c OS X: Add opt-in for CoreFoundation event dispatcher
Opt-in by setting
	QT_EVENT_DISPATCHER_CORE_FOUNDATION=1

This will make QCoreApplication and QThread create
a QEventDispatcherCoreFoundation instead of a
QEventDispatcherUNIX.

With this change we can now support calling native API
that requires a running Core Foundation event loop
on the QCoreApplication main thread and secondary
threads. Previously this was only supported on the
QGuiApplication main thread.

Rewrite the #ifdef event dispatcher logic slightly:
both OSX and GLIB now gets an "else" branch for the
UNIX event dispatcher, instead of the current "dangling
else" pattern which only works for one #ifdef case.

Change-Id: If853567fa097fe007502b0804c2307a989719866
Task-number: QTBUG-46625
Task-number: QTBUG-48758
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 16:04:56 +00:00
Friedemann Kleint
ff4d8906f6 Direct2D: Fix build.
Fix the include path of the event dispatcher which changed after
08a4b7f745.

Change-Id: Ie679b189bd65dc3388ba0d28d01036e3d05683e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-19 16:01:06 +00:00
Friedemann Kleint
3d46f32c53 Windows: Open GL blacklist - Disable Mobile Intel 945GM
Like GMA 3150, the card cannot handle Desktop GL nor ANGLE.

Task-number: QTBUG-47435
Change-Id: I88c14ac5d642eb931779f689799295b9a169cd3b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-19 16:00:54 +00:00
Rafael Roquetto
986a5262e3 Add QPixmapStyle class
The QPixmapStyle class provides a mechanism for implementing pixmap based
QStyles, using the same concept introduced by the BorderImage QML component.

The bb10style plugin in qtstyleplugins uses this class and is currently the
only user.

Change-Id: Ibfa2104e95ba6a91e89a6277baa97a7fc9edaec2
Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-11-19 15:43:53 +00:00
Alex Trotsenko
3d93fb0771 QAbstractSocket: simplify a check for data availability
We know that the QAbstractSocketPrivate::canReadNotification() slot is
called by the engine's read notifier only when new data is available for
reading, or when the socket has been closed. This allows us to remove
additional checks for engine validity and data availability for unbuffered
sockets.

Change-Id: Ic278cf2214d418d8fe471ea24a765b8d5840b0a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 14:58:11 +00:00
Laszlo Agocs
7c6625b105 Support mixing native child widgets with texture-based ones
Currently QOpenGLWidget and QQuickWidget do not support having native
child widgets inside the same top-level window. In some cases this is
inevitable, f.ex. multimedia may require native windows when used from
widget apps. winId() calls made for various (valid or invalid) reasons
are also problematic.

There are no blockers for supporting this setup, however. By storing
multiple texture lists (one for each subtree where the root is a
native widget), adding the missing markDirtyOnScreen calls, letting
each native widget access the correct texture list (i.e. the one
corresponding to its children) when they are (separately) flushed, and
fixing composeAndFlush() to take the update region and the (native
child) offset into account, it can all be made functional.

The change also fixes the issue of keeping GL-based compositing
enabled even after all render-to-texture widgets in the window become
hidden. Due to the changes of how such widgets are gathered,
composeAndFlush() is not invoked anymore when no such widgets are
discovered for a given native parent. This is great since having
compositing enabled infinitely is an issue for applications like Qt
Creator that implement certain views with QQuickWidgets but cannot
afford the cost of texture uploads in other places (e.g. for the text
editor) on slower machines.

The openglwidget manual test is greatly enhanced to test various
situations (MDI, scroll areas, tab widgets, QOpenGLWidget as native
child, QOpenGLWidget with non-tlw native parent, etc.)

Task-number: QTBUG-48130
Task-number: QTBUG-49172
Change-Id: Iad098359c8bcf749f01c050da0853415e1550eda
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-19 13:56:52 +00:00
John Cumming
208496091d Add Section Symbol at end of text flow when showing paragraphs
Insert a section symbol (U+00A7) to the end of a text flow instead of a
space as many text layout applications do.

Task-number: QTBUG-49252
Change-Id: Ib1276b508c24824b6329e0458ae5171bc1a288c3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-19 11:53:30 +00:00
Andrey Bienkowski
a7db6e3467 Fixed memory leaks in the "40000 chips" example.
Two QObjects had no parent. This caused memory leaks on app close.
Confirmed with the valgrind memory analyzer tool from Qt Creator.

Change-Id: I9294099ca819be1a9c5b74b3cec5bf197be06433
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-19 11:30:50 +00:00
Marc Mutz
bbe65832f5 QString::vasprintf: avoid allocating memory for format text copied verbatim
... by using the new QUtf8::convertToUnicode() function in
conjunction with QString::resize().

For this to be a clear optimization, resize() must be banned
from shrinking capacity, which another patch will implement.

Change-Id: I6394af95ef1aaae131e23a4227734eb76fa685cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:43 +00:00
Marc Mutz
db9a0befca Add a QUtf8::convertToUnicode() overload that operates on an existing buffer
... and therefore doesn't need to allocate and thus
can be marked as nothrow.

Technically, the function doesn't have a wide
contract, because it has the precondition that
the buffer pointed to by the first argument needs
to be large enough to hold the result.

But that precondition can't be checked from within
the function, so no failure can be generated for
it and thus the nothrow guarantee is acceptable
(and desireable).

Change-Id: Iaf6ea6788ef6b4bbb6d8de59a3d0b14d66582307
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 11:30:37 +00:00
Marc Mutz
110e82f5e9 QString::vasprintf: avoid allocating memory just to parse a number
Port parse_field_width from constructing a QString and
then calling toInt() on it to use qstrtoull().

Not only do we not allocate memory anymore, we even
don't need to copy the digits out of the format
string - qstrtoull() does it all for us.

In order to preserve behavior with the previous code,
which consumed all digits before performing error
checking on them, we also consume all digits, even if
qstrtoull() would have returned the start of the range
as the end pointer.

Change-Id: Ief941ce3a8ea43d2e5475d9eab77d7d0d7abc450
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:30 +00:00
Marc Mutz
e17629e32d QString::vasprintf: Extract Method parse_field_width
... and reuse the function to parse precision, too.

This also allows to more easily simplify it (done in a
follow-up commit).

Change-Id: I9da27c4b06565f676e15ef9cab7c53b5d464515e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:23 +00:00
Marc Mutz
139fd9bd0d QString::vasprintf: Extract Method parse_flag_characters
... and simplify the method afterwards:

Drop the boolean that was used to control program
flow when the code was still part of vasprintf(),
by taking advantage of the fact that we can now
just return from the function to break out of both
the switch and the loop.

Change-Id: I97f050b63c0c309aaed3cb0fe979d53c8d970003
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-19 11:30:07 +00:00
Erik Verbruggen
72c68f5f22 Reimplement qt_inf/qt_snan/qt_qnan using std::numeric_limits.
Qt already assumes a working IEEE-754 implementation, so we can rely
on a working std::numeric_limits<double>.

This patch also gets rid of three cases of type-punning with unions
(which is undefined behavior in C++).

Change-Id: Ic3747f49d55e372960abf2091c1d5752c1eccdff
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 10:56:41 +00:00
Laszlo Agocs
e1fb3b0b3e Add EGL stream state defines used by Qt Wayland
Change-Id: I7318de90477aa92abd782cf2038e882152b515bf
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-11-19 08:33:41 +00:00
Laszlo Agocs
3f937393d5 Add Xlib for eglconvenience
This used to work by accident but now with the recent build system changes
the problem became apparent. Not listing the X11 libs is wrong anyway.

Change-Id: I6f75dafa81510d6d6a7571a9fe156cc7b968c8dc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-19 08:33:31 +00:00
Eirik Aavitsland
711f799298 Make the ppm image handler corrctly handle long comment lines
The ppm decoder used a fixed size buffer to discard comment lines,
which would fail for comments longer than 100 characters.

Task-number: QTBUG-49414
Change-Id: I92e910e025cf7584a6ff1c0e5b0e8a4ab281d479
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-11-19 08:06:07 +00:00
Marc Mutz
912df566d0 tst_compiler: make the check for C++14 return type deduction harder
Recurse into self must work, e.g.

Change-Id: I2cccd3d40d2ab5c75a18bf4425b790d30b4d7af0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-19 07:43:34 +00:00
Marc Mutz
62f2a0fb0d QXmlStreamStringRef: unbreak move special member functions
The QXmlStreamAttribute move operations expect QXmlStreamStringRef
to have move special member functions, but in fact the non-trivial
QXmlStreamStringRef dtor prevented them from being generated by the
compiler. We can't remove the dtor, because it's exported :(

So provide all the move special member functions by hand, and since
their presence in turn prevents the copy special member functions
from being generated, provide those too.

Change-Id: I494aea24981cdb661abe33a96976a363cfe7ef1b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-19 07:40:49 +00:00
Marc Mutz
2697d77141 QXmlStreamStringRef: mark as shared-not-movable-until-qt6
Requires adding member swap. Member-swap is also
necessary to fix the deleted move-assignment operator
of this class, on which QXmlStreamAttribute heavily
relies for its own move assignment operator.

That's why it's not proposed for dev, but 5.6.

Change-Id: Id7d0823d44fc6e55ada7c096ae95444f6bb50963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-19 07:40:39 +00:00
Marc Mutz
f9de9eae3a Replace backwards Java-style iteration with new reverse_iterators
Faster, and, thanks to the new reverse_iterators, just as convenient.

Change-Id: Ibc6c64051a8ede4a47428e9271ffbeaa921fc255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-11-19 07:40:29 +00:00
Marc Mutz
80d7b19b80 QCommonStyle: remove use of obsolete QStyleOption*V<N>
They are obsolete since Qt 5.0.

Change-Id: I96b03fa6b4986de7571caf368b692d2a037a026f
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-11-19 07:40:22 +00:00
Friedemann Kleint
efd8e6922c QSqlQueryModel::clear(): Call begin/endResetModel().
Call begin/endResetModel() in QSqlQueryModel and all
derived classes.

Task-number: QTBUG-49404
Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-11-19 07:24:13 +00:00
Tim Blechmann
970f44bf48 qfactoryloader: static qt compile fix
statically linked qt does not compile, as versionKeyLiteral() is unused,
causing clang to complain:
error: unused function 'versionKeyLiteral' [-Werror,-Wunused-function]

Change-Id: I6a233081e7c58fce75ece82616f937f29a23a81b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-19 07:09:10 +00:00
Oliver Wolff
36f3288a23 Use standard error handling in qhostinfo_winrt.cpp
Change-Id: I83555bf9952c01c68fb270a7e1f88ac0ee6ed373
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-19 06:55:26 +00:00