João Abecasis [Wed, 28 Mar 2012 13:49:46 +0000 (15:49 +0200)]
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>
João Abecasis [Wed, 28 Mar 2012 13:15:10 +0000 (15:15 +0200)]
Pre-validate numerus rules: fail early, fail gracefully
Change-Id: Ibb3d27b9ff3d2f356a7c5c98b98686342f001f8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Wed, 28 Mar 2012 13:10:52 +0000 (15:10 +0200)]
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>
João Abecasis [Wed, 28 Mar 2012 22:24:50 +0000 (00:24 +0200)]
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>
João Abecasis [Wed, 28 Mar 2012 13:16:51 +0000 (15:16 +0200)]
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>
João Abecasis [Tue, 27 Mar 2012 13:20:42 +0000 (15:20 +0200)]
Fix comments out of touch with reality
Change-Id: Id060626b0bb6c28f4e67c9b3c7a0fbc456f7dcc6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thiago Macieira [Thu, 29 Mar 2012 20:32:58 +0000 (17:32 -0300)]
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>
Thiago Macieira [Thu, 29 Mar 2012 15:10:47 +0000 (12:10 -0300)]
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>
Thiago Macieira [Thu, 29 Mar 2012 14:27:10 +0000 (11:27 -0300)]
Fix the license headers for the files in the new-qurl branch
Change-Id: I469fed8b72111905e31553d0c82e62ced4009d75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Thiago Macieira [Wed, 28 Mar 2012 21:11:12 +0000 (18:11 -0300)]
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>
Thiago Macieira [Wed, 28 Mar 2012 22:31:45 +0000 (19:31 -0300)]
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>
Thiago Macieira [Wed, 28 Dec 2011 18:02:44 +0000 (16:02 -0200)]
Disallow spaces in URLs when parsing in StrictMode.
Change-Id: I16de68aff2b9e84cc800734c5875aaee9a2ea565
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 28 Dec 2011 17:59:47 +0000 (15:59 -0200)]
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>
Thiago Macieira [Thu, 20 Oct 2011 14:23:41 +0000 (16:23 +0200)]
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>
Thiago Macieira [Thu, 13 Oct 2011 17:56:28 +0000 (19:56 +0200)]
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>
Thiago Macieira [Wed, 19 Oct 2011 23:23:14 +0000 (01:23 +0200)]
Add QUrl::setQuery overload with QUrlQuery
Change-Id: I0cba92b6bf7f848f1918383b380c0444b8bead3a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 19 Oct 2011 18:33:31 +0000 (20:33 +0200)]
QUrl: optimise setHost for the common case
Change-Id: Ib667557268ebf75cb796ddd716b337ca24b466ad
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Wed, 19 Oct 2011 18:31:46 +0000 (20:31 +0200)]
QUrl: Always lowercase the scheme
Change-Id: I8d467014d22384f1be15fdd746e20b1153a82a4e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Thu, 8 Sep 2011 20:06:17 +0000 (22:06 +0200)]
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>
Thiago Macieira [Thu, 8 Sep 2011 19:58:50 +0000 (21:58 +0200)]
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>
Thiago Macieira [Thu, 8 Sep 2011 20:05:42 +0000 (22:05 +0200)]
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>
Thiago Macieira [Sat, 3 Sep 2011 13:05:56 +0000 (15:05 +0200)]
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>
Thiago Macieira [Thu, 8 Sep 2011 15:40:36 +0000 (17:40 +0200)]
Refactor the URL recoder a little
Change it to operate on QChar pointers, which gains a little in
performance. This also avoids unnecessary detaching in the QString
source.
In addition, make the output be appended to an existing QString. This
will be useful later when we're reconstructing a URL from its
components.
Change-Id: I7e2f64028277637bd329af5f98001ace253a50c7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Tue, 6 Sep 2011 18:36:28 +0000 (20:36 +0200)]
Remove the tolerant parsing function and make the recoder tolerant
The reason for this change is that the strict parser made little sense
to exist. What would the recoder do if it was passed an invalid
string?
I believe that the tolerant recoder is more efficient than the
correcting code followed by the strict recoder. This makes the recoder
more complex and probably a little less efficient, but it's better in
the common case (tolerant that doesn't need fixes) and in the worst
case (needs fixes).
Change-Id: I68a0c9fda6765de05914cbd6ba7d3cea560a7cd6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Mon, 5 Sep 2011 21:17:21 +0000 (23:17 +0200)]
Add the code that recodes URLs.
This one function is an all-in-one:
- UTF-8 encoder
- UTF-8 decoder
- percent encoder
- percent decoder
The next step is add the ability to modify the behaviour, by telling
the function what else it must encode or decode and what it should
leave untouched.
Change-Id: I997eccfd2f9ad8487305670b18d6c806f4cf6717
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Fri, 2 Sep 2011 18:43:50 +0000 (20:43 +0200)]
Mark QUrl::{to,from}Punycode as deprecated since 5.0
These functions are now aliases to {to,from}Ace, which are usually
what you want. The original functions from Qt 4.0 had the wrong
semantics and wrong name. The new ones from Qt 4.2 execute the ACE
processing from IDNA (specifically, the ToASCII and ToUnicode
operations described in the RFC).
But so as not to be without tests, export the tests in unit testing
environment and test the punycode roundtrip. Note that the
tst_QUrl::idna_test_suite test tests *only* the Punycode roundtrip,
not the nameprepping.
Change-Id: I9b95b4bd07b4425344a5c6ef5cce7cfcb9846d3e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Fri, 2 Sep 2011 18:09:35 +0000 (20:09 +0200)]
Move the QByteArray-based percent-encoding activities to QByteArray
Copy the unit tests that related to percent-encoding to
tst_qbytearray.cpp and use public functions to execute
QUrl::fromPercentEncoded and QUrl::toPercentEncoded.
Change-Id: I6639ea566d82dabeb91280177a854e89e18f6f8d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Jędrzej Nowacki [Tue, 27 Mar 2012 10:27:54 +0000 (12:27 +0200)]
Make QArrayData::shared_null zero terminated.
This is expected by QByteArray and QString
Change-Id: Ib668b144bdc0d2c793018c8f8d794f249eaf935c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Jędrzej Nowacki [Tue, 27 Mar 2012 10:30:50 +0000 (12:30 +0200)]
Remove compression support from moc.
Moc doesn't compress anything so it doesn't have to link against zlib.
In practice it is a build fix for a bug exposed by previous patches.
Change-Id: I0debfccc903b3addd7c16be8421a51b6be9ceb2f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Jędrzej Nowacki [Tue, 27 Mar 2012 12:23:38 +0000 (14:23 +0200)]
Add an assert to QMetaObjectBuilder.
Constructors and destructors don't have a return value, but every other
method return at least "void".
Change-Id: Ie621aff83e44c187e950910d5c0684ba1a6579b8
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Jędrzej Nowacki [Tue, 27 Mar 2012 09:21:27 +0000 (11:21 +0200)]
Compile QArrayData in bootstrap phase.
This change will be needed during migration from QByteArrayData to
QArrayData.
Change-Id: I0c8d6f9ed3ef7c33af62736af55259a8f9a70c0f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thiago Macieira [Thu, 29 Mar 2012 00:03:38 +0000 (21:03 -0300)]
Fix operator precedence order.
Clang (I guess it was clang) reports:
io/qipaddress.cpp:276:34: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]
Fix the precedence by wrapping the ternary expression in parentheses.
Change-Id: I1c995dc8e2b1b831480ea8f8a695f7f89c08fcac
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Thiago Macieira [Sat, 31 Dec 2011 02:16:13 +0000 (00:16 -0200)]
Make qsimd.cpp also complain if required features are missing
Record in a variable the features that the compiler used for code
generation when Qt was compiled. Then complain if those are
missing. This is required in qdrawhelper_plain.cpp to make it disable
the plain build, keeping only the AVX, Neon or SSE2 builds. This code
works for GCC, ICC on Unix and Clang.
MSVC support is pending. It will involve defining the same macros
from qsimd_p.h when the compiler support is detected.
Other compilers are unknown. The only relevant one would be Sun Studio
for x86, but I have no access to it to find out what macros it
predefines.
Change-Id: I25f2d90b3c7ac7bd0442f4b349b6ee3bd751a95b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
João Abecasis [Tue, 27 Mar 2012 15:32:43 +0000 (17:32 +0200)]
Clean up and make robust the file loading code
The used_mmap variable was set to true the first time an mmap operation
was successful, but it was never reset back to false. While that can be
a good indicator that future calls might succeed it is not a guarantee.
Not properly resetting could mean we'd unmap memory allocated with new,
instead of deleting it.
Since that variable is only used inside defined(QT_USE_MMAP) blocks, its
declaration is scoped the same way.
While mmap is still handled "by hand", use QFile for the other
operations. Calling mmap here is less than ideal, as it prevents use of
other memory mapping methods, such as native Windows APIs, but is less
intrusive as it allows QTranslator to retain control over lifetime of
the map. Using QFile for remaining operations reduces the number of
filesystem operations.
The file size is now checked to be minimally sane (<4GB), the limit of
the 32-bit variable that will hold mapping's length. Translation files
should be expected to be much smaller in practice, but there isn't a
sane hard-limit. The file format is broken down to sections, each of
which has a 32-bit length.
Finally, when loading a file fails, release resources immediately,
instead of delaying to next load attempt or the destructor.
Change-Id: I5cc1b626a99d229e8861eb0fbafc42b928b6a122
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thiago Macieira [Mon, 17 Oct 2011 11:41:19 +0000 (13:41 +0200)]
Port QHostAddress to use the new IP utilities in QtCore
The new code now generates lowercase hex instead of uppercase, so
adapt the unit tests to pass.
Also, "123.0.0" is now considered valid (compatibility with inet_aton).
Change-Id: I07b5125abf60106dc5e706033d60836fb690a41f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Fri, 14 Oct 2011 15:12:34 +0000 (17:12 +0200)]
Add support for IPv6 parsing and reconstructing the address
Similarly, only test against the libc function on Linux, as other OS
sometimes have different behaviour.
Change-Id: I9b8ef9a3d660a59882396d695202865ca307e528
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Thu, 13 Oct 2011 20:49:19 +0000 (22:49 +0200)]
Add a function to parse IPv4 addresses in QtCore
In the unit test, check against inet_aton on Linux with GLIBC
only. Other platforms have this function too, but they sometimes have
different behaviour, so don't try to test them equally.
Change-Id: I1a77e405ac7e713d4cf1cee03ea5ce17fb47feef
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Mon, 26 Mar 2012 17:57:40 +0000 (14:57 -0300)]
Remove the -no-stl option from configure
This was decided on the mailing list. See:
http://lists.qt-project.org/pipermail/development/2012-March/002442.html
http://lists.qt-project.org/pipermail/development/2012-March/002465.html
Change-Id: I7681e5cc743b20f6d4e29d2aea45c50df41a0b98
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Thu, 29 Dec 2011 20:09:46 +0000 (18:09 -0200)]
Remove the old code using MMX registers.
There are only 8 MMX registers, each 64-bit wide, and they alias the
x87 registers. The access to the MMX register cannot use the new
VEX-prefix instructions either.
All of the functions being replaced are either present in the
qdrawhelper_sse2.cpp and qdrawhelper_ssse3.cpp files, or the plain C++
function in qdrawhelper.cpp is vectorised when compiled with
-ftree-vectorize (enabled in -O3), if SSE2 support is enabled.
All x86-64 processors have SSE2, so this is a net improvement for
64-bit builds. For 32-bit builds, without further support this will
cause the code to use non-vector or x87 instructions, which aren't the
best. The solution will come in another commit.
Change-Id: I4a22d8a2516b79172867510202d0fd627db54807
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Debao Zhang [Sat, 24 Mar 2012 01:19:27 +0000 (18:19 -0700)]
Remove WA_PaintOutsidePaintEvent
WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code
to Qt 4 under X11 platform. and it has been broken now.
Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Debao Zhang [Fri, 23 Mar 2012 21:43:07 +0000 (14:43 -0700)]
Remove AutoCompatConnection
The default type when Qt 3 support is enabled. Same as
AutoConnection but will also cause warnings to be output in
certain situations.
Change-Id: I64bf3c39a740afb716820bfd3173936fda213f4a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
David Faure [Sun, 25 Mar 2012 11:10:48 +0000 (13:10 +0200)]
Allow auto tests to stay away from the user's configuration.
QStandardPaths now knows a "test mode" which changes writable locations
to point to test directories, in order to prevent auto tests from reading from
or writing to the current user's configuration.
This affects the locations into which test programs might write files:
GenericDataLocation, DataLocation, ConfigLocation,
GenericCacheLocation, CacheLocation.
Other locations are not affected.
Change-Id: I29606c2e74714360edd871a8c387a5c1ef7d1f54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
João Abecasis [Tue, 27 Mar 2012 10:49:00 +0000 (12:49 +0200)]
Ensure QTypedArrayData is just a shim over QArrayData
Change-Id: I6f41ca054d0e0a0c4642f0b841b3b3df9559f818
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
João Abecasis [Thu, 22 Mar 2012 00:28:30 +0000 (01:28 +0100)]
Improve output on test failures
This adds checks to ensure Q_ALIGNOF is returning the desired alignment
for explicitly-aligned types.
The alignment check is now inlined in the test inside QCOMPARE so we get
slightly more informative errors:
FAIL! : tst_Collections::alignment() Compared values are not the same
Actual (quintptr(&it.value()) % Value::PreferredAlignment): 64
Expected (quintptr(0)): 0
Loc: [tst_collections.cpp(3384)]
In this case, this is enough to notice "non-native" alignments are being
requested. Having test parameters otherwise hidden in template arguments
doesn't help the situation.
Change-Id: I05267fd25b71f183cfb98fb5b0a7dfd6c28da816
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Thu, 22 Mar 2012 00:22:41 +0000 (01:22 +0100)]
Silence unused comparison result warnings (clang)
The intent is to force instantiation of template container classes and
semantics or behaviour are otherwise irrelevant in this context.
tst_collections.cpp:3036:15: warning: inequality comparison result unused
tst_collections.cpp:3037:15: warning: equality comparison result unused
tst_collections.cpp:3100:15: warning: inequality comparison result unused
tst_collections.cpp:3101:15: warning: equality comparison result unused
Change-Id: I70ad38b18dcbc43879e36a34b1da460aee5f7b07
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Thu, 22 Mar 2012 00:19:34 +0000 (01:19 +0100)]
Fix loop conditions, after warnings from clang
tst_qmap.cpp:697:43: warning: inequality comparison result unused
tst_qmap.cpp:717:50: warning: inequality comparison result unused
Change-Id: I300f9e10b7748306b99c3c8c38f3cc2661a569ad
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Tue, 27 Mar 2012 15:14:14 +0000 (12:14 -0300)]
Don't hardcode the order of elements in QHashes
Instead use QMap if we want a stable order.
Task-number: QTBUG-24995
Change-Id: I93f643df236f5078768f539615fa47163e5262e8
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thiago Macieira [Sun, 31 Jul 2011 22:41:18 +0000 (19:41 -0300)]
Unit-test the additional QBasicAtomicXXX expansions
Test that they do expand properly and don't produce errors. This is
templated code, so it doesn't get tested fully unless we instantiate
them.
Also check that the alignments are correct.
Change-Id: I2a8ee2165167f54b652b4227411e209850974b8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Stephen Kelly [Wed, 21 Mar 2012 19:42:50 +0000 (20:42 +0100)]
Remove workaround for QComboBox not having a USER property.
QComboBox does in fact have a user property
since
b1b87a73012342dc1619a8e907ea9954d59ca564.
Change-Id: I24eb2ef267cec5d8a9f7348954b703fa6df04fa5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
Stephen Kelly [Wed, 21 Mar 2012 19:41:57 +0000 (20:41 +0100)]
Add USER properties to QDateEdit and QTimeEdit.
Both classes had such components before, but there were issues with
the NOTIFY signal not being in the same class as the Q_PROPERTY.
This patch solves that problem by using a signal of a different name.
Task-number: QTBUG-15731
Change-Id: Ibc7ce4dba8a6b88c05d62a90e14d0101c5cd3082
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Thiago Macieira [Mon, 27 Feb 2012 15:01:53 +0000 (16:01 +0100)]
Unify the atomic implementation for x86 architectures
It's almost exactly the same code in both files, so let's have one file
only. That means we need an #ifdef for the special case of 64-bit types
on i386.
Also take the opportunity to add a comment explaining how this works.
Change-Id: I50d274fa026806ae511b1045aa8a5c25daaa0edc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Mon, 27 Feb 2012 14:32:47 +0000 (15:32 +0100)]
Rename qatomic_x86_64.h to qatomic_x86.h
This is the first step in merging the i386 and x86-64
architectures. The next commit will bring i386 support into
qatomic_x86.h.
Change-Id: I24105ea70f3fc29b3fb779a70053f99117440573
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
João Abecasis [Tue, 27 Mar 2012 13:26:19 +0000 (15:26 +0200)]
Fail when no translations found, reset pointers on failure
We don't want to be using or trusting partial loads.
Change-Id: I3934d6cf54cd99eaab2fa7aee9a0e9968d9f3c13
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Tue, 27 Mar 2012 11:18:03 +0000 (13:18 +0200)]
Use Big-Endian conversion functions from qendian.h
These avoids repeating code and documents that the underlying format is
compacted big-endian.
Change-Id: I5a2dc0084945d99368183203a0a9b7c116874620
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Tue, 27 Mar 2012 11:07:10 +0000 (13:07 +0200)]
Remove unused argument
The mode argument (third argument to (_)open) is only used when
(_)O_CREAT is also specified. As we're opening the file read-only it is
unused and unnecessary.
Change-Id: Icc16edec5a7d44c57ad02865048c56114c39d4bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Tue, 27 Mar 2012 11:01:28 +0000 (13:01 +0200)]
There's no need to check pre-validated input
elfHash and friends are used solely from do_translate, which already
checks for null strings. There's no need to do it again here.
Change-Id: I90a16d2623ca753a444e53952539001988568bdb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Tue, 27 Mar 2012 10:59:24 +0000 (12:59 +0200)]
Use accumulating hash, instead of allocating intermediate string
Change-Id: Ie93ac8df3066159ad11ff7f68c7ba85e7f5aa8bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Thu, 22 Mar 2012 00:38:48 +0000 (01:38 +0100)]
Make QTranslator testcase independent of Widgets
There isn't really a need for the dependency as LanguageChange events can be
caught in QObject::eventFilter, directly.
Change-Id: I39778fbe1663924d97705b514ae399cfd3749776
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
João Abecasis [Tue, 27 Mar 2012 16:08:09 +0000 (18:08 +0200)]
Avoid overflow in boundary check
Change-Id: I4f397795a65d5d6ea237a6751588a8dc6be15bdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Kent Hansen [Tue, 27 Mar 2012 14:19:29 +0000 (16:19 +0200)]
Merge master into api_changes
Conflicts:
src/corelib/global/qisenum.h
src/dbus/qdbusconnection_p.h
src/widgets/kernel/qwidget.cpp
tests/auto/other/qaccessibility/tst_qaccessibility.cpp
Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
Thiago Macieira [Mon, 26 Mar 2012 13:37:06 +0000 (10:37 -0300)]
Disable ICC diagnostic 2261 about __assume with side-effects
The warning is presented now that we use __assume in every
Q_ASSERT. It presents itself in code that calls functions, like:
tools/qbitarray.h(128): warning #2261: __assume expression with side effects discarded
{ Q_ASSERT(i >= 0 && i < size());
^
Change-Id: I5851b3c35b56c00b9c541c2489233121ef621e04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Girish Ramakrishnan [Tue, 20 Mar 2012 21:02:21 +0000 (14:02 -0700)]
device: Add -device and -device-option to configure
For some reference platforms and SDKs we will need to pass in
extra paths. Currently users have to modify the mkspec to adjust
paths or set environment variables that will be picked up.
This change introduces the -device <name> and -device-option
<key=value> option. The key value pairs will be written to a
qdevice.pri and can be used by the qmake.conf of the device spec.
The reason to not save the key value pairs in qconfig.pri is
becase of the fact that the device spec loads the qdevice.pri
earlier than the qconfig.pri. qdevice.pri allows the mkspec
to set the compiler flags and qconfig.pri allows configure to
add to those compiler flags.
Done-with: Holger Freyther
Change-Id: I931a197b8be72397e1eedfee09502eefc01c9d4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Rohan McGovern [Mon, 26 Mar 2012 23:34:48 +0000 (09:34 +1000)]
Mark tst_qdialog as insignificant on mac.
This autotest gives different results on consecutive runs, and is
therefore insignificant for the purpose of detecting regressions.
Task-number: QTBUG-24977
Change-Id: I5c4dfd663ce5df6b60ae47a29d332c06e3c0585f
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Marius Storm-Olsen [Wed, 21 Mar 2012 10:09:59 +0000 (11:09 +0100)]
Sync configure with Unix version (-make/-nomake)
Move previous -make <exe> feature to -make-tool <exe>
Change-Id: I1cbc87e60e2588fd8b2a11c11178988003cac7c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Jason McDonald [Mon, 26 Mar 2012 09:59:56 +0000 (19:59 +1000)]
Make QWidget::mapTo/mapFrom() take const pointers.
This commit addresses a long-standing Qt 5 to-do. Whilst a trivial
change, it is binary incompatible.
Task-number: QTBUG-665
Change-Id: I4294233d876dec79eda57113bdf298ce73643e76
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Jason McDonald [Mon, 26 Mar 2012 09:09:49 +0000 (19:09 +1000)]
Make QWidget::isEnabledTo() and isVisibleTo() to take const pointers.
This commit addresses a long-standing Qt 5 to-do comment. Whilst a
trivial change, it is binary incompatible.
Task-number: QTBUG-259
Change-Id: I2fc7bfda488318dbabbbea9f5ff9d2b1d6ce0784
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Jason McDonald [Mon, 26 Mar 2012 15:05:41 +0000 (01:05 +1000)]
Make QGridLayout::getItemPosition() const.
This commit addresses a long-standing Qt 5 to-do. Whilst a trivial
change, it is binary incompatible.
Task-number: QTBUG-1433
Change-Id: I6e31e47fd5791cb6f1373e2696ffc95f7174f0b0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Thu, 22 Mar 2012 22:34:41 +0000 (19:34 -0300)]
Add support for detecting SSE2 and SSE3 on WinCE
Change-Id: Ic26ba2073d1f1d7e12338811b86f9b99ea8f1eac
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Mon, 26 Mar 2012 09:58:01 +0000 (11:58 +0200)]
Cocoa: initialize QCocoaEventDispacherPrivate::lastSerial
This silences warnings from valgrind about a conditional depending on an
uninitialized value.
Change-Id: I819a44ed5dc02e163c00849811870c94f66b6651
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Thiago Macieira [Sun, 25 Dec 2011 21:30:15 +0000 (19:30 -0200)]
Use ADD/SUB instructions on x86 and x86-64 atomics instead of INC/DEC
According to the Intel Optimization Manual section 3.5.1.1 Use of INC
and DEC Instructions, those instructions modify only part of the flags
register, so they mey introduce unnecessary data dependencies on
previous flag-setting operations so that the resulting flags are
computed. Preferring ADD and SUB (rule 33) is recommended.
However, we don't do it for 16-bit integers. The reason is that the
presence of the 0x66 prefix may trigger a slower decoding codepath in
the processor (up to 6 cycles, as opposed to 1). The same Intel manual
talks about Length-Changing Prefix, which applies in particular to
instructions with 16-bit immediates. The assembler generally produces
uses the 8-bit immediate variant of the ADD and SUB instructions, but
to be on the safe side, we prefer to use INC and DEC here.
Change-Id: Ic03236ac600a5b4e087614d21df5d3c666ae064e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Sun, 8 Jan 2012 22:45:11 +0000 (20:45 -0200)]
Fix the 64-bit i386 atomic according to assembly output
The assembly output showed that GCC was generating some wrong code in
some conditions, so update the constraints so it will do the right
thing: the expectedValue constraint needs to be in/out with early
clobber. In/out because cmpxchg8b really does produce output and, even
if we don't care about it, GCC needs to be told that the registers
used (EAX:EDX) were modified. The early clobber is necessary so it
won't schedule EAX or EDX to be the same as the EBX_reg (the register
we'll xchg EBX with).
Since EAX and EDX are in/out and EBX can't be used, the only remaining
low register for the "sete" instruction is CL. So use it directly and
set ECX to be in/out too.
For whatever reason, it can't find enough registers in debug mode and
this expansion doesn't work. It looks like a bug though, since this
requires 4 registers and one memory operand and in debug mode it must
have EAX, ECX, EDX, ESI and EDI free for use. One of ESI or EDI is
used to xchg EBX with, which means there must be at least one more
free general register.
Change-Id: I1f11e68d776bf9ad216b34ca316a53129122fabe
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Fri, 23 Mar 2012 22:16:23 +0000 (19:16 -0300)]
Remove old code that was for the MIPSpro compiler
That compiler is no longer supported
Change-Id: I6ff9003a8b986478850ad2e6e6662a44264236d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thiago Macieira [Thu, 1 Mar 2012 16:44:34 +0000 (17:44 +0100)]
Fix annoying deprecation warning about QImageTextKeyLang
If we deprecate the entire class, then we get the warning for every use
of it with GCC, including the three operators defined inside the class.
So instead, mark as only the constructors as deprecated, which should
reduce the warnings to the places where the class was instantiated.
That should be enough to poison the code enough: to fix the warning, you
need to stop using the class there and/or stop calling one of the
deprecated functions that deal with it.
Unfortunately, we still get one more warning inside the inline code, in
QImage::textList. To remove that warning, we disable all deprecation
warnings around that code block.
Change-Id: If3c11647a9d2cab055e15810d7cfe0d8f5e7042f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Bai Jing [Mon, 26 Mar 2012 09:32:52 +0000 (11:32 +0200)]
let qtPrepareTool give right path for app_bundle
Change-Id: Ieb4979244d741c9d9d0c11a035c18ced87ea28f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Rafael Roquetto [Mon, 19 Mar 2012 16:30:28 +0000 (17:30 +0100)]
Blackberry mkspecs
Unlike QNX mkspecs, these mkspecs target more specific, BlackBerry-only
devices. So far, the only difference is the definition of Q_OS_BLACKBERRY
and linking with -lbps, but this will likely change with time. It will also
allow conditional compilation to distinguish between qnx and blackberry
devices.
Change-Id: Ia44e9b4059f720c308240e9dac7e90f7ae7920d0
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Bradley T. Hughes [Wed, 21 Mar 2012 09:30:53 +0000 (10:30 +0100)]
Cocoa: Remove unused qt_mac_is_sheet() function
The static qt_mac_is_sheet() function in qcocoafiledialoghelper.mm was
not called anywhere, remove it.
Change-Id: I88785e15aa17ae9c9ffbc33eba30433c8834b798
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Wed, 21 Mar 2012 09:29:24 +0000 (10:29 +0100)]
Cocoa: silence warnings about unused variables
Silence warnings about unused function parameters and local variables
while building the Cocoa platform plugin.
Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Tue, 20 Mar 2012 12:30:10 +0000 (13:30 +0100)]
Cocoa: silence warnings from QCocoaBackingStore
Remove unused (and misspelled) flipedRect() function, as well as several
unused variables.
Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Fri, 23 Mar 2012 11:53:35 +0000 (12:53 +0100)]
Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly
clearNSWindow() should also clear the delegate and remove the
contentView from the window, since we are no longer using that window.
Make sure the QCocoaWindow::~QCocoaWindow() doesn't release the
m_contentView until after clearNSWindow(), to avoid crashes while
trying to cleanup the window and view.
Change-Id: Ia081488f629a4fd4cf10fb1053fb8183b1914d35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Donald Carr [Fri, 23 Mar 2012 21:29:34 +0000 (21:29 +0000)]
Reunite NAS support in configure with QSound
RIP
Change-Id: I7c47052ce4962f10dbcbbb8d48f05b3158d4a69a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Bradley T. Hughes [Wed, 21 Mar 2012 08:43:45 +0000 (09:43 +0100)]
Cocoa: don't show window when calling raise()
Calling raise() on a hidden window should not show it. The setVisible()
function will ensure that the window is raised (since we use orderFront
or makeKeyAndOrderFront). This fixes the failing
tst_QDockWidget::task169808_setFloating() test as well.
Task-number: QTBUG-24774
Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Lars Knoll [Thu, 22 Mar 2012 09:53:45 +0000 (10:53 +0100)]
Fix measurement system for the UK
THe UK still uses the Imperial system at least for distances
and many other things.
Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Pekka Vuorela [Fri, 16 Mar 2012 12:08:13 +0000 (14:08 +0200)]
Password editor mask delay stylable by platform plugin
Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with
a style hint.
Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Laszlo Agocs [Sat, 24 Mar 2012 08:48:12 +0000 (10:48 +0200)]
Test mouse events more thoroughly in QWindow autotest
Apparently there are still issues here and there (e.g. in declarative)
with properly recognizing more complex event sequences (like triple
clicks). The behavior of qtbase is correct but we need a test case
that makes sure the functionality will not regress.
Change-Id: I08c558fcfdde0dd06e194b4f0affc6f6896573bf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Bradley T. Hughes [Wed, 21 Mar 2012 09:49:39 +0000 (10:49 +0100)]
Cocoa: reimplement QPlatformWindow::setOpacity()
Qt and Cocoa opacity levels are compatible, so we just need to forward
the setOpacity() argument to [NSWindow setAlphaValue]
Change-Id: I5fd5678894fd6949811ad1c4b493e592561f01f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Thu, 22 Mar 2012 12:14:24 +0000 (13:14 +0100)]
Fix for fontconfig 2.9 behavior change
Start from 2.9, fontconfig will reset the result to FcResultNoMatch at
the beginning of FcFontSort().
According to
http://lists.freedesktop.org/archives/fontconfig/2012-March/003857.html
the result value of FcFontSort() can be ignored, checking the nfont
value of the fontset returned is sufficient.
The fix works for pre-2.9 versions as well, since those versions don't
touch the result at all.
Change-Id: Iba6c1157e314088a90867292a4bd970bb873e284
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Eskil Abrahamsen Blomfeldt [Fri, 23 Mar 2012 13:45:51 +0000 (14:45 +0100)]
Remove dummy impl. of shared graphics cache in XCB plugin
This implementation was disabled and didn't really work
properly, so it doesn't make sense to update or do
bug fixes to it. Removing it completely instead.
Change-Id: I62abe35f0f9a91bb207b87296d25c3c62d58228e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Bradley T. Hughes [Tue, 20 Mar 2012 12:27:07 +0000 (13:27 +0100)]
Cocoa: reimplement QPlatformBackingStore::scroll()
Use qt_scrollImageInRect() from QtGui to accelerate scrolling in the
Cocoa plugin.
Change-Id: I8ad1377ed3307345f72d17c72049cec5472c97d3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Thu, 22 Mar 2012 16:43:25 +0000 (17:43 +0100)]
Fix QGuiApplication::keyboardModifiers()
Make sure that the keybaord modifiers are maintained properly when
handling window system events.
Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Bradley T. Hughes [Thu, 22 Mar 2012 16:39:30 +0000 (17:39 +0100)]
Cocoa: send key events for modifier keys
Implement -flagsChanged: in QNSView so that we can calculate the
necessary modifier key events to send.
Change-Id: I3de89537d6e22b4a6d69ae646a71d9722dd9f82a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Wed, 21 Mar 2012 09:38:32 +0000 (10:38 +0100)]
Cocoa: keep a NSWindow pointer in QCocoaWindow
The NSWindow we create could either be a QNSWindow (our NSWindow
subclass) or a QNSPanel (our NSPanel subclass).
Change-Id: I6e5c18328bf0fd1786a042d1fddc5b3e8be17f89
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Sarah Smith [Wed, 21 Mar 2012 06:45:32 +0000 (16:45 +1000)]
Fix qtnamespace compile break on Mac.
Appears as though the QT_NAMESPACE macros are incorrect here.
In fact in qisenum.h because the #define is no respecter of a namespace
in most of these conditional compile cases they will be ignored
effectively. The QT_HEADER also - if qtypetraits.h conditional compile
occurs then it will result in adding extern "C" { twice. For the macros
invoking them will not cause the extern "C" { to be used anyway, so just
remove this altogether.
Task-number: QTBUG-24903
Change-Id: I710dc330f58357f395241a0cf3172e41a5864576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Kurt Korbatits [Thu, 22 Mar 2012 03:12:21 +0000 (13:12 +1000)]
Fixed qthreadstorage unittest to work from install directory
- Added install of crashonexit sub program
Change-Id: I2cc3043d5c1b879665930552487b4fe54407fd25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Thiago Macieira [Thu, 29 Dec 2011 21:53:30 +0000 (19:53 -0200)]
Remove the Q_STATIC_TEMPLATE_SPECIALIZATION macro
This was necessary only for older MS Visual Studio versions, which are
no longer supported anyway.
Change-Id: I6c96fb2340296c34b480716303c93b892419229b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thiago Macieira [Fri, 11 Nov 2011 19:55:46 +0000 (17:55 -0200)]
Remove the use of a template qUnused function for ICC
ICC 12 does not seem to need this.
Change-Id: I98e9d530e767c4d24424f0c2b5d763f863e85fe4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thiago Macieira [Wed, 19 Oct 2011 21:41:17 +0000 (23:41 +0200)]
Work around what apparently is a GCC 4.6.0 bug
The QFlags::operator int() isn't being called, so GCC complains that
this isn't an integer expression.
Change-Id: I537d06fd4a52ecbcddf0ef67807b298c42d3e911
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
João Abecasis [Wed, 21 Mar 2012 17:09:09 +0000 (18:09 +0100)]
Enable endianness conversions on q(u)int8
Lack of support for these types is not a real issue as endian
conversions on byte-sized types are no-ops. Still, the conversions are
useful as they facilitate writing of generic code. They can also be used
explicitly as a way to document in code an endian-specific binary
format:
uchar *data;
quint8 tag = qFromLittleEndian<quint8>(data++);
quint32 size = qFromLittleEndian<quint32>(data);
This commit also adds a test for functions documented in the QtEndian
header.
Change-Id: I2f6c876ce89d2adb8c03a1c8a25921d225bf6f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Frederik Gladhorn [Wed, 14 Mar 2012 13:01:54 +0000 (14:01 +0100)]
Improve accessibility test to handle more text events.
Change-Id: I67ece6c9bb755e84c786b32e8e3396eaf634fda1
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Thiago Macieira [Tue, 28 Feb 2012 13:55:22 +0000 (14:55 +0100)]
Use private futexes for QMutex on Linux if they're available
Futexes on Linux can be used across processes, for inter-process
synchronisation. The private flag tells the kernel that this futex is
not used with other processes, so it does not need to check for waiters
outside the current process.
This feature had been proposed in Merge Request 25, but was lost.
Change-Id: Ieafa8b8df0949bd9ae73709b3ec63f7709b0b2a6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Samuel Rødal [Fri, 23 Mar 2012 07:00:11 +0000 (08:00 +0100)]
Use XCB_TIME_CURRENT_TIME instead of CurrentTime from X.h in xcb plugin.
The less X header dependencies the better, we might at some time in the
future be able to do without the XCB_USE_XLIB define as well.
Change-Id: Ib45986036febef70798851ee8455e054eafc9d22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>