Commit Graph

26468 Commits

Author SHA1 Message Date
Timur Pocheptsov
daeed4631a Blacklist failing tst_QFile tests (OS X)
openStandardStreamsFileDescriptors and openStandardStreamsBufferedStreams
fail on OS X: lseek somehow works on sequential streams (standard streams)
but QFile has pos() == 0 (since it's sequential).

Change-Id: I6a6161c012a91de189f59c533880fb8fe7a66d37
Task-number: QTBUG-49841
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-01-06 09:38:55 +00:00
Edward Welbourne
e5724533e4 Remove declaration of method nowhere defined
Change-Id: Ia95aac626803a85fea0bc0bc99972eb34215d351
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-06 09:10:38 +00:00
Takumi ASAKI
83dedc5b74 Fix potential crash in FreeType font database for WinCE
Change-Id: Iea922c2561d59a67cc26c300325a3f198baaafa7
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-01-06 01:14:57 +00:00
Błażej Szczygieł
0b3da1907d xcb: fix drag and drop when window is hidden
This patch fixes drag and drop operation on XCB platform when window
will be hidden. The window can be hidden during dnd operation by
switching virtual desktops or by minimizing all windows (show desktop)
using key shortcut.

The ShapedPixmapWindow must grab mouse before dnd operation if mouse is
not grabbed by other window (like in Qt4).

Task-number: QTBUG-46243
Change-Id: I807bc842719a2d0ea0f4dcb733c06c1fd08813e1
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-01-05 21:12:34 +00:00
Marc Mutz
e7174533e7 xcb: use qLoadPlugin()
... instead of rolling your own.

qLoadPlugin() expects the create() method of the Plugin
class to take at least the QString key. Since this plugin
create() method doesn't take one, supply a wrapper.

Change-Id: I690fecd3390cc706a45f40ba06dda2b952ff0d85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-01-05 17:37:16 +00:00
Marc Mutz
c34ab3714a eglfs: use qLoadPlugin()
... instead of rolling your own.

qLoadPlugin() expects the create() method of the Plugin
class to take at least the QString key. Since this plugin
create() method doesn't take one, supply a wrapper.

Change-Id: I5b90b4b87e83f2e8a2e8942b792bb39b87d5f2de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-05 17:37:12 +00:00
Shawn Rutledge
2d8b0d1cd5 xcb: don't select XInput events on the root window
If we select XInput events, then when the mouse is clicked, there will
not be a fallback to a core pointer event. But a typical Qt application
doesn't own the root window.  If the window manager (such as OpenBox,
Awesome or fvwm) relies on receiving core pointer click events, e.g.
to show a desktop menu, then each time a device is hotplugged while a
Qt application is running, we would select XI2 events and thereby
prevent the window manager from receiving them.

QDesktopWidget's native window is added to m_mapper, even when
it isn't mapped.  Then after hotplugging there's a hierarchy event,
and that calls xi2Select for every window in m_mapper.  The assumption
with this patch is that the root window does need to be in m_mapper
in case the QDesktopWidget is shown (that was done already in Qt 5.1: 
fca94fa5ed), but xi2Select must avoid 
selecting XI2 events on it to fix this bug.

Task-number: QTBUG-49952
Change-Id: I5c160e879d93fadfce14120ef2e89a4f71d4f599
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-01-05 17:10:43 +00:00
Orgad Shaneh
bddccfb839 Do not use gold linker on Windows
Gold only supports ELF binaries, not Windows PE.

Change-Id: I72b0f944566bbc8713c71b5cd01f217ab55c8103
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-05 17:07:54 +00:00
Joerg Bornemann
6d6707c8c3 Fix access after delete in GTK2 dialog helpers
Each QGtk2*DialogHelper class owns a QGtk2Dialog. It is possible that
QGtk2Dialog's parent window is destroyed before QGtk2*DialogHelper.
Then the QGtk2Dialog is destroyed, because of the QWindow parent/child
relationship. Before destroying QGtk2*DialogHelper,
QQuickPlatformFileDialog calls QGtk2*DialogHelper::hide, which will
then operate on the already destroyed QGtk2Dialog.
  Break the parent/child relationship when QGtk2Dialog's parent is
destroyed.

