Instead of making insignificant the all platform for
QtBase 5.5 integration.
Change-Id: Ief3f29c094bdbc90e684f19c1077ee595fb7d581
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Storing the position of the first selected item in the view can lead to
wrong extended selections if the contents of the model change. Future
Shift-clicks will always use the previous position of the first selected
item, which may not be correct any more, to calculate the current
selection.
To fix this problem, a QPersistentModelIndex is used to keep track of
the first selected item.
A new unit test is added. Moreover, one function of the QTableView unit
test is changed such that it shows the view prior to performing the
test. Without this change, this test may fail. That the test, which
simulates mouse presses without showing the view, worked at all seems
to be a coincidence, as pointed out in QTBUG-18009.
Task-number: QTBUG-18009
Change-Id: I0d844fbd1a994c279a7c8ee5d9b5b9fccecd25bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When the ComboBox currentText() was changed by key
LineUp or LineDown or mouse click, the completer still
contained the last inserted characters.
If now all text was selected (by Ctrl+A or selectAll()),
the old item and index was restored on next Enter press.
Task-number: QTBUG-41288
Change-Id: I6916fd31c8b8fbacfb12e1a62c3e46823cf918b4
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
This system is no longer in the CI rotation and we haven't had reports
of the same issues happening on later versions. Either the issues have
since been fixed or they were never an issue in Qt in the first place.
This commit has the additional benefit of getting rid of the following
shell error when qmake was run:
sh: line 0: [: =: unary operator expected
as /etc/lsb-release hasn't contained DISTRIB_CODENAME for some time and
proper quoting was never implemented (not even qtcpsocket.pro).
Change-Id: Ia0aac2f09e9245339951ffff13c829e910ee64e9
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When pressing a button with the mouse and then moving the focus away,
the internal and visual state of the button would get updated, but the
released signal would not be emitted.
The same goes for disabling the button, although in 99% of the cases,
disabling the button will also move the focus, so the first case
already takes care of emitting the signal.
Task-number: QTBUG-42775
Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Make styleHints a static member variable of QGuiApplicationPrivate and
fix accessor accordingly. Extend tst_QApplication::settableStyleHints()
to run without QApplication instance as well and add a similar test
to QGuiApplication.
Task-number: QTBUG-44499
Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Currently Qt uses the QPlatformIntegration::StyleHint
SynthesizeMouseFromTouchEvents to check whether to synthesize mouse
events from touch events. But not only platform plugins can produce
touch events, they can be created by e.g. QTest::touchEvent() and in
this case we almost definitely need synthesizing regardless of the
platform.
This commit introduces a QTouchDevice::MouseEmulation capability which
replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents.
So it's possible to pass QTouchDevice without this capability to
QTest::touchEvent() and be sure that mouse events will be synthesized.
Notice that touch pads always emulate mouse events.
As a result we can activate some tests which were disabled for specific
platform configurations by commits 6c1670d8c2
and e9760f1559.
Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reasons:
- the PlayBook NDK is old and its compiler does not keep up with newest
C++11 improvements inside Qt code.
- the PlayBook NDK diverges considerably from the standard BB10 NDK,
making it non-trivial to keep a common codebase.
- It's a defunct platform.
- Maintenance time is limited.
[ChangeLog][Platform Specific Changes] Removed BlackBerry PlayBook support.
Change-Id: Ia338aff55f4e4b747ebdecb0e1463a369a656c03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Most of the time the widget passed in to finish() will not yet have a
window handle so it would just call close() straight away. This
way it ensures has a window handle.
Task-number: QTBUG-35757
Change-Id: I2e212a2ea496cc4e4bba57a8c2d0d127afc43e48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
We must do something when requestUpdate() is called on a QWidgetWindow.
The semantics of UpdateRequest for QWindow and QWidget are unfortunately
different: for widgets an UpdateRequest means "sync the backing store".
For QWindow it also involves marking as dirty.
Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
[ChangeLog][QtWidgets] Added QPlainTextEdit::createStandardContextMenu(QPoint)
overload that takes the position in document coordinates. This method enables
the actions that are sensitive to the given position eg. where the user clicked.
Change-Id: I47ed7a1afc4fcfb3318c9b7af37867aeb7f2aa35
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Re-enable tests that were skipped because of open, now closed, bugs.
Change-Id: Ic7dbe0a9cf74df1e69550536d5923a62e2186b6f
Task-number: QTBUG-26424
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
This only occurred if the item added was the only item in the last
row/column, since then the the internal grid failed to expand
(in this case it would always call expand(0, 0), which would not
create the extra row/column).
[ChangeLog][QtWidgets][QGridLayout] Fixed crash that sometimes happened
when adding items with spans that spanned to the bottom/right edge.
Task-number: QTBUG-38052
Change-Id: Iba95f6d9d9356b4d1c84c7b93f4af9b4ea0cf714
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Disable top-level widget code path for embedded widget in the show
helper.
Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Change-Id: I6b551de331aa0386ea53d8e96f50b669777d2d69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This requires being able to create a QItemSelectionModel
without specifiying its model, and also setting the model
later. Also, several classes, like QPersistentModelIndex,
need to be declared as meta-type.
Finally, and in order to introduce the 'model' property,
we need to have a type compatible getter. Hence the new,
non-const model() function.
Where needed, meta-type declarations have been removed from
auto-tests.
[ChangeLog][QtCore][Item Models] QItemSelectionModel
can now be created without a model and have one set later.
Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to
mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming
the ifdefs we make it clear that the code in question is dead.
In incremental follow-ups, we can then selectively either remove, or
port, the pieces that are dead code.
Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Length is supposed to be equal to the section items length, but the state saved might be corrupted.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Ctrl/Ctrl+Shift should not cause any characters to be input
(as opposed to AltGr(Alt+Ctrl) as used on German keyboards).
Extend the tests in QLineEdit and QPlainTextEdit to
check the modifiers, remove test from QTextEdit
since it is handled by QWidgetTextControl.
Task-number: QTBUG-35734
Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.
Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
ItemIsTristate means QTreeWidget determines the check state of parent
items based on the check state of child items.
Checking/unchecking the parent propagates to children; but setting
the parent to PartiallyChecked shouldn't do that, especially since it can
lead to children without ItemIsTristate having PartiallyChecked check state.
Change-Id: Ibc8b7c77d9ec4c1578c07f3c62581edb770f8439
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
ItemIsTristate is now again purely for enabling the automatic management
of the check state of QTreeWidgetItems, while ItemIsUserTristate is
separate from that and lets the user select the three states manually.
This restores the original behavior of ItemIsTristate for QTreeWidgetItems,
which got broken by letting the user cycle through the states too.
[ChangeLog][QtWidgets][QTreeWidget] Restored Qt 5.1 behavior of
QTreeWidgetItems with ItemIsTristate to enable automatic management
of the check state. User-editable tristate checkboxes are now enabled
by setting the new flag ItemIsUserTristate.
Task-number: QTBUG-40060
Change-Id: I341f5e983804d3b4f27982520bb6647f3014cccc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
This was available before but was protected with the wrong define for OS
X, so this is changed to the right define.
Task-number: QTBUG-23696
QTBUG-23703
Change-Id: I669a6cf2ff7c01020693adff9f04a4b8b9404d02
Reviewed-by: David Faure <david.faure@kdab.com>
When checking for completion on the file system, we need to check
for directories that actually exists.
Change-Id: Id83e3802abcd40355dcd8cd47f2d55061eacd117
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
For windows that do not have WS_EX_TOOLWINDOW set, the WINDOWPLACEMENT
API uses workspace/available aera coordinates. Introduce a helper
function to return the offset and use that.
Task-number: QTBUG-43872
Change-Id: I329c640f180524699b45b855b4583f447c4a0987
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Replace by QCOMPARE where applicable; introduce message to generate
output for failed comparisons with QVERIFY2().
Task-number: QTBUG-43872
Change-Id: I09c8f9fd31ceed224e441f253049f68907ca0d7a
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Commit 1259c5768e410361bcd8b5cf0c2057a2ebabda83 in qtdeclarative removed the
ability to create QWidgets in QML by giving them the correct parent, which
requires calling QWidget::setParent instead of QObject::setParent. This patch
introduces a hook that will allow QtQml to give widgets a proper parent.
Change-Id: I84c57ca5032582c43e405219343d55ac9cf2ffa0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The layout for an invalid block is very likely to be null, it
shouldn't be accessed without checking the block's validity first.
We can make the check a bit more conservative and simply check that
the block isn't empty.
Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe
Task-number: QTBUG-43562
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Makes it easier to add new tests.
Change-Id: I5c2bca60e125259eac83a03860e60ca85b51db24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This is in preparation of adding more tests.
It makes the test run longer, because of the additional book-keeping,
but if something goes wrong, it can pinpoint the circumstances better.
Change-Id: I4be68fcfbffe48e8609b722ea551b1f7c36790a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp
forgot too, which led to a valgrind warning, the elapsed timer was never started)
2) setValue(0) makes no sense if the progress dialog goes from 50 to 60,
or any other non-zero minimum value.
Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case), and by also starting
the timer when calling setValue(minimum()) for well-behaved dialogs.
setValue(0) special case kept for compatibility.
Task-number: QTBUG-17427
Task-number: QTBUG-25316
[ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating
the duration of the progress dialog is now started in the constructor and in
setValue(minimum()), as well as when calling setValue(0), as previously documented.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().
Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test needs to have a test environment available on the regular
file system, so we create this when initializing the test. In
addition we QEXPECT_FAIL one of the tests which seems to expose
a legitimate bug. A bug report has been created for this.
Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.
Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
... in QCOMPAREs.
The implementation is hidden in a nested Internal namespace that retrieves
the strings without strdup()ing. That makes it easier to compose these
functions as there is no need to delete character arrays when using them.
The public interface (which qstrdup()s) is implemented on top of these.
[ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.
Change-Id: Ib03d969847e5a12474c71a7921366b400025f680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When changing models it makes no sense to keep the old root model index,
pointing into a possibly deleted model. Reset it to the root
of the new model is the best line of action.
[ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root
model index when a new model is set on it.
Task-number: QTBUG-43350
Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
If the user has some objects selected and holds down the "extend selection"
key (Control on Windows, Command on Mac OS X), clicking and dragging a
rubber band selection deselects the current selection. This is
counter-intuitive and confusing for users.
This commit fixes the behavior so users can extend selections using the
rubber band when the proper key is held down.
Task-number: QTBUG-6523
Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Wheel events should not cause a popup widget parented on a scrollable
widget to be closed or moved to correctly reflect the system behavior
on OS X and Windows.
Task-number: QTBUG-42731
Task-number: QTBUG-40656
Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This adds the testdata to a qrc to make them available on Android.
There are still some failures which might be actual errors, and which
will be addressed separately.
Change-Id: I1bdcfb2c6676134ca52388d49a1b2d25cf2813f9
Reviewed-by: BogDan Vatra <bogdan@kde.org>
... which is the module-wide include, bringing in the entire QtCore.
Change-Id: I5cd872efa4562917fc4e3850809cb7595710c43a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We already let enter/return key presses to reach text edits instead
of closing the editor. Do the same for tab/backtabs.
[ChangeLog][QtWidgets][Important behavior changes] QItemDelegate will
now not close a QTextEdit/QPlainTextEdit editor when the tab key
is pressed; instead, the key will reach the editor.
Task-number: QTBUG-3305
Change-Id: Ife9e6fdc5678535c596d1068770b0963134d8d5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Fix indention, add empty line as separator, undef a local macro.
Change-Id: Ie0d8529322f87ca2bdedb9a7f2f4cf9f463a6e12
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Split off default-value check from getSetCheck().
This is in preparation of extracting getSetCheck_data().
Change-Id: I869c34014a92e29a07dc08584a93a4cbba372518
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Basically, introduce a small check for this corner-case situation.
Setting a model doesn't just store a pointer, but also resets the current
index, changes the line edit completion model, and so on, and seems silly
to trigger changes in such cases.
[ChangeLog][QtWidgets][QComboBox] A QComboBox does not reset itself any
more when setting the same model more than once.
Change-Id: If028b36cdfaa5552c156dd900e123ca9a04d4e3d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Put also processing of control activation into initial timer check for possibly
pending mouse release event.
[ChangeLog][QtWidgets][QScrollBar] Fixed a bug where the valueChanged() signal
was emitted twice if a connected slot took too much time.
Task-number: QTBUG-42871
Change-Id: I7bad5279ef84463a033b55256d241d4445374081
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This fixes a regression introduced with
c09e9f71173a698670d6c728291ee24f53d50800 which caused the lineedit to
clear the whole text when an invalid character was entered into a lineedit
with an echo mode that was not Normal and a validator was set.
Now if undo() is called directly then it will still clear the text as it
is considered to be called as a user. Whereas the validation will take
care of the invalid entry by using internalUndo() as before which avoids
the clearing of the entire text.
Task-number: QTBUG-29318
Change-Id: I5ff5777a75ab864de2217441b5f518f50646bd8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Add the source widget to the texture list (may be null for custom
compositor implementations that add textures not belonging to actual
widgets). This allows us to do proper checks with the
dirtyRenderToTextureWidgets list.
As a result paint events are only sent to a QOpenGLWidget if (1) there
was an update() for it or (2) it was actually marked dirty. (2) was
previously behaving differently: the widget got a paint event when
anything in the window has changed. This is fine for naive animating
OpenGL code but less ideal for QGraphicsView.
Bool properties like stacksOnTop are now stored in a flags value to
prevent future explosion of texture list fields and parameters.
Task-number: QTBUG-43178
Change-Id: I48cbcf93df72ac682c9b5d64982a8b648fe21ef3
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The Qt bug tracker URL changes as part of the qt.io transition
Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Add new enum items PM_HeaderDefaultSectionSizeHorizontal and
PM_HeaderDefaultSectionSizeVertical to QStyle and get corresponding
values in QHeaderView. This way we get rid of some magic constants in
QHeaderView and we can have reasonable values for the default section
size for high-DPI displays.
[ChangeLog][QtWidgets][QHeaderView] Default section size is now style-dependent by default.
[ChangeLog][QtWidgets][QHeaderView] Added resetDefaultSectionSize().
Change-Id: I44e152c5cf0bec1e5d78e1e62f47a2d1f761dfbf
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The problem was that the span we stored in the multiCellMap was the
"effective" span (i.e. the given span subtracted with the number of
ignored rows it would span). Later we used that span to distribute its
size across all its cells. However, since the span now could be smaller
that the given span, we could sometimes fail to distribute to the last
span(s).
[ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't
distribute themselves to the last cells they covered.
Change-Id: I31db3d850484dc8b70d62c5f02f680740578c661
Task-number: QTBUG-43099
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
When setting a left corner widget on a QMenuBar, the first
action rectangle is offset by its width and thus the width
should not be added to the size hint. Use QSize::expandedTo()
instead.
Task-number: QTBUG-36010
Change-Id: I660e3facbd0aeb5fb84fac8923db3e0c7998309d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Strange API asymmetry that needed to be fixed.
Task-number: QTBUG-8315
[ChangeLog][QtWidgets][QAbstractScrollArea] A getter for the viewport
margins has been added.
Change-Id: Ie1460b572206922031fc4effc2aa8261e25088b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The sizeHintChanged() signal from the column and row delegates need to be
connected to the doItemsLayout() slot so that the view is updated when the
size hint changes.
Additionally doDelayedItemsLayout() is called to ensure that this is
up-to-date as the size hints may have changed when the new delegate was
set on the row or column.
Change-Id: I458293f05ce9ef40a03bdbcab1a6e7a10f648c89
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Remove duplication of the set of flags.
Remove "text" column which had a constant value.
Change-Id: I39dd541a545664fb3f992b32b8c64e4dd263a9c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
sizeHint() did it exactly like this, but minimumSizeHint() didn't,
which made it too small. Didn't affect the actual size in most cases
since the vertical size policy is fixed, so sizeHint() is called instead.
But when writing a subclass, if one re-implements sizeHint() by
calling the QLineEdit's minimumSizeHint(), it would then be wrong,
when text margins are used.
Change-Id: I29ae8dcab00842b3b5ca534cdb250efc0b496f45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
When a popup is opened it grabs the input, but the leave event to the other
windows needs to be sent.
Remove the popupEnterLeave test as it did not test any code. The Popup
never gets any enter or leave events so it will succeed always succeed
Task-number: QTBUG-36862
Change-Id: I625c616eeb74b5168af7b751485e2a9a53b76cd3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
customMenuFont was null, so objects was an empty array, and
NSDictionary throws an exception when being called with arrays
of different sizes.
Task-number: QTBUG-42728
Change-Id: I8cdab449fd8c1d12b65c46dd5617a7f5e3e96c6e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Change-Id: I7147d326b0f5bb218f4dbc013ed82efb4c1e1440
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Place the rubberband over the tabs instead of where the hidden
subwindows happen to be.
[ChangeLog][QtWidgets][QMdiArea] Fix rubberband position for tabbed mdi windows
Task-number: QTBUG-42612
Change-Id: I41e81ab8b99ab9e0fa533fd4ed1b2a8141d19753
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Prepare for determining the suitable number of touch points
from the device type. For now, 2 points are used as
before, which can be overridden by setting the environment
variable QT_PAN_TOUCHPOINTS. Add member variable
to QPanGesturePrivate which is set on gesture creation and later
used for comparison.
Task-number: QTBUG-40461
Change-Id: I6d9e35ca752375bc6a54435482ca0925195b8142
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This is required so we can take a QVariant and detect that it contains a
Q_GADGET and then use method like QMetaType::metaObject and QMetaProperty::write
with the QVariant::data
Change-Id: I3603692e4e84426e10bf59949e3def3ea4947bec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
When the QWidgetWindow receives a resize or move event, it should check
with the widget if its crect already has this geometry. if not then send
the resize or move event
Ideally events should be sent whenever the QWidgetWindow receives them.
QTBUG-42383 is created for this problem
Task-number: QTBUG-29937
Task-number: QTBUG-38768
Task-number: QTBUG-30744
Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
For some reason lost in time QFrame was missing that method. Of course
that led to duplicated code and to subtle sizing miscalculations.
Task-number: QTBUG-29330
Change-Id: I81163f5def6661e01cb2ecc49c1169449a3e3758
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This test shows a behavior change of setFrameStyle(QFrame::WinPanel)
between 4.4 and 4.5.
Turns out that 4.4 defaulted to "Raised" only via a side effect of the
code, while 4.5 defaults to "Plain" which makes more sense since Plain
is the default anyway. So there is no actual bug to fix (the app code
really meant QFrame::WinPanel|QFrame::Raised anyway), but the unittest
is still good to have for the future.
Done-with: David Faure
Change-Id: Icf16382504b18357256bc601b1e865abac9f2b2a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
For some reasons lost in history, those methods simply ignore
the list of items passed to them, and always return NULL.
Of course, that's totally broken. Fix that by doing the same thing
that the respective (hidden) models did when calling mimeData().
Surprisingly enough, QTreeWidget has a proper implementation.
Task-number: QTBUG-25900
Change-Id: I99ca7b4d4f87f096fd9ff0b0cb4e58282aa9c26e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Instead of sending the event from random places, send it from
QWindowSystemInterface. This allows to send override events on OS X to
menus before doing other key processing and reduces the number of
ShortcutOverride events on all platforms to exactly one per key press
event.
Additional test by Friedemann Kleint.
Task-number: QTBUG-38986
Change-Id: I6981bb776aba586ebc7c3daa5fd7a0d84c25bc3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>