Commit Graph

410 Commits

Author SHA1 Message Date
Friedemann Kleint
bf42eacc7f Windows font database: Resolve aliases for extra fonts.
Ensure QFontDataBase::hasFamily() deals with aliases.

Task-number: QTBUG-31689

Change-Id: Ia59bfcb93362ac9343c6d30dab1091a4db482dfa
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-07-11 17:29:39 +02:00
Friedemann Kleint
7b9d6cf844 Stabilize tst_qguiapplication.
Introduce QScopedPointer for windows or instantiate them on the
stack to prevent leaks. Tile all windows within virtual
screen to ensure they don't influence each other and are not
in the taskbar area.
Move cursor away from windows in modalWindow-test.

Change-Id: I40343e9f72263e22bdf2560448d7efcc915d17cb
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-07-11 10:56:49 +02:00
Thiago Macieira
eb5749e8d9 Bugfix QDesktopServices on Windows
It was doing tricks with URLs that it shouldn't be doing... including
running QDir::toNativeSeparators on a URL.

Task-number: QTBUG-32311
Change-Id: I5b6f640919956998c00dcf507f931045f21a9e53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-11 10:56:49 +02:00
Sergio Ahumada
fa06a866b9 test: Fix tst_qwindow::positioning() on Ubuntu 12.04
It seems like the left-side menu bar on Ubuntu 12.04 causes some
problems when it is not automatically hidden, which is the case
in the CI machines.

Task-number: QTBUG-31995
Change-Id: I01ff3fe4c09d720b2dd53037c42e59679d8570dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-10 20:06:26 +02:00
Sergio Ahumada
af19cbc8f3 test: Replace QSKIP with QEXPECT_FAIL in tst_qwindow
It is better to mark a test as XFAIL so we get an error whenever
it gets fixed.

Task-number: QTBUG-23059
Change-Id: I0f2f491645c261bf0e735dde6a16d8e90e0b17a0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-10 17:40:53 +02:00
Sergio Ahumada
d1a6de21c3 tst_QIcon: Mark availableSizes() and task223279_inconsistentAddFile() as XFAIL
Task-number: QTBUG-31993
Change-Id: I10e39951fb38b950633805a44ea4c0edaf55635e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-27 23:14:16 +02:00
Frederik Gladhorn
1867ad741a Merge remote-tracking branch 'origin/release' into stable
Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
2013-06-25 23:25:35 +02:00
Bernd Weimer
6f0d258424 Fixed qrawfont auto test
Number literals are always interpreted as double. This lead to errors
on platforms that define qreal as float.

Change-Id: I838f690c33bb97e39a2cca2cfd3bdfb9482bc2b2
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-06-25 14:31:00 +02:00
Bjoern Breitmeyer
1723a9861f Fixed testbuild with QT_NO_CURSOR
Removed the QCursor entry from the list of types
if QT_NO_CURSOR is set.

Change-Id: I6b8e925acedec75ed6e46b2e3fe34d0011667c91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-06-25 07:14:54 +02:00
Rafael Roquetto
ed0b5e125b Fix tst_QWindow for fullscreen platform plugins
Some tests assume that QWindow::show() behaves like
QWindow::showNormal(), which is not true for platforms in which the show is
fullscreen, forcing QWindow::showNormal() to be explicitly called.

Change-Id: Ib5f23a4d01bc6a3a2973f57488996c8c198c45f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-18 06:25:52 +02:00
Frederik Gladhorn
0eff16611f Merge remote-tracking branch 'origin/release' into stable
Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
2013-06-10 10:00:34 +02:00
Friedemann Kleint
2b401796c7 tst_qguivariant: Fix warnings about double / float conversion.
warning C4305: 'argument' : truncation from 'double ' to 'float'

Change-Id: If9bf2f79592d305e767d2a8c38e577c5dff51129
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
Sergio Ahumada
9ef24ff8ed test: Mark tst_qopengl as insignificant on Win7 + Angle
This only marks tst_qopengl as insignificant on Windows 7 32bit
with the Angle configuration.

Task-number: QTBUG-31611
Change-Id: I1876b6fdc32fef93edf34c2bd61d03cc9ba11135
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2013-06-07 18:07:26 +02:00
Bjoern Breitmeyer
c9e1c947d4 Disabled test on WINCE.
The winapi call used to load the icon does not
support the arguments on windows ce

Change-Id: Ia600eb9b05d5eb40778d8c281e6ce8278bfd7177
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-27 02:45:21 +02:00
Mitch Curtis
9a7bc0fc1b Rename Numpad to Num, ensure Numpad is translated in all cases on Mac.
Numpad is unnecessarily long.

Change-Id: I19a6ce129e26a4f6f8344f514317214c48abde6e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-05-10 09:10:45 +02:00
Mitch Curtis
7dd81686e8 Fix QKeySequence::toString() returning gibberish for Qt::KeypadModifier
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.

