Commit Graph

27500 Commits

Author SHA1 Message Date
Oswald Buddenhagen
27c87e31dd Revert "Don't add qmutex_xxx.cpp to SOURCES, as qmutex.cpp #include's them"
This reverts commit 40cbf1927b -
the qmake parser bug this worked around has been fixed.

As a side effect, the platform conditionals were simplified.

Change-Id: Ibfc1253e3c2252ab954c725a9effd6e719cb691c
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:45 +00:00
Oswald Buddenhagen
a51085fc68 export private module's deps as run deps of the public module
this is necessary for:
- generating -rpath-link arguments when link_prl is not used. link_prl
  is enabled by default, so this has no effect on most projects.
- deployment purposes, which is hypothetical as of now.

Change-Id: I9e629f3eef93c4edf12efc016ecc27dbe2186d61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:41 +00:00
Konstantin Ritt
248488c894 QCoreTextFontDatabase: Get rid of local fallbacksForFamily cache
The centralized one (in QFontDatabase) does the job.

Change-Id: I33def7a7bcddeaa62b904d8812321a7f4648a9d0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-07 14:05:12 +00:00
Konstantin Ritt
229c519785 Increase chances of finding the ellipsis glyph in elided text
The glyph for the ellipsis could be absent in the main font, so we should
try to find it in a fallback font; otherwise fall back to "...".

Change-Id: Ic53060ed42f3c800aba055d2be2a1c7c3cfeec64
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-07 14:05:04 +00:00
Konstantin Ritt
393f096ec3 Bundled HarfBuzz: simplify the built-in shapers list configuration
Change-Id: If7819b5b6ad23e319bfedeb4c9e1e12054b216a7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-07 14:04:53 +00:00
Andreas Holzammer
15fcd691db configure: Fix (Open)SSL detection on WinCE
"ssl" should be defined when "openssl" is defined, and WinCE should
default to autodetection of OpenSSL.

(cherry picked from commit f2fbee5134)
Change-Id: I9110b245d66fac233eb2bfe89b26cb34cee3e291
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-07 09:51:48 +00:00
Morten Johan Sørvig
bcd88d8e99 Add QWheelEvent::inverted()
Some consumers of wheel events need to know if the
scrolling direction is inverted in order to provide
consistent behavior.

For example, the scrolling direction of a horizontal
slider should not change when the user toggles the
"natural scrolling" setting on OS X. In this case
the inverted bit will change state and the slider
can compensate.

This change adds a bit to QWheelEvent and sets it
on OS X.

Task-number: QTBUG-35972
Change-Id: I221435dea45d436d570b113bd0e24ee6f6832211
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-06 19:39:42 +00:00
Marc Mutz
65ec933f91 QCompleter: QMatchData: init all fields in default ctor
Found by UBSan:

  src/widgets/util/qcompleter_p.h:130:8: runtime error: load of value 249, which is not a valid value for type 'bool'

Change-Id: I0529e54e17a6f4d6add91786a2d5687f2d043531
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2016-03-06 18:37:11 +00:00
Marc Mutz
5e68c84ca6 QPlatformPrintDevice: fix uninit'ed member variable
Found by UBSan:

  src/printsupport/kernel/qplatformprintdevice.cpp:370:10: runtime error: load of value 196, which is not a valid value for type 'bool'

Change-Id: I184e5bf5e4917eeb492b54fe87950bcf03421887
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-06 18:37:06 +00:00
Samuel Gaist
a90485dd01 Make use of defaultDropAction in QListView icon mode
Before this patch, using setDefaultDropAction on QListView in icon mode
would not have any effect. Now the drag behaves properly.

The default action is set to CopyAction rather than IgnoreAction to
keep the current behavior and avoid breaking user code.

[ChangeLog][QtWidgets][QListWidget] Fixed a bug that caused
the default drop action to be ignored when using icon mode.

Task-number: QTBUG-15741
Change-Id: I49654cde382af344ffc4594699303c928e27e05d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-06 15:07:49 +00:00
Mike Krus
8defe0f4e3 Remove iOS/OS X duplication
Move common configuration to mac

