Robin Burchell [Wed, 11 Apr 2012 08:21:05 +0000 (10:21 +0200)]
Remove unused QIntRect.
I can't find any uses of this anywhere, in either Qt 4 or Qt 5.
Change-Id: Ibf747b57b4afdd81e11631e87a80dcab5ac12f69
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Jason McDonald [Wed, 11 Apr 2012 12:52:21 +0000 (22:52 +1000)]
Address Qt 5 to-do comments related to QFileSystemModel.
- QFileSystemModel::rmdir() and QFileSystemModel::remove() changed to
non-const -- they don't change the object, but they do change the
file system, and the Qt way is to be non-const if having side-effects
on external entities.
- The comment on incompatibility between entryList and QFileInfo will
not be fixed as doing so is likely to break existing code.
- The comment on removing the internal resolvedSymLinks variable has
been removed, as the variable is still used.
Task-number: QTBUG-25088
Change-Id: I20456e4d116076403d9c4d4692ee05c178a1ed17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Jason McDonald [Wed, 11 Apr 2012 12:22:26 +0000 (22:22 +1000)]
Address Qt 5 to-do comment for QColorDialog.
- change customColor() to return QColor instead of QRgb.
- change setCustomColor() and setStandardColor() to take
a QColor instead of QRgb.
- add missing standardColor() getter method.
Task-number: QTBUG-25087
Change-Id: Ic6adb2031ef47f5e9b15fa3560a5322e6847c0bb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Wed, 11 Apr 2012 15:06:11 +0000 (18:06 +0300)]
make QStringList::sort() to take a Qt::CaseSensitivity param
Task-number: QTBUG-12892
Change-Id: I402e6fb12ff24ac26c5a8103bf81547946f9cc58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 11 Apr 2012 20:58:55 +0000 (17:58 -0300)]
Fix warning introduced in "Adjust a double leading slash..."
Change-Id: Id89fd3983123c0ba302c493b54437dd75e419e01
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Jason McDonald [Wed, 11 Apr 2012 15:03:19 +0000 (01:03 +1000)]
Make QBoxLayout::insertItem() public.
This commit addresses a Qt 5 to-do comment in the code. The method was
already protected (so could already be made public by sub-classing),
and already has documentation in qboxlayout.cpp.
Task-number: QTBUG-25098
Change-Id: I5b51d34be8180becb63b8ad291879620f265bbec
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Fri, 6 Apr 2012 07:35:24 +0000 (09:35 +0200)]
Prefer QCOMPARE to QVERIFY, as it gives better output
Done-by: Jędrzej Nowacki
Change-Id: Ic1c8fd5b8acede52b45e5ea16b14fb5bae78f171
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thiago Macieira [Mon, 2 Apr 2012 22:55:57 +0000 (19:55 -0300)]
Readd a bunch of tests that had got removed in the QUrl porting
Most of the tests were removed while QUrl::toEncoded or fromEncoded
were deprecated in the development process. Since they aren't
deprecated in the end, bring them back.
Change-Id: Ibdb6cd3c4b83869150724a8e327a03a2cd22580d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 20:48:42 +0000 (17:48 -0300)]
Change the component formatting enum values so the default is zero
By having the default value equal to zero, we follow the principle of
least surprise. For example, if we had
url.path()
and we refactored to
url.path(QUrl::DecodeSpaces)
Then instead of ensuring spaces are decoded, we make spaces the only
thing encoded (unicode, delimiters and reserved characters are
encoded).
Besides, modifying the default can only be used to encode something
that wasn't encoded previously, so having the enums as Encode makes
more sense.
As a side-effect, toEncoded() does not support any extra encoding
options.
Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 19:21:45 +0000 (16:21 -0300)]
Allow {} to remain decoded in URLs in the path and query
This allows things like http://example.com/{1234-5678}?id={abcd-ef01}.
But do not allow it in other parts of the URL. I could allow it in the
fragment, but in the username and password it would be too ugly.
In order to do that, make DecodeReserved use two bits and have
PrettyDecoded set only one of them. That way, toString(PrettyDecoded)
can be distinguished from toString(PrettyDecoded | DecodeReserved),
just as path(PrettyDecoded) can be distinguished from
path(PrettyDecoded & ~DecodeDelimiters).
Also, take the opportunity to avoid decoding the reserved characters
in the query. Keep them encoded as they should be.
Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 16:32:19 +0000 (13:32 -0300)]
Introduce QUrl::DecodeReserved and reorder the enums
DecodeReserved applies to all characters between 0x21 and 0x7E that
aren't unreserved, a delimiter, or the percent sign itself.
Change-Id: Ie64bddb6b814dfa3bb8380e3aa24de1bb3645a65
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 13:31:37 +0000 (10:31 -0300)]
Merge QUrl::DecodeAllDelimiters and QUrl::DecodeUnambiguousDelimiters
There's little value in having the DecodeUnambiguousDelimiters option
since neither QUrl nor QUrlQuery can return values that are ambiguous
in that particular context, ever.
This option could be used to encode a character if, when placed
in a URL, it would need to be encoded. Such cases are hash (#) or
question marks (?) in the path component, or slashes (/) and at signs
(@) in the userinfo.
However, we don't need two enums for that, since there are no
other characters that can appear in either form. Still, leave two bits
for this enum. In the future, if we want to split the gen-delims from
the sub-delims, we are able to.
Change-Id: If5416b524680eb67dd4abbe7d072ca0ef7218506
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Tue, 3 Apr 2012 15:42:03 +0000 (12:42 -0300)]
Add a big test for QUrl encoding principles
This tests how QUrl encodes and decodes certain characters and leaves
some other ones alone. It also tests that the output of toString() (in
whichever encoding was being tested) is also parsed again to be
exactly the same as the previously decoded form.
Change-Id: Ie358d001f8b903409db61db48bde1ea679241a60
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 01:59:56 +0000 (22:59 -0300)]
Fix the handling of ambiguous delimiters in the query part of a URL
This is the same fix as the previous commit did for the other
components of the URL. But we're also changing how we handle the "[]"
characters in a query: previously the handling was like for other
sub-delims; now, they're always decoded, assuming that the RFC had a
mistake and they were meant to be decoded.
Change-Id: If4b1c3df8f341cb114f2cc4860de22f8bf0be743
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 30 Mar 2012 01:11:33 +0000 (22:11 -0300)]
Make QUrl handle ambiguous delimiters correctly
Refactor the way that QUrl stores and returns the components of the
URL so that ambiguous delimiters (gen-delims that could change the
meaning of the parsing) are interpreted correctly. Previously, QUrl
called "unambiguous" the form found in a full URL, even though each
item in isolation could have more characters decoded.
Now, instead, store only the fully decoded form. To recreate the
compound forms (the full URL, as well as the user info and the
authority), we need to do more processing.
This commit applies to the user name, password, path and fragment
only. The scheme, host and port do not need this work because they are
special; the query is handled separately.
Change-Id: I5907ba9b8fe048fff23c128be95668c22820663a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Shane Kearns [Tue, 10 Apr 2012 16:54:22 +0000 (17:54 +0100)]
Fix error reporting in QNetworkReplyHttpImplPrivate
When errors are detected synchronously in _q_startOperation,
they were not reported. This is because unlike the generic
QNetworkReplyImpl the function is called directly rather than
using a queued connection.
In order to report errors, use the _q_error and _q_finished slots
so that signals are emitted after returning to the event loop
i.e. after the application had a chance to connect the QNetworkReply
Change-Id: I8a7bbe79a934f4634fb4e0572ebb5479dfc5f489
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Tue, 10 Apr 2012 12:15:29 +0000 (13:15 +0100)]
Add unit test for usagePolicies
Change-Id: I749268d81521d84ffc709014963a0f34fbf6d74c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Shane Kearns [Tue, 10 Apr 2012 12:10:40 +0000 (13:10 +0100)]
Add autotest interface to get session from QNAM
Change-Id: I7d8ea41299408377042a9f0d0a672e1a6fb57e7d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 17:37:54 +0000 (18:37 +0100)]
Check background requests are allowed before starting
If background requests are not allowed, don't even attempt to start
the network session, just fail the request immediately.
After this change, a QNAM with mixed requests queued should behave
as follows when background requests are disabled:
- background requests at head of the queue fail
- first foreground request starts the session and succeeds
- remaining background requests fail
- remaining foreground requests succeed
If policy is changed on the fly, then running background requests
are not aborted. However queued background requests won't be started.
Change-Id: Ic9aba1eb59ca41b166a08d2ed09418e1b6af6b60
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 17:11:42 +0000 (18:11 +0100)]
Define usagePolicies API in QNetworkSession
This allows the system to publish usage restrictions to applications
related to the network in use.
Currently there is only one restriction defined:
NoBackgroundTrafficPolicy, which means that non user initiated traffic
should be avoided (e.g. background downloads).
For example this policy could be applied to save battery or data transfer
charges.
Change-Id: I49e26c0f3650d2b92f4ec51981aae9435b717b49
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 15:31:09 +0000 (16:31 +0100)]
Use NetworkSessionFailedError in QNetworkReply
Switched the error code.
Republish the error string from the bearer plugin if possible.
Change-Id: I9e4ac7a9914fbf2e87fe8fd3a5175deda6d933d2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 15:14:57 +0000 (16:14 +0100)]
Define QNetworkReply::BackgroundRequestNotAllowedError
This error will be used when background network requests are not allowed
according to the current policy of the bearer plugin.
For example, to save power when battery is low on a portable device.
Change-Id: I866e115f8fdd046134da99ea895b7c1df0375f26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 15:11:53 +0000 (16:11 +0100)]
Define QNetworkReply::NetworkSessionFailed error
This is to replace the UnknownNetworkError which occurs when the
internal QNetworkSession fails to start (e.g. no usable WLAN available)
Change-Id: I2b14577c22e0acf8ff07be7e932f0dfe9ac89c33
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 14:45:22 +0000 (15:45 +0100)]
Set ConnectInBackground based on request
Set the QNetworkSession attribute to match the QNetworkRequest that
triggered it.
Currently if there are a mix of normal and background requests queued
and background connections are not allowed by policy:
- background requests at the head of the queue should fail
- first foreground request should successfully start a connection
- remaining requests succeed regardless of background attribute
Change-Id: If0e3ec0b8a5096e3d7cd6df85884c6f53172d233
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Wed, 4 Apr 2012 14:20:05 +0000 (15:20 +0100)]
Define BackgroundRequestAttribute
This is so that the ConnectInBackground flag can be set on the
QNetworkSession internal to QNAM according to pending requests.
Change-Id: If0cc62f5117ed8febbbda7b7f6de62b11b274258
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Robin Burchell [Wed, 11 Apr 2012 08:09:26 +0000 (10:09 +0200)]
Move QVectorPath::polygonFlags to its own class.
Who can say why it was put in QPaintEngineEx's header, but it certainly doesn't
belong there.
Change-Id: Ieb3b977affcf4b240f621d13b72bdc0e8f8138b9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Robin Burchell [Wed, 11 Apr 2012 08:26:50 +0000 (10:26 +0200)]
Move QRectVectorPath into the .cpp of the only file actually using it.
Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Konstantin Ritt [Wed, 4 Apr 2012 23:29:35 +0000 (02:29 +0300)]
unite QString::normalized() overloads
Change-Id: I27545e599a1831728e491a9fad1e52fa255535fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Robin Burchell [Fri, 6 Apr 2012 14:34:19 +0000 (16:34 +0200)]
Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.
On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.
For qMemCopy, the benefits are a little more modest: 16-7%.
Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Olivier Goffart [Mon, 9 Apr 2012 11:38:03 +0000 (13:38 +0200)]
Mark QObject::disconnect overload const
Consistency with the non-static connect overload
Task-number: QTBUG-23622
Task-number: QTBUG-1772
Change-Id: Ic09df9cca1feaabb6b5cf335f04a0d6d4bbf011f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 13:00:41 +0000 (15:00 +0200)]
Make reallocData() take (unsigned) size, including null
The parameter represents an allocation size and unsigned matches the
Q*Data::alloc member it ultimately represents (even if they currently
differ in accounting for the null).
There's still work up for grabs to ensure we avoid integer overflows
when growing.
Change-Id: Ib092fec37ec2ceed37bebfdc52e2de27b336328f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thiago Macieira [Tue, 3 Apr 2012 16:58:39 +0000 (13:58 -0300)]
Adjust a double leading slash in the path for FTP to /%2F
Some FTP implementations (currently not including QNAM) strip the first
slash off the path in an FTP URL so that the path in the URL is relative
to the login path (the user's home directory). To reach the root
directory, another slash is necessary, hence the double slash.
In anticipation of future URL normalisation, which Qt 4 could do, "//"
could be rendered to "/", so this extra slash should be "%2F".
This operation is done only in QUrl::fromUserInput.
Change-Id: If9619ef6b546a3f4026cb26b74a7a5a865123609
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Tue, 10 Apr 2012 15:08:21 +0000 (12:08 -0300)]
Add early-clobbers to the output variables in CPUID
Without those early-clobbers, the compiler might decide to schedule a
register that is also used as output. The existing early clobber in
the tmp variable was there so the compiler wouldn't use a register
scheduled as input (especially EAX).
To be honest, I'm not convinced that the compiler should be allowed to
do this. That means that two output variables are scheduled to the
same register... still, this fixes a problem found with GCC 4.2 (at
least the Mac one).
Change-Id: I6cd4676284e9a83d6aac4b439c6e58e347c40106
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Fri, 23 Dec 2011 12:47:15 +0000 (10:47 -0200)]
Make plugin linking fail if some references aren't present
It's better to fail at linking time than to try and figure out later why
QPluginLoader refuses to load the plugin.
Change-Id: I439bad9dcdbfff9f76efe40381fd7ccfffe738bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Oswald Buddenhagen [Tue, 10 Apr 2012 10:48:01 +0000 (12:48 +0200)]
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
configure
src/widgets/styles/qwindowsxpstyle.cpp
tests/auto/gui/kernel/qwindow/qwindow.pro
tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
Marcel Krems [Thu, 5 Apr 2012 20:12:15 +0000 (22:12 +0200)]
Removed QApplication overloads used solely for documentation.
Also removed a define which was used only for this purpose.
This change brings the constructors in line with Q{Core,Gui}Application.
Change-Id: I1134ca5611453e8445c1a4f3226846621fa8872c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Giuseppe D'Angelo [Tue, 27 Mar 2012 17:40:06 +0000 (18:40 +0100)]
New qHash algorithm for uchar/ushort arrays (QString, QByteArray, etc.)
Port of Robin's work from I0a53aa4581e25b351b9cb5033415b5163d05fe71
on top of the new qHash patches (the original commit just introduced
lots of conflicts, so I redid it from scratch).
This is based on the work done in the QHash benchmark over the past
few months experimenting with the performance of the string hashing
algorithm used by Java.
The Java algorithm, in turn, appears to have been based off a
variant of djb's work at http://cr.yp.to/cdb/cdb.txt.
This commit provides a performance boost of ~12-33% on the
QHash benchmark.
Unfortunately, the rcc test depends on QHash ordering.
Randomizing QHash or changing qHash will cause the test to fail
(see QTBUG-25078), so for now the testdata is changed as well.
Done-with: Robin Burchell
Change-Id: Ie05d8e21588d1b2d4bd555ef254e1eb101864b75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Giuseppe D'Angelo [Thu, 22 Mar 2012 09:32:03 +0000 (09:32 +0000)]
Stop relying on qHash always giving the same results
The implementation of the various qHash overloads offered by
Qt can change at any time for any reason
(speed, quality, security, ...).
Therefore, relying on the fact that qHash will always give
an identical result across Qt versions (... across different
processes, etc.), given identical input, is wrong.
Note that this also implies that one cannot rely on QHash
having a stable ordering (even without the random qHash seed).
For such use cases, one must use f.i. a private hash function
that will never change outside his own control.
This patch adds a private hash function for QStrings,
which is identical to the Qt(4) qHash(QString) implementation.
A couple of spots in Qt where the results of a qHash call were
actually saved on disk are ported to use the new function,
and a bit of documentation is added to QHash docs.
Change-Id: Ia3731ea26ac68649b535b95e9f36fbec3df693c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Giuseppe D'Angelo [Wed, 4 Apr 2012 19:37:04 +0000 (20:37 +0100)]
QHostAddress: improve qHash implementation
Avoid the conversion to a temporary QString -- just hash the address
as a byte array.
Change-Id: Ic35cdbbc3ee66c32a28d911bd27de0092395979f
Done-with: Shane Kearns
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Giuseppe D'Angelo [Wed, 4 Apr 2012 19:19:39 +0000 (20:19 +0100)]
QUrl: added two-arguments qHash support
An unnecessary #include <QHash> was also removed, and other
includes refactored.
Change-Id: Ifcd3e37d75029c142a2e55ab492b88624505670a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Sat, 24 Mar 2012 18:23:49 +0000 (18:23 +0000)]
More qHash(T, uint) overloads for Qt types
The more we get in 5.0, the better.
Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Sun, 1 Apr 2012 17:47:56 +0000 (18:47 +0100)]
QFileSystemModel: fix sorting
When sorting a model recursively, the children of a QFileSystemNode
are extracted from their parent in a QHash order; then filtered,
then sorted (using a stable sort) depending on the sorting column.
This means that the order of the children comparing to equal for
the chosen sort are shown in the order they were picked from the
iteration on the QHash, which isn't reliable at all.
Moreover, the criteria used in QFileSystemModelSorter for sorting
are too loose: when sorting by any column but the name, if the result
is "equality", then the file names should be used to determine
the sort order.
This patch removes the stable sort in favour of a full sort,
and fixes the criteria of soring inside QFileSystemModelSorter.
Change-Id: Idd9aece22f2ebbe77ec40d372b43cde4c200ff38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thiago Macieira [Mon, 26 Mar 2012 18:34:23 +0000 (15:34 -0300)]
Remove -DQT_NO_STL from the bootstrapped builds
Change-Id: I37ea06426b66e617a49ec46952abdaad8814eadf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thiago Macieira [Mon, 26 Mar 2012 18:29:34 +0000 (15:29 -0300)]
Remove references to QT_NO_STL from QtConcurrent
Same as with QtCore, remove the #ifdef and #ifndef and select the side
with STL.
Change-Id: If1440080328c7c51afe35f5944a19dafc4761ee5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Thiago Macieira [Mon, 26 Mar 2012 18:28:40 +0000 (15:28 -0300)]
Remove references to QT_NO_STL from QtCore
QT_NO_STL is now no longer defined, so remove the conditionals and
select the STL side.
Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Giuseppe D'Angelo [Wed, 4 Apr 2012 15:21:03 +0000 (16:21 +0100)]
qHash: always use the seed in the catch-all template
This pertubates the results of the calls to the one-argument
version of qHash through the catch-all template.
Change-Id: I7037b25d545e6f1360384a83ff895f4bb62ed195
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Giuseppe D'Angelo [Wed, 4 Apr 2012 20:00:11 +0000 (21:00 +0100)]
Add test for qHash(QByteArray)
Two equal QByteArrays must return the same hash.
Change-Id: Iddd45b0c420213ca2b82bbcb164367acb6104ec8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Wed, 4 Apr 2012 19:44:33 +0000 (20:44 +0100)]
Add test for qHash(QString) / qHash(QStringRef)
Two equal strings / stringrefs must return the same hash.
Change-Id: I2af9a11ab721ca25f4039048a7e5f260e6ff0148
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marcel Krems [Thu, 5 Apr 2012 21:15:51 +0000 (23:15 +0200)]
Fix compilation with MinGW.
Change-Id: I494c84e8e6889a7d7bb3b29669337483732d02c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Sun, 25 Mar 2012 07:18:15 +0000 (08:18 +0100)]
QLatin1String: add qHash overload
It was never introduced in Qt 4, probably because of the implicit
conversion to QString (that is, adding the qHash overload for
QLatin1String in Qt 4 would have been a BIC).
Change-Id: I2ebc8e73a85be497866820e0ca416dd11167bb53
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Shane Kearns [Wed, 28 Mar 2012 15:06:57 +0000 (16:06 +0100)]
Find libssl on linux using paths of loaded libraries
The installed path of libssl may include an element describing the
architecture, e.g. x86_64-linux-gnu or i386-linux-gnu.
In most cases, the libraries already loaded (static dependencies of
Qt, such as libc) will include the path where libssl is installed.
Use dl_iterate_phdr to find the paths. This is a linux specific
function, but it does provide "/lib/<arch>" and "/usr/lib/<arch>"
at the point ssl symbols are being resolved when running the
qsslsocket autotest (which has less dependencies than a typical
Qt app).
Task-number: QTBUG-24694
Change-Id: I9af8081f41bb85c2fcff450a2acda5672a7f7518
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
João Abecasis [Thu, 5 Apr 2012 08:24:41 +0000 (10:24 +0200)]
Enable variadic macros for MSVC >= 2005
Change-Id: I8793ea0f6e3a640276b073321d29373b2ed18d63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Friedemann Kleint [Tue, 27 Mar 2012 15:05:53 +0000 (17:05 +0200)]
Windows: Use native font engine by default.
Turn around the meaning of the command line parameter.
The FreeType engine can now be activated by passing freetype.
Change-Id: I9da6cd4a127603f9cfb91f0ce8450088c0883faa
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Pekka Vuorela [Tue, 3 Apr 2012 15:49:23 +0000 (18:49 +0300)]
Include with qt module to avoid configure warning
Change-Id: I8d338f22c4b0dabcca33878b33c6a203828d84c5
Reviewed-by: David Faure <faure@kde.org>
David Faure [Wed, 4 Apr 2012 19:43:53 +0000 (21:43 +0200)]
Fix unittest for QStandardPaths::enableTestMode
It was confusing DataLocation and GenericDataLocation, and the same
for CacheLocation and GenericCacheLocation. The test was passing in
the api_changes branch because these were giving the same result
(empty app name), but the QCoreApplication::applicationName fix in master
makes these different, so the bug in the test showed up after merging.
Change-Id: I80ef6883c96cfd02b8c277d9d686717028d396bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Tue, 3 Apr 2012 23:26:44 +0000 (01:26 +0200)]
Add zero-termination checks to QString and QByteArray tests
This uses an alternative approach to the testing formerly introduced
in
4ef5a626. Zero-termination tests are injected into all QCOMPARE/QTEST
invocations. This makes such testing more thorough and widespread, and
gets seamlessly extended by future tests.
It also fixes an issue uncovered by the test where using a past-the-end
position with QString::insert(pos, char), could move uninitialized data
and clobber the null-terminator.
Change-Id: I7392580245b419ee65c3ae6f261b6e851d66dd4f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
João Abecasis [Tue, 3 Apr 2012 23:29:26 +0000 (01:29 +0200)]
Revert "Add tests to verify QByteArray's zero termination"
The approach used to verify for zero-termination is too intrusive and
requires additional maintenance work to ensure new zero-termination
tests are added with new functionality.
Zero-termination testing will be re-established in a subsequent commit.
This reverts commit
4ef5a6269c1465662ea3872596ba284a13cce25e.
Change-Id: I862434a072f447f7f0c4bbf8f757ba216212db3c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Charles Yin [Wed, 4 Apr 2012 01:59:39 +0000 (11:59 +1000)]
Fixed an exit crash that could occur in QQuickPixmap.
The global destructor for the clean up hooks might be called before the
global destructor for QQuickPixmapCache objects.
This is an additional fix for QTBUG-8681
Task-number: QTBUG-8681
Change-Id: I8694a7a246980f488aef78071c613e3a908c7db3
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Thiago Macieira [Wed, 4 Apr 2012 16:51:33 +0000 (13:51 -0300)]
Make QLocale::toULongLong return the proper type: qulonglong
Task-number: QTBUG-25143
Change-Id: Ia8fd588c25d11fe31acd57fd34a90d51dace248c
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Thiago Macieira [Wed, 4 Apr 2012 18:36:21 +0000 (15:36 -0300)]
Get rid of QKeyEventEx
This class was added when we needed more information in QKeyEvent but
couldn't extend it. And we couldn't use the d pointer because the copy
constructor and copy assignment operators in QEvent were
implicit. That is now fixed.
But since this is Qt 5, we can change QKeyEvent to include the extra
information.
Task-number: QTBUG-25070
Change-Id: Iba4ac3378ca70583fcaa8caf96bca8ef75e30701
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Debao Zhang [Thu, 5 Apr 2012 00:23:46 +0000 (17:23 -0700)]
Remove macro _POSIX_ from Win32 special file
Macro _POSIX_ doesn't used by this two files. And it will casued compile
errors under VS2005/VS2008/VS2010 such as:
Error 19 error C3861: \91_fileno\92: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 443
Error 20 error C3861: \91_fileno\92: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 468
Error 21 error C3861: \91_fileno\92: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 607
when we don't use precompiled headers. And this error will triggered when
we reomve QT_NO_STL from QtCore.
Because stdio.h declares fileno instead of _fileno when _POSIX_ is
defined.
Change-Id: I9d9031578dac7b7c5f7b77098839723a4bc8bfdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 12:24:01 +0000 (14:24 +0200)]
Don't allocate space for null when using fromRawData
In this case we only need to allocate space for the "header" data.
Change-Id: I059627e47a5bae7a02c82d837c826a6ed0fd20fd
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 12:11:14 +0000 (14:11 +0200)]
Simplify conditionals
alloc >= size is an invariant of both QString and QByteArray, unless
string data is immutable (e.g., when using fromRawData()), in which case
alloc will be 0, regardless of size, That's what needs to be checked
here.
Change-Id: Ief9e6a52a1d5ea1941d23ed3c141edfd15d2a6a7
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 12:04:03 +0000 (14:04 +0200)]
Rename realloc -> reallocData
This avoids confusion with standard ::realloc.
Change-Id: Ibeccf2f702ec37161033febf4f3926bee8f7aea6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 11:50:21 +0000 (13:50 +0200)]
Move growth computation to re-allocation function
Callers of QByteArray/QString::realloc() are still responsible for the
heuristics and decide whether to provide the "grow" hint, but
computation is centralized there.
With this change we also ensure growth takes into account the
terminating null. Previously, calls to qAllocMore took into account
header and string size, for left out the null, meaning we ended up
allocating ("nice-size" + Null).
Change-Id: Iad1536e7706cd2d446daee96859db9b01c5f9680
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Wed, 4 Apr 2012 11:35:02 +0000 (13:35 +0200)]
Drop nullary overload of private QString::realloc
Change-Id: I196ec038ab7b648287e310525681f2d218059b51
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Tue, 3 Apr 2012 11:23:55 +0000 (13:23 +0200)]
Introduce initializer macros for QString- and QByteArrayData
This enables easier updating of those structs, by reducing the amount of
code that needs to be fixed. The common (and known) use cases are
covered by the two macros being introduced in each case.
Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Sat, 31 Mar 2012 23:05:47 +0000 (01:05 +0200)]
Clean up constructors for "statics" in QString and QByteArray
There were two constuctors offering essentially the same functionality.
One taking the QStatic*Data<N> struct, the other what essentially
amounts to a pointer wrapper of that struct. The former was dropped and
the latter untemplatized and kept, as that is the most generic and
widely applicable. The template parameter in the wrapper was not very
useful as it essentially duplicated information that already maintained
in the struct, and there were no consistency checks to ensure they were
in sync.
In this case, using a wrapper is preferred over the use of naked
pointers both as a way to make explicit the transfer of ownership as
well as to avoid unintended conversions. By using the reference count
(even if only by calling deref() in the destructor), QByteArray and
QString must own their Data pointers.
Const qualification was dropped from the member variable in these
wrappers as it causes some compilers to emit warnings on the lack of
constructors, and because it isn't needed there.
To otherwise reduce noise, QStatic*Data<N> gained a member function to
directly access the const_cast'ed naked pointer. This plays nicely with
the above constructor. Its use also allows us to do further changes in
the QStatic*Data structs with fewer changes in remaining code. The
function has an assert on isStatic(), to ensure it is not inadvertently
used with data that requires ref-count operations.
With this change, the need for the private constructor taking a naked
Q*Data pointer is obviated and that was dropped too.
In updating QStringBuilder's QConcatenable specializations I noticed
they were broken (using data, instead of data()), so a test was added to
avoid this happening again in the future.
An unnecessary ref-count increment in QByteArray::clear was also
dropped.
Change-Id: I9b92fbaae726ab9807837e83d0d19812bf7db5ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Donald Carr [Mon, 2 Apr 2012 18:10:49 +0000 (18:10 +0000)]
Specify generic QPA plugins via env variables
Introduce a mechanism to load comma separated generic QPA plugins via
exported environment variables. (Drastically simplifies QPA usage in custom
environments where a variety of plugins could be used and heuristics are
consequently a poor fit)
Change-Id: I292f3fbfc8b8ad2b4f416984ef0a10b9b59de531
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Bradley T. Hughes [Wed, 4 Apr 2012 10:16:40 +0000 (12:16 +0200)]
Don't ignore tst_QWindow on Mac OS X
QTBUG-23059 only affects 2 test functions, not the whole test. XFAIL the
2 failing tests.
Change-Id: I87086a9ec573362625bc090038dfd7c79aeb9426
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Donald Carr [Wed, 28 Mar 2012 19:23:50 +0000 (19:23 +0000)]
device: Add device support for the Broadcom Raspberry PI
Add mkspec for the Raspberry PI platform to be used in conjunction with the
-device support in configure. This allows you to build Qt with the
application libraries provided by the Raspberry PI foundation.
The Raspberry PI is described here:
http://en.wikipedia.org/wiki/Raspberry_Pi
and its use with Qt is documented here:
http://wiki.qt-project.org/Devices/RaspberryPi
Change-Id: Ib8d11d0a469edaaf34ccc04cf33a42a725fc2bdb
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Stephen Kelly [Wed, 4 Apr 2012 12:33:25 +0000 (14:33 +0200)]
Change the parameter name of the mutex in a QWaitCondition.
IDEs pick up hints like this, so it makes it more clear to the user
what they need to pass in.
Change-Id: I5de272395fc98391cf43963ce4416a845726bb2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 3 Apr 2012 17:32:12 +0000 (19:32 +0200)]
Revert "Make the CONFIG and QT_CONFIG contents available downstream."
This reverts commit
6c2e57e6884c1ef524bb22f0ed6a2be2c97cd46d.
This created variables with awkward names and unproven usefulness.
In the FindQt4.cmake file they are considered internal.
Change-Id: I51443b2a39d4f11817bd13332baf025556dd8ebe
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Friedemann Kleint [Wed, 4 Apr 2012 12:56:45 +0000 (14:56 +0200)]
Windows Vista: Fix painting of item view items.
The old QWidget-based treeViewHelper() function silently failed
since the widget no longer had a HWND.
Use a native Window handle instead.
Change-Id: I6902677c565bb165f29b9d1c6fd0d28d9870d567
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Friedemann Kleint [Wed, 4 Apr 2012 12:02:27 +0000 (14:02 +0200)]
Windows: Replace QString keys of XP themes by an enumeration.
Change-Id: I5323e9ed5bc3fe73f278d167acae6fa744b0a299
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Thiago Macieira [Mon, 2 Apr 2012 18:25:29 +0000 (15:25 -0300)]
Update the documentation about the sign in QElapsedTimer::(m)secsTo
Since all implementations calculate other - *this, if other has a higher
value (was started later), then the returned value is positive.
The implementations are:
generic: return other.t1 - t1
win: return ticksToNanoseconds(other.t1 - t1) / 1000000
mac: return absoluteToMSecs(other.t1 - t1);
unix: return (other.t1 - t1) * Q_INT64_C(1000) + fraction...
Task-number: QTBUG-25128
Change-Id: Iff0a3460ae9e9d9bdd82fbaad55657fb60e5235a
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Stephen Kelly [Thu, 22 Mar 2012 16:31:59 +0000 (17:31 +0100)]
Document that the order of results from QAIM::match are not relevant.
This will allow fixing of QTBUG-10160 in Qt 5.1.
Change-Id: I1ea7579cb4227f9940847c62d5a520c7cee3b0c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Thiago Macieira [Fri, 30 Mar 2012 01:19:13 +0000 (22:19 -0300)]
Merge one static function into another
One static function was only being used by the other, so just merge
them and reduce the work for the compiler.
Change-Id: Ia7a1c46ace6254633450632fae7ab35816ff13bf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Wed, 4 Apr 2012 12:29:48 +0000 (14:29 +0200)]
Make sure we create an application before a QWidget.
Change-Id: I2e48f9ca59df62ac28d3cecdb6c2b741c59075de
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Girish Ramakrishnan [Fri, 16 Mar 2012 23:52:39 +0000 (16:52 -0700)]
eglfs: Introduce hooks for the eglfs plugin
EGL provides an api to create a rendering context for khronos APIs
on native surfaces. The board initialization and window creation
is platform specific.
This commit adds platform hooks/extensions to the EGLFS plugin and
implements them for the Amlogic 8726M. The hook interface is internal
and there are no ABI/API guarantees.
EGLFS is now linked with -Wl,-no-undefined to make sure that a hook does not
add unresolvable symbols.
Change-Id: I7f4fcdb422aacbf00de468f4d8e85ae5368bfacf
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Thiago Macieira [Tue, 3 Apr 2012 02:08:04 +0000 (23:08 -0300)]
Add missing #include <stdio.h> for _fileno
..\..\corelib\io\qfsfileengine_win.cpp(443) : error C3861: '_fileno': identifier not found
..\..\corelib\io\qfsfileengine_win.cpp(468) : error C3861: '_fileno': identifier not found
..\..\corelib\io\qfsfileengine_win.cpp(602) : error C3861: '_fileno': identifier not found
..\..\corelib\io\qfsfileengine_win.cpp(847) : error C3861: '_fileno': identifier not found
..\..\corelib\io\qfsfileengine_win.cpp(909) : error C3861: '_fileno': identifier not found
Change-Id: Ib6bed4814fce162e3065848c835f4774f0cbad01
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Friedemann Kleint [Wed, 4 Apr 2012 09:55:24 +0000 (11:55 +0200)]
Windows: Fix menu color for Windows, WindowsXP.
Typo in palette.
Change-Id: I8b4c23ef7f75ff3aa3351f15e4af0767a3ccd083
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Bradley T. Hughes [Wed, 4 Apr 2012 10:11:40 +0000 (12:11 +0200)]
Add tst_QWindow::windowModality()
This tests that we get the windowModalityChanged() signal as needed, but
not unnecessarily either.
Change-Id: I2232fa9d45c72e472b324b681859b4b0d574b467
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Jason McDonald [Mon, 2 Apr 2012 13:03:57 +0000 (23:03 +1000)]
Remove/update Qt 5 to-do's that won't be done for Qt 5.
Task-number: QTBUG-23524
Change-Id: Iebf5b78dc2ff27310b5a484bae588862417f693c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Sat, 24 Mar 2012 08:50:02 +0000 (08:50 +0000)]
QHash security fix (1.5/2): qHash two arguments overload support
Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.
This patch adds a qHash overload taking two arguments: the value to
be hashed, and a uint to be used as a seed for the hash function
itself (support the global QHash seed was added in a previous patch).
The seed itself is not used just yet; instead, 0 is passed.
Compatibility with the one-argument qHash(T) implementation is kept
through a catch-all template.
[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html
Task-number: QTBUG-23529
Change-Id: I1d0a84899476d134db455418c8043a349a7e5317
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Kevin Krammer [Wed, 4 Apr 2012 09:17:17 +0000 (11:17 +0200)]
Re-enable PPS based rotation handling for blackberry devices
BPS based event handling not there yet, so make use of the non-blackberry QNX
facility until it is.
Change-Id: I95cdbfbe36cd23e71710c8cad0b292a5a375c214
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Bradley T. Hughes [Fri, 30 Mar 2012 08:01:14 +0000 (10:01 +0200)]
printing: Make sure window modality works with native print dialogs
Make the native QPrintDialogs and QPageSetupDialogs participate in the
Qt modality system. Even though we are overriding QDialog::setVisible()
and exec() to show the native dialgos, we want to still call into
QDialog::setVisible() so that modality state and events are properly
handled. We do this by setting the WA_DontShowOnScreen attribute on
QPrintDialog and QPageSetupDialog, and call QDialog::setVisible() at the
appropriate places.
Change-Id: I7d800790c40ba1f467c3315e29abb79a7fa0eb34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Rafael Roquetto [Fri, 30 Mar 2012 13:31:44 +0000 (15:31 +0200)]
Moved 'qnx' CONFIG definition to common location.
Removed the duplicated 'qnx' CONFIG defition from the mkspecs and declared it
on the common qcc-base-qnx.conf configuration file.
Change-Id: Ie215e3dd794762f20bec9c19afd5936a78a9d963
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Samuel Rødal [Mon, 2 Apr 2012 07:28:49 +0000 (09:28 +0200)]
Removed Qt 5 todo comments from qpalette.h
The removal won't happen in Qt 5, and there's no great value in making
NoRole have the value 0 at the potential risk of breaking existing code.
Task-number: QTBUG-25068
Change-Id: I57238f55a23e77a783ebac47b96b4a5e62480add
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Sean Harmer [Mon, 2 Apr 2012 10:37:59 +0000 (11:37 +0100)]
Enable stack smashing protection on QNX and Blackberry platforms
Change-Id: I2610c8e446a74ee584c5b450e1b872b7cda50813
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Sun, 1 Apr 2012 17:53:55 +0000 (18:53 +0100)]
Stop relying on QHash ordering
tst_rcc and tst_qdom rely on specific QHash orderings inside
rcc and QDom respectively (see QTBUG-25078 and QTBUG-25071).
A workaround is added to make them succeed: QDom checks for
all possible orderings, and rcc initializes the hash seed to 0
if the QT_RCC_TEST environment variable is set.
Change-Id: I5ed6b50602fceba731c797aec8dffc9cc1d6a1ce
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Pekka Vuorela [Tue, 3 Apr 2012 14:01:12 +0000 (17:01 +0300)]
Pass autorepeat info to input context key filtering with XCB
Change-Id: Ifbb658dde6689543f48ed8fb82109ea07bcf8bd7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
João Abecasis [Mon, 2 Apr 2012 20:45:29 +0000 (22:45 +0200)]
Reorganize unicode string support in QString
Cleaned up preprocessor code to have a single definition for
QStaticStringData. A new qunicodechar typedef is introduced representing
a 2-byte integral type that can be used to represent a UTF-16 codepoint.
When QT_NO_UNICODE_LITERAL is not defined, QT_UNICODE_LITERAL converts a
US-ASCII string literal into a (native endian) UTF-16 string literal of
qunicodechar type.
Change-Id: I04822c4cdc0b240bc0fe113aba897348b7316932
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Mon, 2 Apr 2012 14:11:42 +0000 (16:11 +0200)]
Remove the sectionAutoResize signal.
Despite being documented, it was never emitted, and I can't find
any use of it in the history either.
Change-Id: If89b401004d14ef068ada6a4099bef9dc47936c9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Jason McDonald [Mon, 2 Apr 2012 12:51:03 +0000 (22:51 +1000)]
Remove duplicate non-const methods from QProgressBar.
Task-number: QTBUG-23524
Change-Id: I80f7eecb9f892fcd026b3c3f9159958fc99cfe23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Tue, 3 Apr 2012 07:40:36 +0000 (09:40 +0200)]
Fix warnings about signed/unsigned comparisons in QtJson.
Change-Id: I92071ea870bf0ebb740fcb360aff19658380a0cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Tue, 3 Apr 2012 07:37:13 +0000 (09:37 +0200)]
Fix warnings about unused variables.
Fix MSVC warnings about unused q, d where only static functions
are used.
Change-Id: I239d6fc3c851b0a62434cb09fc0e1967f2e6d031
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Tue, 3 Apr 2012 07:43:05 +0000 (09:43 +0200)]
Fix warnings about truncations in constants.
Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Kevin Krammer [Tue, 3 Apr 2012 14:11:30 +0000 (16:11 +0200)]
Fixing the QNX QPA build for non blackberry targets
Change-Id: I3d0bb33cadae946d21f8b2566840be9b1ae5101a
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Thomas McGuire [Mon, 2 Apr 2012 10:03:46 +0000 (12:03 +0200)]
Delete the screen event handler after its last user.
Change-Id: I2e3c6d08c0dcdd4b954570e9a2198c190c8fffd2
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>