Commit Graph

8477 Commits

Author SHA1 Message Date
Friedemann Kleint
4677cf3d01 Deprecate the qWaitForWindowShown(QWindow *) method.
While the qWaitForWindowShown(QWidget *) is inherited
from Qt 4.8, the qWaitForWindowShown(QWindow *) was introduced
in Qt 5. As it is identical to qWaitForWindowExposed()
and removed already, it can be deprecated in Qt 5.

Remove its usages in qtbase.

Change-Id: I28788d120ad687a49f02b2b44de6b38a2832fe5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-25 07:24:49 +02:00
Martin Smith
a4cd6ef25d qdoc: Fixed incorrect href attribute values in qdoc
There were two fileBase() functions, but only one
was correct. The wrong one was being called in some
cases. Now there is only one fileBase() function,
which is always called.

Task nr: QTBUG-26591

Change-Id: I2c40e2152a8c7ad1bb9db256ecf1367148f0e7f6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-25 01:00:41 +02:00
Ali Akhtarzada
48d439833a Fix typo in QMdiArea docs
Task-number: QTBUG-26498
Change-Id: I2c7b7a67c732eb58f1ffc2a137a675ac63dc6597
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-07-25 00:59:53 +02:00
Mitch Curtis
96c5d73eca Document emission of commitDataRequest() signal in QApplication doc.
It is currently not clear that QApplication::commitData() emits
the commitDataRequest() signal. Users should know this if they plan
to override the default implementation.

Task-number: QTBUG-23117
Change-Id: I418af4b83795d53c9d86a2ac620c0f7c5bb9ada3
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-07-25 00:59:46 +02:00
Mitch Curtis
b7ab608bd2 Correct reference to nonexistent Qt::QA_Window flag in documenation.
Should be Qt::Window.

Task-number: QTBUG-22725
Change-Id: I150e77dec9c93035e01cf2e6be68a54bb4b122b2
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-07-25 00:59:43 +02:00
Uli Schlachter
cd398431e3 QXcbWindow::setMask(): Check for SHAPE extension
If the SHAPE extension is not available and we try to use it, the xcb connection
will shut down and go into an error state. This is bad because there would be no
error message that would give a hint on what went wrong.

Change-Id: I1a6734bd146ca179a990b6ce896813bf76007b66
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-07-25 00:59:35 +02:00
Uli Schlachter
597b99305e Reimplement QXcbWindow::setMask() with xcb
This functionality does not need libXext. The bindings for the shape extension
from libxcb-shape is enough and is available without Xlib.

Change-Id: I9f1927024c64df00ace1666998c6c6deda2ef782
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-25 00:59:32 +02:00
Mitch Curtis
958e4e6bec Fix error in sample code on the Layout Management page.
Incorrect return type in a sample class (CardLayout) function.
Although the function is never called, the return type should be int,
not QLayoutItem*.

Task-number: QTBUG-25602
Change-Id: I05ebd07a35b6db62b8c12255186f9d9487da79f6
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-07-25 00:58:20 +02:00
Mitch Curtis
044645ead6 Remove references to nonexistent QLocale::setDefaultLocale() in docs.
Should be QLocale::setDefault().

Task-number: QTBUG-23210
Change-Id: I0f5e6cc431f568c9b8c4be1411b7b47835304d0b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-07-25 00:48:43 +02:00
Marc Mutz
15f041e6d5 QtOpenGL: use nullary version of qRegisterMetaType<T>("T")
Using the nullary version has the advantage that multiple calls
during a program run are much more efficient, since an inlined
atomic is used to store the result. For this, it requires
Q_DECLARE_METATYPE(T), so add, too.

Change-Id: Ic9a9013aa13ff9d8f917f9df033dd2197944f84a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 00:48:38 +02:00
Stephen Kelly
b3694d1295 Split the QGuiVariant test from the Core one.
This makes development on the meta type system easier because only
QtCore must be re-built to run most of the tests. The existing
QGuiVariant test needs to be run before pushing anyway, but not
so frequently.

Change-Id: I1fa66edbd790c957e1a232226847dd550227a477
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-07-25 00:48:33 +02:00
Stephen Kelly
f9db44ad15 Make sure that unknown types use the handler for unknown types.
This fixes an assert in the QVariant checkDataStream unit test when
it no longer links to QtGui.

