No need to loop twice to add the "native" entries, since they are added
by the helper function anyway.
Change-Id: I9caabc6fc4973a90b483840815769b1351947a89
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.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>
Add a functions to dump out texts character by character and
as code.
Task-number: QTBUG-43191
Change-Id: I1ac17f2485563f909b71bb1fbd1fd595d1d94223
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QStandardPaths::writableLocation() is documented to return the
empty string if no matching writable location can be determined.
This is the case for e.g. FontsLocation and ApplicationsLocation on
Android. We need to still accept this as a valid response.
Change-Id: I2824e9dcfd41b1c24dbf3896b7ae9b5260e9accd
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The test expects all the files to reside in the file system,
both for loading the runtime resources and for comparisons.
Since we can't deploy directly to the file system on Android,
we go via qrc and extract the files on startup instead.
Change-Id: I17ff8985cb17dbfc45f0fb692ca46558bb5c5cdc
Reviewed-by: BogDan Vatra <bogdan@kde.org>
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>
Since those are unpredictable, there's little we can match, besides the
"0x" for the QThread pointer. For the PID, at least we can compare it to
the value from QProcess.
Change-Id: I89420306863b95c82be761baabd733a7f17eba5e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This test fails if the environment has the variable set.
Change-Id: Ibd54ff3e6e22a885341898889088ac56e84282b1
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Our theory for the failure of framePosition() not having the expected
value after setFramePosition towards the end of the test is that we try
to call setFramePosition() while the getting-back-from-fullscreen-to-normal
window animation is still running, at which point the compositor may
just choose to ignore our move request.
Similarly to when going fullscreen, also wait when coming back from it.
Change-Id: Icfc92f277d96dccdfad772c4aac252b2a20c6196
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.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>
The test still fails sporadically at a new place, so this adds some
debug information when it fails to may help us identify what is going
wrong.
Change-Id: Ife0f171299ef7e800a2d808602e76ca2f3885964
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The calculateTabWidth() can trigger shaping of the item, which can
cause the layout data to be reallocated, so we need to update the
local pointers to it, like we do when we explicitly invoke the
shaper.
[ChangeLog][Text] Fixed problems with text layout when using custom
tab stops.
Task-number: QTBUG-43126
Change-Id: Ifaeeeb4bfb1a55e6638b12b444f53d2679d3d1e6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Calling QOpenGL2GradientCache::getBuffer() will generate the texture the
first time, calling glBindTexture in the process. We did this without
first ensuring that the right texture unit was active, resulting in the
generated gradient texture binding onto the glyph cache mask unit.
We now provide a specialization of bindTexture for a QGradient, which
ensures that the right unit is active before calling getBuffer().
Unfortunately we have no way of knowing if the result of getBuffer()
was a texture that was already bound, or if we need to bind the result,
which means we have to do an unconditional bindTexture of the resulting
texture ID. This means double-bind for the initial texture generation,
but this was already an issue in the original code.
Task-number: QTBUG-43039
Task-number: QTBUG-41244
Change-Id: I20c9b795c8c14f8d58be2b60a284c5a060705ec0
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The part of the test that verifies that setFramePosition moves the window
successfully appears to be very unreliable in the CI system. The "tested"
frame position is calculated to be at (40, 40) relative to the top left
of the available screen geometry, which can be non-zero due to task bars
and similar system ui elements. However that position appears to be
unreliable in the sense that the window manager doesn't seem to always
respect that. So instead let's try placing the window (by frame position)
in the center of the screen instead.
Change-Id: I96fe6c37e748fc18262632b5effe5a9e90dc0028
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Don't check for absolute counts of resize events but just check if we
were resized. Also use QTest::qWaitForWindowExposed instead of QTRY_COMPARE
and checking for QEvent::Expose.
Change-Id: Ie383493a8ce6d88cad50bd6375d432ad1578449c
Reviewed-by: Jørgen Lind <jorgen.lind@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>
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>
Most of QtDBus already needs very little from libdus-1, so create an
extra header containing the minimum API we actually need.
One large advantage of this solution is that now QtDBus can always be
enabled, even if the system doesn't have libdbus-1 installed. This is
interesting on OS X, where libdbus-1 is often installed by Homebrew or
MacPorts, which may include extra libraries we don't want in our
packaging.
Change-Id: I1b397121ec12eeca333ef778cf8e1c7b64d6b223
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Conflicts:
dist/changes-5.4.0
7231e1fbe2 went into 5.4 instead of the
5.4.0 branch, thus the conflict.
Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
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>
The enum was made public in f84b00c6d2, but this
makes it follow the convention to camel case acronyms too before it's too late
to change it.
Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
- Fix prototype for glinfo() for Qt 4
- Add more event types and object type flags to event filter.
Change-Id: Ia4160b40486d054e860a339e7b5c9c28695330ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This makes it follow the coding style, which says to camel case acronyms too,
and makes it consistent with the rest of the class.
Change-Id: I4a1b21de1815530e476fc5aa8a0d41c724fc8021
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
The code in 4696e9dbaa was incorrect. It is perfectly valid to call
these methods with row=-1 column=1 parent=some_index, this is exactly
what happens in QListView and QTableView. Child row/column is only for
trees.
Move the coordinate mapping from QSortFilterProxyModel into a new
mapDropCoordinatesToSource internal method, used by QAbstractProxyModel.
Task-number: QTBUG-39549
Change-Id: I3312210473d84b639cbe4c01f70ea36437db3e91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Somehow, it doesn't shrink with btrfs, even if you write 1 MB of non-
null data. This does not seem to be a bug in QStorageInfo. strace
confirms that there is a second statvfs call happening.
Change-Id: I9ed99d27d25e191916278e6b8faeae132469fc63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The testcase always returns the expected result, independently of the
QEventLoop::ExcludeSocketNotifiers flag to processEvents.
In Qt4 the same test uses an intermediate QEventLoop and already runs
it before the QEventLoop::ExcludeSocketNotifiers:
QEventLoop loop;
// allow the TCP/IP stack time to loopback the data,
// so our socket is ready to read
QTimer::singleShot(200, &loop, SLOT(quit()));
loop.exec(QEventLoop::ExcludeSocketNotifiers);
This fixes and improves the test by connecting, processing and
checking the bytesWritten signal for the pending connection socket.
Change-Id: I1b1d2b7b83910c87ba3fe48e29ac9fd585ac62ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch is cherry-picked from
c38f1f19b8 and
d29d727d72
Task-number: QTBUG-32435
Change-Id: I6dbbb668b96737a5791bc688949a00bc09f1357f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
This patch is cherry-picked from
63ae74f365 and
07f234d2a8
Task-number: QTBUG-42528
Change-Id: I5f86679e62a4be48ce25afa5a4987a2b6678a357
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The default should be the actual time of day. Showing the process's time
is the optional case. In the future, we'll provide a way to showing the
monotonic reference time ("boot") and we should improve the detection of
actual application runtime.
Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.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>
QRegularExpressionValidator and QRegularExpression disagree on what a
partial match means.
[ChangeLog][QtGui][QRegularExpressionValidator] Allow empty string as
intermediate match
Change-Id: Ia6c55beb54870b1be5c88b6ef3eceebc8ca3f86b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>