Commit Graph

7935 Commits

Author SHA1 Message Date
Alexis Menard
92d4e843bd Fix qDecodeDataUrl for already percentage encoded content.
If the url we pass as parameter already have percentage encoded data,
we don't want to decode it and call fromPercentEncoding. The test
coverage is not complete for qdataurl.cpp file but it is better than
previously and it will also protect us from future regressions.

Change-Id: I79f709f44bed1b7f274a3de639c7e291fa91a193
Reviewed-by: Thiago Macieira
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-09 20:10:44 +02:00
Martin Smith
4e9dc8b49d qdoc: Fixed a qdoc error problem
When an example was missing, qdoc printed
an error message without specifying the
location of the error. Now it includes the
file path and line number of the \example
command where the error can be fixed.

Change-Id: Ib75ffc467c0f266ed3939b8aa4b24800ec5eb92e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-09 17:52:48 +02:00
Samuel Rødal
4ab7d53431 Compile fix for kms plugin.
Change-Id: I0ad9716273a7beb643fab5fafc7fcf4884c8a364
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-09 17:51:53 +02:00
Laszlo Agocs
52bc65dc8a Enable float coords in evdevtouch
There is no reason to truncate the touch position.

Change-Id: I2bdcd43d3bb06a664e909d92704a701ece603847
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-09 17:51:18 +02:00
Casper van Donderen
4f6b1cad56 QDoc: Use node name for page DITA title when name argument is empty.
When QML documentation is being generated from .qdoc files the 'name'
argument of the generateHeader() function is always empty, since the
plaincodemarker sets the plainFullTitle to "".

In that case the Node->name() should be used to specify the title of the
page, this will always be the first argument given to the \qmlclass qdoc
command.

Change-Id: If3e86ce59be1fdad608fab9f32fbe7bbca97aa93
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-09 17:30:14 +02:00
hjk
cc8d9fb85e gettingStarted: sanitize parameter names and compile fix for Qt 5
Change-Id: I3f30ccee89b8add8718a9a36f0f16fa7b2e9bad1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-09 17:16:55 +02:00
Friedemann Kleint
014ad6bf1b Windows: Disable Non-modal native file dialogs.
Disable dialogs, add explanatory comment. This is now
equivalent to Qt 4.

Change-Id: Ib6f4853d6f7ef1812bd5887d3ced8d7c8d1db5c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-09 16:46:11 +02:00
Bradley T. Hughes
ab947649eb QPA: Cleanup native dialog modal execution
Remove the _q_platformRunNativeAppModalPanel() function, together with
the launchNativeAppModalPanel() signal and
emitLaunchNativeAppModalPanel() slot, which were previously used to run
the modal loop inside the QDialog::exec() loop. This trick isn't
necessary anymore, so remove the mechanism and code related to it.

Rename QPlatformDialogHelper::platformNativeDialogModalHelp() to
exec_sys(). This function is now responsible for both showing the native
dialog and running the modal loop. QDialog:exec() now calls this
function if a native dialog is in use (it does not call
QEventLoop::exec() anymore).

The dialogResultCode_sys() function was unused, so it has also been
removed.

This commit also removes some unused private slots that were left over
from the port to QPA.

Note that the comments in the Cocoa plugin are still valid and relevant,
but this commit does not fix the scenarios mentioned. This will be done
in a future commit.

The Windows plugin needs minor changes. The QueuedConnections to
accept() and reject() cause the deliver to come too late, resulting in
crashes, hence the change to AutoConnection (which ends up being a
DirectConnection).

Change-Id: Ifc90325c945ca78737e60bf331929f03ecc52e0a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-09 13:42:03 +02:00
Bradley T. Hughes
9f2f7a8f72 Make sure QWidgetPrivate::hide_sys() really hides
When commit 55fa3c189f was merged from
api_changes, the conflict resolution left it possible for hide_sys() to
leave a visible window on screen. This happens when
Qt::WA_DontShowOnScreen is set on a visible widget. hide_sys() needs to
always hide the platform window if it is non-zero.

Change-Id: I3a1a882b66954e90d6ba80c657de69cae32e75a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-09 13:41:54 +02:00
Bradley T. Hughes
cebfd69ade Don't handle window events after Qt::WA_DontShowOnScreen is set
QWidget can set WA_DontShowOnScreen while visible, which generates
events when the QWidgetWindow is hidden. This causes
QWidgetWindow::handleExposeEvent() to clear the WA_Mapped flag which was
set by QWidgetPrivate::show_sys(). Once WA_Mapped is cleared, the
QWidget becomes non-functional, causing failures in at least
tst_QGraphicsProxyWidget::paintEvent(), since paint events are not sent
to widgets that don't have WA_Mapped set.

