Commit Graph

13649 Commits

Author SHA1 Message Date
Albert Astals Cid
f7dee7383d Q_DISABLE_COPY doesn't need a ; at the end
Fixes warnings when -Wpedantic is enabled

Change-Id: I8fcfbfa9bb3a5ab61c85f8cb74660f6f7e459fc0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-06-10 12:17:11 +02:00
Thiago Macieira
9095210c0b tst_QUrl: check that prohibited characters in hostnames are not valid
qt_nameprep is tested by tst_qurlinternal. We just need to be sure that
QUrl handles them correctly.

Change-Id: Ic563004870d2cf2fa7a31ce49fff7280d5ffb5f3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-06-08 15:20:44 +02:00
Friedemann Kleint
9e65808acf tst_qfilesystemmodel: Fix warnings about comparing int/bool.
warning C4804: '<=' : unsafe use of type 'bool' in operation

Remove outer loop and replace ugly ROW_NAME macro by
inline function.

Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
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
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
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
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
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
Frederik Gladhorn
2dd7f02bb9 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-05 17:58:47 +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
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
Thiago Macieira
76d75fd7df Use the GCC inline assembly when building for MinGW
MinGW has a longstanding problem of providing the MSVC intrinsics that
every Windows developer expects to be there. Other projects have run
into those problems.

So instead just use the GCC inline assembly.

Change-Id: I5651f97f9a4dfbf98ebbf063f91f221eab80b224
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-06-04 18:33:02 +02:00
aavit
c11a7d16c7 Fixes QKeyEvent::count() on Windows
All other main platform plugins leave the count parameter at its
default value (1). For improved compatibility, make the Windows plugin
do the same, instead of hardcoding the value to 0.

Task-number: QTBUG-31285
Change-Id: Id87fd559d13f42391be3200d5ff2393285f0d2a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2013-06-04 16:08:26 +02:00
hjk
55f01addb2 Adapt QtPrintSupport related uic rules
It's no more on QtWidgets.

Task-number: QTBUG-31508
Change-Id: Iba117a4103c2b32173816a4ecb5faa187f169b32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-04 09:53:47 +02:00
Thiago Macieira
db15341d27 QDnsLookup: test multiple TXT answers too
The TXT record is particular because each RR can contain multiple text
strings. So we need to join each RR's texts too.

To make it easy, I've made everything be QStrings.

Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-04 02:22:47 +02:00
Thiago Macieira
0c8061f608 QDnsLookup: test MX and SRV records that can change order
The DNS protocol changes the order of the RRs in each reply it sends,
in an effort to balance the load in servers. For most tests, to ensure
that we get always the same result, we simply sort it back.

For MX and SRV, we can't sort because we also need to test that
QDnsLookup sorted correctly according to priority. So instead allow
that test to have multiple alternatives.

Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-04 02:22:47 +02:00
Mitch Curtis
46e6bbd229 Mention QRect's int min/max constraints in detailed description.
Task-number: QTBUG-25732

Change-Id: If330768c3075568f09593ed17f26389d3dec3335
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-04 02:22:47 +02:00
Tasuku Suzuki
830cbb1aaf Make qtbase compile with QT_NO_TEMPORARYFILE
Change-Id: Ida2f59bb245ef70bf65f7e8944c4c315d5bc2f81
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-04 00:05:55 +02:00
Scott Deboy
092a2f813c Fix broken build when using OpenSSL 0.9.8
Resolving compilation issues encountered when dynamically linking to OpenSSL release 0.9.8 (no letter)

Adding #ifdefs to address OpenSSL version issues, correcting q_sk_push declaration

Conflicting code in qsslsocket_openssl.cpp not present in stable branch.

Task-number: QTBUG-30615

Change-Id: I4b86ca4303343cca5d440ab9821b275028cc5a72
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-06-04 00:05:02 +02:00
Andy Nichols
fb7e0e24c4 eglfs: Fix bug determining physical screen size
In the situation that the screenSize EGLFS hook had been defined, but
not the physicalScreenSize, the uninitialized contents of
fb_var_screeninfo vinfo would be used to calculate the fall-back
physical screen size.  Since this value is undefined, devices like the
Raspberry Pi would end unable to render DPI dependent fonts.

Change-Id: Ic9f67c1c646cc7b328b695b76a84d78577fefcd8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-06-03 22:24:07 +02:00
Andy Nichols
51a35f5c02 eglfs: prevent expose/geometrychange loop
This prevents EGLFS from getting stuck after
exposing the first frame, by constantly generating
new Expose and GeometryChange events which are
synchronously processed.

Change-Id: Id3b09821ea31e9c1ddab7c520e782a4e42844a08
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-06-03 22:24:04 +02:00
Sergio Ahumada
101c47242b Update LICENSE.PREVIEW.COMMERCIAL license
Change-Id: I87b9c77327e2e32db77efb027172ccd21659e032
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-06-03 20:04:26 +02:00
Oswald Buddenhagen
9a9abf8a8a Only process vcproj files if we do a -fully-process
A top-level vcproj (really a .sln file) only makes sense when sub-
projects are generated too, since the solutions generator will ignore
all non-generated projects.

Originally-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Change-Id: Iff09279d5760b5114a4cfb9b58ad677f2f69fa58
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:53 +02:00
Oswald Buddenhagen
0a1b89bff5 run syncqt only for builds from git
the logic in the configures was even trying to express that, only that
nowadays we always ship syncqt, so the tests were kinda pointless.

this frees us from the perl dependency for non-developer builds of
packaged modules (except for webkit, which needs almost every scripting
language on earth anyway).

obviously, this requires that the packaging scripts run syncqt in the
source dir before tarring up the sources. note that for repositories
other than qtbase, the -version argument needs to be passed to syncqt.

Task-number: QTBUG-29465
Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:47 +02:00