Commit Graph

7853 Commits

Author SHA1 Message Date
Konrad Grochowski
b0a6c521ab proper filling when using Qt::TexturePattern
fix for using both Qt::OpaqueMode and
Qt::TexturePatter for filling

Task-number: QTBUG-19202
Change-Id: Ia92363cacaa51140fe78b542d9768aead81868ff
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-06-21 02:52:16 +02:00
Janne Anttila
5281cba808 Fix qitemview and qdatetimeedit autotest builds for WinCE.
Defined missing SPI_GETPLATFORMTYPE macro as it was done in for example
in qwidget and qaccesiblity test cases.

Change-Id: I33a1e0119848911fbc4830299fcc1854f5259e86
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-06-21 00:58:29 +02:00
Janne Anttila
db7bdcd976 Fix qdiriterator autotest build for WEC7.
Change-Id: I18b1bdd79905761eff7a5ddbe1c6538c33624a1f
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-06-21 00:58:26 +02:00
Samuel Rødal
ec2e99ead5 Fixed mouse grabbing preventing popups from being closed.
The pointer grabbing leads to fake Enter events being sent to the
Qt::Popup window, preventing it from closing since QWidget::underMouse()
returns true. We should only send Enter events if the mouse is actually
inside the widget.

Change-Id: I4ba3fb08943580f93ad4337ff0227becd647767e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-21 00:58:22 +02:00
Shane Kearns
98fd2eeb62 Handle fragmented responses on SOCKS5 control channel
Server responses may arrive in more than one packet, though this
is rare due to nagle algorithm.
Also fixed IPv6 addresses being discarded from server responses,
which was caught by the new autotest.

Task-number: QTBUG-18564

Change-Id: I32d9e2978037fb3e1fff27b7e618b5da6d222f28
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-06-21 00:58:19 +02:00
Janne Anttila
d527f2b933 Fix qfile autotest build for WEC7
Change-Id: I6c4b4c91ea841ccb91ad685510caaecaf51baced
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-21 00:58:16 +02:00
Chris Adams
d8ad516150 Add new benchmark metrics to testlib
QElapsedTimer provides nanosecond-resolution elapsed timing, which
allows for finer granularity benchmark reporting.  Also, clients
may also wish to benchmark the memory usage of a particular component,
but no metric currently exists which matches that requirement.

This commit adds the WalltimeNanoseconds and BytesAllocated metrics
to meet these needs.  It is intended for manual use by clients via
setBenchmarkResult() only.

Change-Id: Ib37ada374e265c857eda02d047d51d436618e4a7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-06-21 00:58:12 +02:00
Daniel Molkentin
78a4c46842 Doc: tmake -> qmake, it's about time
Pushing this before 5.0 since it will most certainly
trigger a major recompile, which is probably why
this has never been changed.

Change-Id: I5fd90537d3b754d0a8a1b522d66183513693e0af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-21 00:58:10 +02:00
Shane Kearns
4f578d15fe Change default Content-Type for http POST to match 4.7.4
Qt 4.7.3 sent no Content-Type header by default.
This was fixed independently on 4.8.0 and 4.7.4 branches, with
different defaults.
Since this is often used for web service logins, the 4.7.4
default of x-www-form-urlencoded seems more likely to work.

The warning message is left in place, since not specifying the
content type is still an application bug.

Task-number: QTBUG-23350
Change-Id: I30bf50fd216ee9894d0168e904cea1ed4251ec68
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-06-21 00:58:05 +02:00
Girish Ramakrishnan
3401e91be0 Remove references to Q_WS_QWS
Affected code includes:
src/widgets/dialogs/qmessagebox.cpp
src/widgets/graphicsview/qgraphicsitem.cpp
src/widgets/kernel/qapplication_p.h
src/widgets/kernel/qwhatsthis.cpp
src/widgets/kernel/qwidget.h
src/widgets/widgets/qdockwidget.cpp

Change-Id: Ib9e920b3cc1253b39e4e00d7137c21321ecc0399
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
Girish Ramakrishnan
994192643a plastique: Use QPlatformTheme::DialogButtonBoxButtonsHaveIcons
Change-Id: I2f493d45820063ef62f16febde0df89a874dddb0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
Girish Ramakrishnan
00a4dd2a6f Remove dead code
Change-Id: I48c1e3b2ebcf4ec2fb21ed2d1a88e1dae64e937d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
James Turner
ed29e29a3c Fix QWidgetWindow sending duplicate drag-drop events
Unlike the other event handlers in QWidgetWindow, the drag-drop events are not followed by an
early return. This causes all drag-drop events to also be sent to the root widget of the window,
which is a bug. For example in the fridgemagnets example, where the target widget and
root widget are the same, the drop event is received twice.