Change-Id: Ie2bda234f759e7bf4d0642accd82fdc38e0379c2
Task-number: QTBUG-49203
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-01-05 16:09:22 +00:00
Sérgio Martins
a1702da020 Don't detach QGradientStops
Change-Id: I1ae84d0ae825e9fb474d4fab45b0c475a3878b25
Reviewed-by: David Faure <david.faure@kdab.com>
2016-01-05 15:00:49 +00:00
Alex Trotsenko
9f74b840f9 QAbstractSocket: remove unused 'connectTimeElapsed' member
Change-Id: If73198fb034b6a52b5081379a2bc69052d307454
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-05 13:05:46 +00:00
Maurice Kalinowski
e0cc6e5b8e winphone: Invoke windeployqt twice unconditionally for vcproj
In 50bf54c invoking windeployqt was only required in release mode as
MDILXapCompile was not invoked for debug builds with Visual Studio 2013.
However, Visual Studio 2015 invokes MDILXapCompile for debug and
release. Hence we have to use this workaround unconditionally.

Also we cannot limit this to msvc2015 host specs only, as older projects
still might be loaded with Visual Studio 2015 causing the build to
break.

Task-number: QTBUG-49815
Change-Id: Ia120a392967319b945a9746ad489f2db0eed7156
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-05 13:05:00 +00:00
Maurice Kalinowski
3c086e50d3 winrt: handle PrelaunchActivated property to pass certification
Windows 10 requires apps to handle the PrelaunchActivated property. This
enables a faster startup by launching an app and immediately suspending
it. This happens by the system and at the time the user launches the app
no library loading or initialization is required.

By default we opt-out of this and return early. The reason is that we
cannot know the type of application written in Qt and whether it breaks
the guidelines by using prelaunch. For further details check here:
https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx

Task-number: QTBUG-50292
Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-05 13:04:09 +00:00
Ulf Hermann
9d6a4e7094 QLocale: Accept trailing junk in qstrtod()
qstrtod() used to accept trailing junk until libdouble-conversion was
introduced and we need this behavior in order to implement EcmaScript's
parseFloat() correctly. The QString and QByteArray methods should not
accept trailing junk, though.

Task-number: QTBUG-50131
Change-Id: Ide922da0d65b2576be2c9f47f6053057eff77994
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-05 11:29:29 +00:00
Marc Mutz
8b2f133822 QFactoryLoader: generalize qLoadPlugin()
- Use perfect forwarding for the additional argument.
- Provide a variadic template version
- Deprecate qLoadPlugin1() — there's no reason for a different name
  — and fix all callers in qtbase.
- Provide non-variadic overloads for up to three additional args
  (QPlatformIntegration rolled its own function because it needs
  three args).

Change-Id: I72fb2dd9a021de704cbf5e4b6ea31c80447fb3b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-05 10:28:27 +00:00
Marc Mutz
32bd53c6b1 QStateMachine: replace a QPair with a small struct
The use of QPair made the return type of initializeAnimation()
so complicated, that the original author opted to declare the
pair on one line, then assign to it in the next, to keep below
the line length limit.

She also copied a member of the pair just so as to give it a
descriptive name.

Fix both by introducing a small result struct. It has a nicer
name, compared to the pair, but still port callers to use 'auto'.
The member names are descriptive enough now.

Saves more than 0.5KiB in text size on optimized GCC 4.9 Linux
AMD64 builds, too.

Change-Id: I7ed007ffa0fb16e182e38cd405cfd54da4e363fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2016-01-05 10:28:09 +00:00
Marc Mutz
01d8abdbf1 [docs] Gently steer people away from QPair
Change-Id: Ib0fb69f856606612d516426732f619422630c93f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-05 10:25:05 +00:00
Oliver Wolff
275f182872 winrt: Added timeout to await function
Instead of using a "custom wait function" in cases,
where a timeout is needed (like in qhostinfo_winrt.cpp)
we should have the timeout as part of our await
function.

By having one common place to handle this, we can avoid
unnecessary warnings, that might be caused by custom
functions. The current implementation in qhostinfo
for example causes at least 1 "originate error"
exception per call.

