QRegularExpression counterpart for QRegExpValidator.
Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
- Add initial set of amd64 data
- Add QtWidgets to global.cfg
Task-number: QTQAINFRA-321
Change-Id: I9bffaa00ac01976546629988ac69965383eb2efd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1):
- The NumberingSystem for some Indic and Slovak locales.
- The Month/Day name in Irish/Gaelic locale.
- The AM/PM Text in Turkish locale.
Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: Ifd116dee32a450ff89a9a1011e26b434765d6e95
Reviewed-by: David Faure <david.faure@kdab.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b
Reviewed-by: David Faure <david.faure@kdab.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: I95b8b4b674e85b2b3c374931f6231d60f35be984
Reviewed-by: David Faure <david.faure@kdab.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: I54523eb854619917123d8816d3cd6c3a1f5b4c55
Reviewed-by: David Faure <david.faure@kdab.com>
If the dynamic_cast failed in QSharedPointer::dynamicCast or
qSharedPointerDynamicCast, we should avoid creating the QSharedPointer
that shares the weak and strong reference counts. In Qt 5, this does
not imply a leak since the original pointer is stored internally for
deletion. In Qt 4 it implies a leak under certain circumstances, which
this change fixes.
Task-number: QTBUG-28924
Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Those certificates have erroneously set the CA attribute to true,
meaning everybody in possesion of their keys can issue certificates on
their own.
Task-number: QTBUG-28937
Change-Id: Iff351e590ad3e6ab802e6fa1d65a9a9a9f7683de
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
We make it pass by relaxing the comparison of the characterRect....
Change-Id: I900e0601d9e1e568c12a3952cf42657743345013
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
In some cases, the type is required to be registered with the typedef
name, so those Q_DECLARE_METATYPE uses remain for now. In a future
patch we can also remove those and the typedefs themselves.
Change-Id: I5721955c86f566ae09024203954840f817bd3088
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Previous commit b2363a935c fixed keyboardModifiers() after QPA event
processing, but broke QTestLib, which expects spontaneous input events
sent to qApp->notify() to update keyboardModifiers() and mouseButtons().
The commit also did not fix mouseButtons() after QPA event processing,
and missed keyboardModifiers() after QPA Tablet event processing.
This commit fixes all these shortcommings in b2363a935c.
Includes test case by David Faure <faure@kde.org>
Task-Number: QTBUG-26887
Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: Iba4b7f8ff7a1c7974d144b955cbf064e43b36ec7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.
Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
With trailing spaces in some cases, we would not get the
"no justification at end of paragraph" special case, and continue
in the code, getting the unexpected case where line_length becomes
< 0 which would lead to memory corruption because we were writing
outside our buffers. I added an assert to catch this type of bug
earlier, and I added the trailing spaces to the test for the end
of the paragraph.
The test case added is one example which would crash.
Task-number: QTBUG-27354
Change-Id: Id720a6fa55dbc709ce04dd5321e55687bf960d75
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
As they are built-in, they are effectively registered at compile-time
already.
Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
trolltech.com seems to be shut down already
Change-Id: Ic90ce01aeb51b6f154b9bbf4762c365a398c9e3d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch allows single selection to be cleared with the normal
control modifier. This affects e.g QTreeView and QListView.
Task-number: QTBUG-8836
Change-Id: I7fd50b987acc3552b36657409568192763257536
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Going through QLocale and QString is not really needed.
This also makes the result of the conversion of negative numbers
in bases other than 10 independent of the architecture and
implements the documented behavior of treating them as
unsigned types.
Change-Id: Ibc231dc5241deb5cbadd9796484a8b5f79c29410
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The Linux futex implementation had a Q_ASSERT for positive values, but
the documentation says that negative values should be interpreted as
infinite (equal to lock()).
Test that too.
Change-Id: I2f96a502d672732781e88e49797756ca9a809121
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Requires C++11 rvalue references and variadic templates so we can
implement perfect forwarding.
Change-Id: I62e47d1ffd0c61e8386f9f246aa79031b7430b46
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QUrl::fromUserInput("http://") was invalid, which doesn't make sense
since QUrl("http://") is valid. Same for "smb:" which is actually
even more a valid URL from a user's point of view.
Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some things needed to be corrected for testing with PSQL, this was
checked against the the PostgreSQL documentation to confirm that the
exepected behaviour is correct.
Change-Id: I45a6b343e9eb920fcae2a62910ecc956abcac0f0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
These cases weren't handled before.
The validateComponent function is copied from QUrlPrivate::parse, with
the added modification that it now needs to check the gen-delims for
the userinfo.
Change-Id: I055167b977199fa86b56a3a7259a7445585129c6
Reviewed-by: David Faure (KDE) <faure@kde.org>
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.
Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
...and remove the outdated QUnicodeTables::Script enum.
QFontEngineData now has one extra slot that never used
(engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown],
if accessed, would be set with a Box engine instance, and could be used
as a minor optimization some time later.
In order to preserve the existing behavior, we map all scripts up to Latin to Common.
Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Add a command line program allowing to test rename, copy, etc.
Task-number: QTBUG-28246
Change-Id: Ie9667f03b65a874475700ec9ecd91ca2ed32ed97
Reviewed-by: David Faure (KDE) <faure@kde.org>
Use QWidget::isVisibleTo(parent) instead of isVisible(), just like
QAbstractScrollArea::replaceScrollBar() does. This removes the need
of using QCoreApplication::processEvents() to deliver the actual
hide event just for testing if the scrollbar was requested to be
hidden as it should.
Change-Id: Ie9a816e7b871d280a4b3d9d76adb10601915bd56
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
As recommended by Giuseppe, don't rely on the env var, but use the
internal but exported seed atomic int. This way, the compiler will
detect breakages, rather than runtime.
Change-Id: Iec2bc88c53532d3463d2dc5c73631fc9bc34747b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A pointer to the data of one qimage is used, with an offset, in a copy.
In the mono case, that could lead to overflow: the last row would
of the copy would stretch 1 byte beyond the end of the allocated
area. Fix by reducing the height of the copy, so that it keeps
within the allocated memory.
Task-number: QTBUG-28322
Change-Id: I09abfc83f738f8af000fc50f8c94f63dba3a6cfe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
... with respect to empty and null strings.
Change-Id: Ic107d5bcc8b659497a567b75a7244caceba5a715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...where the values are not aliased to Common script.
The old QUnicodeTables::Script enum was retained for compatibility reasons
until Qt internals are updated to use QChar::script().
Using QChar::Script instead of QUnicodeTables::Script would improve both
the text analysis (itemization, boundary finding) and the text shaping quality.
This also a required step for switching to Hurfbuzz-NG.
/* This adds 6668 more .rodata bytes */
Change-Id: I5aa3d12c550528d0052542436990f8d0779ea8e5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
CONFIG += pcre is enabled if we're using the Qt PCRE, which isn't
compiled for 8-bit. If it isn't set, then we have a system PCRE.
Change-Id: I29d043b9d3f4d3223dcbb41eadc9f859e710eb88
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Make windows frameless so that size constraints for
decorated windows do not interfere.
Task-number: QTBUG-28696
Change-Id: Ic4410d8a6e8166bdfe013ed2362173f8e02d4b29
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
According to the comments of selectRow and selectColumn, the expected
behaviour of this method was to select a row or a column and unselect
any cell that were previously selected. However the actual behavior
was to select only one cell and not deselect any cell.
Moreover, according to the specification there's no simple way of
selecting multiple rows or columns as when one of the methods is
called for selecting one row or column the others should be
unselected.
The specification was changed not to require the rest of the cells
to be deselected, although they might be deselected if the
selectionMode requires that in order for the new row/column to be
selected.
The implementation of these methods was changed in QAccessibleTable
and QAccessibleTree to select the whole row/column and take into
acount selectionMode and selectionBehavior.
tst_qaccessibility.cpp was modified to test the new behaviour of
the methods.
Change-Id: I29635d014792169302435e81704e02c16f951238
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Increase tolerance on Windows for the Aero style.
Set small top level widgets frameless to avoid warnings
about minimum size of decorated windows on Windows.
Task-number: QTBUG-28611
Change-Id: Ia4aec0cf0763da9955577054cb8cf81337fac134
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Avoid failures caused by minimum window widths on Windows Areo/8.
Task-number: QTBUG-28611
Change-Id: I9affcce84ab804a45fa1a12fb93ad0136e6ae877
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
When disconnect()ing through a QMetaObject::Connection, if the
QObjectPrivate::Connection contains a slot object, deref it, so
that it will be destroyed before the next run of cleanConnectionList.
Previously, a copy of the functor passed to connect() was kept until
QObjectPrivate::cleanConnectionLists was called (by adding a new signal,
or the sender was destroyed), even after a successful call to
disconnect(). That is, we were keeping that copy allocated without
any good reason.
Change-Id: Ie6074ea797df1611cb995dec07c5b5a742360833
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The QObjectPrivate::Connection refcount was not decreased
when disconnect()ing, therefore it was kept alive by the
owning QMetaObject::Connection object.
This removes a leak in case the QMetaObject::Connection
survives the sender object, after a successful disconnect().
Change-Id: Ie2ea59b269a0e589ae23c1457df7533be77c0797
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
More QVERIFY()s were added in the meanwhile to the test function,
so we can drop this one.
Change-Id: If6f137f45ba606b61d6a7004556a667ed316b61f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QGraphicsItem::setActive() is by design not guarded against calls that
do not change the current activation state of the item (e.g., calling
setActive(true) on an active item or calling setActive(false) on an
inactive item). This is to ensure that it's possible to set explicit
activation state on items, either before they are added to a scene, or
while the scene itself is inactive.
Before this fix, calling setActive(false) on a panel item that is not
currently active would by accident clear activation from any other
panel that might have focus. After this fix, activation is only cleared
if the item setActive() was called on itself is the active panel, or
is the panel that will regain activation once the scene is reactivated.
Task-number: QTBUG-28544
Change-Id: Ic4752f1e4400f9a0660bc968834747610212bb52
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This signal is emitted by QGraphicsScene whenever focus changes in the
scene (i.e., when an item gains or loses input focus, or when focus
passes from one item to another). You can connect to this signal if you
need to keep track of when other items gain input focus. It is
particularily useful for implementing virtual keyboards, input methods,
and cursor items.
Task-number: QTBUG-10570
Change-Id: I9cbbd9a2d15d6f568e1597c2c33ec049eb70f793
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
move QT+=widgets (and printsupport) statements before the install
statements, and de-duplicate some cases.
also move some TARGET assignments to a more conventional place.
Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qt is already added by spec_pre.prf, warn_on and depend_includepath by
default_pre.prf.
Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Makes tst_qgraphicsitem::tst_focusProxyDeletion not crash.
valgrind reported the error when running tst_qgraphicsitem. The crash
was very real; when deleting an item that has another item as a focus
proxy, the proxy still had a reference to the deleted item's focusProxy
pointer. I'm not a huge fan of whitebox testing but thought this crash
justifies a modification of the test to make it fail, instead of just
passing silently with a warning only given by valgrind and friends.
FTR the reason the test doesn't crash hard is that the memory is freed
but not reused within the scope of the test. So the access to the
pointer d_ptr->focusProxy succeeds, it just accesses memory that might
as well have been reclaimed. But this is quite undefined...
Task-number: QTBUG-28321
Change-Id: I2624631f5e5c2a8aa8bd4efe1fc128eba6c61f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This changes behavior, but I would argue it's a good change. If you
create a panel and activate it (e.g., by simply showing it or reparenting
it onto an already-visible item), you expect the panel to gain focus /
which is sort of the whole point of activating it. Prior to this change,
you had to have explicitly called setFocus() on one of the panel's
children, which would give that item subfocus, for that item to auto-
gain focus when the panel was activated. This change makes it more
automatic. If the panel itself or any of the widgets in its focus chain
can gain focus, they will gain focus when the panel is activated.
So the new logic is - if the panel already has a focus item, so if
someone explicitly set subfocus on an item before the panel is shown,
that item gets focus. Otherwise, if the panel itself can gain focus
(e.g., someone makes a line edit / text edit panel), it gains focus
when activated. Otherwise, we search the focus chain until we find
the first item that can gain focus. This last case is the file dialog
case, where the dialog itself can't gain focus but typically the
first item in the focus chain is the primary focus widget, such as
the search field or the directory list view.
The change also fixes this for the first Tab. If you clear focus on
a panel, the user expects to be able to press Tab to regain focus.
Prior to this change that didn't happen. Now, the panel or the first
in the focus chain that can get focus gets focus on first tab.
Task-number: QTBUG-28194
Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
For moc, rcc and uic, then it's friendly for tools like ccache.
ccache is using md5 to check file modification, but the different
timestamp info will cause different md5 for same meaningful
contents, it will disabled ccache.
Updated the autotest for uic and rcc.
Task-number: QTBUG-26589
Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
We need to do bounds comparison on the actual offset we're going to use
with _mm_load_si128 to read 16 bytes from memory (even though we won't
use the trailing bytes in the end).
Task-number: QTBUG-28324
Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Change-Id: Ib05a120db16f65d9833663445c028971d4de3d29
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Avoid QHash randomization so that the order of the XML attributes is stable
This was causing intermittent failures.
Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This increases consistency a lot: all windows and dialogs from a Qt
application will show the app display name in the caption, on Windows and X11.
This helps identifying which app a dialog belongs to, which is especially
useful when the dialog is very generic and shows up unexpectedly.
For compatibility reasons, the app name is added to the caption only
if setApplicationDisplayName() was called -- or if the caption would be
completely empty. The standard Qt4 case (setWindowTitle + no display name)
is unchanged.
Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This test fails on some setups and a pending critical change
causes the existing bug to trigger in CI. To avoid blocking
other changes because of this bug, it's been marked as
insignificant until such a time when it can be fixed.
Change-Id: Ide41f7b1c76209f9c05f95f996b2364d5dea5e67
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
We also need to detach() the taken value in case the compaction triggers and
modifies the underlaying data.
Change-Id: Idcdeba4236b8e208d107d41be2decbdfc5721300
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
These tests have been failing on certain setups for a while,
but some new critical changes causes the failure to trigger
on the CI system as well. We mark them as insignificant until
they can be fixed.
Change-Id: I467e7030c55d6f23515275b4062c17068d2b688c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
When clicking at the bottom-right corner of a menu in a menu
bar, it appears at the wrong position. Add test and stabilize
RTL-tests by making sure the layout direction is cleared should
they fail.
Task-number: QTBUG-28031
Task-number: QTBUG-2596
Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The stepSize property was missing in Qt 4 and is
a sensible addition to the value interface.
Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
In SHA 51914375b6 the rubberband
selection was fixed, so it followed the scene-point on mousemove.
However wheelEvent could move the view - but avoid update of the
rubberband (that would not be updated until next mouse-move).
This patch fixes that (and generally improves rubberband behavior)
since QGraphicsViewPrivate::mouseMoveEventHandler is called by
replayLastMouseEvent, which is called from various places,
where we need to update the rubberband (e.g scrollContentsBy).
Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
it compiles just fine without it.
if this was meant to inject a newer version of JSC than what is in
QtScript, it can be redone without creating a bizarre hybrid.
Change-Id: I61fe60bfa6a9bdb6423e8a7135250e332a5835ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
so other modules can actually re-use the code without referencing qtbase
sources.
Change-Id: Id66f07b476e539273dd32455e7642a17d7e5d0ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
this is a compile-only test, and it's not even marked as a testcase in
the autotest system.
Change-Id: I9b48ddad3c8e3e953d0e6fcfa010bab73289bc6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
There are two ways to register a type: using Q_DECLARE_METATYPE(T) and
using qRegisterMetaType<T>("T"). Doing one thing in one translation
unit and another thing in another TU constitutes an ODR violation,
because the value of QMetaTypeId<T>::Defined will differ in the two
TUs.
By adding the information whether a type was declared with
Q_DECLARE_METATYPE to the typeFlags(), such a use will trigger
the existing binary-incompatibility failure that checks for
equality of the incoming type flags with the stored ones (if any).
I had to encode the type as a defaulted function argument in order
to avoid the linker merging instantiations of the function templates
and therefore rendering the detection moot.
Change-Id: I82017caf300458b411cc8ac2f6653536fac64117
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Manual tests are not supposed to be run by "make check"
Change-Id: I0539b94f5286e89ddad2edf487d4b0d82fc2f374
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
Commit 0696071316 moved away from QDom but
also lost the ability to fill the introspection field of the created
QDBusIntrospection::Interface instances. This commit now generate the
string again as we proceed with the QXmlStreamReader based parsing.
Task-number: QTBUG-26668
Change-Id: I8f406e1f4e9d3e667a8557db69da36cac369ba4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With the change cff46983a, prepared queries can now store a
named paramater to be used more than once.
When using ?, thus positional binding, there is no named
parameter, thus there is no need to store it.
When prepare is called from a query with ?, it currently
causes an error when the feature QSqlDriver::NamedPlaceholders
is true. Because holders values are called while holders is
actually empty.
QSqlDriver::NamedPlaceholders is true for QOCI plugin only
but the problem is independant of the plugin used.
Adding a test case with a test driver to make the test runnable
without Oracle installed.
Change-Id: I6d7491f7e09a7b62d2d4d216b40fedd67e927e27
Reviewed-by: Matt Newell <newellm@blur.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Add handling of the focus chain to QGraphicsItem::setFlags(), so that
the focus chain is repaired (panels pop out of the chain and non-panels
merge back in) when the ItemIsPanel flag is toggled. Add handling focus
chain to QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting for
panels.
Before this fix, you must enable the ItemIsPanel flag before adding
the item as a child to a parent panel, and you lose focus when using
the tab key to focus around a panel after it has been reparented into
another panel.
Task-number: QTBUG-28187
Change-Id: I1d0d81a90697eaf715a8a337c8bf6c2159329e68
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There are no proper implementations of this API, and as it stands it
only acts to confuse anyone who stumbles across it. It will be better to
revisit the full cross platform orientation API story for 5.1.
Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The address behind a string doesn't point to a string.
Change-Id: Ic54f652ae781fea278f60cc49d219c1c610ba29f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This makes QT_PLUGIN_PATH / QCoreApplication::libraryPaths() actually work,
as a search path for plugins, when apps look for a specific plugin by name.
To make it possible to write portable code (unlike the current QPluginLoader
unittest), let QPluginLoader figure out the extension, too.
Change-Id: I895d597d7cb05ded268734bc5f313f32d8d12cb9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The QSslSocket one is both wrong and redundant as there is a
Q_DECLARE_METATYPE for it already.
Change-Id: I63d065abfb3d0e3d82a8b1f29a6752b7676db847
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
there is no point to use this for in-module references.
cleaning it out in an attempt to purge the constants entirely.
Change-Id: I1da4d70e3778257dd43eda0bdfc71eaec1124732
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
we were already installing them into QtCore/private, so turn them into
proper private headers to start with. this cleans up our project files.
Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
A focus scope has effective focus if one of its children is the focus item,
clearFocus() should remove effective focus from an item and its children
not just from the focus item.
Task-number: QTBUG-28328
Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Also change Trolltech for QtProject in other places
Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QStackedLayout doesn't have support for QLayout, only QWidget, so
the issue doesn't arise there.
Reported-by: Johannes Schaub
Task-number: QTBUG-27420
Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Execute the test in a temporary directory, purge remaining files
except the special readonly-files in cleanup().
Avoid repeated invocation of QFINDTESTDATA() by assigning to
member variables.
Do more checks in rename(), check on contents of file.
Generally, use more QVERIFY2, print error messages.
Task-number: QTBUG-3570
Change-Id: Ibd0e11a361208a716ea3efbcca76adeda70e061a
Reviewed-by: David Faure (KDE) <faure@kde.org>
Bring Qt 5 on par with Qt 4, prepare for more comprehensive
support later on.
Introduce device independent pixels (dips), device pixels,
and devicePixelRatio. Add high-dpi support to QPainter,
QGLWidget, the cocoa platform plugin, mac and fusion styles.
Dips are similar to CSS pixels, Apple points and
Android density-independent pixels. Device pixels
are pixels in the backing store/physical pixels on screen.
devicePixelRatio is the ratio between them, which is
1.0 on standard displays and 2.0 on "retina" displays.
New API:
QImage::devicePixelRatio() and setDevicePixelRatio()
QPixmap::devicePixelRatio() and setDevicePixelRatio()
QWindow::devicePixelRatio()
QScreen::devicePixelRatio()
QGuiApplicaiton::devicePixelRatio()
Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
It's again possible for QWindows and widget windows to go into
fullscreen mode on the Mac.
Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
We should consider the scene-position when we are expanding
moving a rubberband. If the user does some auto-scroll
(Qt should support that itself, but that is another matter)
then the rubberband should not keep the (old) local position
to calculate the rubberband extension, but instead use the
scene-position that was actually clicked.
Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Since QtOpenGL/QGLContext is implemented in terms of
QtGui/QOpenGLContext which has stricter requirements about how it's
supposed to be used, we need to apply these requirements to QGLContext
as well.
This change adds QGLContext::moveToThread(QThread *) and documents it as
a necessity for making a context current on another thread.
Also introduces QGLPixelbuffer::context() to access the QGLContext of a
pixelbuffer, and made QGLWidget::context() return a non-const
QGLContext, since there's no good reason why it shouldn't, and it leads
to less const_cast clutter.
We could have introduced a backdoor in QOpenGLContext instead, making it
loosen its requirements, but that would have made it harder / impossible
to fully support threaded OpenGL in all the platforms.
Task-number: QTBUG-22560
Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: I25ac344d349d07db94e2fbc9ef943e09c399f913
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
As 672e7c875e did changing pos() to
position() and setPos() to setPosition().
Luckily there's not much code that uses these.
Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When hiding any widget that is not a panel, it is correct to clear
subfocus. In case clearFocus() has been called, the result is that
focusItem() / focusWidget() points to 0, which is correct. Upon
reactivation, nothing gains input focus. When changing focus, the
following setSubFocus() call will ensure subfocus points to the new
widget.
When hiding a panel, however, it's essential that subfocus within
that panel is not cleared, otherwise, when re-showing the panel,
nothing will have focus, whereas the expected behavior is that focus
is restored to the last item that had focus, i.e., the focusItem()
a.k.a. subfocus widget.
Task-number: QTBUG-22256
Change-Id: I84d849a505764e074e1369fef923cef1ad5c0b1e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This makes the structure of the examples after an 'make install'
similar to the one in a 'developer build'.
Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454
Reviewed-by: Martin Smith <martin.smith@digia.com>
QCoreApplication::Type enum was removed in 553e21. This change updates
the (un)tested application types to match the application types
available in Qt 5.
Change-Id: I8631987a9ff31dc81baa013619cfc18616b851d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QWindowsStyle is soon to become an internal class.
Change-Id: If163aae6910c0b082a9bcca1ebbab66660cc005f
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: Ie28d4ea074938b17827aa803a2298f881946f7e5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: I287c771a841ba96e445f0a0df96ea035be25ac74
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: I422e7d67fadbb169d19285aab0a8ba0f3d668697
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
QWindowsStyle is soon to become an internal class.
Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
If we are reacting on the sectionResized signal and we call
setDefaultSectionSize we should ensure that we are not moving
the mouse-cursor.
This is an improvement of f8f6acb05c
Change-Id: I1adee7821bc8fcc9633f692bfd515f2c458b12c8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Since the documentation doesn't mention the search should be done by language only,
consider the current behavior incorrect.
As of now, it is possible to get a list of locales by Country or Script as well.
Also fix countriesForLanguage() to be in-sync with matchingLocales().
Change-Id: I6a09ca459120143565fa6099d2b823df1fed7c25
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Remove redundant includes, remove references to deprecated
QApplication::GuiServer (passing that has no effect anymore), and use
QStyleFactory instead of referencing QWindowStyle directly (about to
become an internal class).
Change-Id: I08f94993a55ce6039c7694d8f7019cbd53594edc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
On Mac every function was skipped individually,
on the other platforms it was marked as
insignificant.
See also QTBUG-22560 and QTBUG-22361
Change-Id: Ie9b9c617006d5a8c19d042b8be89e449c5ac70bc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
When compiling qmetatype auto tests with msvc2008 64-bit, I receive:
qmetatype.h(383) : fatal error C1128: number of sections exceeded
object file format limit : compile with /bigobj
This patch follows that advice and adds /bigobj to QMAKE_CXXFLAGS.
Change-Id: I05b3cf9dfdb6a93649c692e2df22365d200e6f2f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Correclty replace macros according to the C++ standard.
Use the correct replacement method also to evaluate
With this moc correctly processes boost headers.
Task-number: QTBUG-27546
Change-Id: I001b3054c5fcdc34d46cfa53d1387bd19436f361
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make sure we always emit the destroyed() signal before
we delete our children. This wasn't working correctly
for QWidget based classes, as the QWidget destructor
deletes all children itself.
Task-number: QTBUG-24672
Change-Id: Iecdff3489196271177edfeba1c4a2c5800e255af
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This patch fixes the manual move of sections when auto scroll is on.
It is done in QAbstractItemView::doAutoScroll by letting the
qheaderView use its parents scrollbars if they are childs of a
QTableView or QTreeView.
Task-number: QTBUG-993
Task-number: QTBUG-1103
Change-Id: I70d999d9a07c3566e42d01cc5ebb47a69a83d9d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QMacStyle directly.
Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
As of Unicode 5.1, some punctuation marks were mapped to MidLetter and MidNumLet
for better URL and abbreviations handling which caused "hi.there" to be treated
like if it were just a single word;
until we have the Unicode Text Segmentation tailoring mechanism, retain
the old behavior by remapping (some of) those characters back to their old values.
Change-Id: I49dea6064f2ea40a82fc0b1bc3c4f0b4e803919f
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsMobileStyle directly.
Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsCEStyle directly.
Change-Id: I6b3c0554e7a2a4a5f0027f4ea1342fd332af89ad
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
When the floating-point behavior in MSVC is set to "precise" (default),
assigning nan numbers to a float causes the bit pattern to be altered
(only affects 32bit builds). We should therefore not assign the swapped
value back to a float and use it.
Task-number: QTBUG-25950
Change-Id: I7b6cc4d546e5c8aeafdede749056358b7d639ec7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Somehow this bug managed to stay hidden until the introduction
of QFusionStyle.
Task-number: QTBUG-27675
Change-Id: I86b049b869e9f2951426dc67a485ad7c60ef1403
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Requested by Allan Sandfeld Jensen for QWebkit, which needs to register
upfront all the mimetypes that a given plugin can handle.
Change-Id: I64b8d39c7988adfc7db4ed8bfdc73acd16e999da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
geometryengine.cpp: In member function 'void
GeometryEngine::drawCubeGeometry(QGLShaderProgram*)':
geometryengine.cpp:159:93: warning: cast to pointer from integer of
different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95:
warning: cast to pointer f rom integer ofdifferent size
[-Wint-to-pointer-cast]
benchmarking.cpp: In member function 'void TestBenchmark::multiple()':
benchmarking.cpp:85:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
benchmarking.cpp: In member function 'void TestBenchmark::series()':
benchmarking.cpp:120:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
qstandarditemmodel.cpp:2717:45: warning: unused variable 'd'
[-Wunused-variable]
qxcbconnection.cpp: In member function 'xcb_timestamp_t
QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning:
suggest parentheses around assignment used as truth value
[-Wparentheses]
tst_qguiapplication.cpp: In constructor
'BlockableWindow::BlockableWindow()': tst_qguiapplication.cpp:340:9:
warning:'BlockableWindow::enters' will be initialized after [-Wreorder]
tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves'
[-Wreorder] tst_qguiapplication.cpp:342:12: waring: when initialized
here [-Wreorder]
tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value'
[-Wunused-parameter]
tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index'
[-Wunused-parameter]
Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...just like described in http://www.unicode.org/reports/tr35/#Likely_Subtags.
This is much more effective than current "guessing" algorithm
+ makes it possible to instantiate a locale by the script or territory code only.
Change-Id: I674f8476e65b01c56960b6e83a1a346df0715274
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This patch adds some missing codes (two-letter ones only),
removes an outdated ones, and updates some names.
The legacy language codes are handled in QLocalePrivate::codeToLanguage()
(fortunately, there are only 4 of such codes).
Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This makes it possible for uic to handle QTreeWidget that in
the designer has one or more empty headers.
Before the right(most) empty items where there wasn't a
non-empty header to the right of them would not be visible.
The other empty items - where there was a header to the
right of it would not be empty but initialized with a number.
This patch ensures the same behavior that the QTableWidget
is having.
Task-number: QTBUG-18156
Change-Id: I19bfd3307befe46a1af2d6a3275f7446a15b3442
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsXPStyle directly.
Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsVistaStyle directly.
Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
On the BlackBerry platform, applications run in a sandbox. They are
not allowed to read or write outside of this sandbox. Hence in
QSettings there is no use for the system scope and differentiating
between organization and application. This change will also improve
performance.
Change-Id: I79fee0140595385f3d33bd89fe5daa36b04836bc
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.
=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QFusionStyle directly.
Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Actually, this broke using QXmlStreamWriter with any codec
where characters in the ASCII range have a different encoding
than the ASCII standard.
This was a regression from 558fe9383ba0aecbec09cc411c0ebab132aac137
Task-number: QTBUG-23310
Change-Id: I75bd013e9d5de53da564a76c2f06e95ff35303a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
...with a generated one in a way similar to what
http://www.unicode.org/reports/tr35/#Likely_Subtags suggests.
The supplemental/likelySubtags.xml contains all the required data.
This changes some default countries to a most-expected ones.
Change-Id: I920a5623601d8661a943e78197d3bcc838191483
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The error and message handlers used by the freetds library were getting
reset to back to the default every time a database was opened. The
Qt TDS SQL driver was calling dbinit() from QTDSDriver::open(). This
had two problems:
1. dbinit() would reset the error handler previously set by a call to
dberrhandle(). A db error would then cause the application to
abort.
2. freetds expects dbinit() and dbexit() to be called symmetrically.
Opening multiple database connections would result in freetds not
cleaning up on application close.
Solved by moving the dbinit() call into the QTDSDriver constructor.
Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Checking that the result of sort() is a specific list is wrong,
as sort() can put equivalent elements in an arbitrary order.
Change-Id: Ib06399cdecedb6cf01e721d4d92048449d66b40d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The timeout is in millisecond. So we just need to divide by 1000 to get
the number of seconds
Regression introduced in f587e8f4fd
Reported in the comments of QTBUG-24795
Change-Id: Id16e05e7d04d33605860926f7516d14cdefd6a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since none of the platform backingstore implementations currently
implement this, skip trying to use the optimization for now to avoid
graphical glitches.
Task-number: QTBUG-27971
Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
When the sections has been resized we need to calculate new values
for the section start-positions. Otherwise we break visualIndexAt
and sectionPosition.
This fixes a regression introduced in
b800d8b94a
Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Sending enter and leave events to other windows than the grabbing
window is not logical. The policy should be that only the grabbing
window receives enter and leave events.
Changed the documentation accordingly and provided the necessary
changes to Windows implementation.
Also removed explicit leave event generation for widgets when
popup is opened as that is now redundant.
tst_QWidget::underMouse() test was changed to behave according to
new logic.
Task-number: QTBUG-27871
Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When both freedesktop.org.xml and kde.xml define text/x-qml (*.qml),
the XML provider would look up *.qml, see two mimetypes, and treat that
as a glob conflict, and proceed with contents-based-determination,
which for this sample file, would find "C source" due to the C comment.
Fixed by ignoring duplicate pattern-mimetype associations.
The binary-cache provider doesn't have this problem, update-mime-database
already filters out duplicates when generating the on-disk extension tree.
Change-Id: Ie335b0b419e7413fa0550779709513f68c2bfc68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This prevents unnecessary updates, since the cursor is not visible.
Change-Id: Iec54ed338a0cb526a03cd611de4d823e26f3d804
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This was apparently done so in each of the widget_<platform>.cpp
in Qt 4.8. This then causes the cursor to be updated in
dispatchEnterLeave() on Windows and Linux.
Task-number: QTBUG-27871
Task-number: QTBUG-27585
Task-number: QTBUG-26424
Change-Id: Idf14cd96ccb36f7c2607853ed8b0024c36a5413c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
If you set the duration of any variant or property animation to 0,
its progress will be stuck at 1 (0..1), and its "end" value set on
the target object, after start() has been called. If you change the
direction of the animation to QAbstractAnimation::Backward, you
would expect the progress to be 0 after start. Instead it's still
1; the code seems to assume that if the duration is 0, the
progress must be 1 always.
The fix is that if the duration is 0, the direction is checked to
determine whether progress should be 0 (Backward) or 1 (Forward).
Task-number: QTBUG-27969
Change-Id: Ibeca084bbbce41df1dca7b7d96c15b6b54394996
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thierry Bastian <thierryb@filewave.com>
Reviewed-by: Magne Zachrisen <mazachri@cisco.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
remove private->public hack, make it build on all platforms;
replace homebrew testing code with QtTest based one
Change-Id: Iaed93fd21938620e58ae90189456df1b8061f2f5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Macros should call QSKIP instead of creating a semi-empty function body.
Change-Id: I389701f618fe9bf0a40aa26f161620389a80e407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Enter handling requires knowledge of the mouse
position. Extend the enter handling of
QWindowSystemInterface to receive the position
(implemented for Windows, XCB and Mac), passing it
on to QEnterEvent. Dispatch QEnterEvent from
widgets code.
Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
For the special transparent color index, the decoder would skip
writing anything out (thus leaving the pixels at 0 rgba value).
Although correct for later frames, for the initial frame this would
loose the color information for such pixels (which one otherwise
could have made visible e.g. by converting then image to an
alpha-less image format).
Change-Id: I316cefce8f21797feedebfbf98296ad84eaa4b99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qt/c309d424f45dc0e7b62fbbbabf20dbfe355f48a7)
Reviewed-by: aavit <eirik.aavitsland@digia.com>
a) Use the new Qt5 OpenGL API for testing of GL painting
b) Simplify: Use the higher-level QBaselineTest API instead
of the low-level baselineprotocol API.
Change-Id: Ib5f47f6fe68837dfdc8dc3a74638c5cb0b724614
Reviewed-by: aavit <eirik.aavitsland@digia.com>
1. There is a behaviour change for CFDateFormatterGetFormat() between
10.6 and later, QLocale::dateFormat(QLocale::LongFormat) will return
"MMMM d, yyyy" for 10.6 and "MMMM d, y" for 10.7, 10.8
2. Add a comment for toCurrencyString() test, need another system
settings
Task-number: QTBUG-27790
Change-Id: I4fe684d6e0c1d4a140e3b1f1ef395b7fdad030b4
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
MYSQL_TYPE_TINY should be used for binding bool input value.
MYSQL_TYPE_LONG might be too big for bool, resulting in bools being
saved in the database as int 127. The problem was not specific to
the vendor's BOOL column type.
http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.htmlhttp://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statement-type-codes.html
Added generic autotest to make sure that binding bool works. All
drivers should pass this test.
Task-number: QTBUG-27763
Change-Id: I4e69f8e3b32fffb702ec9fa8a80ff5c50dea954b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This has (and still does) caused lots of grief since
it means accessibility was often unintendedly not built.
Instead copy the lib-at-spi-2 header file needed for the
type enum and build it by default again.
Change-Id: I1ba26f20edff1aeb444c96a37928f36230ac7576
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
While handling events for Widgets and Windows in QWidgetWindow::event
makes sense for other events, it causes QWidget::show/hideEvent to be
called twice when handled like "the rest". Having that as one case here
seems to be the cleanest solution. Removing the call to showEvent from
QWidgetPrivate::show_helper (as proposed in the bug report) causes
autotests to fail and thus is not a viable option.
Additionally the expected result for the task221221 test for
QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was
restored.
Task-number: QTBUG-27199
Task-number: QTBUG-26424
Task-number: QTBUG-22565
Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Abbreviated properties are to be avoided. But all 3 of these
properties are redundant from the QML perspective; and because QRect,
QPoint and QSize are (wisely) not QObjects, it's not possible to bind
to _their_ properties, which make these QWindow properties less useful
than users might assume that they are.
Change-Id: I19c00b54b1d2712f9418e8bcf56e35a8008b89ef
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Benchmark tests are not supposed to be run by "make check"
Change-Id: I718565a8b4e71c136c7aa8f9bd95f95c5fdafab8
Reviewed-by: Rohan McGovern <rohan@mcgovern.id.au>
windowTitle, windowModality, windowIcon and so on are named that way
to be similar to the ones in QWidget. However QQuickWindow inherits
all of the declared properties, and we would like to have shorter
property names in QML. If you are working with a Window then it's
obvious the title property is the window title. Unfortunately,
there must be patches in many other modules which depend on this one.
In order to avoid the need to merge them all at the same time,
there is also patch https://codereview.qt-project.org/#change,39001
which temporarily adds backwards-compatible accessors, which can be
removed after the other modules are able to build without them.
We should not rename windowState to state, because in QML, state
usually drives the state machine for animation transitions etc.
(although QWindow is not an Item, a user might get confused about it).
Related patches are
https://codereview.qt-project.org/#change,39001https://codereview.qt-project.org/#change,37764https://codereview.qt-project.org/#change,37765https://codereview.qt-project.org/#change,37766https://codereview.qt-project.org/#change,37762
Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
As the script dependency for that autotest is not really needed it should
be moved to qtbase.
Task-number: QTBUG-27706
Change-Id: Ieda8b2182a20a77f53a0be9878e82e3236c79c2b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
No reason to keep this test. If an application is trying to allocate too
much memory it will fail, and its the users responsibility to provide
sane values and catch exceptions to recover.
Task-number: QTBUG-27361
Change-Id: I29d71745ab791b6e8a76f7b1f866ff4bd7024749
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A 180° rotation results in a TxScale QTransform with negative scaling
factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint
engine yet, so use software rendering fallback in this case.
This rendering issue can be seen when using "-webkit-transform" CSS
property in WebKit with DirectFB QPA platform.
Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
As CI runs autotests using the "check" target the approach using
DESTDIR = ../ does not work for the test. Instead the binaries are just
moved one directory up and QFINDTESTDATA is used to find the path of the
helper binary.
Change-Id: If1ed2b60821f1de4ac62f238c8af5e09cf0f444a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Seems that these tests are now passing on Windows, so remove the skips.
Change-Id: Id30ef544502f97f8bc84f35f635e39912da3afe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QApplicationPrivate::leaveAfterRelease was not properly cleared when
mouse event handling was interrupted by a modal dialog, which caused
every mouse move over the modal dialog to trigger enter event to the
widget under cursor.
Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event
without any buttons pressed is handled.
Task-number: QTBUG-27643
Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.
Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.
This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.
The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template
If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.
Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Pointer to const member function have a different signature, and hence
need their own traits code.
Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
We don't need to define pi.
Use some clearer names in navigateHierarchy.
Use smart pointers.
Change-Id: I482efe9235a3419f048baede6886d29d46e3057c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Use smart pointers.
Navigation to siblings is long gone.
Change-Id: I81a10633960eefb9738990682734dcfbdd65330c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Add a read position variable to eliminate excessive memcpy'ing when
reading a partial buffer.
Specifically, fix performance issue of reading large files from
QNetworkDiskCache in QtWebKit2.
Task-number: QTBUG-27522
Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Antti Harju <antti.harju@ixonos.com>
This prevents the user of moving the leftmost column.
There will be no API to allow move of the tree-structure.
It is very weird to do that, so it shouldn't be a problem.
In case it is a big problem somewhere it can be hacked with:
QTableView unused;
unused.setVerticalHeader(tree->header());
tree->header()->setParent(tree);
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
Task-number: QTBUG-332
Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Get rid of QWidget-centric QMacStyle::eventFilter() and implement the
fade out animations for scrollbars using QNumberStyleAnimation-based
QFadeOutAnimation.
Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
It does not make sense to add a QLayout to a QSplitter, since the
splitter manages its child widgets in the same manner as a QLayout.
The result of doing so is that the child widgets inside that layout
will lead to the splitter and the layout fighting to position the child
widgets.
QSplitter::addWidget should be used to add widgets directly to the
splitter instead.
Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679
Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The animation is not just supposed to run when indeterminate, but
also while it is progressing.
Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Ifdef out waitForBytesWritten on Windows.
See comment in source.
Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If ReadFile returns with an error then we must set our internal state
accordingly. QWindowsPipeReader::readSequenceStarted must be set to
false. If ReadFile fails, we're not within a read sequence.
Also, we must handle the ERROR_BROKEN_PIPE error.
Task-number: QTBUG-25342
Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The old code is just plain wrong for negative julian days. Replaced
with plain math from The Calendar FAQ [1], which is correct for all
julian days, provided you use mathematical integer division (round to
negative infinity) rather than c++11 integer division (round to zero).
[1] http://www.tondering.dk/claus/cal/julperiod.php
While the conversion code works for up to around JD +/- (2^63/4), we
only use an int for the year in the API, so this patch limits minJd()
and maxJd() to 1 Jan (2^31) BC and 31 Dec (2^31-1) AD, respectively.
Note that while the new conversion code looks like it would be more
expensive than the old, gcc will in fact be able to optimize it to be
slightly faster (probably because x86 hardware implements round to
negative infinity, and so GCC manages to optimize floordiv to a single
instruction, compared to the three instuctions needed for operator/).
In the following test application, run with a release mode Qt and
redirecting stderr to /dev/null, I measured an improvement from
6.81s +/- 0.08s to 6.26s +/- 0.16s user time over five runs on an
otherwise idle x86_64 system.
int main(int, char *[])
{
int year, month, day;
qint64 jd;
for (qint64 i = Q_INT64_C(-1048576) ; i < Q_INT64_C(1048576); ++i) {
QDate::fromJulianDay(i).getDate(&year, &month, &day);
jd = QDate(year, month, day).toJulianDay();
qDebug() << jd << year << month << day;
}
}
Change-Id: Ifd0dd01f0027f260401f7f9b4f1201d2b7a3b087
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
These are useful when QWindow is exposed to QML.
Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This seems to be the established practice.
Change-Id: I75a65d722a026ab0eb1805688743f46aba406e6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Different OpenSSL versions produce slightly different output when
dumping a certificate.
Change-Id: Ida98b24422302e287641be074d6740ca292cf203
Reviewed-by: Richard J. Moore <rich@kde.org>
Using
git ls-files -z | xargs -0 sed -i 's/ \+$//'
in the relevant directories.
Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
To avoid leaking when converting a QFuture<T> to a QFuture<void> we need
to have a separate ref. counter for QFuture<T>. When the last QFuture<T>
goes out of scope, we need to clean out the result data.
Task-number: QTBUG-27224
Change-Id: I965a64a11fffbb191ab979cdd030a9aafd4436c2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
As the script dependency for that autotest is not really needed it should
be moved to qtbase.
Task-number: QTBUG-27705
Change-Id: I4ce0d34aca97cadd79b157b0f7c90c406bed4295
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
tst_QMimeDatabase::inheritsPerformance() is not an unit test but a
performance test, so moving it from 'tests/auto/corelib/mimetypes/qmimedatabase'
to 'tests/benchmarks/corelib/mimetypes/qmimedatabase'
Change-Id: I59e84f61559023659f101666683870f2ca1d2034
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
qt.nokia.com is also going to disapper in future, so I think it is better
to use qt-project.org.
Change-Id: Ice550fe657a33609472b8e4b8630d7649f9c9fb5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
All modules currently have a test_modules CMake test. The
new module_includes test has very similar requirements, and can
obsolete the hand-maintained test_modules tests in all modules.
After all test_modules have been removed in other repos, the
module_includes test can be renamed to that name.
The types chosen need to have a constructor which can be invoked
with no arguments. QtConcurrent has no public classes which fit
that description so it is still tested separately
Change-Id: Id7929cd32b3112c293cbf5e6964cc894a697f9b1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Change-Id: Ia9bf8d3c202b17746036e203268ef6229aaa900d
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
If a modal dialog was shown as a response to button click, the button
retained its hover highlight, because it didn't get leave event.
Fixed by tracking the most recently entered window and sending a leave
to it when modal dialog is shown that blocks it.
Also modified tst_QGuiApplication::modalWindow() autotest to check
for enters and leaves.
Task-number: QTBUG-27644
Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
When the QPrinter is initalized then it will set up page margins based
on the default paper size. If the paper size is changed to be a custom
one then it should disregard the margins for the default paper size.
If the page margins are set explicitly beforehand then it will use these
page margins.
Change-Id: Ic535c3a80b8b217dbd5eb5f4fb2cbc0ab1354563
Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
hasUnquotedAP currently only checks for an a or A, which is wrong
according to both the toString documentation and the comments for
hasUnquotedAP.
Change-Id: I03015734b846fe761085cf8f8fca2b29210cff97
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
We can insert directly on the most left-most Node.
We always enforce an insert here (unlike the insert call),
but that is not a problem since the keys in a std::map are unique.
Change-Id: Ib409b90ffc57a5a43dab4a4b08d34f6fdabd057f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
in case when the layout is partially initialized.
We shouldn't access any data except of indices
if GlyphIndicesOnly flag has been passed in.
Change-Id: I264689b498e0f9de8b5c040d47dbae4f6ef391c4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
Qt::WA_MergeSoftkeys
Qt::WA_MergeSoftkeysRecursively
It also removes some "zombie" enums:
Qt::WindowSoftkeysVisibleHint = 0x40000000,
Qt::WindowSoftkeysRespondHint = 0x80000000,
(The only implementation that used these were removed when
qapplication_s60.cpp and qwidget_s60.cpp were removed.)
Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Remove QSKIP and instead omit the whole tests when appropriate.
Remove QSKIP from crashTest, crashTest2 and exitStatus on Windows,
the tests are now passing.
Add a guard in testForwarding to check if QT_NO_PROCESS is defined.
Change-Id: Icba4d773315e3bf87764a381742168b51cf169c0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reference tasks with detailed information of failures rather than generic
task for blacklisted tests.
Task-number: QTBUG-27732
Change-Id: I0f0f500d255ea8748dd98d066deeaf1dfcdb7ec8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The test expects 'fail:invalid' to be an invalid file,
which it no longer is on Windows 7. It also assumes that
f: is an invalid drive. Fix by picking a drive that does not exist.
Task-number: QTBUG-27306
Change-Id: I9d9b36c50fc31d2561d3c4eec66f65d96084f0d7
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
It was probably not implemented because it needed to access
private APIs.
However, accessing those from this a11y plugin is unproblematic.
Forward-ported from Qt 4.8 with change
d2fb64d52fc6ec229d775f829a9a0cb3d251aad3 (and then slightly improved)
Change-Id: Ifa2d48c152fd75fc1fff49a05369787a7db3b902
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This suggestion keeps track of the most left node.
The point is that constBegin() becomes a lot faster.
That speeds up iteration a bit, and makes it O(1) to get the
first element. The penalty in insert and remove is very small.
On large trees it seems to be less than 1%.
It should be noticed that constBegin() is a very common hint
on my planned change to 5.1, and this opperation will without
this patch cost 2 x log N. One when the user calls the hint
with begin - and one where it is compared with begin.
Other std::maps has a very fast begin(). E.g
http://www.cplusplus.com/reference/stl/map/begin/
(begin with constant time)
Change-Id: I221f6755aa8bd16a5189771c5bc8ae56c8ee0fb4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Giving the std-map a hint (normally) improves insert performance.
There seems to be no reason not to provide this hint.
Change-Id: I4344607ebf54574a3ae9666d87a41a3c14762361
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Adds NOTIFY to currentText property.
Test included.
Change-Id: I3e92b585ad6697891d61537c82f6ab9e8beb1a00
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QItemDelegate and QDataWidgetMapper use the WRITE method on the USER
property to set a value in a widget. This did not work for QComboBox
whose USER property currentText lacked a WRITE method.
This change adds the missing setter and flags it as the WRITE method.
The setter setCurrentText() simply calls setEditText() if the combo
box is editable. Otherwise, if there is a matching text in the list,
currentIndex is set to the corresponding index.
Test included.
Follow-up to 816c554017 which restored
currentText as the USER property.
Task-number: QTBUG-26501
Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The variations of includes which should work are tested. For example,
in the case of testing the QtCore module and QObject include, the
following includes are generated and compiled:
#include <QObject>
#include <QtCore/QObject>
#include <QtCore>
#include <QtCore/QtCore>
As the private include directories are not available to the compiler,
this also tests that private headers are not included from public ones.
Change-Id: Id03d0fe290c9691e0f7515015892991d1701ab72
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fixed menu handling on Cocoa so if a menu is enabled/disabled or made
visible or not then it will keep this in sync with the appropriate
native menu entry.
Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f
Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Fix those test scripts that assumed cosmetic default pen, and
improve testing coverage of cosmetic vs non-cosmetic pens in general.
Ref. I04d910e9700baf7f13a8aac07a3633014bb9283e
Change-Id: I2bb3525c21a8e9c8dd1f16e7dcd225195df43c1b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
When nameDetailsVisible is set to false and an invalid/empty
string is passed to selectNameFilter(), the regexp used to
strip the filter off the suffixes returns empty and a crash
occurs.
Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>