Commit Graph

6125 Commits

Author SHA1 Message Date
Kai Koehne
0556540b41 Rename the 'declarative debug support' to 'qml debug support'
Since the library and almost everything got renamed to qml, we
should do so for the debugging support, too.

(CONFIG+=declarative_debug will continue to work for some time
being, but prints a deprecated warning).

Change-Id: I295155dce873e2585c1452d2bf0625ea6ce219c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-31 16:33:04 +02:00
Debao Zhang
1b29481f3b Documentation cleanup
They are comments of Qt3 support members which have been removed already.

Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-31 08:43:34 +02:00
Miikka Heikkinen
f2c5d38c32 Windows: Make tst_qprinter significant again since the test is passing
The commit b188221fee fixed the test.

Change-Id: I630ede91ad6050b6a22d2b65947dd341ce7d9aa9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-31 08:42:06 +02:00
Friedemann Kleint
99715fcfc9 Enable Windows font tests..
Application fonts have been added in
4f1820e3a7

Task-number: QTBUG-24193
Task-number: QTBUG-24195
Task-number: QTBUG-24196

Change-Id: I45d0bbb183562b7355e07ce7fa93b0046dfd4665
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-31 08:41:23 +02:00
Matt Newell
d5e9616e39 Add payload to QSqlDriver notification with PSQL implementation.
Postgres async notifications can contain a payload parameter
that is currently discarded. This patch provides the QSqlDriver
api change necessary to deliver a payload with each emitted
notification by adding a QVariant parameter to the notification
signal. It also provides the implementation for the qsqlpsql driver.
The qsql_ibase driver has been updated to reflect the change to the
notification signal signature.

The eventNotificationPSQL test in the qsqldatabase test has
been expanded to test proper payload sending and receiving.
All tests/auto/sql/kernel tests have been run with sqllite and
postgres with no regressions.

Task-number: QTBUG-13500
Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-31 08:40:55 +02:00
Matt Newell
9b423b6e69 Expand QtSql tests covering boundValues and boundValueName
Tests added that cover boundValues with positional binding,
and boundValueName.

Change-Id: I2962d76607b716d19d3e0be958109be2f032f2d9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-31 08:39:53 +02:00
Stephen Kelly
f524470a95 Overwrite the LIB_DEPENDENCIES of modules.
This way if a module is found more than once, the list does not grow
duplicates.

Change-Id: I08e3e2a83453f45a49fe79e803a4b50d115709a3
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-31 01:49:26 +02:00
Stephen Kelly
e96a7e0115 Ensure that the variable for the installation prefix is unique.
Using the same variable for multiple config files can lead to
conflicts.

Change-Id: Ie6a22618c4c2e64567874e5c7e8b278e067fedae
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-31 01:49:26 +02:00
Matt Newell
aea6845069 Fix postgres notification support in the QPSQLDriver.
This patch fixes a critical bug in the qsqlpsql driver where
notifications aren't delivered when received. Any blocking libpq
function(specifically PQexec) will read all the incoming data
from the socket, including any pending notifications. This would
cause the socket notifier to never be fired for incoming
notifications that are already queued inside libpq. The qsqldriver
test case was skipping the postgres notification test because of
this bug, now its enabled and passing. In order to fix this
bug I made a wrapper function for PQexec in QPSQLDriverPrivate
that calls _q_handleNotification via QMetaObject::callMethod
QueuedConnection in order to deliver pending notifications
when control returns to the event loop. I also added a flag
to ensure only one call is made each time the event loop is
entered.

Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-30 23:51:11 +02:00
Thomas McGuire
4efd61c3cf Add support for screen overlays / foreign windows
We're not the only one creating native windows. When using the
multimedia API, the multimedia library creates a video window
for video display. Here we need to deal with giving this video
window overlay a proper z-order, otherwise it will never get
visible.

Change-Id: Ibff0382ebee5cda87408b91c8181a4104fc4a1a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 21:51:14 +02:00
Thomas McGuire
b5f343b367 Remove static methods in QQnxScreen
Change-Id: If0fd910848ba70d3b0a2d948065b09337f8e51c3
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 21:51:14 +02:00
Thomas McGuire
5d7f7e6559 Don't assume windows and GL contexts are created on the primary screen
Change-Id: Ib4f1c377bf93b1041b5f5e3fc56c0e01e35aeb38
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 21:51:14 +02:00
Rafael Roquetto
d8c98de399 Fix QFileSystemEngine::tempPath on Blackberry OS
Unlike Unix, Blackberry OS stores the location of the temporary directory into
the TEMP environment variable.