Change-Id: I99e56ad8c48b3d31b0bd7c815cea8490edbf0af4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
Stephen Kelly
579ea489a4 Record if a metatype is a smart pointer to a QObject derived.
This allows QVariant/QMetaType software (such as QtDeclarative) to
deal with smart pointers in a similar way to how they can deal with
naked pointers (accessing properties etc).

This also adds a requirement that T be fully defined when
QSharedPointer<T> is inserted into a QVariant.

Change-Id: I29e12b8a6aa5f4aadbd62f92b89bc238f64b5725
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 15:45:07 +02:00
Stephen Kelly
668efc29fd Add some internal API for extracting a QSharedPointer<T> from QVariant.
The T must be derived from QObject, or it will fail to compile.

This will allow scripting or other 'wrapping' and runtime environments like
QtDeclarative to handle QSharedPointers to types derived from QObject
properly. A QSharedPointer<T> can be inserted into a QVariant, and
where T derives from QObject, a QSharedPointer<QObject> can be
extracted from the QVariant, and its properties are then accessible.

Change-Id: I68d6d89aceceb019267bd7301baa2047f9c09b90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 15:45:07 +02:00
Martin Petersson
534bcc9667 QNetworkAccessManager: delete the httpThread
The httpThread was using deleteLater the finished signal of the
thread to call the deleteLater slot. If the QNetworkAccessManager is
deleted when the application is closed then then fished is emitted
but we never return to the eventloop so the deletion is never done.

This will delete the httpThread directly instead of using deleteLater

Task-number: QTBUG-25487
Change-Id: I1fdbd4eca01e8bd8b3a98936298e5c78217752b4
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-20 15:45:07 +02:00
Bradley T. Hughes
cf7c93b928 Change *-clang mkspec globs to *-clang*
Like with the numerous g++ mkspecs, we have mkspecs with suffixes, and
these mkspecs should still match the clang globs.

Change-Id: I9296408b5192bc72cc468d229a57923e3f5ab6f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 15:45:07 +02:00
Bradley T. Hughes
1618ef236b mkspecs: Add macx-clang-libc++ and macx-clang-libc++-32
Use these mkspecs to switch to the new libc++ C++ runtime library, which
in turn makes it possible to enable C++11 support with clang.

Change-Id: If92908592f8bee4829a1bad747fe396f527d26c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 15:45:07 +02:00
Joerg Bornemann
5f9d386727 fix tst_QWidget::getSetCheck on Windows
Change-Id: Ie11a7576f8e618e2fedb31bd8071abb44b9f9f57
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
Mitch Curtis
f74b26b6aa Fix unused parameter warnings in moc test.
Change-Id: I3467a8bf99464c2d3762a171b20508bb4b29ddb4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 15:45:07 +02:00
Jeremy Katz
a8cbd3a527 Make QUuid compile with QT_NO_QUUID_STRING without breaking QDebug <<
Change I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d breaks the use of
operator<< for QDebug, which shows up when trying to link QtCore in
the small qconfig.

Instead, render QUuid as "QUuid(QT_NO_QUUID_STRING)".

Task-number: QTBUG-24816

Change-Id: Ia52283d7461a9907bcec7a110e41c9f830895efe
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 12:38:32 +02:00
Jeremy Katz
23e3c703a1 define QT_NO_ICONV if QT_NO_TEXTCODEC
This also updates qfeatures.h with various other things that have
been neglected. Run $QTSRCDIR/util/scripts/make_qfeatures_dot_h
after changing qfeatures.txt

Task-number: QTBUG-24816

Change-Id: I18b71fcec71efa9cfe3425fb1a7833456ec411b9
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-20 12:38:32 +02:00
Jeremy Katz
6eed1ff9d5 Make QVariant compile with QT_NO_QUUID_STRING
Task-number: QTBUG-24816

Change-Id: I76e6a6bcf1a2381e14f400648e3cb8ba554772a6
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-20 12:38:32 +02:00
Eike Ziller
a44bbc3c1c Mac: Fix rendering of non-int sized fonts.
Scrolling happens in integer steps, so it's necessary to use a
fractional correction value.

