Commit Graph

6087 Commits

Author SHA1 Message Date
Simjees Abraham
91bdfd3020 irrelevant qDebugs from QGuiApplication removed.
removed the qDebugs that are not relevant for the user and were printed when the
app was started from QtCreator.

Change-Id: Iae49d6c780a4d3cfd55b3e149555294e150f3f52
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-28 17:22:39 +02:00
Thiago Macieira
4fc7474805 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>
2012-03-28 16:31:34 +02:00
Thiago Macieira
826c0723c1 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>
2012-03-28 16:31:34 +02:00
Thiago Macieira
70db6233e7 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>
2012-03-28 16:31:34 +02:00
Thiago Macieira
7adbc9b234 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>
2012-03-28 16:31:34 +02:00
Thiago Macieira
d43fe0b672 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>
2012-03-28 14:54:12 +02:00
Martin Petersson
b754deb055 QNam: try to read the last CRLF when chunked encoding is used.
When chunked encoding is used we should try to read the last CRLF after
the last zero-lenght chunk, with chunk size coded as 0.

Task-number: QTBUG-19480
Task-number: QTBUG-20924
Change-Id: Ida40593fec8788bff713a31cfe6a7c2d86354a91
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-28 13:22:11 +02:00
Friedemann Kleint
b2d205b587 Windows: Fix handling of -nomake.
Add to list of disabled build parts (see
b9a498bf51).
This fixes the tests are currently built in developer-build
despite "-nomake tests".

Change-Id: I43282112e03328dd89d8c874ca31b0483742ddb3
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-28 13:01:01 +02:00
Debao Zhang
d2b1c2ef1f 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>
2012-03-28 11:22:11 +02:00
Debao Zhang
5e80eb7917 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>
2012-03-28 11:22:11 +02:00
David Faure
a5a80da223 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>
2012-03-28 11:22:11 +02:00
Bradley T. Hughes
448b9c00be windowmodality test: Allow exec() with ApplicationModal dialogs
Add a checkbox to the main window and dialog .ui files to allow
exec()ing ApplicationModal dialogs.

Change-Id: I4d8a4be136d0f6b688938a8020a6ebcc69a9dfe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-28 09:42:00 +02:00
Frederik Gladhorn
6c45614cbe Add missing accessible child id.
In the deprecated function the child parameter got lost.

Change-Id: Ieeef19100bffaaa6079185dae6ae5bf82dcd7a60
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-28 09:42:00 +02:00
João Abecasis
99e7ad660f Ensure QTypedArrayData is just a shim over QArrayData
Change-Id: I6f41ca054d0e0a0c4642f0b841b3b3df9559f818
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-28 09:37:27 +02:00
João Abecasis
7c9e345551 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>
2012-03-28 09:36:52 +02:00
João Abecasis
049157f4f1 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>
2012-03-28 09:36:43 +02:00
João Abecasis
9596f591b6 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>
2012-03-28 09:36:33 +02:00
hjk
6d13e9f295 Use "qt-project.org" instead of "trolltech" in the resource system
Task-number: QTBUG-23272

Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-28 07:50:06 +02:00
Casper van Donderen
3198247ccf qdoc: also allow \page index as head of ditamap.
QDoc previously only supported having \page index.html as root of the
ditamap, this is hard to understand.

Change-Id: I9f99bf53440aad372bb72b59e7bfa1a0427cb652
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
89be197b92 qdoc: Add CLI option to not generate example docs.
Change-Id: I059ae76430adada020d338905b39ba3089c89615
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
419b4abed6 qdoc: Rename QML classes to QML types in ditamap.
Change-Id: I7b1a10d0d25a0a79fb018ab9138f2ef32470475d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
1f742095ce qdoc: Do not write index.dita multiple times in ditamap.
Change-Id: I69719237d0ab567ce2a606c96b38f6baa2a601b5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
291f436ab6 qdoc: Implement \uicontrol command.
Change-Id: I10381cd69d32352c590ec5a7d4041465af57b88b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Thiago Macieira
bc4f74f586 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>
2012-03-28 04:07:16 +02:00
Stephen Kelly
32068cb707 Remove comment about QVariantList and QVariantMap.
They predate Qt 4.5, but it looks like the comments are indicating
that QVariantList and QVariantMap types will use the basic template,
but that is not the case. Instead they will use the compare
specializations for QList<T> and QMap<T> respectively.

Change-Id: Iebf7e9b8aaa8a699ea720090fbf641dfecde0ff7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-28 03:18:56 +02:00
Thiago Macieira
2cf466312b 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>
2012-03-28 02:16:39 +02:00
Stephen Kelly
dc6a1d186e 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>
2012-03-28 02:02:07 +02:00
Stephen Kelly
c3e1abad4e 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>
2012-03-28 02:01:49 +02:00
Thiago Macieira
e7a6dacf80 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>
2012-03-28 01:51:40 +02:00
Thiago Macieira
4408d0ccd8 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>
2012-03-28 01:51:38 +02:00
David Faure
e5d5495526 Make QCoreApplication::applicationName() default to argv[0]
This makes it more useful in all the Qt apps that don't set it,
given that it's used internally by QTemporaryFile, QTemporaryDir,
QStandardPaths, QDBus, QAccessibleApplication, etc.

