Commit Graph

3399 Commits

Author SHA1 Message Date
Jan-Arve Saether
f718728567 Do not crash in the windows accessibility bridge
If the object did not have a QAccessibleInterface subclass it would
crash in the windows accessibility bridge.

Change-Id: I931d69466a5a74a87f1c1c577fb1c918dcc8accf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-22 00:47:03 +01:00
Martin Petersson
54c487cdd2 QNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo order
Instead of always delaying IPv4 when we have both Ipv4 and IPv6 we
should use the order we get from getaddrinfo to descide which one
that should be delayed.

Task-number: QTBUG-23066
Change-Id: Ibe8c4d7000abd6e57fe8c6afac8a4a843e17ff27
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-12-22 00:47:03 +01:00
Friedemann Kleint
bc8f25c7e6 QTestlib: Make QImage comparison more verbose.
Introduce a specialization for qCompare(QImage,QImage) that
checks isNull, size and format and outputs verbose messages.

Check isNull, size similarly for QPixmap.

Add an autotest:
- Add test to cmptest and make it a GUI application since
  QImage requires QGuiApplication.
- Make testlib/selftests capable of running X11-GUI applications
  by passing DISPLAY.
- Ignore stderr output for cmptest
- Add test data

Change-Id: I2b29c7822fbeedf2b22c90889739ed7ff859ce92
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 22:59:28 +01:00
Friedemann Kleint
5d4acbab0e QTestLib: Fix QFINDTESTDATA for Windows.
- Scan the parent directory of the executable if it is located
  in a 'Debug' or 'Release' directory
- Report with native separators in the log.
- Use the QString::arg() overloads with several string parameters.

Change-Id: I5ea84411e12978f8f958a0bce3ae10da44cc4e3f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 22:59:13 +01:00
Friedemann Kleint
f1e07483b3 Rebuild configure.exe.
- Use create_prl, link_prl for all modules.
- Remove -graphicssystem (and -runtimegraphicssystem) options from
  configure.

Change-Id: Id1e0c8f82fa3149fd67c6a31e9e8baec06366205
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-21 22:58:56 +01:00
Rohan McGovern
3225942dbb configure[.exe]: use create_prl, link_prl for all modules
These should go into qmodule.pri, rather than .qmake.cache, as they
make sense for all Qt modules - not only qtbase.

Fixes link failure when building qtdeclarative with jom on Windows.

Change-Id: I3e8b207e1808cb23af58b865a160c2fafa906288
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-21 22:58:50 +01:00
Bradley T. Hughes
cd796404f1 Reimplement QIODevice::reset() properly
The reset() function is not const.

tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp:324:
warning: 'FixedSizeDataGenerator::reset' hides overloaded virtual
function [-Woverloaded-virtual]
    virtual bool reset() const{
                 ^
src/corelib/io/qiodevice.h:112: hidden overloaded virtual function
'QIODevice::reset' declared here
    virtual bool reset();
                 ^

Change-Id: I022d902147f9c8fb71bee8c3e21b963b2d7bec55
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-21 20:32:42 +01:00
Bradley T. Hughes
f0710e1d95 Reimplement QGraphicsEffect::sourceChanged() properly
sourceChanged() takes one argument, not zero.

tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp:125:
warning: 'CustomEffect::sourceChanged' hides overloaded virtual function
[-Woverloaded-virtual]
    void sourceChanged()
         ^
src/widgets/effects/qgraphicseffect.h:104:
hidden overloaded virtual function 'QGraphicsEffect::sourceChanged'
declared here
    virtual void sourceChanged(ChangeFlags flags);
                 ^

Change-Id: If227b7b79c4a2fc3d21f93e371510ddccb408d7d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-21 20:32:36 +01:00
Bradley T. Hughes
103c2e3690 Reimplement QVariantAnimation::updateState() properly
The updateState() takes 2 arguments, not 1.

tests/benchmarks/gui/animation/qanimation/dummyanimation.h:54: warning:
'DummyAnimation::updateState' hides overloaded virtual function
[-Woverloaded-virtual]
    void updateState(State state);
         ^
src/corelib/animation/qvariantanimation.h:106: hidden overloaded virtual
function 'QVariantAnimation::updateState' declared here
    void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
         ^

Change-Id: Ieb2e4e0b1f017c51c4fed5bdb874ba30cb056916
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-12-21 20:32:31 +01:00
Bradley T. Hughes
58170cea15 Reimplement QAbstractFileEngine::open() properly
The virtual function takes a QIODevice::OpenMode argument, not an int.

tests/auto/corelib/io/qfile/test/../tst_qfile.cpp:1942: warning:
'MyEngine::open' hides overloaded virtual function [-Woverloaded-
virtual]
    bool open(int ) { return false; }
         ^
src/corelib/io/qabstractfileengine.h:118: hidden overloaded virtual
function 'QAbstractFileEngine::open' declared here
    virtual bool open(QIODevice::OpenMode openMode);
                 ^

Change-Id: I92338dacb89c05d8c5cfbf8ce094dc519b84d3ba
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-12-21 20:32:24 +01:00
Stephen Kelly
9c67364708 Convert macros to functions.
Change-Id: I43f4188d1c33cd5a07eb7a12bf3343af7e6a211f
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 19:58:14 +01:00
Stephen Kelly
8c207a46e6 Port to list(APPEND)
Change-Id: I198622270324eea62dd5ad6343fdf7c89e736e6c
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 19:57:58 +01:00
Stephen Kelly
ad14089179 Remove misleading and incorrect information from dropMimeData docs.
It is not the responsibility of the view to insert data into the
model after a dropMimeData call.

Change-Id: Ib2dedddb3239af0e2bf722a28081c68677e6b2af
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:40:15 +01:00
Stephen Kelly
bec40ee055 Fix style in cmake macros files.
Change-Id: I2806ce63f5948dde9c582740bc2f070900987fb5
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 17:40:01 +01:00
Stephen Kelly
c76f938fe1 Connect to the moved signals in the header view.
Change-Id: I6954f77ad7d02970f562abcbaf4e733c6d43ead5
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:39:36 +01:00
Stephen Kelly
930bcb266c Fix whitespace consistency.
Change-Id: Ia5debce8e5be4e9c67e1ef303e136816ab55bf90
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:39:25 +01:00
Robin Burchell
a09fdd91cf Fix -tickcounter in qtestlib.
HAVE_TICK_COUNTER is supposed to be set (if possible) from cycle_p.h, so
guarding cycle_p.h's inclusion with HAVE_TICK_COUNTER ensures it will never be
set.

Change-Id: I6313d0a2efd47c89522623e8e7b3f505489ded90
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 07:50:30 +01:00
Jason McDonald
bf4177e9db Remove mention of Trolltech in installation path.
Task-number: QTBUG-19653

Change-Id: Ic92e0bb4980af53568efe77ebc72e048ee5a32d7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-21 01:17:37 +01:00
Robin Burchell
e5f84ebf01 Merge QReadWriteLock constructor overloads per Qt 5 comment.
Change-Id: I3b569b1240a0bc5b2589de353dbf62c175472448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 20:47:13 +01:00
Stephen Kelly
341b62d308 Add missing connections.
Unit tested in next commit.

Change-Id: Iab37829f98ef8f2258a30aed60e95aa114379b7e
Reviewed-by: David Faure <faure@kde.org>
2011-12-20 19:02:54 +01:00
Robin Burchell
189f944a0d Remove unused QPicture::detach_helper() private method.
QPicture doesn't need this for quite a long time now, so get rid of it.

Change-Id: Ie575f32555deb130f7b27e11a7617fb2b3dc4e43
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
43aef6f8d2 Remove non-const QMovie::cacheMode().
There's a const QMovie::cacheMode(), so having this makes no sense.

Change-Id: I0b6f20055fcbb28f3a21a8bc303f82543592c9c6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-20 16:18:27 +01:00
Harald Fernengel
2532ddc48b make QString::fromLatin1 partially inline
This allows us to benefit from compile time optimizations when calling
strlen()

Change-Id: If6694117e613a012fce97f8664e6b43005d255de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 16:18:27 +01:00
Friedemann Kleint
b8ac9da63a fixqt4headers: Add QtCore to folders (for moved item models).
Change-Id: I71f805c618a888e654207fb29f68769f9d90db9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
2992db14e7 Remove unused qInitResourceIO() method.
Was effectively removed in 4.x's 2e7d5def1fdabb5949fbffc629da500aa2bb78d7, but
couldn't be removed due to it being exported.

Change-Id: I5061f50deaeae7f53e8b688633e377095b4463c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
ab9ce77e09 Remove qt_image_id() and qt_image_colortable().
Both of these have been unused at least as far back as Qt 4.5 according to git
log -p.

Change-Id: I381024cb1621fbfdb806a62e1cc55ce13219ef17
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-20 14:38:10 +01:00
Pekka Vuorela
b652cc8d20 Adapt from input context mousehandler to input panel in QLineEdit
Change-Id: If14d0cc18188da1dbc8b152fa2fa9583ff03b3bc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
a1743e4681 Remove input context action support from editors
Relying on obsolete QInputContext API.

Change-Id: I954ccf57204cbb24ff5cec622384fa3b9932a079
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
a32df45bec Remove QInputContext based test from QGraphicsItem tests
Was basically checking that a method call is a method call and
QApplication::setInputContext() sets the input context.

Change-Id: Ia8723fe245f2480d503f0140f61078dc074161fc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
db55b6aee7 Removed test for obsolete QInputContext
Change-Id: Idb3b909934434f8f55eb6e94aa814840ab628856
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
34cb690163 Adapt from QInputContext interface to QInputPanel
Change-Id: I4143c3b516e7b0e46c706b8a6560bca9d8951572
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Frederik Gladhorn
a730a2b196 Add destructor to QPlatformFontDatabase.
Virtual functions deserve a virtual dtor.

Change-Id: I71b7ae3b7fb0aa1553a37a90dce6270740d49e32
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 12:57:38 +01:00
Alan Alpert
cb9b7ceffb Revert "Revert "Add QObject::objectNameChanged(con... signal""
This reverts commit 9b17557f3b.

Justification: Temporary commit, see JIRA task.
Task-number: QTBUG-22985
Change-Id: I3df9eb5fdbdc133349dca5e192dcfcc9e758626c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 11:15:21 +01:00
Olivier Goffart
8754bf03f5 Better error reporting in case of connection failure.
Use Q_STATIC_ASSERT_X give a better error message.
If C++11 is used, you get the string in the error.
Else, clicking on the QStaticFailure error still shows you the
string in the qobject.h source code)

And report better failure if the return types do not match.
(Without the static assert, you would still have a compilation error,
but in an unrelated place, with no reference to the actual connect()
call. The error was thrown from the virtual call
QSlotObject::call, without saying where it was instantiated)

Previously the error was relying on the existence of a type inside
CheckCompatibleArguments, but the Q_STATIC_ASSERT requires a bool
(hence the introduction of CheckCompatibleArguments::value)

There also was a typo in the return value of
AreArgumentsCompatible::dummy that made that code not work, and that
error not be reported.
(Instead, the error was reported when QObjectSlot::call is instantiated)

Specialization of AreArgumentsCompatible for the void type have been
added because if the return value of a signal or slot is void, the
connection should work.

Change-Id: I5a93ec787ce2a4b94a26630ca31d5001cd294e4d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 09:15:41 +01:00
Jason McDonald
85a77cd5c8 Retire QTest::pixmapsAreEqual().
QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with
some old tests written for Qt3.  QCOMPARE() is the preferred way to
compare QPixmaps and provides superior diagnostic output when a
comparison fails.

This commit removes QTest::pixmapsAreEqual() from the testlib API and
replaces the last few remaining calls with QCOMPARE.

Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 06:17:42 +01:00
Stephen Kelly
1749fef3c5 Remove declaration which is exported from QtGui.
Fixes static build.

Change-Id: I6f82ded7bf6cb3b72b0ef987e781c7e8f9ed932b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 23:04:38 +01:00
David Faure
8707c09fcd Fix QDir::removeRecursively so it doesn't follow symlinks to directories.
Critical bug... Good thing I had backups of my $HOME.

Change-Id: I43b3a80786c946b0aec797036c1164d436d521f8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-19 20:48:16 +01:00
Shane Kearns
0443a51228 Fix QNetworkReply test cases that use the MiniHttpServer on windows
The "happy eyeballs" connection code means that IPv4 and IPv6 connections
are both attempted for a http request.
For a normal http server, this is no problem, but the MiniHttpServer in
the test code is very simplistic and cannot cope with more than one
client connected at the same time.
On windows this causes all these tests to fail with timeouts.
Changed the MiniHttpServer to listen on IPv4 only instead of Any address.

Change-Id: I81e249997d894d266001da474a351b1f5642599e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 19:08:57 +01:00
Shane Kearns
9ffd69a6a6 Fix regression in user-agent setting of http proxy in a QNetworkRequest
Modifying the proxy causes a detach(), so the socket is still using
the unmodified proxy.
Changed this to setProxy() the modified one back to the socket.

Test case tst_QNetworkReply::httpProxyCommands()

Change-Id: I448c2f2ab43ce8d78bc6edb8261599bf67372676
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 19:08:57 +01:00
Laszlo Agocs
2edada763a Update the touchscreen plug-in.
Now works with bcm5974: Added manual contact tracking for drivers that
do not report a tracking id and fixed abs limit querying to use
ABS_MT_* instead of ABS_*.

Fixed reported area: The incoming point was the top-left point instead
of the center which was incorrect.

Added pressure support.

Tracking of event type has been removed as handleTouchEvent no longer
needs it.

Broken debug prints have been removed.

Changed udev auto-detection to pick only /dev/input/event*.

Fixed multiple released state reports with some drivers.

Name and capabilities are now set properly for the QTouchDevice.

Change-Id: I8f026c9a14465bfb6d567f4dcf36c5c03f843868
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-19 17:29:10 +01:00
Olivier Goffart
87679491cb Do not call QueuedConnection slot on partialy destroyed object
This is a regression introduced in Qt 4.8
When QApplication::processEvents is called from a destructor, it is
possible that pending events would still be called on the already
destroyed subclass.
Prevent that by using the same pattern as in QMetaObject::activate

Change-Id: Ida50db07ae089264402dafcde7a41a066479d08b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 14:06:12 +01:00
Friedemann Kleint
bbc098ab9f Windows: Remove Window from list before calling DestroyWindow.
Change-Id: Ifef99d9e4e46f0450cecf8ecba18ce79ebec3e8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 12:27:45 +01:00
Olivier Goffart
92464faea9 Q_STATIC_ASSERT: fix C style cast
Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in
some headers included by moc generated files

Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-19 12:27:45 +01:00
Frederik Gladhorn
74c9f9d83f Accessibility: childAt returns interface
childAt used to return an integer.
Return an interface instead.

Not requiring a direct child to be returned allows optimizing
by bypassing iterating through the hierarchy of accessibles.
For QtQuick this is the only sensible way of implementing this.

The bridges are still responsible for finding the top-most element.

The default implementation in QAccessibleObject is sufficient
to return direct children. The implementation in
QAccessibleApplication is therfore no longer needed.

Change-Id: Id7100dd5bcc3a98de516a7f4a12eaaa41cb46d26
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 12:27:45 +01:00
Stephen Kelly
7e12d2d30f Change a slot into a virtual method.
Implements a BiC Qt5 TODO.

Change-Id: Ie7dc32d954335019166dbd78d8b01ef79e2ad5c2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 10:42:26 +01:00
Stephen Kelly
c023f5600a Remove plugin related variables from the CMake files.
It doesn't currently have any effect and needs to be re-thought
anyway.

Change-Id: I6e620ca5b341264bbf5279a19e8f25af8fa7d396
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-19 10:42:02 +01:00
Stephen Kelly
5fb4bf8987 Include the extras files after defining the target.
Allows the extras file to contain references to the target.

Change-Id: I47332c4efcb7ba0132509a41fa3040531cd1c81f
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-19 10:41:50 +01:00
Jędrzej Nowacki
31d8ecfe3b Make QMetaTypeInterface POD.
QMetaTypeInterface has to be POD because it is constructed in a static
array. Constructors in POD types are not allowed so we will use a macro
instead.

Change-Id: Iab9ae776dfe4dcd7148558f02d6181c5917aa5c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 10:21:16 +01:00
Chris Meyer
e75e4421cd Enable option to see filename extension in Mac save dialog
Many Mac OS users expect to have the option to see the file extension
of the file being saved in the save dialog. This patch enables that
option.

Change-Id: I7713bcef16b6f43135b382c7107f306009c7a0a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:55:24 +01:00
Chris Meyer
b13f630c81 Add check to make sure qApp exists before using
Check for qApp before using. I'm aware that this is in commented
out code right now; but I wanted to make sure it doesn't
accidently slip back in without this check so I'm submitting
this patch. It caused problems at shutdown in 4.8.

Change-Id: I1c2358ab94f8b698e5519b3e0f988fb5cdd653fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:53:42 +01:00