The intent is to provide compile time validation of signals and to help
detect signal overloading in the future.
Change-Id: I9d5d46ed4b70c5d0cd407deb5928b1e76d37e007
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Since we require a relatively recent system, check the version of the
direct2d dll on disk and report an error to the user if it is too old.
Previously only a cryptic runtime error resulted from a direct2d version
that was too old.
Change-Id: I6c3955e1a98326fca6bcdc871b0a25291391ba88
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
After analysing text drawing performance two things seem to take up most
of the time. The first is font lookup, the second is QVector
initialization.
To address the first point a per paint engine instance font cache is
introduced. At the moment no mechanism exists to clear this cache and
it is unbounded.
To address the second point, we simply switch to using QVarLengthArray
instead of QVector.
In an artificial benchmark that draws text in a tight loop, the first
change raised fps from ~70 to ~100. The second change further raised this
number to ~115 fps.
Change-Id: Iafa25c3e35bc42bd7c1582b0636e721c5193b494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When the start point is not on the curve, the end point will be
used as starting point for the QPainterPath, if it is on the curve -
if it is not on the curve, the mid point between start and end point
will be used. The origianl start point will still be used as a control
point for the first bezier curve.
Task-number: QTBUG-38601
Change-Id: I90e07f1141288873263f1f12fa51e6a248d0804f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
1) toString does not track the string it returns, thus it has to be
deleted by the caller
2) on some platforms vsnprintf crashes if a null string is in the
va_list
Change-Id: Iecf94e93d3a2ddf4186ee20de1f495f2f92dcc60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Matches the compiler capabilities better and will catch all GCC-like
compilers (including Clang, LLVM and Intel CC on Unix).
Task-number: QTBUG-38544
Change-Id: I102966d307a4e167b6dcf3da08359e656f3af45e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
GetGlyphOutline fails for ttf fonts with embedded bitmaps. This results in
distancefield rendering not rendering glyphs (for the failed paths). We
need to fall back to texture rendering if this is the case.
Change-Id: Ibdf7dc5c1d34f513c436f88fabbdcc4089bb6fef
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.
Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
Some calls pass len=32, so garbage was shown when maxlen (readBytes) is smaller.
Change-Id: I97e61dcdf5a0db032317c57afb4bfb406437d8d5
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
The collected data doesn't reveal any obvious correlation between sleep
times and test failures but the many warnings are a hassle for anyone
reading the test results.
Change-Id: I71bd0c90c20c730573693f23f4435e538b635d44
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The image format returned by QOpenGLFramebufferObject::toImage() on
OpenGL ES/2 builds changed in 5.2.0 but was not documented.
Change-Id: I2379c62c7f715803192ffa9bb8ae1171ef4b2314
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Change-Id: I92fa083665509932b75ff1037904a6f78a950fd6
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Change-Id: Ife5b7206fd3d7af57cfca3c0f28f56bb53ede7a7
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
A pro file that adds files to QMAKE_BUNDLE_DATA using relative
paths will fail building if doing shadow builds. The reason is
that we look for the files inside the build dir.
This change will make sure we resolve files from the source dir
when not using full paths.
Task-number: QTBUG-37054
Change-Id: Ic1067861097b3b6a640ee862472d728d6188576a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Nothing else seems to report this state and on windows
for example it results in NVDA reading subMenu which makes
little sense.
Task-number: QTBUG-38500
Change-Id: I64820d9f2ea9174034f01da42cb2266a19c19465
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
When moving the mouse over a disabled menu it could appear to be usable
but it should not show any interaction at all.
Task-number: QTBUG-31688
Task-number: QTBUG-37488
Change-Id: I9e6594b40e8b209146d8c3705750dfd75f1258c5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This test doesn't fail on Mac any more.
This reverts commit 36493a7a41.
Task-number: QTBUG-23685
Change-Id: Ib7c56494b07de9839b3287758fe228f799bc343c
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When replaying the mouse events synchronously, nested calls
of QEventLoop::exec() may happen in conjunction with menus.
Task-number: QTBUG-38550
Change-Id: I2b1dafdac59d1a080775af5f165d1e594ea58804
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Useful for any application that can take URLs on the command-line, so that
full paths and relative paths can also be accepted.
Change-Id: I8a2c50f36d60bdc49c065b3065972fd5d45fa12a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Small improvement to the code by using an enum instead of a boolean.
Change-Id: Ib792cf97224b5204fd36ca215387fc7be34f2c32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We can do the (atomic) test of studyData before locking the mutex
protecting the entire function body.
Change-Id: I3006e3a0028608f21668ddaebe8a799aed56362f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a user doesn't like that QRegularExpression might do an
uncontrolled CPU/memory spike when it decides to optimize a pattern,
offer a way to disable the automatic optimization.
Change-Id: I38a98a3bfb239cfad9f977b0eeb75903268e747f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The fact that we kick in a pattern study and possibly a JIT compilation
after an undocumented number of usages is suboptimal, for a number
or reasons: users may want to JIT compile a pattern immediately,
and at the same time they may not want a random delay in the program
(due to the pattern getting optimized at a random usage).
So: add an optimize() call to force an immediate pattern optimization,
and a pattern option to force an optimization on the first usage.
Change-Id: I95efdecfd31f11ca7cceb9c05037df613601a11c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
sched_yield is standardized and on linux pthread_yield is implemented as sched_yield.
Building Qt for Android on OS X doesn't compile with the pthread version.
Change-Id: I1913afa83769805291e987f55b8f452299a43dce
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
QGLWidget has a paint device type of Widget, yet drawing on it
from outside the gui thread is fine as long as ThreadedOpenGL is
supported. It has probably been overlooked that the device type
OpenGL applies to QGLFramebufferObject and such but not QGLWidget.
This will fix the problem of flooding the output with warnings in
the tst_qglthreads autotest and potentially elsewhere too.
Task-number: QTBUG-38771
Change-Id: Ie014a2610a0db41b31c30c404e286d4997aecdc3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This caused for example the variable QMdiAreaPrivate::isSubWindowsTiled
being cleared from another instance, which resulted in odd
resizing behavior.
Task-number: QTBUG-31448
Change-Id: I880f7e415d6654e52499df1bfaf99f2c55d86320
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
For exaple Qt Creator would crash when started and a screen reader (eg
NVDA) is running. This is due to updateAccessibility being called during
the ctor of the TextEdit and on Windows the AT can access properties in
the same call resulting in accessing the text control before it's fully
constructed.
Also make sure to not send accessibility updates for non-widget type edits
since we don't support any accessibility in Qt Quick 1.
Task-number: QTBUG-38659
Change-Id: I1635fa3b2c4d3509f44daf760e4d7b4171d67e1d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
On some Intel configurations the current DXGI discovery breaks. Fix this
by adhering to Microsoft's guidelines for discovery of the DXGI factory:
http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx
Not querying the adapter directly as in the code snippet on the site above
seems to have been a typo originally.
Change-Id: Ibd7546462cdab7e5ad03db9abc16fe1615b631f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This aligns with the other mobile platforms.
Task-number: QTBUG-38691
Change-Id: I7b9b70a1182c0e53f997cae111ec46b5161b0b48
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Remove the intermediate pixmap in the backing store and draw directly to
the window swap chain. This is faster and reduces memory pressure on the
graphics card.
In case of native child widgets we need to read back the back buffer,
which incurs an extra copy in this case.
In an artificial benchmark drawing animated full screen
gradients as fast as possible this patch increases performance by 42% on
my current machine from 480fps to around 680fps, i.e. the time for
actually getting the pixels to the screen is now lower.
Change-Id: Ifbeda0e199afec03cecfe76337679a9e9d082bdd
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This patch reuses the code and pattern used to vectorize scaling, to
also vectorize rotating transforms in fetchTransformedBilinearARGB32PM.
This provides significant improvements in QtWebKit on benchmarks using
rotating transforms.
Change-Id: If250e0f5dae1ff0f954301f96cc8970a99ae3e9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The button state part of the XI2 events appears to be badly constructed
on some devices and platforms. Even where supported the 'detail' field
of the XI2 events is what we should be reading since it indicates the
button the event refers to and not just the state of all buttons.
Task-number: QTBUG-38169
Change-Id: Iedb7971194b3c27448b72c285a54100c511c17e4
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The pointer ID was incorrectly interpreted as a device ID, which caused
creating a new QTouchDevice for each touch update and potential crashes
in QtQuick. The handling has now been simplified and aligned with Windows
Phone, treating all touch events as if they originate from the same
device. Given that the native device has no ID, it is not
possible to track the native device between events anyway (even the
pointer values change).
Task-number: QTBUG-38745
Change-Id: I24b6c00b765dcb49cd653638afafc04fdd80f774
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
When using directfb platform the drawing of some widgets (e.g. Toolbar)
would crash the application.
Pixmap device pixel ratio can be used in QCommonStyle::drawControl() as
a denominator to calculate pixmap width or size. The drawing of some
widgets (e.g. Toolbar) would fail the assertion of a non-zero
denominator.
This commit initializes the device pixel ratio when generating
BlitterClass pixmaps and makes QBlittablePlatformPixmap::metric(
PdmDevicePixelRatio) return devicePixelRatio() instead of 1.
Task-number: QTBUG-38709
Change-Id: Ia8b96c5341b5ac1297c483deed1c695846398b88
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Determine KDE prefixes in the following priority order:
- KDEHOME and KDEDIRS environment variables
- ~/.kde(<version>)
- read prefixes from /etc/kde<version>rc
- fallback to /etc/kde<version>
Task-number: QTBUG-36184
Change-Id: I9010ea485f1954b21bda73b02993dbddef67eb1d
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Change-Id: I003e59bd50754dbbda23de5c55096ca2d25b7a7a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
When compiling with the -Wswitch-default flag, the compiler
spits warnings for the moc generated files.
In certain development environments (e.g. where MISRA rules
have to be followed) every switch statement needs to have a
default case. Unfortunately the moc generated files contain
switch statements without default case. This patch adds a
default statement to all switch statements that are generated
by the moc compiler.
Change-Id: I8f3d81e3463fce4d3abf2ea5d0fa8727a7d9ba2e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When it gets 'calendarPopup' set, that is.
The reason lies, indirectly, in the extra margins we add to
QComboBoxes and other QPushButtons in the Mac style. However,
these extra margins do not apply to spinboxes, which is what
QDateTimeEdit is.
In particular, this causes Designer to show QDateTimeEdit at
the wrong size when it's not in a layout.
Task-number: QTBUG-38615
Change-Id: I3dd52e10db8c8970a6dc40b39fbe29dd86167daa
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>