Commit Graph

22789 Commits

Author SHA1 Message Date
Friedemann Kleint
5930a2d314 Track modifications of white space in QString::simplified().
The existing check fails to detect the case where white space characters
other than the space character are replaced by space characters
without the length actually changing and returns the original string.

Task-number: QTBUG-44936
Change-Id: Ice6faa975f8b41f185c76f6d0d4ff81603e25eb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-12 05:32:41 +00:00
Andrew Knight
718f87046a eglfs_kms: Use a QByteArray for connectorName
Using a byte array here simplifies the logic while being more efficient.
It also removes warnings about using deprecated QString methods.

Change-Id: Ia1384dfb92e953c56179647b92a41b59cd26d9ea
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-12 05:00:56 +00:00
Thiago Macieira
e039555d0e Update strto(u)ll.c to not produce a warning with -Wcast-qual
This only works if you #include from a C++ source, of course.

The diff is updated to apply over the following sources:
 https://raw.githubusercontent.com/freebsd/freebsd/release/10.1.0/lib/libc/stdlib/strtoull.c
 https://raw.githubusercontent.com/freebsd/freebsd/release/10.1.0/lib/libc/stdlib/strtoll.c

Change-Id: Ia0aac2f09e9245339951ffff13c8d5e2113d4f36
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-12 04:23:54 +00:00
Thiago Macieira
ce30394686 QtGui: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c946844bc31eb8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-12 04:23:50 +00:00
Thiago Macieira
6025c36d01 Make Q_ASSERT_X also check its argument for validity
Commit ebef2ad136 did it for Q_ASSERT, but
I somehow forgot to do it for Q_ASSERT_X. Do it now.

This includes the fix from 9a3d7adaad to
silence a Clang warning.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca066a5b5ab5d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-12 04:23:45 +00:00
Thiago Macieira
e5e1e056e8 Silence MSVC warning about 64-bit conversion (loss of data)
One of the reasons why we use "int" everywhere: to avoid this annoyance
about different types and having to explicitly cast to silence the
compiler.

qsslsocket_openssl.cpp(690) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: Ia0aac2f09e9245339951ffff13c8bdad334ce108
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-12 02:47:47 +00:00
Thiago Macieira
aa246e487c QHostAddress: add IPv6 address overloads that take const data
It has been a historical mistake that there wasn't a const overload.

Change-Id: Ia0aac2f09e9245339951ffff13c8d8b70f206a99
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-12 02:47:05 +00:00
Thiago Macieira
08e45154fb QtNetwork: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c946859c282001
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-12 02:46:59 +00:00
Tor Arne Vestbø
c286afee3a tst_QWindow::initialSize: Use showNormal() instead of show()
On some platforms show() may result in the window being shown full
screen, depending on the defaultWindowState of the platform. If
that's the case, the resulting window size does not follow
the requested size (though the internal normal geometry should).

We need to use showNormal, so that we guarantee that the window
state is WindowNoState.

Change-Id: Ied080eaca13d759501ea292b5e6b2df4e3b32426
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-12 00:10:27 +00:00
Konstantin Ritt
bad3325c0b [QFontEngineFT] Use QScopedArrayPointer to auto-free the bitmap buffer
Also track the allocated buffer length and re-use the existing
buffer instead of allocating a smaller one, where possible.

Change-Id: I494519d653522622b1fe4ec80ac9035e2c3d9714
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-11 21:47:33 +00:00
Konstantin Ritt
b50e52ed16 Update bundled HarfBuzz copy to 0.9.39
Change-Id: I48d130a1639fef3b8ec2de5622848eb56fadc1c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-11 21:47:19 +00:00
Konstantin Ritt
6ca406d43d Bring harfbuzzng.pri naming in par with the other .pri-s in src/3rdparty
Change-Id: I59bf922e3085a03a4c2c370f42418cb005456d3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-11 21:46:58 +00:00
Konstantin Ritt
cc9ca2bece Micro optimization to QPainterPrivate::drawGlyphs
Re-use font engine obtained in the first place

Change-Id: Icdc2ad404ba9b2aadf2732e95c43a47aa957a6fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-11 21:46:34 +00:00
Laszlo Agocs
85620bd788 windows: Introduce a built-in GPU blacklist
Use a built-in JSON file in case the QT_OPENGL_BUGLIST environment
variable is not set. When QT_OPENGL_BUGLIST is set, the built-in list
is ignored.

To make the implementation simpler and more readable, some of the code
in QWindowsOpenGLTester is reshuffled a bit. It also caches the results
now, so it is safe and fast to call supportedRenderers() and friends
multiple times.

The blacklist currently contains the Intel card from QTBUG-43263 (Intel
GMA / HD3000 ?) and may also apply to QTBUG-42240.