Change-Id: Ib45139cf790f3ac6ee80e1c59f50d08d0b51ffa4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-07-25 00:48:28 +02:00
Stephen Kelly
80cd5d2017 Use a large core type for the QVariant::setValue test.
The type needs to be large enough that
QVariantIntegrator<T>::CanUseInternalSpace is true.

Change-Id: I311c44bedfebd946e41639975df206c27b6d55ca
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-07-25 00:48:24 +02:00
Stephen Kelly
dec9666dd4 Make qRegisterMetaType constexpr for built-in types.
For consistency with qMetaTypeId, and because we can.

Change-Id: I6882a16ef3c0d84539048c9f2c201c4a2b2ca7ad
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-07-25 00:48:20 +02:00
Stephen Kelly
a5b0290497 Don't make the CMake file generation dependent on DESTDIR.
It is expected to be well defined for the CMake files to be generated
correctly, but if that stops being the case, it should fail loudly. All
of the generated CMake packages are CI tested.

Change-Id: I67c7fa6ef1fe0a019c40936cb12db282669e9ee8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-25 00:48:10 +02:00
Kevin Ottens
a31ac11d98 QNX: Remove mouse events synthetized from touch events
This behavior is now implemented in a finer way in QtQuick and
QtWidgets, it's not needed anymore in the platform plugin.

Change-Id: Iacdcd313253627fbba094abe4e9a9c1d23a431e1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2012-07-24 22:28:44 +02:00
Marc Mutz
e9ecf1b420 QtDBus: use qMetaTypeId<T>() instead of qRegisterMetaType<T>("T")
Using qMetaTypeId<T> has the advantage that multiple calls during
a program run are much more efficient, since an inlined atomic
is used to store the result. It also ensures that
Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>
(the unary version) will happily register anything.

Had to add a proper default constructor to QDBusError, as the
one doubling as the default constructor wasn't available under
QT_BOOTSTRAP, but Q_DECLARE_METATYPE requires a default ctor.

Also changed a nullary qRegisterMetaType() to qMetaTypeId() in
qDBusRegisterMetaType(). They're equivalent, since the former
just calls the latter, but apart from the miniscule optimisation
that the compiler has to instantiate one function less, the result
is also used, so using qMetaTypeId() better expresses what 'id'
is.

Change-Id: Ib9dde17923ab9ee55f9464138a625ab8cd55c482
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 20:11:05 +02:00
David Faure
95232af3ef QAbstractNativeEventFilter: document return value
(paragraph taken "as is" from the QObject::eventFilter documentation)

Change-Id: I1b7e92736103042d7105f1b26ba4784cbcc43dc2
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
1a470256e1 remove support for rvct_linker config from MinGW generator again
yet another symbian remnant (building windows arm executables for the
simulator).
This reverts commit 5c88141ed0b25d8ab9318bf4cb5dda54b90b2ce1.

Change-Id: I6eb147c0e2710eba09a4339fa4a08a5b08f8dab3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
8fa9249acc $$QMAKE_LIBDIR contents belong into $(LIBS), not $(LFLAGS)
unlike for the unix linker, this does not matter for the windows linker,
but keeping it consistent has advantages.

Change-Id: Ib9b9efa18c31d87c026d3cac5a8737f4612ad1c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
2184b27462 do not run findLibraries() over QMAKE_LFLAGS
libraries and related flags have no business in that variable, by
definition.

Change-Id: Ic958a3e082a498945ab56bc12ec05d4083ee43a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
e5b203dbc7 dispose of MSVCPROJ_LIBS
this way QMAKE_LIBS{,_PRIVATE} can be treated the same as in all other
generators, which allows us to:
- make the windows generators' findLibraries() be more like the unix
  version
- dispose of QMAKE_INTERNAL_PRL_LIBS handling while reading prl files
  (because the output always goes to QMAKE_LIBS)
- as a side effect, QMAKE_LIBS_PRIVATE are not subjected to prl file
  resolution any more, which is again consistent with unix - the
  correctness of that needs to be assessed separately.

Change-Id: Ie9bc04d117eff6a7cde846677f98acf3c64aa6ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
c1056c80fb remove apparently pointless call to findLibraries()
the function was already called long before. if it really needs to be
called again, it's a) probably affecting the other windows generators as
well and b) the actual problem should be fixed instead.

This reverts commit d50c3c6624b2343e42d0df4b72212d9ced8f3682.