Change-Id: I5905763258ea01541c756361870258b421a00967
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 21:51:14 +02:00
Rafael Roquetto
83e7f61b61 Forward native key codes to QWindowSystemInterface
Using QWindowSystemInterface::handleExtendedKeyEvent() instead of
QWindowSystemInterface::handleKeyEvent(). While the former allows
us to forward the native key codes to QWindowSystemInterface, the
latter initializes them with 0, causing QKeyEvent::native*() to
return 0, instead of the actual values.

Change-Id: I596ad2e07645e091529ca514682c98d095244a73
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 21:51:14 +02:00
Honglei Zhang
06001ce008 Fix crash when an invalid filter is set
QSqlTableModel::headerData() generates a crash if an invalid filter
is set. QSqlQueryModel::indexInQuery() should check the index value
before applied to d->colOffsets[].
QSqlQueryModel::initRecordAndPrimaryIndex() is updated to sync the
size of rec and colOffsets.

Task-number: QTBUG-23879
Change-Id: Ic9f88bb288592aa6fb3c1415cc818632dadaab56
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-30 19:51:43 +02:00
Honglei Zhang
fa9cf67615 Update QSqlRelationalTableModel about reference table alias
The current documentation does not mention how the reference
table name is aliased in the relational table model. This makes
it difficult to use function setFilter(). This commit adds relevant
information to the documentation.

Task-number: QTBUG-15989
Change-Id: I02cbefb3f2b66c9772557a1fea3d93c2d1696ee9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-03-30 19:50:50 +02:00
Girish Ramakrishnan
cb0b3fc34d device: Add device support for Amlogic 8726M board
Add mkspec for the Amlogic 8726M platform using the -device
support in configure. This allows to build Qt with the application
libraries provided by Amlogic.

The 8726M is an ARM Cortex-A9 that support NEON and has a Mali 400-M GPU.

Change-Id: I01ea0c8e7d34dcb165653980a1856f6e22318c4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
2012-03-30 18:36:12 +02:00
João Abecasis
ad921347f7 Make numerus unsigned
It's the index number of the translation to be used.

Change-Id: I959c6aaa1aad09e74286d201ea356bfc4409f02a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 13:24:20 +02:00
João Abecasis
5900305add Pre-validate numerus rules: fail early, fail gracefully
Change-Id: Ibb3d27b9ff3d2f356a7c5c98b98686342f001f8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 13:24:09 +02:00
João Abecasis
26d12ecd27 Verify presence of "magic cookie" before more expensive reads
Moved this simple sanitation out of do_load as it will prevent us from
loading misplaced (or misfound) files into memory in the first place.

We'll still load anything minimally looking like a translation file.

Change-Id: Ia138be010979d4a66d330f7414fce3df20727e68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 13:24:00 +02:00
Marcel Krems
131a5ab543 Fix QWheelEvent::angleDelta() returning QPoint().
Change-Id: I29460bd5a3f485dcd460edc52239d748e7faf6e0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-30 12:21:18 +02:00
Morten Sorvig
4bafdc940b Cocoa: Fix combo box flicker on show.
Replace Q_WS_MAC -> Q_OS_MAC, restore Qt 4 behavior
that does not disable updates on first show.

Change-Id: Ibc7f58add2a44c95879bd3c4772cea36dd7905fa
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-30 12:20:39 +02:00
Bradley T. Hughes
5211d17864 Cocoa: set window levels when creating NSWindow/NSPanel
Port the QWidgetPrivate::setWindowLevel() function from Qt 4 so that we
get compatible window level behavior in Qt 5.

Change-Id: I67f036941f1e460be678b28e7079d36b1a6622ac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-30 12:19:27 +02:00
Bradley T. Hughes
177a78b035 Cocoa: don't call non-existent NSWindow setFrameSize
Commit 140579cb3e changed a setFrame call
in propagateSizeHints() to setFrameSize, which doesn't exist in
NSWindow. Change it back to setFrame.

Spotted due to this objc warning:

qcocoawindow.mm:232:9: warning: instance method '-setFrameSize:display:'
      not found (return type defaults to 'id')
     [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(),...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...

Change-Id: Ieb7e022694ced7e59c07fdd2fc53048dab1e93c7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-30 12:19:22 +02:00
Casper van Donderen
ac2f7eff88 QDoc: Write proper output file name for debug output.
Change-Id: I55138c47960a4d9e1595ef648a8d0982e3bfd19b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-30 12:04:49 +02:00
Kevin Krammer
831943d7f1 Separate virtual keyboard interface and implementation
Allows us to create a BPS based implementation and drop it in
without further changes to users of the interface.

Change-Id: I16313717e1200d717c330cbb18c3314567af51c2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-30 11:47:55 +02:00
João Abecasis
4ef5a6269c Add tests to verify QByteArray's zero termination
For data allocated and maintained by QByteArray, there's a guarantee
that data() is null-terminated. This holds true even for null and empty,
where logically the terminating character should never be dereferenced.

For tests that modify or generate QByteArrays, this ensures the
invariant is kept.

In the toFromHex() text, const-ness of temporary variables was dropped
to enable the test macro to be used, as the qualification didn't add
much to the test otherwise.

Change-Id: I7ee52e79e3a9df7de18c743f3698dab688e6bf0e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-03-30 11:21:34 +02:00
João Abecasis
be4554d934 Use unsigned variable for size and index
rulesSize is passed from unsigned variable numerusRulesLength, so don't
bring sign bit into equation; array index variable i also made unsigned.

Change-Id: I0cb4e8483272c1e60339298149fb118215aa2183
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 11:21:34 +02:00
Morten Sorvig
724e0e20ae Add Mac OS 10.8 define.
Change-Id: Ief687d3d6188b11c39d9ac4879928b35d8b467d0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-30 09:31:03 +02:00
Morten Sorvig
3d72797df1 Fix "unused variable" warning in QVariant header.
Change-Id: Ia70ee372e277b1f95b893c461820fe97f381b8b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-30 09:31:03 +02:00
Bradley T. Hughes
3fa70d9c74 Update tests/manual/windowmodality to test native dialogs
Window- and ApplicationModal native dialogs need to send WindowBlocked
and WindowUnblocked events as well. This will let us test that they work
properly.

Change-Id: Iaa4ddb79bb0872f9ab1e61336a5decb262472283
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-30 09:31:03 +02:00
Matt Newell
cff46983a8 Allow named bind values to be used multiple times per query
Prepared queries should be able to use a name parameter more than
once. Currently this will result in undefined behavior and crashes.
This patch fixes the bug and implements the needed test case.

Task-number: QTBUG-6420
Change-Id: I07d6537e432a9b2781e9ef3d9f597bceb054527e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-30 09:31:03 +02:00
João Abecasis
f1b2f1acd1 Fix comments out of touch with reality
Change-Id: Id060626b0bb6c28f4e67c9b3c7a0fbc456f7dcc6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 09:25:03 +02:00
Andy Shaw
3ec88b355b Plug memory leak when gestures are grabbed but never triggered
When a gesture is grabbed by QAbstractScrollArea but never triggered
then the deletion of the QAbstractScrollArea would mean that the gesture
created for it would not be deleted.  This ensures that it always
deletes the gestures waiting to be deleted even if no gesture event is
triggered

Task-number: QTBUG-25011

Change-Id: I36118b82baaa60ac4e014896159060e1af76b2d2
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-03-30 07:27:19 +02:00
Thiago Macieira
ffd20af339 Revert to Qt4 behaviour that QUrl().isValid() == false
There are probably lots of places that rely on that behaviour, so go
back to what it was.

Change-Id: I4d1503a0ee105a50cdfaab52d9a5862a02c70757
Reviewed-by: David Faure <faure@kde.org>
2012-03-30 01:19:59 +02:00
Thiago Macieira
7f20dce264 Move the #include "tst_qurlinternal.moc" up to workaround a bug
I don't know if the bug is in moc or in qmake. But it bails out trying
to parse the .cpp file after the
tst_QUrlInternal::nameprep_testsuite_data function. If the #include is
placed above, it works. If it's placed below, it doesn't.

Change-Id: Ide554aa5aa3f1999e29604ba6d25ccdb09f6ef28
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
c9b78026f5 Fix the license headers for the files in the new-qurl branch
Change-Id: I469fed8b72111905e31553d0c82e62ced4009d75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
83526a9bdc De-inline qHash(const QUrl&) and improve
Make it a friend and access the internals to have better performance.

Change-Id: I3bbf0b0faa5363278b7b3871d6b6fb5f2225a5f4
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
66df11f4d1 Fix QUrl operator== and operator<
Don't crash when either side is null but not both sides.

Also make sure operator< is working properly and satisfies the basic
conditions of a type (such as that if A < B, then !(B < A)).

Change-Id: Idd9e9fc593e1a7781d9f4f2b13a1024b643926fd
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
64a10879cb Disallow spaces in URLs when parsing in StrictMode.
Change-Id: I16de68aff2b9e84cc800734c5875aaee9a2ea565
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
329ee8cedc Reimplement the StrictMode URL parsing
The strict mode check is now implemented after the tolerant parser has
finished, and only if the tolerant parser has not found any errors. We
catch the use of disallowed characters (control characters plus a few
not permitted anywhere) and broken percent encodings.

We do not catch the use of Unicode characters, as they are permitted
in IRIs.

In the tests, remove the old errorString test since it makes little
sense.

Change-Id: I8261a2ccad031ad68fc6377a206e59c9db89fb38
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
cff38329aa Re-introduce support for QUrl::errorString()
Note that QUrl can only remember one error. If the URL contains more
than one error condition, only the latest (in whichever parsing order
URL decides to use) will be reported.

I don't want too keep too much data in QUrlPrivate for validation, so
let's use 4 bytes only.

Change-Id: I2afbf80734d3633f41f779984ab76b3a5ba293a2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
74d2dba460 Port to the new QUrl API
The use of any broken-down components of the query now needs
QUrlQuery.

The QUrl constructor and toString() are now rehabilitated and the
preferred forms. Use toEncoded() and fromEncoded() now only when we
need to store data in a QByteArray or the data comes from a QByteArray
anyway. Change to toString() or the constructor if the data was in a
QString.

Change-Id: I9d761a628bef9c70185a48e927a61779a1642342
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
8cf66c3bc4 Add QUrl::setQuery overload with QUrlQuery
Change-Id: I0cba92b6bf7f848f1918383b380c0444b8bead3a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
f40e934983 QUrl: optimise setHost for the common case
Change-Id: Ib667557268ebf75cb796ddd716b337ca24b466ad
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
2591545ee1 QUrl: Always lowercase the scheme
Change-Id: I8d467014d22384f1be15fdd746e20b1153a82a4e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
1372d60bde Long live the new QUrl implementation.
Also say hello to QUrl's constructor and QUrl::toString being allowed
again.

QUrl operates now on UTF-16 encoded data, where a Unicode character
matches its UTF-8 percent-encoded form (as per RFC 3987). The data may
exist in different levels of encoding, but it is always in encoded
form (a percent is always "%25"). For that reason, the previously
dangerous methods are no longer dangerous.

The QUrl parser is much more lenient now. Instead of blindly following
the grammar from RFC 3986, we try to use common-sense. Hopefully, this
will also mean the code is faster. It also operates on QStrings and,
for the common case, will not perform any memory allocations it
doesn't keep (i.e., it allocates only for the data that is stored in
QUrlPrivate).