Change-Id: I7b6cfdfd861af2b0d271465eecaefe4a93e3109b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-05 08:14:37 +00:00
Oliver Wolff
452a27e1f0 Winrt: Show message when command line processing fails/usage should be shown
Change-Id: If8f69906beb22f632ccbde92aab5caf914dcb31b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-01-05 08:14:35 +00:00
Oliver Wolff
47b5b5d106 winrt: Use "await" with its timeout for dns queries
By using await instead of using a custom wait function we
get rid of a lot of "function was called at an unexpected
time" warnings and use the default way of waiting for an
asynchronous function to complete.

Change-Id: I6c5bf73ccf68a219b8f3facd3531873d7e8d4c67
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-05 08:14:32 +00:00
Oliver Wolff
190c76f685 winrt: Use winsock2 API for hostname resolution on WinRT/WinPhone
That API has been available for WinRT and Windows
Phone for some time now. By using it to get the
machine name and for hostname resolution we can get
rid of some winrt-only code and use qhostinfo_win.cpp
on WinRT and Windows phone as well.

Additionally the required capability was added to
tst_qhostinfo so that this auto test can be run without
any manual editing.

Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-05 08:14:31 +00:00
Samuel Nevala
2ca20724dd WinRT: Add camera button events on Windows Phone
Windows Phone 8.1 provides access to the camera button and press/release
events get passed as Key_CameraFocus and Key_Camera. Unfortunately a
release does not provide what has been pressed before, hence this
information needs to be cached when the press happens.

Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com>
Task-number: QTBUG-39115
Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-05 08:14:28 +00:00
Timur Pocheptsov
4ed8733d90 tst_Gesture - fix failing tests on OS X 10.11
This test seems to be quite broken on OS X: qWaitForWindowExposed returns
too early (while no window is on screen) so gestures can not be dispatched
QApplication::topLevelAt(pt) - returns null.
Use qWait + isExposed combo instead (similar to qWaitForWindowExposed, but
there is no isExposed test before the loop).

Change-Id: I85fbd773ccce0ca92b2dceb1749d67ef767aa0cf
Task-number: QTBUG-49849
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-01-05 06:08:18 +00:00
Timur Pocheptsov
60c333caba QMacPanGestureRecognizer - stop timer on 'reset'
_panTimer has a target - for example, widget. 'reset' should stop this timer.
The problem (quite subtle and difficult to reproduce) found in tst_QTouchEvent:
widgets created/destoryed by different tests but we still can have a timer
waiting for event dispatcher to 'processEvents', firing with now-invalid
dangling pointer - 'target'.

Change-Id: Iccaf3368a8ee6a0a2f60e9dcdf5d40fb7392ca21
Task-number: QTBUG-49844
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-01-05 06:08:03 +00:00
Marc Mutz
a3ce123549 QtCore: eradicate all Q_FOREACH loops [tools]
Saves just under 5.5KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: I6d868a7d2e469cf0564127b0e66cd7b272a0c9cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-04 20:35:38 +00:00
Marc Mutz
5feebcc973 QMimeDatabase: replace a QStack<QString> with std::stack<QString, QStringList>
A QStringList is almost as efficient as a QVector<QString>.
More importantly, the QStringList case can share code with
the myriad of other QStringList users, in particular
because std::stack is but the thinnest of wrappers around
its underlying container.

Saves 1400b in text size on optimized GCC 4.9 Linux AMD64
builds.

Change-Id: If37ed55802aa8a529ca772df465990ded0aaba7f
Reviewed-by: David Faure <david.faure@kdab.com>
2016-01-04 20:35:33 +00:00
Marc Mutz
cc2ea22a30 QMimeAllGlobPatterns: optimize string handling in matchingGlobs()
... by not re-creating the same string in every loop iteration.

Change-Id: If17c5980bec8276b531267b309578dac8901c93e
Reviewed-by: David Faure <david.faure@kdab.com>
2016-01-04 20:35:28 +00:00
Mauro Persano
0cee94017f QOpenGLTexture: fix target for compressed textures
Trying to set data for a compressed cubemap texture face fails, because
the code incorrectly tries to bind to a cubemap face target.

This was already fixed for uncompressed textures. Instead of duplicating
the code, moved the texture binding/unbinding code to a RAII class.

