Commit Graph

13938 Commits

Author SHA1 Message Date
Friedemann Kleint
a730b5fabf tst_qmessageauthenticationcode: Fix warning about character conversion.
warning C4309: 'argument' : truncation of constant value.

Change-Id: I54e9b515d065c1a89bf790fb214c335e852ce5ac
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29: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
Friedemann Kleint
9e069d95f4 tst_qdom: Fix warning about character conversion,
warning C4309: 'argument' : truncation of constant value.

Change-Id: I04262dcb71b916abeab27e7b8bc2ca6c875794d2
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
Friedemann Kleint
3e56b01895 tst_qglthreads: Fix warnings about unused variables.
Change-Id: I6bc95e8335474753d6506db5e8119710797f4f1b
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
Friedemann Kleint
274e571be1 QtCore: Fix MSVC-64 warnings about integer truncation.
warning C4267: 'argument' : conversion from 'size_t' to ' int', possible
loss of data.

Change-Id: I79af7497420d468b5bc7c48c9ae21b86117519a9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
Friedemann Kleint
876202ddf2 tst_qjson: Fix MSVC C4293 warning about shift operation.
warning C4293: '<<' : shift count negative or too big,
undefined behavior.

Change-Id: I858dd08f16ea0e00f2384491fc735b7367c6925d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-08 10:29:34 +02:00
Lorn Potter
275c4b8403 code cleanup. make one way to access system dbus. remove dead uncommented code
Change-Id: Ia53cdc27f354269bb393ac137802b8807652cef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-08 08:27:09 +02:00
Thiago Macieira
4d93393a6d QUrl stringprep: fix handling of U+0080: it's prohibited
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>
2013-06-08 05:06:57 +02:00
Thiago Macieira
53388cd8e0 QUrl stringprep: avoid recalculating the surrogates we already know
Change-Id: Icac4e81fff6f7f7fa4f46ec2a08105f8d3d2b403
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-06-08 05:06:52 +02:00
Thiago Macieira
736a052d93 QUrl stringprep: fix handling of prohibited characters
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>
2013-06-08 05:06:47 +02:00
Thiago Macieira
8631227519 QUrl stringprep: fix case folding from non-BMP to BMP
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>
2013-06-08 05:06:42 +02:00
Thiago Macieira
2ccf4c32cc QUrl stringprep: recalculate the current position if the size changes
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>
2013-06-08 05:06:28 +02:00
Rafael Roquetto
d4dba8a5c4 Unix: fix tst_QFile when run as root
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>
2013-06-07 22:18:42 +02:00
Rafael Roquetto
528fd2149e Use QFINDTESTDATA on tst_QStyle instead of SRCDIR
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>
2013-06-07 22:18:33 +02:00
Rafael Roquetto
60df445d3b QNX: fix QQnxWindow
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>
2013-06-07 22:18:23 +02:00
Jørgen Lind
16eea84aa8 Fix for when we don't have XSettings
Task-number: QTBUG-31418
Task-number: QTBUG-31410
Task-number: QTBUG-31446

Change-Id: I3fbed40054f3e0720b50ada0dc4ad0ae4cb0412e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-06-07 19:00:26 +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
Allan Sandfeld Jensen
21356b3ec3 RecalcAdvances and DoKerning should agree on when to use design metrics
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>
2013-06-07 18:07:21 +02:00
Simon Hausmann
d8a6a67579 Add internal functions to QObjectPrivate for signal & slot connections in QML
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>
2013-06-07 16:19:05 +02:00
Frederik Gladhorn
cd756e5ed5 Cocoa Accessibility: fix ignoring of objects
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>
2013-06-07 14:54:39 +02:00
Friedemann Kleint
a1c8c581ce tst_qnetworkproxyfactory: Fix warnings about unused variables.
Change-Id: I6fa08353ebea5cdd7fc7a0c982bf1b9d34bbc077
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-07 14:54:33 +02:00
Stephen Kelly
aff03cbc27 Don't convert built-in types to strings for qDebug.
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>
2013-06-07 13:31:14 +02:00
Friedemann Kleint
1828ab8557 Windows: Send a geometry change after Window creation.
Task-number: QTBUG-30996

Change-Id: I03b5e1fdbbdd779f86541291c13e9eb6840ff3c6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-06-07 11:47:12 +02:00
Friedemann Kleint
476dba9a9f Use QWindow::geometry() for size when sending resize before expose.
Task-number: QTBUG-30996