[ChangeLog][QtGui] Qt now contains a built-in GPU driver blacklist for
Windows that disables the usage of desktop OpenGL with some older cards
that are known to be unstable with opengl32.dll.

Task-number: QTBUG-42240
Task-number: QTBUG-43263
Change-Id: I1ecd65b51fca77925317d52048e7ab01d9b8797c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-11 19:23:17 +00:00
Gabriel de Dietrich
22afbc1536 QShortCut: Check whether the menu is QPA-disabled
When climbing the menu hierarchy, it's sounder to
check whether the actual QPA menu is enabled. This
way we can trigger modifier-less shortcuts even in
submenus.

Task-number: QTBUG-38256
Task-number: QTBUG-42584
Change-Id: I13a27027306bce0f0732b05bf9469f3b77028f73
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-03-11 17:04:59 +00:00
Gabriel de Dietrich
a4c2e95ce1 Use own QIconEngine in QFileIconProvider
This allows us to lazily load icons from the platform theme
by reimplementing the pixmap(). Otherwise, we would instantiate
pixmaps in several sizes even though we would not need them
right away. Since, at least on OS X, icon sizes can go up to
128x128 pixels, we can end up saving an order of magnitude of
memory on icon pixmaps alone if we only use the smallest sizes
in our application.

Two side modifications are included. The first allows sub-
classing QPixmapIconEngine by exporting this class. The second
fixes the q_ptr in QFileIconProviderPrivate which was never set.

Change-Id: I91af322ded2823e475703871e607773177ae25d3
Task-number: QTBUG-41796
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-11 17:04:55 +00:00
Nico Vertriest
6ef8387e42 Doc: Json classes added to list of implic.shared classes
Task-number: QTBUG-44053
Change-Id: I52a1b6c413aaa594bfee9bf7484c3d0ce7e9c9fa
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-11 14:09:26 +00:00
Ulf Hermann
a3aaabc646 Clarify limitations of QCoreApplication::libraryPaths()
If you call libraryPaths() before constructing a QCoreApplication,
intersting things may happen.

Task-number: QTBUG-38598
Change-Id: I2861746277e391ede9e921e4a8ad825007e25fa0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-11 14:08:24 +00:00
Shawn Rutledge
42a8613ffa QScreen availableGeometryChanged signal: emit correct value
Need to emit availableGeometry not geometry

Task-number: QTBUG-44916
Change-Id: I6eb7eb0b8e46d6d8249fa67f57374b25e21f2ade
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-11 14:08:08 +00:00
Laszlo Agocs
367a91d278 Enhance EGL_CONTEXT_LOST checks
Apparently failures can occur not just when doing eglMakeCurrent() but
also when creating window surfaces.

Change-Id: Ife1210293d5120fd41352164d9c89e83fb5ce468
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-11 09:43:14 +00:00
Kai Koehne
f29007b1d5 Gui: Fix compilation with QT_NO_OPENGL
Change-Id: I96674b39fd4176cf9d93b7ce00efa2b035128b61
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-11 09:40:49 +00:00
Kai Koehne
fdb7fa937a Windows: Add -static-runtime configure option
Support statically linking the MSVC/mingw runtime libraries without
manually tweaking mkspecs. This is helpful for projects like the
installer framework.

MSVC does not support mixing MT[d]/MD[d] flags in different
compilation units. The static_runtime option is therefore added
to both QT_CONFIG and CONFIG.

Change-Id: Ifd6dc9c362090457de8e2c62477d0445f9479722
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-11 09:26:37 +00:00
Ulf Hermann
aad3c08902 Clean up QLibraryInfoPrivate::findConfiguration()
The QFile::exists() check in the end was redundant if one of the
!QFile::exists() had returned false before. By always doing the
positive check we can get rid of it and also avoid excessive
nesting.

Also, on OSX the isEmpty() clause probably never evaluated
to true, with the effect that qt.conf in an applicationDirPath was
never found.

Change-Id: I750735741b707d3e98c4bf6c6b9558618e1fcc59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-11 09:10:18 +00:00
Nico Vertriest
8eaddf8343 Doc: corrected snippet issue in Defining Plugins doc
Task-number: QTBUG-44629
Change-Id: I70e20209b6b33f7adcbcafc6b7d959660cdc2e87
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-03-11 09:01:46 +00:00
Nico Vertriest
3128df99d6 Doc: QDataStream Serializing doc error
Task-number: QTBUG-44707
Change-Id: I0ccfb47fe0b2464c5b7331040ea658ace3442366
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-03-11 09:00:53 +00:00
J-P Nurmi
595c91f58a QGtkStyle: identify QtQuick.Controls.GroupBox as QAccessible::Grouping
This allows QGtkStyle to check the role and do appropriate styling
(bold font) for the label.