Qt4 compatibility in the deprecated QDesktopServices is preserved,
no fallback there.

Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
df43b9a06a Don't use the pri depends line for link dependencies.
That is not what depends is for.

Change-Id: Iabf93e890f009bd6c8fcc18dde1891bf20a493f1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
4a6bf9d941 Prefix the variables for debug and release types properly.
Change-Id: I346992effa997f60a4fd20055f0af81d6a084095
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
878a661e31 Only create the cmake files if DESTDIR is non-empty.
This is the case for the winmain library.

Change-Id: I8f416e81ad8de4a1fb2f70a4ebc31c8351c81605
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
1ec383d01b Remove Qt5 TODO to change QListView semantics.
The comment was written before Qt5 was planned, so it might have
seemed like a good idea to change the semantic with Qt 5.0.

However, as Qt5 is intended to be close to Qt4 in behaviour, this
isn't really a 5.0 change. It can be done any time, but only
optionally and while retaining backwards compatibility.

Change-Id: I8c5c497d13a7ec6574e1cdb6bd411e8b28db876b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-28 00:51:32 +02:00
João Abecasis
d4c8509a83 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>
2012-03-28 00:44:30 +02:00
João Abecasis
5254f562b2 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>
2012-03-28 00:44:28 +02:00
João Abecasis
8fd09f456a 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>
2012-03-28 00:44:25 +02:00
João Abecasis
7a0793114b 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>
2012-03-28 00:44:23 +02:00
João Abecasis
d5020b8913 Use accumulating hash, instead of allocating intermediate string
Change-Id: Ie93ac8df3066159ad11ff7f68c7ba85e7f5aa8bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:20 +02:00
João Abecasis
2e92714090 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>
2012-03-28 00:44:16 +02:00
Pekka Vuorela
2744105419 Protect QAbstractTextDocumentLayout::anchorAt() from preedit
Previously the method didn't take into account that hitTest()
returns visual index, i.e. containing the preedit, and thus was easily
hitting assertion. Need to compensate for that before checking for actual
link.

Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-27 23:03:12 +02:00
João Abecasis
a30ee4598f Avoid overflow in boundary check
Change-Id: I4f397795a65d5d6ea237a6751588a8dc6be15bdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:42:18 +02:00
Thiago Macieira
5e4ed93b1c Stop erasing mkspecs/modules at every reconfigure.
Developers who are building & rebuilding Qt often end up needing to
recompile all other modules because of this removal even though the
libs are still compatible.

Change-Id: I4ec0e8ab222675dcd2a3f3a2b5e931c1c7f31f69
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Thiago Macieira
e2dfd2f4d2 Disable EGL (and thus EGLFS) if we're not using OpenGL ES
EGL support in src/platformsupport/eglconvenience requires OpenGL ES
to be enabled, so it makes no sense to test for the presence of EGL if
we're not enabling OpenGL ES.

EGLFS has similar requirements, so ensure it gets disabled
too. Otherwise we're going to get lots of undefined symbols in the
EGLFS plugin to things in QtPlatformSupport that did not get compiled
in either.

Change-Id: Ie55dd2e2597ec0594aa589ee8aac150c71104b46
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Rafael Roquetto
b0b36cc53c Fix scopes on iconv related pro/pri files
Ensure corelib and the iconv configure test link against libiconv on QNX-based
platforms. This now includes the Blackberry mkspecs which were
previously excluded.

Change-Id: I60677ab8506b7cf47f504b880bb1078036984e85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Robin Burchell
e6a7a6a381 Remove xlib plugin.
There's not much point having this with the xcb plugin being present, and xlib
is pretty much unmaintained / broken anyway.

Task-number: QTBUG-24913
Change-Id: I090a9a0e6d2f893c030574e23f1d59f610282bd3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 19:26:45 +02:00
Uli Schlachter
0af9217430 XCB: Simplify xcb error handling
Instead of getting errors just to feed them to the default error handle,
the corresponding unchecked request is used which automatically makes
errors go to the default error handler.

Change-Id: Ib213a860affb72de6f9896f68505e283a809d58f
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-27 19:26:45 +02:00
Bradley T. Hughes
aea0b24d69 Add manual test for window modality
This test allows us to recreate any modal scenario. Multiple top-level
windows with any depth of window and application modal dialogs is
possible.

Change-Id: Ieef2c557d2f9ad2d2b2d2b598e9415f4c1e2dcb5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 19:26:45 +02:00
Bradley T. Hughes
798ccb30cf Update documentation for QAbstractEventDispatcher::TimerInfo
This type is not a typedef anymore, it's a proper class.

Change-Id: I611df067f2983baf262d84a82fb98e61124956d2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-27 19:26:45 +02:00