Commit Graph

13816 Commits

Author SHA1 Message Date
Frederik Gladhorn
e2776b44a0 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenubar.mm

Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
2013-06-12 19:17:07 +02:00
Oswald Buddenhagen
af2f1e14f6 don't touch deprecated headers unless they actually change
Change-Id: Iabeec90c2a6549cf92b3b8369a41764a576fd0aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:06 +02:00
Oswald Buddenhagen
ad52be1acc purge dead uic class map code.
Change-Id: I9b67924a66c847cd4cf2ce9f2996017ae7eb61a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:01 +02:00
Oswald Buddenhagen
f5a5272bc7 remove unused symlinkFile() function
Change-Id: Ie235fe65020ed7c4870d9c8784a181bf880b9e28
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:02:58 +02:00
Oswald Buddenhagen
49bee21d57 don't make qconfig.h read-only
not much point in it, really.

Change-Id: If984aa137993ae6b95cb3591fceac729ae3aa819
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:02:55 +02:00
Sebastian Eifert
7ae6e48d57 Windows: Prevent spurious leave events.
When behind a mouse-event-transparent window, synthesized leave events
are emitted, because the transparent window is considered as the window
under the mouse, not the Qt window.
This change skips transparent windows when searching for the window
under the mouse.

Task-number: QTBUG-31464

Change-Id: I85c8b46a1af37b4d1c5d1d77566ab045657aa9ae
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-12 12:42:59 +02:00
Friedemann Kleint
0d459619a9 QDockWidget: Keep position when undocking.
Initialize undockedGeometry to roughly the current position.