Task-number: QTBUG-43736
Change-Id: I735f5f7ffadd7a435fa9e28fab45b202eec0252e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-03-11 07:59:36 +00:00
Shawn Rutledge
37b7c5164c xcb: another QXcbScreen null pointer check
In QXcbWindow::setParent(), the window may not have a screen,
and in that case we cannot get the root window in this way.

Task-number: QTBUG-44719
Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-11 07:46:01 +00:00
André Klitzing
cacae82a70 CMake: Fix regression with quoted OPTIONS parameter
If a parameter contains quotes the check for "-binary" fails.

Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2015-03-11 07:31:33 +00:00
Thiago Macieira
6272f01617 tst_QDateTime: remove silly test for timezone date too early
Let's not try to to compare our QTimeZone handling with the system one.
Our handling goes beyond the range of the POSIX APIs, so that's a recipe
for error.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4a4f335bdbae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-11 07:23:21 +00:00
Andy Shaw
c87f8a3797 Windows: Only set the touch flags if the window is not already registered
It is possible for there to be a HCBT_CREATEWND hook which can set the
touch window flags already while the window is being created. Therefore
we want to defer to those settings instead as they should take precedence.

Change-Id: If8dcbd34db2b3bbbfb1bc36731665fb17fb87c24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-11 07:15:53 +00:00
Daniel Vrátil
3b30a8215e Improve handling of XRandR events in XCB backend
Querying X server for data can be very expensive, especially when there
are multiple processes querying it at the same time (which is exactly what
happens when screen configuration changes and all Qt applications receive
XRandR change notifications). This patch is aiming to reduce the number of
queries to X server as much as possible by making use of detailed information
available in the RRCrtcChangeNotify and RROutputChangeNotify events.

Firstly, the backend now does not rebuild all QXcbScreens on any change (which
involved the very expensive xcb_randr_get_screen_resources() call), but only
builds the full set of QXcbScreens once in initializeScreens(), and then just
incrementally updates it.

Secondly, it avoids querying X server for all screens geometry as much as
possible, and only does so when CRTC/Output change notification for a particular
screen is delivered.

As a result, handling of all XRandR events on screen change is reduced from tens
of seconds to less then a seconds and applications are better responsive after
that, because we don't block the event loop for long. The X server is also more
responsive after the screen change, since we are not overloading it with requests.

Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-11 07:15:28 +00:00
Thiago Macieira
d3f6249de3 tst_QDateTime: Mark more Windows incorrect transitions
The refactoring from a8c74ddcf7 commit
exposed more issues in the Windows API. There were already quite a few
QEXPECT_FAIL for this, so this isn't new.

For example, localtime(1351386000) on the Central European Timezone
should be "Sun Oct 28 02:00:00 CET 2012" (the second occurrence of 2
am), but the Windows API returns tm_isdst = 1 (i.e., still in the CEST
timezone) and that's incorrect.

Change-Id: I1bc63ac99b1d67b55d783f9606e5c59b24223b13
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-11 07:00:24 +00:00
Thiago Macieira
3b36a550b0 QDateTime: ensure we always use the daylight status if known
Refactor the code so that the localMSecsToEpochMSecs function always
gets the daylight status as input. The calculation can be very wrong if
we forget to set it.

Change-Id: I39e2a3fa6dc7c4a417f23288f10b303e450b8b98
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-11 06:56:54 +00:00
Thiago Macieira
7858838293 QTest: Print hex instead of octal for QByteArray QCOMPARE failures
Change-Id: Ia0aac2f09e9245339951ffff13c65b2234d01ad0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-11 01:50:29 +00:00
Thiago Macieira
7acc7a8eb3 Fix const correctness in Harfbuzz
to_tis620 modifies cstr, so it mustn't be const.

Change-Id: Ia0aac2f09e9245339951ffff13c8d77c886f767d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-11 01:50:27 +00:00
Thiago Macieira
d6268ea91c QtSql: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c94688f5b6ed76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-11 01:50:25 +00:00
Thiago Macieira
6b38d9fa77 qdoc: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c94687a79b3f40
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-03-11 01:50:23 +00:00
Thiago Macieira
a0e693b1e8 QtXml: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c94686ec193958
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-11 01:50:23 +00:00
Thiago Macieira
ff807df6c9 QtDBus: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c9468642b2db83
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-11 01:50:21 +00:00
Frederik Gladhorn
3dbb526329 Fix regression in time zone handling
In QtScript we use the msecs since epoch conversion (JS date is based on
the concept). After a8c74ddcf7 the date
conversion test in qtscript started to fail. Instead of relying on the
code working by chance, simply update the date when setting it with
setMSecsSinceEpoch.