Task-number: QTCREATORBUG-7127
Change-Id: I6eccba6532f95aa4bf9270bdaec4b57280dc8e3d
Reviewed-by: Matthias Ettrich <matthias.ettrich@nokia.com>
2012-06-20 12:38:32 +02:00
Girish Ramakrishnan
eff1f61e50 Document and use UserEvent::nullWindow for event delivery
nullWindow is used to track if the window was null when the event
was created. If the window was null at contruction time, the qpa
event delivery code will choose a window to deliver it to.

If the window was not-null at creation time but became null during
the actuall event processing time, the event is ignored.

All the event delivery except the touch event delivery has been
changed to reflect this. I have not changed touch event delivery
because I don't really know what all need to be retranslated into
new window co-ordinates.

Change-Id: Ic62d12a13e70dd4d01226509411817db1b6af108
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-06-20 12:38:32 +02:00
Oswald Buddenhagen
6d9c545d2b Merge "Merge branch 'buildsystem'" into refs/staging/master 2012-06-20 12:38:32 +02:00
Mitch Curtis
86f953a6d4 Make QDateTime::fromString()/Time::fromString() adhere to ISO 8601.
Currently QDateTime::fromString and QTime::fromString do not correctly
handle fractional minutes and, in some cases, fractional seconds.

In the case of reading fractional minutes, it has been decided to
ignore invalid characters outside of the 5 character portion that
we're interested in (see code comments in fromStringImpl() for
info on why we read 5 digits). The motive is that there is a
performance penalty for calling mid to get the portion of surplus
string and also for converting to it to a float. This is also in
line with what QDate does with surplus characters, for example.

Task-number: QTBUG-14418
Task-number: QTBUG-25387
Change-Id: Ib742fe80686aff3c3770b995678cf838fb4e3bb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 12:38:32 +02:00
Mitch Curtis
223ed436b5 Clean up QDateTime tests.
Clean up and consolidate different tests in tst_qdatetime.cpp
(that seem to be doing the same thing) into single tests.

Change-Id: Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 12:38:32 +02:00
Mitch Curtis
902638e379 Add leading zeros to years below 1000 in QDate::toString().
QDate::toString(Qt::ISODate) lacks prefixed 0's on years below 1000.
The ISO 8601 standard dictates that this should be the case.

Task-number: QTBUG-16476
Change-Id: I7e73152bba0f5894bcbaa3f4418732b74ce86bc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 12:38:32 +02:00
Gatis Paeglis
7f139e8844 Update calendarwidget example
Due to API changes introduced by ff55d64f67

Task-number: QTBUG-26130
Change-Id: I4e5bdf3dd81d75308a3e565239b9d7a95452cd43
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 12:38:32 +02:00
Stephen Kelly
f9817dda55 Use the POSITION_INDEPENDENT_CODE property on targets using Qt.
This property is only set if Qt is configured
with -reduce-relocations (which is the default).

Change-Id: If2f0ab92448f03bbc3f7c828d3bca60107229072
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-20 10:26:59 +02:00
Martin Petersson
79b14f42ba QUrl::setEncodedQueryItems should replace
If there is  already a query string present in the url. It should be
replace when setEncodedQueryItems is called again.

Task-number: QTBUG-26148
Change-Id: I2bd4e1f5d9b4161d64556062e97141888ad89b3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 10:05:49 +02:00
Samuel Rødal
c752bb8eb8 Improved QCursor::setPos() robustness on xcb.
This makes tst_QGraphicsView::hoverLeave() less flaky.

Change-Id: Iaa1be6e2d02499679c69b26c07132413040173b6
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-06-20 10:04:26 +02:00
Kent Hansen
2bfdc2b540 Add test for queued call of method with unregistered parameter type
Verify that this produces a warning containing the relevant typename.

Change-Id: I046c02585e410a211e9175600b1027dda83bdd9c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-20 09:34:48 +02:00
Kent Hansen
42545eaea0 QMetaMethod::invoke: Use normalizedType() to normalize return type
The code was probably written before QMetaObject::normalizedType()
was introduced.

The behavior is covered by the existing tests
tst_QMetaObject::invokeMetaMember and
tst_QMetaObject::invokeBlockingQueuedMetaMember.

Change-Id: Ib1c3b3e4dff37947defd1dfdcc860df44539aa3a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-20 09:34:40 +02:00
Frederik Gladhorn
8b24ed162c Accessibility: Do not automatically add controllers
While I do like the idea, it currently relies on every
QWidget having QAccessibleWidget as a11y representation.

This crashes for example when using the itemviews and
asking them for relations.