Change-Id: Ic4a6ad896ac6fd46a0914a267ba87adecc6b37e4
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-03-05 22:20:24 +00:00
Alexander Volkov
559152d911 Make an implicit grab on TouchBegin for a widget subscribed to a gesture
A receiver of TouchUpdate and TouchEnd events is determined either
as a widget which has an implicit grab for the touch point or as a
visible widget if there are no implicit grabs. The events are sent
if the receiver has accepted TouchBegin event or if it is subscribed
to a gesture. Before sending the events to the widget they are
delivered to the gesture manager. Thus, in order to detect gestures
for the widget, it must own an implicit grab or be a visible widget.

It can happen that the parent widget is subscribed to a gesture, but
doesn't accept TouchBegin event, as in the case of QScrollArea. Then it
will not get an implicit grab and gesture detection will be impossible.

Activate an implicit grab for such widgets. Also don't send TouchUpdate
and TouchEnd to them, because it's against the documentation.

Task-number: QTBUG-43277
Change-Id: Id767583991def6d76c48ad15eb39af822cad115d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-05 21:49:59 +00:00
Thiago Macieira
00f1c4ac3a Silence the warning: Unhandled client message: "_GTK_LOAD_ICONTHEMES"
Qt Creator keeps printing that warning.

Change-Id: I0c94a5c2846b48c8aea7ffff1435775f04234656
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-05 21:08:52 +00:00
HyungDon Lee
bfdbfeb012 ODBC: Fix a memory leak when open() fails.
When connection or login fails, the ODBC SQL driver was leaking memory.
This bug has been present since Qt 4.8 and up.

Task-number: QTBUG-51334
Change-Id: Ie17f3d575a08d47e047a65d1b30af9ce0789b2d0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-03-05 20:00:21 +00:00
Allan Sandfeld Jensen
8135e52cb4 Fix MIPS DSP optimized fetchUntransformed
These have been wrong since being introduced in 5.3.

Change-Id: I5b4aa198c8d4c6726f1c5097abe8d43275722dab
Reviewed-by: Ljubomir Papuga <ljubomir.papuga@imgtec.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-03-05 18:57:36 +00:00
Marc Mutz
ec29c76e18 Fix UB in QFontEngineFT::loadGlyph()
Reported by UBSan:

   src/gui/text/qfontengine_ft.cpp:1079:54: runtime error: null pointer passed as argument 1, which is declared to never be null

The default-constructed QScopedArrayPointer is not
reset() in every code path. In fact, in the code
path leading to this memset, the only reset() call
is in the if block right above it, so move the
memset into the if block.

Change-Id: I1f793c313ca56f3315c6bdd55456cb025cafc089
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-03-05 12:02:47 +00:00
Shawn Rutledge
d5fde51410 QWheelEvent: make NoScrollPhase opt-in
The fix for QTBUG-50199 involves adding an undocumented enum value
which can be returned from QWheelEvent::phase().  This will be quite
unexpected for applications that use it, which work fine with 5.6.0
and then start receiving this new phase value in 5.6.1.  So it should
not happen by default.  Set the env variable
QT_ENABLE_MOUSE_WHEEL_TRACKING to enable this functionality.
In 5.7 it will be default behavior.  But in 5.6 the default
behavior is as it was before: if you use a conventional mouse wheel,
the phase stays at ScrollUpdate continuously.

[ChangeLog][QtCore] QWheelEvent::phase() returns 0 rather than
Qt::ScrollUpdate when the wheel event comes from an actual
non-emulated mouse wheel and the environment variable
QT_ENABLE_MOUSE_WHEEL_TRACKING is set.  In Qt 5.6, this is required
to enable the fix for QTBUG-50199.

Change-Id: Ieb2152ff767df24c42730d201235d1225aaec832
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-03-05 10:48:12 +00:00
Alexander Volkov
362b977e7c Expose the number of X screen through the QXcbScreenFunctions
X screen corresponds to Qt virtual desktop, and RandR output
corresponds to QScreen. There can be more than one X screen,
so we need a way to get the number of X screen for QScreen,
in particular for the right implementation of some methods
in QX11Info.

