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>
Removing and adding toplevel items could result in invalid stacking
order (not corresponding to insertion order).
Task-number: QTBUG-19316
Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Selection rectangle was incorrectly mapped to scene space when the
view was rotated. It became a rotated rectangle instead of the correct
polygon (rhombus).
Task-number: QTBUG-42008
Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The sample lineedit in Qt's own font dialog shouldn't have its font
affected by stylesheets.
Not only does this hampers the ability to preview the font, it actually
overrides the font selection as that one is taken directly from the
widget.
Task-number: QTBUG-41513
Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The updateDelegate() function checks isEditable() which in
turn checks if d->lineEdit != 0, so we need to make the
call after the lineEdit has actually been set/unset, otherwise
the change to the delegate will not come until the next time
you update the delegate.
[ChangeLog][QComboBox] Fixed updating appearance of popup menu
when changing the editable state of the combo box.
Change-Id: Ib32f36cabd53c2c30d6256484a1eae131419960a
Task-number: QTBUG-33537
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Make sure the dock widgets get the available space when the
central widget cannot expand any more.
[ChangeLog][QtWidgets][QMainWindow] Dock widgets will now be resized
properly when the central widget has a fixed size.
Task-number: QTBUG-40410
Change-Id: Id06c07b79aa3102aa41212fa2c621f5fa426fe02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Since layout items can now be hidden, this also makes sure we respect
the QSizePolicy::retainSizeWhenHidden
Task-number: QTBUG-20132
Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Map the positions via QGraphicsScene and the first QGraphicsView
(as is done in existing code). Fall back to the previous code
path when no QGraphicsView exists, which is hit in the tests.
Change-Id: I0754765d05cded6bc1b64045f2513fef8afde337
Task-number: QTBUG-41135
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Without this part of the calendar widget get cut off when put
in a layout and the contentsMargins are non zero.
Task-number: QTBUG-40352
Change-Id: I9ce90476c59c270d92e876a5dc81ea8ce325848c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
QListView::spacing() is the space around the item (layout margin),
so the effective spacing is twice as big.
This differs conceptionally from QTableView, which has a spacing of 1
and a line on top/bottom. Split up QComboBoxPrivateContainer::spacing()
into functions return spacing and top/bottom margins to reflect this.
Task-number: QTBUG-37865
Change-Id: I1ff812e7856e00a53f1119ef3304956cbb7cbfca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fix warning:
void QWindow::setTransientParent(QWindow*) ... must be a top level window.
which occurred for example when parenting a QMenu onto a native child
widget.
Task-number: QTBUG-41898
Change-Id: Icc25fb2108bd68b2d9c0e551949b90fc7a82d358
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
ASAN report:
READ of size 8 at 0x606000011990 thread T0
#0 0x505e3b in EnterTestMainDialog::eventFilter(QObject*, QEvent*) tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10294
[...]
0x606000011990 is located 48 bytes inside of 56-byte region [0x606000011960,0x606000011998)
freed by thread T0 here:
#0 0x2b8df3551c79 in operator delete(void*) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:92
#1 0x418ab5 in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10276
previously allocated by thread T0 here:
#0 0x2b8df3551739 in operator new(unsigned long) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:60
#1 0x4188cf in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10272
EnterTestMainDialog::eventFilter() checks for nullness of 'modal'
before accessing it, but buttonPressed() did not reset 'modal'
to nullptr after deletion.
Change-Id: I65562a29f8264a6996d7d615e06de1d1afb5af53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The check for Qt::Key_A to handle selectAll was changed to directly
compare to QKeySequence::SelectAll as this will only match Ctrl. The
former implementation also triggered when e.g. Shift was pressed.
Added a check that selectAll is only called when selection is not
disabled, i.e. selectionMode=NoSelection.
Added a unit test for selectAll().
Task-number: QTBUG-26687
Change-Id: I721e7ab590b55d7d754b3b74ef01756fa5aa1315
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
- Ensure top level widgets are cleaned up.
- Place wizards beside each other for comparison.
- Use classic style on Windows to avoid interference by Vista style.
Change-Id: I223a40ea14eefe65dc2e9e8ddee44b0f0c806e3d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Apparently, this causes problems with the completer due
to the fact that it matches the root drive "C:\" on Windows.
Task-number: QTBUG-41681
Change-Id: Iaf96675067e22e679371139a1a2fbf011a5edbdc
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
- Streamline code and remove code that has no effect.
- Create temporary directory and files only when it is actually
required (empty start path).
- Remove try/catch as it is not commonly used in Qt autotests.
Its original purpose was apparently to ensure temporary file
cleanup, but that should now work since smart pointers are used
for temporary files and directories.
- Introduce variable for case sensitivity.
Task-number: QTBUG-41681
Change-Id: Ie5f621c30fc461b880292b853e0660b8fba316eb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Take PM_FocusFrameVMargin into account.
Task-number: QTBUG-35146
Change-Id: I1499790537ddf9fbb912ab764b7d049ee11af95d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Say you have a document of two blocks of text.
When you select a block of text in the document and then replace this
with a new empty block (by pressing enter) and then subsequently
undo this action, the following three steps are performed as a
chain of undo commands:
1. Remove the empty block at the beginning of the document
2. Insert a new empty block at the beginning of the document
3. Insert the text back into the first block
Since a block is removed and inserted in the same go, both blocks
require a relayout, since the accumulated change spans both blocks.
However, in QPlainTextDocumentLayout we would only look at the max
of either removed chars or added chars. This would match the text
length of the first block at this point, so we would only relayout
that block. However, since we are also removing characters, the
actual accumulated change to the document is larger. We should
relayout any block touched by the sum of the added and removed
character counts.
Missing this, the paint event would later query
block.layout()->lineForTextPosition(0) which would give an invalid
line despite the fact that the block.length() > 0. This caused
a crash in the paint event when the full width selection was
turned on.
Note that the logic here was only recently updated to include the
removed characters at all in the logic, by the SHA1:
2983cb9531.
[ChangeLog][QPlainTextEdit] Fixed a crash when using full width
selections and issuing a complex undo command chain which removes
and inserts an empty block in one go.
Task-number: QTBUG-36415
Change-Id: Iafe8a69e455e0c713a48714f10f0cace69c84f51
Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame.
Change-Id: Icff45cbd3a47db8618a7f7a80f7252651969237c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fixes a regression against Qt 4, where Show/Hide events were received
when the minimized state changed.
It is restricted to QWidget so as not to introduce additional events
to QWindow (which already has signal visibilityChanged()) and cause
unexpected side effects in QQuickWindow.
Task-number: QTBUG-41312
Change-Id: Ib165a5daf7a7e5d8231ef8a94b70e8a2a3253057
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>