Make sure we move the drag pixmap when required,
and readd some commented out code from Qt 4.x.
Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b
Reviewed-on: http://codereview.qt-project.org/5262
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Re-add the support for drag pixmaps to qdnd.
Use the new WindowTransparentForMouseEvents
flag for the window that shows the drag pixmap.
Change-Id: I4b594085c161475988b9be0ffdc02c75fcc37f66
Reviewed-on: http://codereview.qt-project.org/5261
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Add a flag for output only windows that are
transparent for mouse events and implement it
for the xcb backend.
Change-Id: I24afdb6b27de34bcdf0c061a5a4987ac2880e4ae
Reviewed-on: http://codereview.qt-project.org/5260
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
We need to create the XWindow here to
avoid crashes, when resizing the backing store
before creating the window.
Change-Id: Ib8d9efca3552e5a91f5f63a9262449080ae301e5
Reviewed-on: http://codereview.qt-project.org/5259
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
When the platform window is created, it is the
authorative source for geometry information.
It would however be better if we could completely
avoid duplicated places for the geometry data.
Change-Id: Id90b24b9c40acb57f3d11b8b927292c06bac335e
Reviewed-on: http://codereview.qt-project.org/5258
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Also use QList::at instead of operator[].
Fixes: QTBUG-21403
Reviewed-by: Gabi
(cherry picked from commit 6997b836f445908cf53c1c96a69e3eb7ba535706)
Change-Id: I5d9de189e931b2b55fbd7baab0baad94adae352b
Reviewed-on: http://codereview.qt-project.org/4782
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Commit 37d76a6798
made testlib depend on gui and widgets. It shouldn't.
Changing the includes was enough.
It's the application (e.g. autotest) that uses the
gui/widgets features that should link against gui/widgets.
Change-Id: If80d30a7eca2cac78cb5c6e5d29c82a06fb9f1dd
Reviewed-on: http://codereview.qt-project.org/5095
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
There's api in testlib that should only be available
if the application links against widgets.
Change-Id: I22e382c6710690866ed8ffed81bae27b548dc830
Reviewed-on: http://codereview.qt-project.org/5094
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
The multiexec test runs the same test object five times. If the -o
option is given, the output file is overwritten by each run of the test
object, meaning that tst_selftest only sees 1/5 of the test output in a
file compared with what it sees on the console. This makes it
impossible to use the expected output file to verify the test for both
console and file output. This issue is noted in QTBUG-21561.
Change-Id: I00031a2ea43a7ef78e8317473a089306ec062d8e
Reviewed-on: http://codereview.qt-project.org/5270
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The warnings selftest verifies that qtestlib correctly handles output
sent via qDebug() and friends. The test had a number of printf calls
that were used to tell the user what output they should expect to see
next, but by bypassing testlib's logging, these made the testlog differ
depending on whether the test log was directed to the console or a file.
The printf calls are no longer needed, as any regressions in qDebug will
be detected by tst_selftests, which compares the output of the warnings
test with a reference copy of the expected output.
Change-Id: I8c3a3237463141fa494c50ca02062760cb583090
Reviewed-on: http://codereview.qt-project.org/5200
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.
Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).
Change-Id: Ifd15f72e2c553fba0c399c921957c4e955bb590d
Reviewed-on: http://codereview.qt-project.org/5191
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
As previously with QInputContext, now supporting filterEvent()
interface. Usage only on XCB so far.
Change-Id: I8e5972626552bda32318fe060017d0217bb79a94
Reviewed-on: http://codereview.qt-project.org/5240
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QtDeclarative doesn't link against QtOpenGL anymore.
This line was implicitly causing the QtWidgets library
to get linked in as well.
Change-Id: I56e6e9db52eec7fc924506bfeb4b7931ea04e616
Reviewed-on: http://codereview.qt-project.org/5204
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
The actual touch point is supposed to be in the center of the rectangle,
and since the rectangle is 1x1 it means we have to subtract 0.5 from x
and y.
Change-Id: Ica4aba26dbe61328c8e7cbdcf8b02c96e2f41a40
Reviewed-on: http://codereview.qt-project.org/5256
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
... and use [NSEvent mouseLocation] as global mouse position rather than
relying on QCursor::pos() (which is buggy at the moment).
Change-Id: Ieb8000089d0d824bed89abd8b2add9e28273f227
Reviewed-on: http://codereview.qt-project.org/5254
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
QTouchEvent::TouchPoint assumes the rect() is in local coordinates,
whereas QWindowSystemInterface::TouchPoint uses screen coordinates.
We must therefore use QWindowSystemInterface::TouchPoint::area as the
screenRect() rather that the rect() and then use the screen coordinate
to calculate the local coordinate by using mapFromGlobal.
Change-Id: If7a52f5668c3938f46bdd38a5ea82b5313d6b626
Reviewed-on: http://codereview.qt-project.org/5253
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
The raster engine and the capabilities were leaked, use the
QScopedPointer to prevent that from happening.
Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5242
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Use the QScopedPointer to prevent memory leaks, right now
the code appears to be sound but make it more clear that
calling ::setBlittable will destroy the old one.
Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5243
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic
Reviewed-by: Eskil
(cherry picked from commit cd43d6386de6e66379fa23c1ea4ec06141167c86)
Change-Id: Ic05f775975d5f21e0274e7b2c3a4903d6a4ae41f
Reviewed-on: http://codereview.qt-project.org/5203
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Avoids rounding issues with very large coordinates.
Task-number: QTBUG-21262 - QRasterPaintEngine & QFontEngineFT - fonts corrupted when scrolling to the bottom of long texts
Reviewed-by: Eskil
Signed-off-by: Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
(cherry picked from commit 43e013e2048e8193e2d31276cac6348a9f6ce340)
Change-Id: I5810a1a60f2bbdba4889a6b5e493b183018f3976
Reviewed-on: http://codereview.qt-project.org/5202
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Since FreeType has internal caching, it has had a special
code path in the raster engine which avoided using Qt's glyph
cache, as that would be redundant. However, when compiling
with QPA, we want the same behavior without being able to
access the QFontEngineFT class. To achieve this, I've made
a new abstraction and added it to QFontEngine which allows
the FT engine to provide direct pointers into the alpha maps
stored by FT. This requires a locking/unlocking mechanism.
Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible
mess, but due to time constraints, the task of refactoring these
functions into a more flexible API needs to wait. I've added a
TODO comment for this.
Change-Id: I08237403c2967f8fb952258178676f33a87c0353
Reviewed-on: http://codereview.qt-project.org/5155
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Make the test use qDebug instead of printf, so that the reference test
output is the same regardless of whether the log goes to the console or
a file.
Also rename the test class, as it was evidently cut-n-pasted from the
subtest selftest without being renamed.
Change-Id: I8df1f0989f2e8c33c1f829ba8110fd740ff70f63
Reviewed-on: http://codereview.qt-project.org/5184
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test was attempting to verify two completely unrelated things, so
this commit splits it into two tests.
Also, printf calls are replaced by qDebug so that the test does not
bypass the testlib loggers.
Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee
Reviewed-on: http://codereview.qt-project.org/5178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test is not useful for finding bugs in qtestlib's logging code,
because it bypasses the qtestlib loggers and doesn't play nice with
tst_selftest. Neither is this test very useful for finding bugs in
QTest::qWait(), as the test only proves the qWait() terminates, not that
it waits accurately, or even that it waits at all.
Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694
Reviewed-on: http://codereview.qt-project.org/5173
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The problem is that the libQtPlatformSupport.prl file
will otherwise add these as link dependencies, making any
platform plugin link against these.
Change-Id: Ief71726e86990bb44b12cf86e78b844a1a23ae3c
Reviewed-on: http://codereview.qt-project.org/5098
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
QApplication::pickMouseReceiver() does the appropriate mapping if the
receiver changes.
Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac
Reviewed-on: http://codereview.qt-project.org/5148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Mac only support multitouch points, hence width/height 1. Also add
comment about performance related to multitouch events.
Change-Id: I307261492366e361e17f9edf446f456c07c87a22
Reviewed-on: http://codereview.qt-project.org/5162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
In 20009ed797 I introduced a new
approach to synthesized oblique. However, while the embolden
function in FT alters the glyph metrics accordingly, the
oblique function does not, so the glyphs would be clipped to the
original, unslanted metrics. So I've implemented the same matrix
in the loadGlyph() function and we now apply this to the metrics
manually. This will only work as long as the underlying algorithm
doesn't change significantly.
Task-number: QTBUG-21202
Change-Id: Ic20b2a0fdeac5ce833e95fd06efa12b3b70feee5
Reviewed-on: http://codereview.qt-project.org/5156
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Move handling of -qmljsdebugger= argument from QApplication
to QCoreApplication. It makes sense to allow debugging also
for applications based on QCoreApplication (which we intend
to support in QtDeclarative).
Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36
Reviewed-on: http://codereview.qt-project.org/5121
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Stop the mis-use of navigate to find the parent.
In order to make navigation straight forward
parent and child functions are now part of
QAccessibleInterface.
This allows navigating the hierarchy of
accessible objects without the 1-based indexes in the
navigate function which lead to confusion.
Eventually the support for Ancestor in navigate can be completely removed
and forwarded in the windows bridge if needed.
In addition default parameters for virtual children.
This will make the transition smooth since it allows to remove the integer
already.
Change-Id: I278287ce17161f9fa46797ac244676778c859576
Reviewed-on: http://codereview.qt-project.org/5024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.
Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).
Autotests that don't need QtGui or QtWidgets
api shouldn't link against those libraries.
Change-Id: I2808289068514fcac582808828ad4634e2631733
Reviewed-on: http://codereview.qt-project.org/5093
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Problem was fixed by Change Ie172e935: Revert accidental v8 submodule version downgrade
Change-Id: Ie0467170df70e9fcc10837150103d48ddd48734b
Reviewed-on: http://codereview.qt-project.org/5006
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
When fetching the outlines we need to synthesize the weight and
style of the requested font. This is currently only supported
on FreeType versions that have the Embolden and Oblique functions.
We also use FreeType's Oblique function for regular text when
possible, and only use the matrix approach when that function
is unavailable.
Task-number: QTBUG-21202
Change-Id: I0656ab66cc3ec70d6a7675b8c78d06632625261c
Reviewed-on: http://codereview.qt-project.org/5076
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
The glyph caching was disabled on QPA, possibly due to some
bugs which have gone away now. To avoid the performance hit
of this, we need to enable it. Simple tests of QTextEdit
indicate that this works fine.
Change-Id: I40845b327331b366161f1ca55bf00853bca87358
Reviewed-on: http://codereview.qt-project.org/5096
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
It didn't make sense, since testlib doesn't link against
gui. The QApplication api wasn't used anywhere anyway.
Change-Id: Idb1bd20c7bcd0f9f16a9b526a7dabe4afccecfc4
Reviewed-on: http://codereview.qt-project.org/5058
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>