Task-number: QTBUG-4022

Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 12:26:13 +02:00
Konstantin Ritt
b3dae6848d Fix leaking of QFontEngineData
QFontCache now references QFontEngineData-s it maintains,
so that QFont instances not freed prior to calling ~QFontCache()
would destroy QFontEngineData on their own.

Task-number: QTBUG-25434

Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
2013-04-12 04:23:35 +02:00
Fabian Bumberger
e9760f1559 Fix the check if mouse events should be synthesized from touch events
In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents
is taken into account when synthesizing mouse from touch events, in
QApplication only the PlatformIntegration syle hint
QPlatformIntegration::SynthesizeMouseFromTouchEvents.

With this patch both attributes are checked. Furthermore the check was
moved out of translateTouchToMouse in QApplication in order not to
influence the result which is returned to the user, when mouse events
are not be synthesized.

Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-11 16:09:19 +02:00
Debao Zhang
dd4220b6e6 QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:42 +01:00
Eskil Abrahamsen Blomfeldt
83c9d22d44 Remove dependency on QPlatformSupport in fontdatabase test
If you include a static library in the test, all symbols will
be duplicated, and this can cause nasty crashes because global
static data is also duplicated. This happened on Linux because
of a global static cache in the font engine where the two instances
of it would get out of sync, and we would reference invalid
data.

To test QPlatformSupport features, a QPlatformSupport test which
does not load any platform plugin (or uses its own platform plugin
which does not load QPlatformSupport) is needed. For now, I will
just revert adding the test, since it is broken and was added
as part of supporting Windows CE:
   f2fabf77f9.