Task-number: QTBUG-31044
Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-06-12 12:42:51 +02:00
Tor Arne Vestbø
5c8aa27111 iOS: Remove need for separate qtiosmain library
We can combine the hybrid and non-hybrid use-cases into a single static
library if we are careful about which symbols are included in which
object files. By limiting the main() and qt_user_main() functions to
their own translation units, the linker will only pick them up if they
are missing at link time (the user's program do not provide them).

This technique is resilient to the -ObjC linker flag, which includes all
object files that implement an ObjectiveC class or category, but will
fail if the -all_load flag is passed to the linker, as we'll then have
duplicate symbols for either main() or qt_user_main(). The latter should
not happen unless the user provides the flag manually, and in the case
he or she does, there's ways to work around it by providing less global
flags such as -ObjC or -force_load.

Change-Id: Ie2f8e10a7265d007bf45cb1dd83f19cff0693551
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-12 12:35:02 +02:00
Tor Arne Vestbø
e99fc91c58 iOS: Remove need for -force_load of platform plugin
Instead of force-loading the whole static library of the platform plugin
we tell the linker to look for the missing symbol qt_registerPlatformPlugin.
This symbol is provided by the same object file as the plugin's static
initializer, so the object file is included in the final binary and
the static initializer is run, resulting in the plugin registering with
Qt.

We could have marked the actual static initializer wrapper provided by
Q_IMPORT_PLUGIN(QIOSIntegrationPlugin) as undefined, but due to the C++
mangling this would look less intuitive on the linker command line than
the custom dummy function that we provide, which has C linkage.

Change-Id: I6805537e1f49260a41d48c555376964cb1fe75d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-12 12:34:44 +02:00
Laszlo Papp
0715dc9ee3 Mark the Q_DECLARE_OPAQUE_POINTER macro as introduced in 5.0
Change-Id: Ida52c9f1f72b628d9a7faaf7998798e781b53df2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-12 07:40:58 +02:00
Tor Arne Vestbø
0c313b3adb Xcode: Don't set TARGET_BUILD_DIR; that's handled by a copy phase
This reverts an earlier change that tried to fix the relationship between
Qt's concept of output directories with what Xcode expects, but it broke
DESTDIR. The relationship between Qt and Xcode is still a mess, but at
least DESTDIR now works.

Change-Id: I44f056d48c87359a609e0337da266120ba4eb155
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-06-11 16:35:53 +02:00
Benjamin Port
ba1aefa85d Fix setPlaceholderText in QLineEdit
Since we don't use focus to show/hide place holder text, we don't need
to check widget focus but if text is empty.

Change-Id: I37f2fdb9e20a64ca38c61e60190f95635695c613
Reviewed-by: Aurélien Gâteau <agateau@kde.org>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-06-11 15:08:47 +02:00
Martin Smith
fabd791bcc doc: QOpenGLFramebufferObject::bindDefault() was marked internal
The \internal was removed.

Task-number: QTBUG-31645
Change-Id: I98b57ec3816b6d9c49e3488accb65f147aeb15f1
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-11 14:33:00 +02:00
Martin Smith
505a10baf7 qdoc: qdoc was confused by namespace and module with same name
When qdoc searched for QtConncurrent::blockingFilter(),
it found the module node for QtConcurrent instead of the
namespace. This was because qdoc wasn't given specific
enough instructions on how to perform the search. Now
it searches for the namespace first, then the C++ class,
then the module.

Task-number: QTBUG-31535
Change-Id: I4f8aec503903508789738f2a77c76f47a3e80a93
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-11 14:33:00 +02:00
Kai Koehne
0d7d53fd46 Improve error output when platform plugin cannot be loaded
Forgetting to deploy the platform plugin, or deploying it to the wrong
folder, is a common mistake. The old error message didn't made it however
explicit what was happening. Make the log more verbose, and explicitly
state that the missing plugin is the reason for termination.

Change-Id: I810a0ef8da5f8e898e7e0c6f853972514a05c75d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-11 12:29:24 +02:00
Ivan Komissarov
9ddcd900f6 Fix leak in QCocoaDrag.
Change-Id: I2961d08f95c68446a2893721dc79ba56bf98c0de
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-06-11 10:15:56 +02:00
Andy Shaw
01b6eea415 When the file could not be accessed, we should return 0 for the size
Some functions rely on the size to be sure that the file can be read
from. Therefore when nativeSize() fails to access the file we should
return 0 instead of a random size to prevent these functions from
acting as if there is a valid file to read from.

Task-number: QTBUG-31571

Change-Id: I589fc199760ba40ef2e63047b2f226cb196f7e56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2013-06-11 07:46:29 +02:00
Robert Griebl
809bd1db8c The SingleClickActivation setting was wired to the wrong platform setting
Change-Id: I24dacd6d6cbc22eaf29dc09a6f59bf4ee7d48f37
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-10 19:54:53 +02:00
Frederik Gladhorn
75067b56fa Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-10 19:54:53 +02:00
Thiago Macieira
bea3ae7669 Add QMAKE_NM to the mkspecs
We'll use nm to get the listing of symbols in the next commit.

The -P option is "portable", which sounds like a good idea. I don't
have access to any of the commercial Unix systems, but I do remember
them printing a different format than GNU binutils's nm.

Change-Id: If6f80624bedaf2b1dabf608e16aa097d9910d739
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 16:46:06 +02:00
Thiago Macieira
3ad3939f72 Add objcopy to MinGW's mkspec
Change-Id: I03442f65e281751c8353eca8b987026e9be2437f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 16:46:01 +02:00
Rafael Roquetto
e554ab4585 BlackBerry: fix tst_QLocale::emptyCtor()
BlackBerry OS does not allow for explicitly controlling the locale through the
"LANG" environment variable. Locale is controlled by the underlying PPS
Service instead.

Change-Id: I22154e39f81a9467ad7fdb90a042396390398b1b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
2013-06-10 16:32:57 +02:00
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
Frederik Gladhorn
0eff16611f Merge remote-tracking branch 'origin/release' into stable
Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
2013-06-10 10:00:34 +02:00
Thiago Macieira
ebea15cb33 QEventLoop: Remove the test that checked throwing from an event handler
In Qt 5, we declared that throwing from event handlers is undefined
behavior. So stop testing this.

We will try our best to capture and pass along std::bad_alloc, but even
that might not work, depending on compiler settings. In particular,
after the upgrade to MinGW/GCC 4.8 with DW2, this test stopped working.

Task-number: QTBUG-31615
Change-Id: Ibf5fb2ce0c48b983549096bf7aac434b6ed3ac2e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-08 23:00:50 +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
Hannu Lyytinen
062974bf1f Use QUDeviceHelper instead of custom code.
Avoid duplicating udev handling code here.

Change-Id: I054b6616ead57aa8947dcf942177dfc8a14a00fe
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-06-08 15:14:00 +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
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