Change-Id: I9c3589ea67b563f6e588568ee54cc8bbd084f87c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-06-07 11:47:09 +02:00
Jerome Pasion
c889e28483 Doc: Fixed typo in QDialog.
Task-number: QTBUG-31493
Change-Id: I7bb7b249a0336dd949f8c74bcc22c0b7c39d0885
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-06-07 09:18:37 +02:00
Jerome Pasion
25a4405c69 Doc: Rearranged page titles in the <head> of HTML pages.
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>
2013-06-07 09:17:21 +02:00
Romain Perier
119882714f Cocoa:Fixed crash when sharing QMenu between two QMenuBar instances
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>
2013-06-07 09:17:11 +02:00
Thiago Macieira
24c52bd44b Update the DNS and name-resolver tests to the official zone
Change-Id: I02feb8029461383f38bcbdca138789b119a58b5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-07 05:31:31 +02:00
Thiago Macieira
8fbf959bee Update the code detecting the default include and library paths
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>
2013-06-07 05:27:15 +02:00
J-P Nurmi
d9e50f203e Expose QKeySequence::StandardKey for QQuickKeyEvent
Change-Id: If3fff3bf1d61e8cd7f757d33637d15c931e21fb4
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-06 21:26:44 +02:00
Bernd Weimer
70be62e95b QNX: fixed compilation of auto test
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>
2013-06-06 13:48:06 +02:00
Daiwei Li
d4415cdd84 Fix themeHint typo in qcocoatheme: PasswordMaskDelay should be PasswordMaskCharacter
Task-number: QTBUG-31498

Change-Id: Ie6b1b0a2238923e37d52fa2e90782e874bb224b4
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-06 12:13:32 +02:00
Mikko Harju
fdde071b06 Added rotation parameter to qevdevtouch
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>
2013-06-06 10:11:32 +02:00
Stephen Kelly
04830dbcb2 Strip the -L dirs when processing GL dirs for the CMake files.
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>
2013-06-06 09:08:41 +02:00
Kai Koehne
c9398312fe Print directories for QT_DEBUG_PLUGINS
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>
2013-06-05 20:16:07 +02:00
Sérgio Martins
805031814b Initialize variable to quiet valgrind.
It's accessed by the Q_ASSERT in QArrayData::data().

Change-Id: I859ef9c736b24857cd3f57f9fa54aafd36e57afc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-05 18:24:10 +02:00
Frederik Gladhorn
2dd7f02bb9 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-05 17:58:47 +02:00
Bernd Weimer
fd956af257 Fixed evaluation of application file path
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>
2013-06-05 16:11:02 +02:00
Frederik Gladhorn
248420904f Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ic6e1ae60f891a6b2b568936204d2e84db4177fb4
2013-06-05 15:44:22 +02:00
Friedemann Kleint
1df0f4b2af Fix tst_qcombobox::itemListPosition.
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>
2013-06-05 15:42:01 +02:00
Mikko Harju
b73ad2dd19 Prevent touch coordinates outside target geometry
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>
2013-06-05 12:56:00 +02:00
Mikko Harju
c97a1bc538 Fixed raw coordinate reporting for touch events
The raw coordinates were not reported by the evdevtouch plugin.

Change-Id: Ia06129edd771b12cc9f6a97dc678b545d226af70
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-06-05 12:56:00 +02:00
Mitch Curtis
bd01db4a98 Fix typo in QAlgorithms documentation.
Change-Id: Ic9107f427acc1e009779d39e0a204ea81d54aee7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-05 12:56:00 +02:00
Valery Volgutov
1d8ec5fae2 Fix FBO restoring in QOpenGLTextureGlyphCache
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>
2013-06-05 12:56:00 +02:00
Oswald Buddenhagen
930dc240d1 remove pointless symlink fallback for qconfig.h
syncqt does that nowadays.

Change-Id: Iffc465cce86a7c6370afaa543ba9b9ed8d478eea
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 12:36:58 +02:00
Mitch Curtis
9aa24645eb Prevent negative size in QBitArray, QVector and QVarLengthArray ctors.
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>
2013-06-05 10:46:51 +02:00
Oswald Buddenhagen
07337def65 don't add absent private include paths to non-git builds
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>
2013-06-05 10:39:47 +02:00
Oswald Buddenhagen
53698f3e7c fix non-git non-shadow non-prefix non-qtbase builds
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>
2013-06-05 10:37:29 +02:00
Mitch Curtis
4f2c96eaa8 Iterate over the smaller set in QSet::intersect().
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>
2013-06-05 09:35:42 +02:00
Andrew Patterson
f36374727e Changed project dependencies for solution files
Reorganized project dependency output in solution files for vc 2005+

Task-number: QTBUG-30993

Change-Id: I4764f3d98be40b3e217130522bb89a43bbf3669e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 08:45:07 +02:00