Change-Id: Ib5e38703bf11ae08bb283f26a7b7b15f1a5e8671
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-05 10:46:41 +00:00
Marc Mutz
992e762f66 qt_common.prf: when looking for GCC >= 4.6, match GCC 6+, too
Change-Id: Ia04690f62faa214fb91dffc758e253b5a64e5648
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-05 09:58:30 +00:00
Marc Mutz
4f57705167 Fix GCC 6 -Wunused-functions warnings
GCC 6 is able to identify member functions that are unused.

Remove them.

Change-Id: Ic77548164b38a1cd3c957d2c57a5bccb979bc02e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-05 09:58:10 +00:00
Marc Mutz
d4b6ed3c18 tst_qglobal.cpp: fix compilation with an actual C++14 compiler
Change-Id: I66819f3708f0489006f997f43f1051b81f7b647e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-05 09:57:46 +00:00
Louai Al-Khanji
eae6298202 xcb: support more visual formats
Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-04 21:40:55 +00:00
Andreas Holzammer
2263e5e0aa Fixing the SQLite3 build for WEC2013 again.
The new version broke the build again
-> fix it again.

(cherry picked from commit af2f3bde48)
Change-Id: Ifcc33fbd9f7d7e98901de5130a67501ba19d9895
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2016-03-04 20:42:38 +00:00
Eskil Abrahamsen Blomfeldt
21c7421d4e Fix application fonts with DirectWrite font engine
There is no way to add fonts to the system font collection with
DirectWrite. Instead you have to write custom collections. But
that would mean keeping two instances of the same font data in
memory since we are already registering them for the GDI engine,
and we have no way of knowing which engine will be used. When
we at some point replace the GDI engine completely, we could
implement this in the proper way, but for now, instead of looking
up the equivalent to the LOGFONT in DirectWrite's system font
collection, we look it up using GDI and then convert the HFONT
to DirectWrite.

[ChangeLog][Windows][Text] Fixed disabling hinting for application
fonts, e.g. when automatic scaling by device pixel ratio is in
effect.

Task-number: QTBUG-18711
Change-Id: I5c1365ab956dfa23d4d687877d7440473ee03bb0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-04 16:01:37 +00:00
Eskil Abrahamsen Blomfeldt
273ddd5b23 DirectWrite: Output correct error code on failure
GetLastError() does not return the correct error code for the
DirectWrite functions, they are returned by the function itself.

Task-number: QTBUG-18711
Change-Id: I3931f58bb29a5f2dc4a5aa911ff16a873267d185
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-04 16:01:29 +00:00
Louai Al-Khanji
7b46cad5c9 QXcbBackingStore: Minor code cleanup
Change-Id: I5086e2031201b939b49603f17c373e414a91c32a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-04 14:25:57 +00:00
Louai Al-Khanji
f2ba6586a7 xcb: Do not create OpenGL-enabled platform windows for raster windows
Change-Id: I07d12441db6c7f289363417e21fec65bfcf08b78
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-04 14:25:46 +00:00
Marc Mutz
0cffd65930 Drop hand-rolled ASCII conversion from QAbstractConcatenable::convertFromAscii()
QUtf8::convertToUnicode() contains a SIMD-enabled
ASCII fast-path already which is likely faster
than what the compiler will emit for the old code
here.

Change-Id: I6afae9689424eb53a9f7c01359cc4f57ffcead26
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-04 13:56:41 +00:00
Erik Verbruggen
50388a7e4f iOS: rely on built-in compiler macros to check for CPU features
iOS cannot do runtime feature detection, and querying the CPU is only
allowed in kernel mode (or beyond), so we have to decide the features
at compile time, in which case we might as well use the fallback code
path that uses the built in __ARM_* macros to point out which features
are supported, instead of hard-coding the features for iOS.

Change-Id: Ie507c0d8e962a7bdab16508c8b8122645276512e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-03-04 12:58:52 +00:00
Błażej Szczygieł
caa82c3518 xcb: resourceType names must have only small letters
Change-Id: I563ae26c9e7e6111399fd0b9af7bfb3ff750b34a
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-04 12:50:25 +00:00
Michael Bruning
409151ea2b [Windows] Blacklist AMD FirePro V5900 cards for angle.
They seem to cause crashes on Windows 7 and 8.