Change-Id: Iaa2007640fbc9acdc50ba3b0681efeb0d184f224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Stephen Kelly
94c2745074 Remove obsolete or commented use of Q_DECLARE_METATYPE.
Change-Id: I15bc845801b9f84a9252a0092fbd69f0e1b3f4ea
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-24 10:46:24 +02:00
Stephen Kelly
35a5f7f661 Remove obsolete TODO.
This will probably not be done in time for Qt 4.7.

Change-Id: Ie9112cee021e31849f5b43eefb8eb57537d01a2d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-24 10:46:24 +02:00
Kevin Ottens
7808ec795c Propagate synthesized mouse events in parallel (lock-step) with touch
This patch implement the equivalent of
468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for
QtWidgets.

If a widget doesn't accept a touch event, then QApplication gives it
another try by synthesizing a corresponding mouse event. This way
QtQuick and QtWidget behave in a similar way, removing the need for
platform backends to try to emulate a mouse event from a touch event
unconditionally.

Also add relevant unit tests and adjust old QApplication ones.

Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 10:46:24 +02:00
Stephen Kelly
349f16b03c Replace old typedefs with their built-in equivalents.
Change-Id: I3ecb75ace431b92a13de67aa6426cf570398587f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-24 10:46:24 +02:00
Stephen Kelly
86992d6adb Fix typo pallete -> palette.
Change-Id: I17b71bfed22c3692b027556ef2e5d6ece4f3f77e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-24 10:46:24 +02:00
Marc Mutz
c76a641a27 QAbstractItemView: don't qRegisterMetaType<QModelIndex>
QModelIndex is a build-in type nowadays and doesn't
need to be registered anymore.

Also remove them from the tests.

Change-Id: I47029972651c045c880cee86fb292116a29493d5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 10:46:24 +02:00
Stephen Kelly
45cb8be4f9 Add tests of the various testlib definition possibilities.
The behavior of QTEST_MAIN depends on whether QT_GUI_LIB or QT_WIDGETS_LIB
is defined. It could create a QGuiApplication or QApplication which
could cause linking issues if the corresponding library is not linked to.

The failure cases are also tested.

Change-Id: I61ed0bc760564ef42ce1dbd86c83c06348c860ff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-24 08:44:27 +02:00
Laszlo Papp
4eb6482751 Remove the unnecessary qdebug.h includes in the QPoint(F) tests
Change-Id: I5c45af9d498e20b46d6faf8c96de87586eca7b4a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-24 06:31:26 +02:00
Thomas McGuire
f83954c631 Provide access to (dis)connectNotify() from other objects.
This is the first step to fix (dis)connectNotify() not getting called
for QML signal handlers and bindings.

Change-Id: I5cfc126a5562a20031d3af8415c60d101603dd8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-24 04:23:45 +02:00
Marc Mutz
d4c241a980 QtConcurrentFilter: remove unused typedef (GCC 4.8 warning)
This one actually triggers a failure in tst_headersclean.

Change-Id: Id37184bacf910702879fa68014705ed5399cea1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 00:08:28 +02:00
David Faure
42c86bba9d Remove winEventFilter, replaced with installNativeEventFilter.
No reason to keep a virtual method for Windows when all other similar methods
(macEvent and x11Event) have been removed, and when installNativeEventFilter
provides a much nicer solution (no need to derive from QApplication).

Change-Id: Ia2a7960e320fcbd04cef91f467900861dbb377c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-07-24 00:08:28 +02:00
Friedemann Kleint
607c37befb Remove usage of deprecated qWaitForWindowShown in dialog tests.
Change-Id: Id3ebe202d65ee682e8e2e3ae107808e9abb6cc15
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 00:08:28 +02:00
Mitch Curtis
d38fb0b535 Correct QDomDocument documentation re deletion of internal objects.
Task-number: QTBUG-25641
Change-Id: If1f46757d2d1e678e4b9e939da89a497da71dccf
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-23 22:02:18 +02:00
Mitch Curtis
300e15f688 Fix q_check_ptr typo in QtGlobal documentation.
Task-number: QTBUG-24093
Change-Id: Ia6b4ef49e07910ceddd826b3b7cc81ca41f33d01
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-07-23 22:02:18 +02:00
Mitch Curtis
d499d04a17 Replace Q_REGISTER_METATYPE in QAbstractSocket::stateChanged doc.
Should be Q_DECLARE_METATYPE.

Task-number: QTBUG-24692
Change-Id: I9c8b8d503fba254661e8f0d72855758d5d03ada1
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-07-23 22:02:18 +02:00
Mitch Curtis
2fee2412c2 Correct QLineEdit::inputMask documentation.
The documentation says:

