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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
(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>
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>
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>
libraries and related flags have no business in that variable, by
definition.
Change-Id: Ic958a3e082a498945ab56bc12ec05d4083ee43a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
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>
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>
This will probably not be done in time for Qt 4.7.
Change-Id: Ie9112cee021e31849f5b43eefb8eb57537d01a2d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>