Change-Id: I2d3e5b3baffb07ab73f41520771866f181260bd2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-09 13:41:49 +02:00
Friedemann Kleint
4e4403d69c No longer use deprecated methods for plugin loading.
Change-Id: I19c66b1c41ea4dd236726c86d7d071b210ec9244
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-09 13:40:23 +02:00
Friedemann Kleint
b316c3ac5e Improve widget geometry.
- Rename posFromMove to posIncludesFrame in Widgets and
  make the handling more fine-grained; try to clean it up
  as soon as the frame margins are known
  in QWidgetPrivate::fixPosIncludesFrame().
- Implement QWidgetPrivate::updateFrameStrut().
- Windows: Handle posIncludesFrame in window creation,
  notify changed geometry after setting window flags.
- XCB: Do not change the window gravity in propagateSizeHint()
  as this causes the window to jump around. Determine
  the gravity in window creation, leave it constant and
  fix the geometry when setting instead.
- Store the normal geometry when maximize/fullscreen
  state change events are received.
- Remove xfails from fixed tests

Task-number: QTBUG-25331
Task-number: QTBUG-24905
Task-number: QTBUG-24294

Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-09 13:40:16 +02:00
Stephen Kelly
465c9f4a7e Use bool for the template argument.
It is only ever called with 'true' or 'false'.

Change-Id: Ibaba1c964cebb3ac75a230471a7a6547c2245039
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-09 12:54:08 +02:00
Eskil Abrahamsen Blomfeldt
4b09230d97 Avoid assert in QTextLayout for certain strings
As in other shapers, we need to make sure that the default
attributes of the first character is set before doing the
greek-specific composition (which will set the attributes
for characters > 0). The effect of this would be that
the clusterStart did not default to true in the start of
the string, and we would get an unexpected situation
in addNextCluster() in QTextLayout which would cause an assert.

The example in the task, which combines a greek polytonic
(dasia-oxia: u1FDE) with a regular combining diacritic
(asterisk under: u0359), is not a correct string, but should
not cause an assert.

Task-number: QTBUG-22864
Change-Id: Ieaff3cccbd10abc634e95e9a79dcde4c48504a3c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-09 12:07:58 +02:00
David Faure
5ea4c3f148 Ensure qstring.h compiles with QT_NO_CAST_FROM_BYTEARRAY
19d160b72b broke it temporarily, and this wasn't detected by
tst_headersclean, because it sets QT_NO_CAST_FROM_ASCII too,
which disabled the faulty code.
So this adds a new unittest for QT_NO_CAST_FROM_BYTEARRAY alone.

Change-Id: Iaf7a36a1378e77188bcc636e5dc9a1f9b84f70a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-09 12:07:47 +02:00
David Faure
677858ad9e Fix QUrl::StripTrailingSlash for the case of no path at all.
Change-Id: I1fd0fe4b9b67996732c85c1792415e371e865595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-09 12:07:33 +02:00
Casper van Donderen
a4d07f6c0b Doc: Add "make docs" targets for libraries.
Change-Id: I249c238f4986f443f84aaa6a3ac4ce102abff4db
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:37:35 +02:00
Casper van Donderen
6d4f2486d5 Doc: Modularize QtTest documentation.
This change moves the snippets to the modularized directories.

Change-Id: I917dd1dae5ee5d4b6bd5a0390783a8b9a99edc06
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:37:21 +02:00
Casper van Donderen
1794c3b7a1 Doc: Modularize QtPrintSupport documentation.
This change moves the snippets and images to the modularized
directories.

Change-Id: Ib8f8556bcef13593ee40ac1122d765ed307ecb93
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:37:10 +02:00
Casper van Donderen
03d81b0100 Doc: Modularize QtOpenGL documentation.
This change moves the snippets to the modularized directories.

Change-Id: Ifcf22fa3f234681f851d1e7eed5fe44e2e223ffd
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:36:59 +02:00
Casper van Donderen
97b5b80092 Doc: Modularize QtWidgets documentation.
This change moves the snippets and images to the modularized
directories.

Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:36:46 +02:00
Casper van Donderen
cfdc5628b1 Doc: Modularize QtGui documentation.
This change moves the snippets and images to the modularized
directories.

Change-Id: I5f86f598fbe7c47d632c613b85d94ced89ba2c29
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:36:34 +02:00
Casper van Donderen
3b8e6027c2 Doc: Modularize QtDBus documentation and add missing file to QtNetwork.
This change moves the snippets and images to the modularized
directories.

Change-Id: Idacff866735d00b048d65318bc4c3ee1dfa16310
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:36:17 +02:00
Casper van Donderen
4548022ee2 Doc: Modularize QtConcurrent documentation.
This change moves the snippets and images to the modularized directories.