Change-Id: I6c002d1e0880ee8e031a68eee80e781fe0c62af4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-03-25 19:21:40 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Konstantin Ritt
36cb3f3f65 Fix the font engines leaking
1. when there were some engines with ref > 1 in the cache, prior to calling
   QFontDatabase::{add,remove}ApplicationFont()/removeAllApplicationFonts()
   (QFontCache::clear() has never decreased engine's cache_count);
2. when the QFontEngineData's engine is not in cache i.e. the Box or Test font engine
   (~QFontEngineData() didn't free engines it keeps).

Instead of using the font engine's (external) "cache_count" counter,
QFontCache now references a given font engine every time it is inserted to
the cache and dereferences exactly that number of times in clear().

Change-Id: I87677ebd24c1f4a81a53526f2e726e596b043c61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-20 07:02:29 +01:00
Laszlo Papp
4905c0754b Add convenience distance methods to QVector2D
Change-Id: I8ecdda35912a95e69c2f8dd98ce9c41c77b222d2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-18 08:36:03 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Laszlo Papp
d8bef6bb2e Add a minor convenience for calculating the distance to a point
Change-Id: I312727bf6858ead6c30fe20bf3abc5afc73a3a14
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-03-15 18:37:51 +01:00
Samuel Rødal
c7191d3e21 Fixed artifacts when drawing same line with different clips.
Expanding on the change fixing QTBUG-24762 with the realization that any
line needs to be drawn in a consistent way regardless of system or
painter clip, not just dashed lines.

Task-number: QTBUG-25036
Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-14 12:37:20 +01:00
Konstantin Ritt
0194fa135b Hide Harfbuzz from the outer world
Don't export, don't generate private headers, don't mention HB in API.

Change-Id: I048ebd178bf4afaf9fda710a00933b95274cf910
Reviewed-by: Josh Faust <jfaust@suitabletech.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-13 14:46:26 +01:00
Konstantin Ritt
f69c9059d6 Replace HB types used in API with Qt analogs
hb_uint32 <-> quint32
HB_Glyph <-> glyph_t
HB_Fixed <-> QFixed, HB_FixedPoint <-> QFixedPoint
HB_GlyphAttributes <-> QGlyphAttributes

Change-Id: I4338ec4ce9a9c20ea591606ab10e6ef4f19931b8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-12 18:13:37 +01:00
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Friedemann Kleint
583349de03 Stabilize tst_qclipboard.
If the process terminates while QApplication::processEvents()
runs, the subsequent waitForFinished() returns false and the test
fails.

Task-number: QTBUG-29951
Change-Id: I41f461358920ad430951613dd919885f68ae212c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-03-07 07:10:35 +01:00
Samuel Rødal
a12f6ba302 Fixed dashes being rendered differently depending on system clip.
We need to clip lines to the unclipped device rect in the case of
dashing, since otherwise the dashes will be shifted and rendered
differently when partial repaints are done.

Task-number: QTBUG-24762
Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 02:54:08 +01:00
Kevin Ottens
2d1f3d7c51 Add methods to convert lists of QKeySequence to/from strings
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.

Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
90a277bce3 Fix warning about tautological comparison in tst_qstandarditem (CLANG).
Change-Id: I87e3705b8e03ca84c90783b29f95ad19e5f33b74
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Samuel Rødal
711773776e Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.
QImage is supposed to maintain the invariant that each scan-line begins
on a 4-byte boundary, so we need to verify that this is the case before
using the optimized path of short-cutting QImage::copy() by referencing
the source image's bits directly.

Task-number: QTBUG-14766
Change-Id: I0a178aeb2f34cc64f98deae9470b55b5c53fcb06
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 15:00:35 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Samuel Rødal
b56caf5f4e Introduced QWindow::setMask() to expose existing platform functionality.
Task-number: QTBUG-28555
Change-Id: I2c649b6d9e9dc69be246cb7658b3edbe9682b1bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-27 09:11:18 +01:00
Stephen Kelly
f136701bc5 Use the base implementation of QAbstractItemModel::sibling in QSIM.
QStandardItemModel doesn't really benefit from a reimplementation of
sibling, and the current implementation is buggy.

Task-number: 29540
Change-Id: Icf8dca29b6e1394a378db5bf6abd884f2d7fd9b9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-26 00:03:26 +01:00
Oliver Wolff
bf04283b4e Removed unneeded printsupport dependency from qpainter autotest
Change-Id: I906726a3d77572b9e054adbc68c4755dd663ad87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:21:03 +01:00
Oliver Wolff
53dc49ffc8 Check for network module when building according auto tests
Change-Id: I68013bf8e07be8d202b3253f997d4f4db05335a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:53 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Yoann Lopes
c7a51f1858 Added QOffscreenSurface class.
Inherits QSurface and allows to use OpenGL from an arbitrary thread.
Platform plugins can implement QPlatformOffscreenSurface, otherwise an
invisible QWindow is used by QOffscreenSurface.
This patch includes an implementation of QOffscreenSurface for XCB
and EglFS platform plugins using pbuffers.

Change-Id: I57b4fc1db417331f34826dcfa754b7698782fde4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-18 13:42:22 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Samuel Rødal
733430636d Fixed crashes when using QImage in combination with QCoreApplication.
As long as fonts weren't used we supported using QImage in combination
with QCoreApplication in 4.x, and there's no reason we can't continue
doing so.

Task-number: QTBUG-29643
Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-02-14 10:55:33 +01:00
Samuel Rødal
62d25e4d4f Fixed QPixmapCache associating path with wrong QPixmap.
QPixmap::load() would not detach, so multiple paths could get associated
with the same QPixmap, causing the wrong pixmap to be shown.

Task-number: QTBUG-29639
Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-02-12 15:21:57 +01:00
Samuel Rødal
23b11e792c Added QWindow::Visibility convenience API to QWindow.
This finally makes it possible to make windows fullscreen etc from
QML by doing "visibility: Window.FullScreen". I don't see any reason
from not having the API at the QWindow-level instead of at the
QQuickWindow-level since this way it can benefit other use cases too.

Change-Id: If27344306eb563bc2ccd83296a46b1f2862e2db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-12 15:02:53 +01:00
Friedemann Kleint
d180560e14 Fix QWindow::setFramePosition() to keep the size.
Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-11 15:17:07 +01:00
Samuel Rødal
bfa1584162 Added version() and setVersion() convenience API to QSurfaceFormat.
This lets you write code like format.version() >= qMakePair(3, 2), and
format.setVersion(4, 2) instead of format.setMajorVersion(4);
format.setMinorVersion(2);

Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-08 20:00:00 +01:00
Samuel Rødal
af84313c62 Fixed crash in image reader when reading certain BMP files.
If the high bit in a mask is set, for instance if the mask is
0xff000000, and we shift it to the right by 24 positions, since the mask
was not declared as unsigned we ended up with a mask value of
0xffffffff. We then add 1 to this value and divide by the result,
causing a division by zero crash.

The masks need to be declared unsigned to prevent sign bit extension
when shifting right.

Task-number: QTBUG-29194
Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-06 09:59:56 +01:00
Morten Johan Sørvig
a9458a1755 Clean up logical dpi for QImage.
Revert to the pre highdpi-patch behaviour.

Before, both physical and logical DPI would be based
on the dpmx/dpmy variables, which could be changed
with setDotsPerMeter(). The highdpi patch introduced
separate ldpmx/ldpmy variables, which were not
changed by setDotsPerMeter().

This broke when loading images: setDotsPerMeter
would be called but the logical dpi would not change.

Remove ldpmx/ldpmy. Keep scaling the physical dpi
by the devicePixelRatio, which will be set to 1 by
default.

Task-number: QTBUG-29187
Change-Id: I0d6f5f3b8efae5fb1adc0a50b22a5da78324a282
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-31 10:39:38 +01:00