Change-Id: Ie15a78dae620eefb97c646b9e802b13bdf864650
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-06-20 09:18:08 +02:00
Yuchen Deng
3db8877d28 MOC: Avoiding MAX_PATH limit on Windows
See: http://msdn.microsoft.com/en-us/library/aa365247(v=VS.85).aspx
Task-number: QTBUG-26157

Change-Id: Ie74481cd06c31149a060a432352da5b2731caaef
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-20 08:39:41 +02:00
Gabor Ballabas
8b92d770a0 Fix compile-time error macro when building with -fPIE
This macro causes a compile-time error using LLVM with Clang
when the target that includes qglobal.h is built with -fPIE.

Change-Id: I2e82e1a8feed9009c814f187b06501b26ea3b3b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 03:18:13 +02:00
Tobias Hunger
88cf9402e3 Fix access to uninitialized pointer
The C++ standard says in 9.4..2 that the object expression is evaluated,
so any compliant compiler may access d. So this syntax is a bug in this
place.

Change-Id: I37d2c4ea54febd40410ca473c906bcb1c66c4974
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 03:18:07 +02:00
Olivier Goffart
958aaf3770 Add qMove macro to support std::move
Change-Id: I373e07f479c11b172dab35ed7e5b62724aa50a1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 03:17:55 +02:00
Friedemann Kleint
e4505acd12 Windows: Fix MinGW warnings.
- Missing initializers for structs
- Missing enumeration value
- Mixing enumeration/ints in operator ?

Change-Id: I149ab01ad2ebd04f89e5c699905d5ba724828e0f
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 03:17:49 +02:00
Rohan McGovern
f681e99e29 tst_qfilesystemmodel: increased test's permitted runtime
This test has recently timed out a few times on Windows test runs, with
no relevant changes to account for the timeout. Double the permitted
runtime.

Change-Id: I93765c9ea592973495bfe3a2f63e63ed615eb542
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-06-20 03:17:05 +02:00
Oswald Buddenhagen
b652bffea7 Merge branch 'buildsystem'
This appears to be fully backwards-compatible with all tested modules,
as far as CI is concerned.

Change-Id: I53f979d06d0a264c5aab1193bab181a38ab837d6
2012-06-19 16:48:23 +02:00
Bjoern Breitmeyer
00f9ac93c2 Fixed Wince Makefile environment
Integrated the checksdk tool into qmake and made
the makefiles selfcontained, so configure make, is now
enough to build qt for wince

Change-Id: I29076702eca2ec23d4d06bb3d5c5cef9d4f95161
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
2f1762535b make missing qt modules fatal
there is no point in continuing; it will error out later (in more
cryptic ways) anyway.

Change-Id: I2562eadc2d91bfaa6e85368dc3774da31409a141
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
0fdf7c3a43 less confusing wording
Change-Id: Ia509fe1a28de803673623d425f5949b35404598c
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
1ee462604b fix misnomer: qt_module.prf => qt_build_config.prf
qt_module suggests to be congruent to qt_plugin.

Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
b3a497d781 fix regexp in qmodule.pri inclusion check
this also allows us removing the redundant flag variable

Change-Id: If26d22280ce7bc2ef3514c7c11ce7cd9baec1293
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
575a516630 revamp automatic makefile generation for sub-projects
instead of making the "real" targets depend on the makefiles, add
conditional makefile generation to the targets themselves.
this causes makefile generation to follow the recursion order determined
by the project, which is important when dealing with prl and module pri
files.
a side effect of this is that qmake and make calls are interleaved now,
which is entirely different from a 'qmake -r' run.

on the downside, calling make with multiple targets which operate on the
same subprojects without prior makefile generation will make a mess, as
the qmake calls will be racing. this should be no problem, as qmake does
not generate recursive targets where this would be useful - at least by
default.

it is not sufficient to just order the creation of the makefiles
non-recursively (e.g., by using gnu-specific order-only-prerequisites),
as an interrupted and subsequently resumed build would happily skip the
nested makefiles.
workable alternative approaches would be walking the entire tree in a
pre-pass to ensure makefile presence (which is incredibly slow) or
creating additional stamp files only after recursing and having the
makefiles depend on them (which is ugly).

Task-number: QTBUG-23376
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Change-Id: I88d3e7610215677d362026de316513d3bea04b06
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
e6d97f3f77 support for private depends in modules
if a module's private headers add additional dependencies, QT_PRIVATE is
now the place to declare them. note however, that this may not contain
other private headers in turn - that would be much harder to implement,
and we want the explicitness anyway.

Change-Id: Ic516fcf1a003c95798df4fbe216f92016afaf47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:08 +02:00