Change-Id: I6e91a195077313610a79358d6787ed211357b56a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-04 12:16:04 +00:00
Oliver Wolff
04db3f28af Check if WINAPI_FAMILY_PC_APP is defined before using it
Not all Windows compilers (e.g. MinGW 4.9.2) have WINAPI_FAMILY_PC_APP
defined in their headers and report build failures in several
Qt modules including QtActiveQt. This is fixed by defining the needed
values before they are used.

Task-number: QTBUG-49971
Change-Id: Ib7bac1fe07eb76c64d66fa152427918ee39a2eef
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2016-03-04 12:15:35 +00:00
Kai Koehne
9a999eb7b0 Remove QT_MOC_COMPAT from deprecated QProcess::error signal
QT_MOC_COMPAT has the unfortunate behavior that it generates a warning
at runtime, which also cannot be disabled. This is too draconic.

Task-number: QTBUG-51517
Change-Id: I80af8b8b482671e4c9567281c3b1c504d737e202
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-04 12:07:23 +00:00
Timur Pocheptsov
840831b611 Cocoa integration - do not invalidate backing store on move
If window is only moving, there is no reason to reset a backing store,
otherwise with current expose/flush events machinery it's possible
to have glitches while moving a window programmatically.

Change-Id: Ia4408bd23388e529ae93617a92ae84304b707ca1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-03-04 12:03:24 +00:00
Marc Mutz
7d2c7ca8fa QFontEngine: use RAII for font_, face_ members
Wrap the pairs of (void *ptr, void (*dtor)(void*)) in essentially
a std::unique_ptr. This simplifies code and provides the correct
implicit destruction, so we can drop the explicit glyph-cache
clear()ing in ~QFontEngine(), leaving that job to ~QLinkedList.
A subsequent change will turn the QLinkedList into a C array, the
clearing of which would otherwise cause excessive code bloat.

Since we can't use std::unique_ptr, yet, provide a hand-rolled
replacement for now, marking it for replacement with unique_ptr
once we can use it. Make that a local type instead of providing
a Qt-wide unique_ptr so we don't accidentally lock ourselves into
a half-baked std clone we can't get rid of anymore.

To prepare unique_ptr use with the same type-erased deleter
(function pointer) as now, replace a nullptr destroy_function
with a no-op function, so ~unique_ptr doesn't crash when we
port to it later.

Because QFreetypeFace contains the same construct and shares
payloads with QFontEngine, use the Holder there, too.

Even saves 150b in text size on optimized GCC 5.3 AMD64 builds.

Change-Id: I5ca11a3e6e1ff9e06199124403d96e1b280f3eb2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-04 10:37:25 +00:00
Marc Mutz
5cd455dca3 QtNetwork: use printf-style qWarning/qDebug where possible (I)
The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.

But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.

This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.

In this first part, replace
   qWarning() << ""
with
   qWarning("...").

Saves ~850b in text size on optimized GCC 5.3 AMD64 builds.

Change-Id: Ib1a087795a03b2a6b432e2c499968df779aaea37
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-04 10:29:19 +00:00
Marc Mutz
600529e07a QtGui: use printf-style qWarning/qDebug where possible (I)
The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.

But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.

This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.

In this first part, replace
   qWarning() << "...";
with
   qWarning("...");

In QTransform shared warning strings.

Saves 3KiB in text size on optimized GCC 5.3 AMD64 builds.

Change-Id: I142a8020eaab043d78465178192f2c8c6d1cc4f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-04 10:29:08 +00:00
Allan Sandfeld Jensen
b6b3803b21 Optimized fetchUntransformed RGB888
Reuses the optimized routines from qimage to make painting RGB888
images faster on SSSE3 and NEON.

Change-Id: I99116b318322ba4cb0ddc2cb90bcf17a0350ef99
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-03-04 10:14:37 +00:00
Marc Mutz
fd941ebb6f QHttpNetworkConnection: fix expensive iteration over QMultiMap::values()
Just iterate over the container instead, saving one
iteration and the creation of a temporary QList.