Task-number: QTBUG-44885
Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-11 01:50:08 +00:00
Lars Knoll
a29b7635bd Simplify calculation of week number
This also removes a dependency to 3rd party licensed code.

Change-Id: Ia4818a5cf306501bdb7192265edc4bcba8e597d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-10 13:36:49 +00:00
Tor Arne Vestbø
de92efd448 CF event dispatcher: Decide if eventsProcessed before breaking out of loop
In the case of calling processEvents with WaitForMoreEvents and ending up
processing a Qt timer, we explicitly interrupt the runloop, as CF doesn't
normally treat handling timers as having handled a source. That way we
can re-evaluate whether processEvents should return.

But, we need to compute eventsProcessed before breaking out of the
Q_FOREVER loop, otherwise processEvents will return false when
waiting for events and processing a timer.

Change-Id: Ie5f8905228cce1508b5b2e040cf1186820855191
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-10 12:48:32 +00:00
Tor Arne Vestbø
dfd6fc7bce iOS: Only use root level native runloop if at first level of processEvents
We used to support calling QEventLoop::exec() from within a processEvent
recursion and still jump down to the root native runloop, but this does
not work as intended due to how QEventDispatcherCoreFoundation uses
flags in its ProcessEventsState for e.g. deferred wake up or timer
updates. The logic in QEventDispatcherCoreFoundation assumes that
the next recursion to processEvents will be handled by itself, so
that it can interpret the flags in ProcessEventsState. The iOS
event dispatcher subclass, QIOSEventDispatcher, does neither of
these things, and should only be used from a 'clean' state.

Change-Id: I44fa156feecc45772806002465c35bef0797ead2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-10 12:48:16 +00:00
Tor Arne Vestbø
4c542ab592 iOS: Handle an QIOSViewController outliving its related QIOSScreen
We release the UIWindow that retains QIOSViewController in the
QIOSScreen destructor, but other parts of the OS may have retained
the view controller, so the dealloc may not happen until later. In
the meantime we may receive calls to shouldAutorotate, so we need to
guard this code for the situation that m_screen has been deleted.

Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-10 12:46:37 +00:00
Allan Sandfeld Jensen
3ce88e13b9 Add AVX2 autovectorized versions of premultiply
Following up on using GCC's autovectorizing for faster SSE4.1
premultiply, this patch adds specialized autovectorized versions
of premultiply for AVX2, giving another almost doubling in speed.
To make the speed up for AVX2 and also SSE4_1 available to non-GCC
compilers, the target-specific methods have been moved to separate
files.

Change-Id: I97ce05be67f4adeeb9a096eef80fd5fb662099f3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-10 12:28:13 +00:00
Ulf Hermann
1fc6056ff5 Detect qt.conf in bundle on OSX without QCoreApplication
On OSX we don't need the applicationDirPath to find a qt.conf
located in the application bundle. Let's take advantage of this and
allow findConfiguration to use it.

Task-number: QTBUG-24541
Change-Id: I38c349a3bcd140fcf91352c88c24ca662e6e6f2e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-10 11:56:53 +00:00
Ulf Hermann
d96c29a5d1 Reload QLibraryInfo's settings when QCoreApplication becomes available
Some of the paths may only be resolvable if the application path is
known. On some platforms we can only figure out the application path
if argv[0] is known. Thus, if the paths have been queried before the
QCoreApplication is created, the cached settings may be wrong. We have
to reload them after creating the QCoreApplication.

Task-number: QTBUG-38598
Change-Id: Idf5822be87aa0872b099480040acd7b49939a22c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-10 11:48:24 +00:00
Alex Trotsenko
35ee5349f2 QIODevice: Fix some 64-bit issues
Change-Id: I77354a3069b256135c5792975a1445bcbe816e20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-10 11:45:41 +00:00
Frederik Gladhorn
971b8413f2 QAbstractButton: emit released on focus out or disable
When pressing a button with the mouse and then moving the focus away,
the internal and visual state of the button would get updated, but the
released signal would not be emitted.
The same goes for disabling the button, although in 99% of the cases,
disabling the button will also move the focus, so the first case
already takes care of emitting the signal.

Task-number: QTBUG-42775
Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-03-10 11:35:32 +00:00
David Edmundson
4c0c537421 Avoid detaching pixmaps when it has not changed
setDevicePixelRatio is often called unconditionally even when the
devicePixelRatio matches the pixmap or image.

This causes a lot of unncessary detaches wasting some memory.

Change-Id: I27535b2b22312ec0edc9bdc00c99d322afb727c1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-09 21:14:16 +00:00