Instead of looping unnecessarily on top of testAndSet.
Task-number: QTBUG-37031
Change-Id: I8120f8405eb76dccc9066749cee0a92b0f2da20e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
If the widget \a field is not present on this form, getWidgetPosition
might not fill in the role variable. GCC is correct.
qformlayout.cpp:1690:19: error: ‘role’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Change-Id: Ia67991a71e8f1ceacb9d6370c7028c454ef630c6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
...which uses the recently introduced glyphIndex() method;
get rid of re-implementations that did almost the same.
Change-Id: I6d32d2cee6a31f57de6aee05ed8d120d4a1f4e9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
...an optimized drop-in replacement for the code like this:
`stringToCMap(&uc, 1, &g, &numGlyphs, QFontEngine::GlyphIndicesOnly)`
(aka "get the glyph index for exactly one Unicode character").
Change-Id: I22babf49f7cf28892d27533a5ac51ad449779f75
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Ensure the params are valid and make QCoreTextFontEngine::stringToCMap()
handle the unsufficient buffer case exactly like the other engines does.
Change-Id: I078af37da917cf2bac709b12aa827ed4128e5f30
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Modifying the glyph indexes array in recalcAdvances() could lead
to undefined behavior.
Change-Id: Ibbb6642f381a5fe01b285dc8d2001c167dc66f46
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The justification "classes" stored in the glyph attributes
are actually a justification priorities suitable for a particular
language (script). The external API only uses the justification
metrics array calculated on top of these priorities.
Change-Id: I5b0a39e35954084c63a798b632fd6108f9ae7608
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The 'head' table is usually of 54 bytes length. Passing the buffer of
4 bytes capacity for the 'head' table is expected to return false,
thus skipping the FontRevision tag in QPAGenerator::writeHeader().
Change-Id: I02c0b13f3cbf13579a845fe78fcbc8a437ae22bf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Being a most significant method in the font API,
getSfntTableData() must behave in exactly the same way on all platforms.
Briefly, it must return true if the table exists in the font,
despite the other params, and always stores the table data length
in 'length' param, thus reporting the amount of bytes actually
needed to store the table data in a buffer.
Change-Id: I7a15465020c1ea818ea46a05ea3b9b7e1cd60d14
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make sure the alphamask in the backingstore is updated whenever the
state of a QQuickWidget/QOpenGLWidget child changes.
Task-number: QTBUG-37062
Change-Id: Iffa80fc8993499a15bc9e773a162a3f98b81ae03
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This fixes the tst_qopengl sharedResourceCleanup auto test
Change-Id: I0ac6f45797f656b637254f01c2cb8073436b45b2
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
LRESULT should be non-zero if the application can quit,
and it is always handled. Improves
97d8e3b200 .
Task-number: QTBUG-35986
Change-Id: I0ad95bc20a5d9e2a52c76bdcdfa986595f6a08d8
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This is so we get some typesafty when refactoring, and I think it makes
the code more readable
Change-Id: Ia7531950d5f780dc98f4eb435c1e0050d76cdb5f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
We should never upload on a SPDY stream in a closed or half-closed
state. To avoid it we need to stop listening for readyRead on the
upload device, and ignore WINDOW_UPDATE on completed streams.
This fixes SPDY access of facebook.com.
Change-Id: Icad45ffc109b2c14b921f1571e114b70a30f40a9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
The Windows SDK 7.1 command prompt sets this value to "WindowsSDK7.1"
through its SetEnv.cmd batch script. The MSVC Express Editions do not
include a 64bit compiler toolchain, but the Windows SDK does, so this
change makes it easier to build qmake projects for x86_64 when using
the Express Editions, by running qmake from the SDK command prompt.
See also:
http://msdn.microsoft.com/en-us/library/9yb4317s%28v=vs.100%29.aspxhttp://msdn.microsoft.com/en-us/library/ff660764%28v=vs.100%29.aspx
Task-number: QTBUG-31185
Change-Id: I49d3e159ed67f64490a3d57c5471d540d76ae13f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The last step to make QOpenGLTextureGlyphCache working with
OpenGL core profiles.
[ChangeLog] Native (that is, not distance field based) text
rendering is now functional on OpenGL 3.2+ core profiles too.
Task-number: QTBUG-36993
Change-Id: Ic6c0db4806cea623ca7a19ab77b0329155824877
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Besides serving as an example for performing OpenGL rendering inside
a window container in a way that it works across all GL versions,
this is an extremely useful tool for developers and users alike
since it allows quick and easy checking of what sort of context a
particular driver returns for a particular QSurfaceFormat.
NB! Depending on the OpenGL driver, some surprises can be expected.
The handling of core/compatibility profiles, the fwdcompat bit,
the supported GLSL versions, etc. tend to be somewhat different
across the different OpenGL implementations.
Task-number: QTBUG-37071
Change-Id: Iae4328e66cd0bb19f74a77fefef93ea5a3221e31
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Instead of assigning the various bit-fields manually, use the quint32
union field, which is already present to avoid slow bit-field operations
in the member-swap function.
Verifed that the generated assembly for move-assignment is
significantly better than before on GCC.
Change-Id: If4e0ef678bf3a496c6eb369ad3f639f5a9bc79fc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
by default QT contains both core and gui already
Change-Id: I6f5b551104e40a024468e7cb62e302134e9472ec
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Add handling of invalid stream-ids and buffer overflow in header
parsing.
Change-Id: I712af189d72612639d25890a8861a8f4fe084ce3
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Added checks if item is already expanded/collapsed to
QTreeView::expand/collapse since the following computations
can be quite expensive. (This is useful when saving/restoring a
lot of item expansion state e.g. after a model reset.)
Task-number: QTBUG-35939
Change-Id: I82c4489f9fe0b8ac61994652a60312e34c46f628
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
These tests seem to fail because denormalized numbers are not
supported on QNX yet, so marking them as expected failures.
- floatDistance(denormal)
- floatDistance_double(denormal)
Task-number: QTBUG-37094
Change-Id: I79dbc78da6e9bef8466264fd2cab4af0ee8b868f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
These tests seem to fail because denormalized numbers are not
supported on QNX yet, so marking them as expected failures.
- testNumbers_2()
- toJsonLargeNumericValues()
- parseNumbers()
Task-number: QTBUG-37066
Change-Id: Ifec95b936fb70253395dee4d1ca18e85870486a3
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
SPDY is currently assuming it will only receive RST_STREAM messages on
active steams. This is however not always a safe assumption.
Task-number: QTBUG-37100
Change-Id: Ied89a68a209891992ad72daa513066efc1d7c421
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
let the syncqt + qt_module_header.prf pair handle generation of
forwarding headers.
in qtbase this is ineffective to some degree, as the need to create
QtCore's forwarding headers early for QtBootstrap requires qtbase.pro
already doing the real work, but at least we get the verification that
nothing breaks.
Other Modules (TM) will need the full functionality.
Change-Id: Ifd3dfa05c4c8a91698a365160edb6dabc84e553f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
less platform-specific code. the qfeatures.h generation is already here.
Change-Id: Ied69fb431eed5816fbff63b33be431ee913c2bc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
since ever we've thrown out the phonon hack, each header is synced to
only one location (CamelCase headers notwithstanding).
Change-Id: Idfef33db9410908aefe309bc7a3edeae5fc5a671
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
no need to have two mechanisms for the same thing.
the values of %classnames can be comma-separated lists now, so one
header can have multiple classes assigned. conversely, if an extracted
class name reverse-maps to a different file name, it is omitted.
Change-Id: Ia0a35d64764b6376f33b77bbfe59e1df70a3cf1a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This has apparently never worked for any negative value. That's because
the compiler sign-extends the incoming expectedValue to fill the 32-bit
register, instead of zero-extending it, and it also expects any returned
values to also be sign-extended.
Task-number: QTBUG-37031
Change-Id: I836eddba7b1acc56bb0ac1d41de7001d06255b9b
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Similary to QWidget's windowTitleChanged, QWindow should also have a
windowTitleChanges signal that's emitted when the title changed and declared
as notify signal for the title property, so that QML bindings can be written
against it.
Change-Id: I6f107c6f0b43d6a959bc2ef96492e1f3e4c28bfe
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The source was never set for OS-synthesized events, causing duplicated
touch clicks to occur in Quick 2 applications.
Task-number: QTBUG-31386
Change-Id: Ib6d1405815dfb8e57d6446c72a7d6e2a044281ea
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Make the range for detecting relative (mouse mode) configureable
using -platform windows:tabletabsoluterange=50
Task-number: QTBUG-36937
Change-Id: I44f928e53cb41b246c44554ec7f71bfbdf03c147
Reviewed-by: Arthur Krebsbach <Arthur.Krebsbach@Wacom.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
when the event comes from the windowing system
Task-number: QTBUG-31117
Change-Id: Id136ad8c39c9284cbd6ad126ee71ac655f8f91ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
SPDY sends multiple header values for the same header key by null-byte
separating them.
This patch maps the multiple values the same way
qnetworkreplyhttpimpl.cpp
does. With this patch applied we can now log on to GMail using SPDY.
Change-Id: I03656ad1695d13b5c3ed252794dc6c89c67c7b97
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Popup window positions where offset on retina MacBooks
with an connected external monitor.
Fix this by cleaning up the coordinate conversion
functions:
Remove the qt_mac_flipRect overload which tries
to position the window according screen size. This
functionality does not belong inside a coordinate/
type conversion function. Also, it was using the windows's
screen instead of the main screen which is incorrect.
"Y flipping": Use the height of the first screen in
[NSScreen screens], which is documented to always
be the screen that contains the coordinate system
origin. Remove the usages of QApplication::primaryScreen()
("Don't use Qt to implement Qt").
Task-number: QTBUG-36672
Change-Id: I2354d31361f5a4c2c80035cf4c7def939218406f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Improvements
* Cursor atlas has been recreated using 32x32 cursors which avoids
artifacts introduced from downscaling of the busy cursor
* A white outline has been added to the cursors to improve visibility
on black backgrounds
* Hot spot positions have been tweaked; in particular,
Qt::PointingHandCursor now has a correct hot spot at the tip of the
index finger instead of the center
The assert which checks that the number of hot spots equals the number
of cursors had an off-by-one error as the first cursor is
Qt::ArrowCursor which has an enum value of 0. To determine the number
of cursors, 1 needs to be added to Qt::LastCursor.
Change-Id: I266b6d4cc47d42219854aa5b7e2d8344eb3a920a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Make sure QPlatformWindow::setGeometry is called for
the QWindow::fromWinId() case where there is no
QNSView.
Change-Id: I72dd11a0eb0f3cfbd09b87ffeac86f2a826e0192
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Qt warns on all touchpad evens when running in a VM.
This appears to be harmless. Remove the warning.
Also, qWarnings are ideally messages to the application
developer about incorrect use of Qt API. In this case
there is nothing the application developer can do
and a qWarning is not really appropriate.
Task-number: QTBUG-36484
Change-Id: I8a50f5a15010f1f064509b83ef4f239b008e0f2b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>