Change-Id: I564e3e83cb247a12c413fc5a9dc17299ae089e30
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-04 09:38:23 +00:00
Gabriel de Dietrich
5a56bf4104 QXcbNativeIntegration: Add query for compositing enabled
Task-number: QTBUG-41195
Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-04 09:37:23 +00:00
Fredrik de Vibe
48f25caac4 Check if socketEngine is set before accessing it.
QTcpServer::addPendingConnection() is protected, so it is possible to
add pending connections from a class derived from QTcpServer. This
derived class can get a QTcpSocket from somewhere else, in which case
d->socketEngine will not be set (or used). Given that it is possible to
add pending connections in this scenario, it would make sense to be able
to retrieve them as well.

[ChangeLog][QtNetwork][QTcpServer] Permit using a QTcpServer with
externally created QTcpSocket.

Task-number: QTBUG-51288
Change-Id: I830c10f1a881e2bca4e4ad716d8be865e1c27a9f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-04 08:11:54 +00:00
Anton Kudryavtsev
089ed1525e QtNetwork: optimize container usage
Don't perform lookup twice. Just cache iterator
or position.

Change-Id: I454fd292614dee62167ff248fc3ddec0f79435b0
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-03 20:21:17 +00:00
Anton Kudryavtsev
37d89fd8fb QBearerEngine: break out repeated loops as methods.
Three hashes are handled similarly; so extract the loops over them as
methods hasUsedConfiguration() and cleanUpConfigurations() to avoid
duplicate loop code.

Change-Id: I1040724c4fc98caa48913fac339c03e60b04bae2
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-03 20:21:05 +00:00
Marc Mutz
53abb8267b QtGui: mark some more types as movable/primitive
These are already held in QVectors.

Public API types need to wait until Qt 6, for BC reasons. Even
though Q_RELOCATABLE_TYPE deals with most of them, we lack a way
to mark a type as primitive, but still isStatic - for QList.

Change-Id: I91392b01ae6f94cc847007636e12d4e64c43b2bc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-03-03 16:22:27 +00:00
Anton Kudryavtsev
e2a7d18564 QHostAddress: enable (N)RVO in toString() for gcc
Change-Id: I5f8d72742cc4199bfa73df6037b851c58632ff86
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
2016-03-03 15:52:33 +00:00
Louai Al-Khanji
99b2223406 xcb: Be smarter about how we flush
For the remote X case the backing store previously always reuploaded
image data for every expose event. Instead of doing that create a remote
X pixmap and only flush repainted regions. For regular expose just copy
from the pixmap.

Additionally, atomically update the window by setting a clip mask and
flushing the entire region at once instead of doing it rect by rect.

Change-Id: I26bb1834b159e309c7ad93287dd297769f7e2633
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-03 14:46:10 +00:00
Anton Kudryavtsev
0fb7e910a9 QLocalServer, QLocalSocket: simpler use of startsWith()
It has a variant accepting QL1S directly, so
no need to go via a QString.

Change-Id: Ia8f1198ef2af7027bc9f7c2e1dad3a5f78a12eb4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
2016-03-03 11:48:39 +00:00
Anton Kudryavtsev
06e27b6ef9 QtNetwork: optimize if-else conditions.
De-duplicate calls by caching results.
Reorder conditions: call cheap methods first.

Change-Id: I27715b935247c6c21bd02f9cc40655d3f9371264
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-03 11:48:22 +00:00
Thiago Macieira
d0cdc7ad1e DirectFB: Fix build in C++98 mode
Many DirectFB types have constructors in C++, so we can't initialize
them with = {...}, like we would be able to if they had been regular POD
types.

Change-Id: Ic747cc2ab45e4dc6bb70ffff143840e5780ac2bc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-03-03 11:35:22 +00:00
Milian Wolff
fdd2ab58ae Fix compile with clang and -Werror.
Fixes the following warning/error:

src/sql/drivers/sqlite2/qsql_sqlite2.cpp:142:19: error: unused variable
  'initial_cache_size'
      [-Werror,-Wunused-const-variable]
static const uint initial_cache_size = 128;
                  ^
1 error generated.

Change-Id: I4ed7f789561dd9b68dd374c122f4db3813e63e05
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2016-03-03 10:33:43 +00:00