Change-Id: I8f1cb7fc661b919200f85c3465d6e6e3c22d0871
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-01-04 19:49:34 +00:00
Sebastian Lösch
73ad2bf32f Make ephemeral server key available
When using cipher algorithms with forward secrecy an ephemeral key is
used to generate the symmetric session key. Beside the SSL certificate's
key, this ephemeral key is of cryptographic interest.

The ephemeral key is chosen by the server side - currently statically in
the Qt implementation - so it is only of interest on the client side to
check it. Therefore the ephemeral key is the null key if the connection
is set up in server mode or a cipher without forward secrecy is used.

Change-Id: If241247dbb8490a91233ae47f2b38952c6591bf4
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-01-04 18:10:14 +00:00
Friedemann Kleint
0c60dda872 QWindowsTheme: Fix return type of helper dWordSystemParametersInfo().
QApplication::wheelScrollLines() was always 1 due it being a bool.

Task-number: QTBUG-49561
Change-Id: I83e97da3507c31dfd024db7bf543c4e6a3b4a98b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-04 16:28:31 +00:00
Mitch Curtis
c19216cbea Fix QPainter::rotate() documentation
Change-Id: I5d11f84181cad9be644e850c83459b47ec2f2f15
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-04 16:25:58 +00:00
Edward Welbourne
374d35d5ba Make use of preprocessor easier to understand.
The #if had a condition that was needlessly hard to understand;
and was widely separated from its #else clause.

Change-Id: I43f4282993f4f2e8c4b5ad07dc2c2e06a6b95aa9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-04 13:59:14 +00:00
Alex Trotsenko
a9e1fc29ca Remove Windows-specific handling of the write notifiers on sockets
There is no need in special OS dependent code now, because the
socket notifiers got the identical behavior on all platforms.

Change-Id: I53ee51cd5eeff328e0b73f7325d2c9e883c5b213
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-04 13:43:01 +00:00
André Klitzing
0cd73f23f2 Print correct OS name if it is a server version
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833%28v=vs.85%29.aspx

Change-Id: I7ee4c78959696ee2b662899a6a1408cfd1ebcacd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-01-04 13:29:31 +00:00
André Klitzing
a862474839 Print out "Service Pack" version of underlying Windows
Change-Id: I1f7dbf8f1244e8b7bf2f459fdce381838d776dbe
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-01-04 13:29:26 +00:00
Błażej Szczygieł
eaa3a9d010 Fix crash because of NULL screen in QXcbWindow
Change-Id: If7bbe3ad1656dadcb098bcd3ece2e7b064eeb44d
Task-number: QTBUG-50081
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-01-04 13:22:39 +00:00
Samuel Nevala
7fdfaad43f Fix deadlock when setting environment variables.
Qt uses QHash as the container for faking environment variables on
Windows Runtime and CE. Environment variable manipulation functions are
protected by mutex. Accessing the QT_HASH_SEED environment variable
inside QHash can lead to situation where qputenv() call leads to
qgetenv() call and that leads to a deadlock. Change the container
from QHash to QVector to avoid deadlock.

Task-number: QTBUG-49529
Change-Id: I550ead4ab12e7abebc044f52339063a44fcf0170
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-04 13:12:19 +00:00
Timur Pocheptsov
b12e876efc tst_qwindow::isExposed - fix failing test on OS X
Change-Id: Ice25c8ffaaa4662b679ee829dc0a38834e3258b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-01-04 13:03:03 +00:00
Marc Mutz
5d849880f4 QNetworkReplyHttpImpl: convert another QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.

This change is safe because QNetworkHeadersPrivate::fromHttpDate(),
used as the QDateTime source in other, nearby, code paths, also
returns only UTC date-times. So not only is this change faster at
the call site, it also avoids inconsistent-timespec comparisons
down the line.

Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.

Change-Id: I26d308a2763cc45d28bc96871e651f30b17a6b85
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-01-04 12:58:41 +00:00
Marc Mutz
194e158beb QtCore: eradicate all Q_FOREACH loops [io]
Saves more than 1KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: I1a974e903bc8352af800fa26edae0194c1e51705
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-04 12:22:55 +00:00
Marc Mutz
5170c0416b QWindowsFileSystemWatcher: increase concurrency when canceling threads
The old code asked each thread to stop, and then waited for
that one thread to finish before deleting it and turning
to the next thread in line.

