warning C4267: 'argument' : conversion from 'size_t' to ' int', possible
loss of data.
Change-Id: I79af7497420d468b5bc7c48c9ae21b86117519a9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Edge case: a > that should have been >=. Without it, we never ran the
rest of the IDN nameprepping.
Change-Id: I2276d660de3a70d0c561bb18816820d9a0f47e77
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
RFC 3454 says about prohibited characters (section 2, "Preparation
Overview"):
3) Prohibit -- Check for any characters that are not allowed in the
output. If any are found, return an error. This is described in
section 5.
In other words, we mustn't simply strip the output of prohibited
characters. We must generate an error if they are present. We do that by
clearing the data.
We already had tests for prohibited output, but they were
indistinguishable from being stripped. So instead add some extra
characters so that we can tell whether the label was cleared.
Change-Id: I2d95217c27be5e2d54deed0036cb009e3b7f4886
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
When uc > 0xffff (non-BMP character) and l == 1 (replacement is in the
BMP), we must use QString::replace so the correct number of characters
is replaced.
There's one case testing this in tst_qurlinternal, but it is being
obscured by another bug (false positive).
Change-Id: I32388dd5bef32d4d6804aeeec4904bd5f563e9b9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If the case folding operation results in either expansion or reduction
of the string, we need to adapt. Reduction happens most often when a
non-BMP character is case-folded to a character in the BMP (example:
mathematical signs at U+1D400-1D7FF). Expansion happens in the rare
case of symbols containing words, like U+2121 ℡ (this is part of the
unit test), and one common case: the German sharp S (ß) is expanded to
"ss".
Change-Id: I1bdbdc908b958a89bf30e4bb648d65dfdd9097f8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Because tests are usually run as root on some setups, it does not
make sense to test for the right permissions of a readonly file.
Change-Id: I484f88722d3a9ce7123edc0fb57acae528fa194e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Update the test code to match the current Qt idiom for finding test data (and
fix it on QNX).
Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
To ensure the correct event order, only set the geometry() once the window is
actually made visible.
We also need to post the expose event even for child windows (i.e.,
windows which have a parent).
Change-Id: Ief80778bc3202352bd194e4b3ba655f619350b1a
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
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>
QFontEngineFT::recalcAdvances uses design metrics if hinting is disabled
or slight. QFontEngine::doKerning only follows the QFontEngine::DesignMetrics
flag. This means in some instances the advances will be calculated in
subpixels but kerned in full pixels.
This patch makes QFontEngineFT decide if it should request design metrics
from QFontEngine::doKerning or not.
Change-Id: Ia0236efde2d7269623f690a6074afbe26e07c458
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
In QML it is common to connect signals to slots that are implemented as
JavaScript functions. QML used to maintain separate data structures that
mirrored the QObject connection list and kept references to the JavaScript
objects necessary to perform the call on signal activation.
The recent addition of functor based QObject::connect makes it possible
to store this information in QSlotObjectBase sub-class instead, which
eliminates any extra bookkeeping.
This patch adds internal connect and disconnect overloads to QObjectPrivate
that allow for connecting QObject *sender, int signalIndex to a given
QSlotObjectBase and similar for disconnect.
Change-Id: I90f43d13eb95bd884d752484cf4faacc446f4d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
On Mac it's expected that some elements are
filtered out of the a11y hierarchy.
We do this with the shouldBeIgnored function.
The problem is that we would ignore some objects
and then return them in the child attribute function.
This is inconsistent and leads to voice over not working.
For example having a plain QWidget with other widgets as
children would cut off all of these widgets, since the
plain QWidget would be ignored.
Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This was introduced by 7ed15da3 (Core: QDebug and comparison operator
support metatypes,, 2013-03-20).
Change-Id: Id89aaffeee8d519ca73f0b52b1ac8b9d233cb5f1
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Before: <title>QtMultimedia 5.1: Camera</title>
After: <title>Camera | QtMultimedia 5.1</title>
"Camera" is page name and "QtMultimedia 5.1" is the assembled project
name.
-Regular page title is the same.
-It's a readability issue to not see the page title right away
-New arrangement conforms to Qt Project and blog name format:
"<Title> | <Domain>"
-Tested with the tw-parser and it looks compatible with the
qt-project.org site
Change-Id: Iae0eec9e66b5e21285bdad1e525923f60c72e56b
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Don't insert a NSMenuItem into a NSMenu if this one already belongs to another NSMenu, this is forbidden
in the Cocoa framework and raises an Exception. The solution consists in tagging the menu as sharable
and moving it from one menubar to another when the window gets focus.
Task-number: QTBUG-31342
Change-Id: Ic3bfadd4704f363ac26122ae15547543a0f6d44d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Make it be one big AWK script instead of a ton of smaller
processes. Also handle the defaults inside the AWK script for
simplicity.
Since the output is a qmake variable, we do not need to surround with
quotes strings that don't contain spaces.
Also, use a tee trick to print the verbose output: we get the actual
output from awk.
Change-Id: I4a48a917c988a6b03d2c3b6990765301287713ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Compilation failed because "open" is defined as "open64" in fcntl.h.
This definition is reverted now.
Change-Id: I9badcf11131320c53e442cd5b8b21bb5aa4efee5
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
In some cases the event coordinates reported by evdev are in different
orientation compared to the primary orientation of the platform window.
This commit adds plugin parameter rotate=[90, 180, 270] to rotate the
normalized coordinate system before reporting the touch event.
Change-Id: Ic830a2d259f9d3c5fb63b80afb795d8b400c2ece
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
The generated cmake files expect only the names of libraries, so the
existence of directories causes erroneous fatal errors when attempting
to use Qt5Gui, if pkg-config returns a -L entry from
pkg-config --libs egl
Change-Id: Iec50b4be68ab643c3c02abce2435a98e69955138
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
So far we stayed completely silent if the user forgot to deploy all
plugins, or deployed them in the wrong way.
Change-Id: Idd776c4b4a2ddffd5da08985e5925248c97e0270
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It's accessed by the Q_ASSERT in QArrayData::data().
Change-Id: I859ef9c736b24857cd3f57f9fa54aafd36e57afc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Empty arguments list could lead to crash, due to access of first element.
Besides, empty application file path will be cached now universally.
Change-Id: Ibe1a668da364d87d8431567dfc999cb394686081
Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Add font combo to top level via layout and position top level
instead of the (child) font combo.
Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Previously, normalized positions with either of coordinates equal to
1.0 would be reported outside the screen / window geometry, which would
cause hit test to fail.
Change-Id: Ia5e083bd52254c7e05143eedf930be3bcba7a412
Initial-patch-by: Aaron Kennedy <aaron.kennedy@jolla.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
The raw coordinates were not reported by the evdevtouch plugin.
Change-Id: Ia06129edd771b12cc9f6a97dc678b545d226af70
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
QOpenGLTextureGlyphCache::restoreTextureData restores FBO which
was binded before restoreTextureData call. More specifically,
it restores QOpenGLContextPrivate's current_fbo member. This works
if FBO was binded by QOpenGLFramebufferObject but not if FBO was
binded using glBindFramebufferObject and rendering done via
QOpenGLPaintDevice.
This patch fixes it by querying current FBO using
GL_FRAMEBUFFER_BINDING query and restoring it.
Change-Id: Ia97a21e62566dc39a5191b66d3ca0e3ad0845ce1
Reviewed-by: Valery Volgutov <valery.volgutov@lge.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
As shown in QTBUG-24345, QBitArray will exhibit invalid reads when
initialised with a negative size and run under valgrind.
QVector and QVarLengthArray both cause a crash if initialised with a
negative size.
This patch enforces sizes greater than or equal to 0 with asserts and
existing if statements, and hence impose no performance penalty for
release builds.
Task-number: QTBUG-24345
Task-number: QTBUG-30037
Change-Id: I9a969f6016e0a59904a60bbfe9e5360e6f523b87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
all private headers are created by syncqt (and are thus in the source
dir), so we can simply override the normal (build dir based) paths
instead of extending them.
Change-Id: I9c1f3344c401b481b3f3d2295515f1aabffaa9a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
these builds usually assume all headers in the qtbase build (== source
== install) dir, so the path for adding our pre-generated per-module
include paths needs to be triggered explicitly.
Change-Id: I57ec441d58cdf8186907ee6c36dce08daa206c49
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
When calling intersect() on a large (1000000 items) QSet, with a small
(1000 items) QSet as the argument, the function takes signifcantly
longer than when the operand and the argument are reversed. This is
because the operand set is always iterated over in its entirety.
This patch changes intersect() to iterate over the smaller set. This
reduces the large operand scenario's benchmark to ~0.000063
milliseconds, compared to the current ~134 milliseconds:
1000000.intersect(1000) = empty: 0.000063 (was 134)
1000.intersect(1000000) = empty: 0.000039 (was 0.000036)
1000000.intersect(1000) = 500: 0.10 vs (was 130)
1000.intersect(1000000) = 500: 0.023 vs (was 0.093)
1000000.intersect(1000) = 1000: 0.20 vs (was 139)
1000.intersect(1000000) = 1000: 0.017 vs (was 0.016)
Task-number: QTBUG-22026
Change-Id: I54b25c49c78c458fef355e9c6222da8a64c7681f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>