Change-Id: If52f69c0f8bb4d2df4ee46f5524a82047ec214de
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:36:06 +02:00
Casper van Donderen
a409cebe3d Doc: Fix typo in QtNetwork qdocconf.
Change-Id: I759e8a77b0471d380ffd9f893ae5bb5ed0c5c992
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:35:55 +02:00
Casper van Donderen
7eca53b51a Doc: Modularize QtNetwork documentation.
This change moves the snippets and imagesto the modularized directories.

Change-Id: If14912692a7f72d7de345eaf88d9ec9752310fca
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-09 08:35:43 +02:00
Marius Storm-Olsen
9fde9ab167 Properly implement a 'make docs' target for subdirs and apps/libs
Only call qdoc for projects which sets the QMAKE_DOCS variable to
point to a qdocconf file.

Exclude examples/ and tests/ from the qdoc run, by adding
    no_docs_target
to CONFIG for those projects.

Change-Id: Ic856c8f19db59309302d0602b3e99735609e525a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-09 08:34:42 +02:00
Girish Ramakrishnan
33edd606ae Fix qpa legacy headers installation
syncqt is run twice when using the top level configure (as in
the CI system). The pri_install_files and pri_install_pfiles
variables are not populated if the file already exists when
generating the compatibility headers.

Therefore, headers.pri ends up with different content in
each syncqt run. In the first run, the compatibility headers
are part of SYNCQT.HEADER_FILES. In the second run, they
are not part of it since the header files already exist.

Change-Id: I4908fb934a639a3c9f6af1796d56a40fd4df2d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-05-09 06:42:25 +02:00
Marc Mutz
b58b777cb3 QtDBus: add member-swap to shared classes
Implemented as in other shared classes (e.g. QPen).

Change-Id: Ic827540b535fc5506165b5395b796a53a00bb096
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-09 02:39:08 +02:00
Konstantin Ritt
7fbc80f0eb QTextEngine: simplify the code a bit
by using QVarLengthArray so we can avoid the manual clean-up code.

Change-Id: I35e2f7150d777c1760f722553e6fe7a20f6ecc46
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-05-09 02:28:49 +02:00
Martin Smith
025d544caa qdoc: Fixed qdoc error messages
qdoc prints many error messages without including the
source file path and the line number for where the error
occurs. This makes it difficult to find the place to
fix the error. This update corrects some of those error
messages. Further updates will fix the others.

Change-Id: I9c0eed96482c61643a2d83c5135368413e63ae52
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-09 02:28:44 +02:00
Lars Knoll
3db8f5fbb3 Remove qplatformdrag.h dependency in qguiapplication_p.h
Including a qpa/ header here doesn't really work very well
for other modules using qguiapplication_p.h.

Change-Id: I7620b40bc4731d5a74fe11537637f376c578a786
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-09 02:28:39 +02:00
Lars Knoll
2cc0598f99 Divehi is written right to left
QLocale::textDirection() was missing Divehi as a
right to left language.

Change-Id: Ib2395afe0e1dfbac23cb607dbf7833e6c12b2ce9
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-05-09 02:28:34 +02:00
Friedemann Kleint
e996009eb7 QPA: Add a themeHint for the animations.
Introduce a flag matching the Qt::UI_Effect enumeration and
return it as hint.

Replace the separate boolean flags in QApplication by a single
integer using the flags.

Change-Id: I29e33d4d23d13723ddb1b3f62fe781b9c0747572
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-09 02:28:31 +02:00
Shane Kearns
55070e8637 Connect bearer engines to manager with QueuedConnection
This is to avoid a deadlock that happens when a user thread is
accessing the QNetworkConfigurationManager at the same time the
plugin emits a signal.

i.e.
plugin is holding engine lock
user thread is holding manager lock and blocked trying to acquire
the engine lock
In the manager slot, it tries to acquire the manager lock.

By using queued connection, there are no locks held at the time the
manager slot is called.

Change-Id: I95f28028b5e77f77b2b9b7e31cbd1b78a8fe3097
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-09 02:28:16 +02:00
Shane Kearns
9793dbcc4a Avoid emitting finished() before user can connect the signal
QNetworkSession::open can synchronously emit an error, therefore
we need to queue this.
Otherwise QNetworkReply::finished is emitted before the user has
had a chance to connect the signals.

Task-number: QTBUG-18824
Change-Id: I703d5e31d2934afafabdf0a77ea3aaf5336e8dec
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-09 02:28:10 +02:00
Jędrzej Nowacki
4a1a13a81b Bump moc revision after introducing QMetaType::SChar.
Normally we do not have to change moc version if a new type is added,
but for this particular case we need to do it. It is so because the old
moc could generate wrong type id (QMetaType::Char) for signed char.