Split the three actions, ie. first ask all threads to stop,
then wait for all threads to finish, and only then delete
all of them.

Apart from being more icache-friendly, this enables more
concurrency, as stopped threads' cleanup work can overlap
with other's, thus reducing the wait() time per thread to
potentially zero.

Did not replicate the inefficient foreach loop, but went
with C++11 range-fors directly.

Change-Id: I53e598e31999a772c0f81ff5885490216e13d492
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-01-04 12:22:50 +00:00
Marc Mutz
90484f3901 QtCore: eradicate all Q_FOREACH loops [itemmodels]
Saves more than 4KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: Ice3fe915622a399d1ed10e0ce364cf54b4b835fe
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-04 12:22:45 +00:00
Marc Mutz
2d2d44a3d1 QtCore: eradicate all Q_FOREACH loops [statemachine]
Saves a bit over 2.5KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: I18a635d65a3c20c4bf5ec2cbfa4ed81a8153cab3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-04 12:22:39 +00:00
Marc Mutz
8faf51429e QtCore: eradicate all Q_FOREACH loops [threads, plugins]
Saves just shy of 4KiB in text size on optimized GCC 4.9 Linux
AMD64 builds, iow: ~0.07% of the total QtCore library size.

Change-Id: I87fdcc8ee25c6bb5dabddb9a694ab4496b1538fa
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-01-04 12:22:34 +00:00
Marc Mutz
0ff221f522 QtCore: eradicate all Q_FOREACH loops [mimetypes]
Saves just shy of 6KiB in text size on optimized GCC 4.9 Linux
AMD64 builds, iow: ~0.1% of the total QtCore library size.

Change-Id: I087e1e34a64944affb1211e16371e314012c4b2c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-04 12:22:29 +00:00
Marc Mutz
fd7861ac4b QtOpenGL: eradicate all remaining Q_FOREACH loops
Not many left. Still 344b saved in text size on optimized
GCC 4.9 Linux AMD64 builds.

Change-Id: I51ba49fe065854f84e26d25d7da5e26427ea2c0b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-01-04 12:22:23 +00:00
Marc Mutz
41ca17fa97 QLineEdit: de-inline effective*TextMargin()
Saves 327b in text size, but done mainly because such
functions shouldn't be inline in the first place.

Change-Id: Ieea97f13620e4411dc01cb0d390bd668c13cfa7a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-04 12:22:16 +00:00
Marc Mutz
264c72837d Add qAsConst
...to turn mutable lvalues into const lvalues.

Like the proposed std::as_const, it should not apply to
rvalues to avoid lifetime issues in code like

     for (auto x : qAsConst(someFunc()))
         // dangling

At a more basic level, qAsConst isn't useful for rvalues,
because one can always store them in an lvalue first, with
no loss in performance (the object is created by the
compiler silently anyway). So the correct way to write the
above is:

    const auto funcResult = someFunc();
    for (auto e : funcResult)

To fail compilation when passing rvalues, I used the
const-&& pattern also employed by std::cref(), and the
proposed std::as_const.

Intended as internal API, but not put into the QtPrivate
namespace to make it simpler to use.

We could wait for std::as_const, but that is far, far
away (just entered the current C++17 draft as of this
writing), and the Qt containers with their tendency to
detach are a problem _now_.

Change-Id: I8824a59d2274de5c5cd642f117212322e4648025
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-04 12:22:12 +00:00
Giuseppe D'Angelo
3880f41e68 Update PCRE to SVN r1622 (8.38 + patches)
In preparation for the 5.6 release.

Upstream changelog: http://vcs.pcre.org/pcre/code/trunk/ChangeLog?revision=1622&view=markup&pathrev=1622
Upstream changes: http://vcs.pcre.org/pcre/code/trunk/?pathrev=1622

Change-Id: I97fb23f6b42f4871f05daa726c2edfc691a16d8e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-04 08:56:28 +00:00
Olivier Goffart
c7ab816af1 qmutex_unix: use a semaphore when available
It makes tst_QMutex::contendedQMutex with no msleep 8 times faster

Change-Id: Ic300e7618b4467e4e08b30f0213bd23c06d4d90a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-04 08:40:18 +00:00