"Unset the mask and return to normal QLineEdit operation by passing an
empty string ("") or just calling setInputMask() with no arguments."

However, the parameter for setInputMask is a const QString&, so calling
it with no arguments will result in a compile error. The documentation
should not advise calling setInputMask() without arguments.

Change-Id: Icd8e063dcd3d745bd4bf0c6851a38f63481957ae
Task-number: QTBUG-24803
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-07-23 22:02:18 +02:00
Giuseppe D'Angelo
58ec01e278 More qHash(T, uint) support
Add the seed to QPair, QUuid, QPersistentModelIndex's qHash(), and fix
qHash documentation for them and for many other datatypes.

Change-Id: I1386f3ed42ee1a832371a242ee5c82895ba92c2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-23 19:57:07 +02:00
Lars Knoll
acbfb4d777 Move the windows locale codec into it's own file
Simple cleanup, that will make it easier to refactor
the code to use ICU.

Change-Id: I7486f36d27b8c521cf970327eb94b2236338d4ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-07-23 19:57:07 +02:00
Laszlo Agocs
7a3dd20b98 Add basic backingstore implementation to kms
This allows using the kms plugin in QWidget apps having a single
(preferably fullscreen) top-level widget.

Based on eglfs' implementation. Dirty rectangle tracking is missing,
should be added later.

There is no composition so multiple TLWs will not work nicely.

Change-Id: Ia78589d1a375925ebdcc46aa20fc1619ec14d6cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
2012-07-23 19:57:07 +02:00
Mitch Curtis
c2942cb7b6 Clarify ambiguous sentence in QVariant::toBool() documentation.
Task-number: QTBUG-26482
Change-Id: Id9158ba1f7ffa5af169f808aed4559f7a0470e20
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-23 19:57:07 +02:00
Jan-Arve Saether
4d573117c4 If the GL driver is singlebuffered, reflect that in QSurfaceFormat
Change-Id: Iafed64d0a35f8d49357f147c8b7b4c0e9f4b9173
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-23 19:57:07 +02:00
Jan-Arve Saether
6fbf9506e6 If swapBehavior is TripleBuffer, set WGL_DOUBLE_BUFFER_ARB to TRUE
Previously, if the drivers' swap behaviour was single-buffered
it would fallthrough (just like DefaultSwapBehavior) and remain
single-buffered.

Change-Id: I4b93ad7a49094aa992d0b8fb3429c163bbbf655d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-07-23 19:57:07 +02:00
Friedemann Kleint
bcb5e564ff WindowSystemInterface::sendWindowSystemEvents(): Remove unused parameter.
No need to pass the dispatcher. Get rid of Windows logic to maintain
a stack of dispatcher associated with flags.

Change-Id: Ic2daad4b6762a46fac3274937effc188af436c9a
Reviewed-by: David Faure <faure@kde.org>
2012-07-23 19:57:07 +02:00
Sean Harmer
0026b80cd2 Improve the loading performance of QLibrary
If an absolute path is specified we try that first. Otherwise we first
try the most likely system-specific format (e.g. libfoo.so) on Unix.
This improves performance especially on systems with slow flash devices.

For example, prior to this commit loading the Xcursor library (in the
xcb plugin) results in attempts to dlopen:

"Xcursor"
"Xcursor.so.1"
"libXcursor"
"libXcursor.so.1"

With this commit this is reduced to a single attempt of:

"libXcursor.so.1"

Plugin loading uses absolute paths with QLibrary so there is no
performance penalty for plugins with this commit.

This is however a behavioural change with respect to Qt4 but one
that I believe is justified and wanted.

Change-Id: I7813afa335f9bf515e87934c2f8f97888818c69c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-23 17:56:13 +02:00
Sean Harmer
b182940340 XCB: Record the OpenGL profile in the format
Change-Id: I68f9e78e15fc798ec801feed74e0cb900ef577ae
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-07-23 17:55:40 +02:00
Sean Harmer
3e760da85a QNX: Use new native event filtering api
Change-Id: Iaf25697e6250ad29085647db4b8e50e274599227
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: David Faure <faure@kde.org>
2012-07-23 17:55:26 +02:00
Stephen Kelly
73d127397d Quote the SONAME properly.
It does not make a big difference, but it is what was intended
initially.

Change-Id: Idd7e06c857533030b000726ff87b48bb2619df06
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-23 17:48:51 +02:00