The Null/Empty behaviour that fragments and queries had in Qt4 are now
extended to the scheme, username, password and host parts. This means
QUrl can remember the difference between "http://@example.com" and
"http://example.com".

Missing from this commit:
 - more unit tests, for the new functionality
 - the implementation of the StrictMode parser
 - errorString() support
 - normalisation

Change-Id: I6d340b19c1a11b98a48145152513ffec58fb3fe3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
4758c8fa48 Move some of qurl.cpp into other files for ease of maintenance
The parsing code is now in qurlparser.cpp, whereas the IDNA related
code is in qurlidna.cpp.

Change-Id: I0b32c0bf0ee6c2f08dc3200c44af3c9d1504a3df
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
1c2144c39f Forward the methods dealing with the break down of query to QUrlQuery
Now that QUrlQuery exists, these methods are no longer necessary in
QUrl itself. Manipulation of the items should be done using the new
class.

They are now implemented using a temporary QUrlQuery. This is hardly
efficient but it works.

Change-Id: I34820b3101424593d0715841a2057ac3f74d74f0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00
Thiago Macieira
1aeb180386 Long live QUrlQuery
This class is meant to replace the QUrl functionality that handled
key-value pairs in the query part of an URL. We therefore split the
URL parsing code from the code dealing with the pairs: QUrl now only
needs to deal with one encoded string, without knowing what it is.

Since it doesn't know how to decode the query, QUrl also becomes
limited in what it can decode. Following the letter of the RFC,
queries will not encode "gen-delims" nor "sub-delims" nor the plus
sign (+), thus allowing the most common delimiters options to remain
unchanged.

QUrlQuery has some undefined behaviour when it comes to empty query
keys. It may drop them or keep them; it may merge them, etc.

Change-Id: Ia61096fe5060b486196ffb8532e7494eff58fec1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-30 01:19:59 +02:00