Change-Id: I20be2a24adc59a305674595dafe23fb1774b475d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-05-09 02:28:04 +02:00
Bradley T. Hughes
cf48eded4d Don't leak native dialog resources
Have QDialog::~QDialog() call deleteNativeDialog_sys() on the helpers,
so that we don't risk leaking any resources allocated in the helper.
QFileDialog does this now, but not QColorDialog or QFontDialog. The
Cocoa plugin worked around this problem by calling
deleteNativeDialog_sys() itself, but the Windows plugin does not do
this, resulting in leaks.

Change-Id: I380d87c95686c8f3cb260f9242299be27329280d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-09 01:36:09 +02:00
Samuel Rødal
f280efc620 Added QScreen::refreshRate() to get the vertical refresh rate.
To give applications that want it the option to use a fixed timestep for
animations, and to avoid having values of 60 hard-coded (we have a
couple of those in qtdeclarative/src/quick already), we need to know the
refresh rates of the screens we are rendering to.

Change-Id: Ife49162e830440ad7eab563a27e8aebbbafc5fc5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-08 22:30:10 +02:00
Girish Ramakrishnan
4a58853aea Fix qpa files installation
qpa header files were not installed under qpa/.

Change-Id: I243c3a7e83a342f7485791a1a29b65c9a8f25d6b
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-08 20:03:49 +02:00
Frederik Gladhorn
bf82547b82 Fix typo
Change-Id: I94a2b7e2b895c234e4520e0a9093a6af9bef3fbb
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-08 11:47:29 +02:00
stockton
1ef8a6d48e Add 'FullScreen' into QKeySequence::StandardKey
This StandardKey was never defined in Qt4, and should be added to
simplify cross-platform Shortcut handling for this Action.
Comment concerning the sort-order requirement in QKeyBinding is
expanded to discuss the role of Modifier Keys in the Sort Order.

Task-number: QTBUG-25517

Change-Id: I8c26404010f1e55164e25fe6a586d9795869c25f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
2012-05-08 11:47:29 +02:00
Jędrzej Nowacki
1e432f0a88 Introduce a new built-in type: signed char.
C++ distinguish between "char", "signed char" and
"unsigned char", they are three independent types.

Fix QVariant behavior on ARM. On ARM "char" may mean
"unsigned char", but we depends on the sign during
a numerical conversions.

Change-Id: I610ce3fb88ed5964b67f3ae442d264fe16b2d261
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-08 11:47:29 +02:00
Konstantin Ritt
4169e20662 QTextEngine: drop unused leftovers
qIsControlChar() doesn't handle SMP code points, it is outdated
and is not used anymore; drop it

Change-Id: I934ace1e44eb2652e426fccc579b563d31197fca
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-05-08 11:47:29 +02:00
Konstantin Ritt
51998eb4f6 fix glyph's CMAP index might be corrupted
when SMP sybmol is present in the font.
this is a simple typo fix, actually

Change-Id: I54a4df43ece1a36f5c7997d121b7655afb2069e3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-05-08 11:47:29 +02:00
Ali Akhtarzada
e483b9bf37 Add assignment operator for QJsonValueRef
The implicit cast to QJsonValue was being ignored probably because the
compiler was generating a default QJsonValueRef assignment operator

Change-Id: I3a041595497308868dd7e4aab71027ce21bf8f0b
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-08 09:27:30 +02:00
Casper van Donderen
427fe6c2fd QDoc: Remove the unused \expire command.
Change-Id: I17108dee0a619cbff7627c86cddb8391857e169c
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-05-08 06:59:23 +02:00
Stephen Kelly
27ca259fb6 Don't attempt to ask cmake to find the glib dependencies.
Those components are not known to FindGTK2.cmake.

Change-Id: I4a7fe35d7d118168c24285f3ea8f57822b2facff
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-08 06:59:19 +02:00
Richard Moore
2cea0042d0 The \enum should use the enum name not the flags.
Fixes a qdoc warning.

Change-Id: Ia8cbad00902a27c24e14910cdc3a87a66839716b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-08 06:59:13 +02:00
Rohan McGovern
de11b9f5a7 Revert "QtPrintSupport: Remove remaining LPR specific code"
This doesn't compile with a typical cross-compilation setup, which
generally won't include cups headers.  The commit should have been
rejected, but wasn't, due to a bug in the Qt Project CI.

Since it now causes all other modules depending on qtbase to fail their
CI, it must be reverted to minimize disruption while the commit can be
amended and/or the test toolchain updated to include cups headers.

This reverts commit 80f7a38890.

Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-08 06:58:27 +02:00