Commit Graph

5212 Commits

Author SHA1 Message Date
Thiago Macieira
91ae988b5c Remove unnecessary adding of test rows in the QtDBus type benchmark
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>
2014-12-20 07:36:06 +01:00
Pavel Krebs
1c1cce67fa QScrollBar: emit valueChanged once even if a slot takes too much time
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>
2014-12-19 17:15:07 +01:00
Friedemann Kleint
b6514cf307 Diaglib: Add helper functions for analyzing non-Latin strings.
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>
2014-12-19 16:19:30 +01:00
Eskil Abrahamsen Blomfeldt
678a283498 Android: Fix QStandardPaths test
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>
2014-12-19 16:00:46 +01:00
Eskil Abrahamsen Blomfeldt
0fb839ac62 Android: Fix QResourceEngine tests
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>
2014-12-19 16:00:41 +01:00
Andy Shaw
a07120d496 Don't clear lineedit in non normal echo mode when validation is invalid
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>
2014-12-19 15:55:07 +01:00
Thiago Macieira
7fad14f4e2 tst_qlogging: add tests for %{pid} and %{threadid}
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>
2014-12-19 01:54:41 +01:00
Thiago Macieira
0cd1ed0883 Fix running tst_qmessagehandler when QT_MESSAGE_PATTERN is set
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>
2014-12-18 22:17:36 +01:00
Simon Hausmann
622df95fee Prospective stabilization fix for tst_qwindow::positioning(default)
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>
2014-12-18 17:56:03 +01:00
Laszlo Agocs
6c2da36c22 Prevent continuous painting with viewport QOpenGLWidget
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>
2014-12-18 09:46:23 +01:00
Alex Blasche
8eb4b281d9 Change bugreports.qt-project.org -> bugreports.qt.io
The Qt bug tracker URL changes as part of the qt.io transition

Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-18 09:46:09 +01:00
Simon Hausmann
bfbb985ed5 Add some debug information to tst_qwindow
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>
2014-12-18 09:41:36 +01:00
Tony Sarajärvi
dd91e1bc4d Blacklist ioGetFromHttpBrokenServer:no-newline
Task-number: QTBUG-43388
Change-Id: Ie589d72723520152a4cdb28b2fe40e3013b0dd50
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
2014-12-16 14:36:16 +01:00
Eskil Abrahamsen Blomfeldt
19bb9aa9e5 Fix possibly corrupted log clusters when using custom tab stops
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>
2014-12-15 21:02:12 +01:00
Tor Arne Vestbø
dfccd78aa6 Ensure that GL::updateBrushTexture() activates and binds properly
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>
2014-12-13 01:49:24 +01:00
Friedemann Kleint
3740fb41fe DiagLib: Add Wheel event to mouse event category of the event filter..
Task-number: QTBUG-42731
Change-Id: Ib0293a245ed430bd86a1ceb221628b3044ad305e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-12-11 16:10:32 +01:00
Simon Hausmann
9ccd359be8 Attempt to make the positioning test of QWindow more reliable
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>
2014-12-09 16:52:37 +01:00
Friedemann Kleint
0a91f15878 Diaglib: Fix another typo in .pri file.
Change-Id: I2888c4fb9947d61285a8a570661a29e61b10bbce
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-05 15:32:37 +01:00
Simon Hausmann
7644faa881 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
2014-12-05 11:53:33 +01:00
Friedemann Kleint
82d54a6593 Stabilize tst_QWindowContainer.
Fix window/widget leaks, observe available geometry.

Change-Id: I19784d34a62c6e05dbc403852364cfb5e4d12dd5
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-04 20:18:38 +01:00
Simon Hausmann
bd5743f1d8 Make tst_qwindow::positioning more reliable
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>
2014-12-04 12:00:43 +01:00
Friedemann Kleint
8e9d78e43e QMenuBar: fix extra indent on the right with a TopLeftCorner widget.
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>
2014-12-04 06:33:03 +01:00
Andy Shaw
2ca57e39e3 Respect the size hint signal for the column and row delegates
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>
2014-12-03 13:31:07 +01:00
Friedemann Kleint
03c4b52e13 QLayout: Observe contents margin when positioning the menu bar.
Task-number: QTBUG-38152
Change-Id: I53ea6bce33057251265a7eca1651aeabca314ba9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-12-02 08:36:59 +01:00
Friedemann Kleint
4958cadeda QMainWindow: Observe left contents margin when positioning status bar.
Task-number: QTBUG-38152
Change-Id: I4c762a113dbfe47472d1087aa34c0e327083ee16
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-12-02 08:36:54 +01:00
Thiago Macieira
a2da88712f Make QtDBus compile without libdbus-1 headers, if dlopening
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>
2014-12-01 20:03:33 +01:00
David Faure
504ab80f6d tst_qsortfilterproxymodel: remove unused member var
(clang warning)

Change-Id: Id751443e03be4f2bd1721cbe9d9a898d9619b29b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-28 09:09:02 +01:00
Frederik Gladhorn
3de7382044 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Conflicts:
	dist/changes-5.4.0

7231e1fbe2 went into 5.4 instead of the
5.4.0 branch, thus the conflict.

Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
2014-11-27 18:12:10 +01:00
Friedemann Kleint
4680052063 Diaglib: Fix typo in .pri file.
Fixes compilation with Qt 4.

Change-Id: I66781089cd4c07a33f8136706e3211a21f41039f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-11-27 09:26:41 +01:00
David Faure
2d0b20ef92 QLineEdit: take text margins into account in minimumSizeHint().
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>
2014-11-27 04:19:05 +01:00
Alejandro Exojo
6ea6ee7a12 Adjust DBMSType to DbmsType to follow conventions
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>
2014-11-26 10:47:32 +01:00
Tony Sarajärvi
aed71b6832 Blacklist one tst_qsslsocket test
Task-number: QTBUG-29941
Change-Id: Ieb3418a2d6d88ebd399964b5df20d9fe4d6ca37b
Reviewed-by: Simo Fält <simo.falt@digia.com>
2014-11-26 10:47:08 +01:00
Jørgen Lind
ddc7323999 XCB: send leave event on grab
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>
2014-11-26 08:43:28 +01:00
Friedemann Kleint
f96cd3187d Improve diaglib.
- 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>
2014-11-25 22:39:39 +01:00
Alejandro Exojo
f88ab80c8a Use camel case in PKCS#12 function
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>
2014-11-24 08:50:05 +01:00
David Faure
736ac19156 QAbstractProxyModel: fix canDropMimeData/dropMimeData implementations
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>
2014-11-24 08:05:43 +01:00
David Faure
dcbf704bc0 tst_qtableview: fix virtual-override clang warning
Change-Id: I40391890c988ce15d8fa65898976bf0fdc446992
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-24 08:05:34 +01:00
Thiago Macieira
749f4f0e55 Disable the tests that verify that the available space shrunk
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>
2014-11-22 20:02:45 +01:00
Jan-Marek Glogowski
a2f78ea0a1 Fix tst_QEventLoop::processEventsExcludeSocket test
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>
2014-11-21 18:51:17 +01:00
Tony Sarajärvi
d958a16bc1 Blacklist one test function in tst_QNetworkReply
This patch is cherry-picked from
c38f1f19b8 and
d29d727d72

Task-number: QTBUG-32435
Change-Id: I6dbbb668b96737a5791bc688949a00bc09f1357f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-21 16:48:44 +01:00
Tony Sarajärvi
c9c40af130 Mark QSocks5SocketEngine tests blacklisted
This patch is cherry-picked from
63ae74f365 and
07f234d2a8

Task-number: QTBUG-42528
Change-Id: I5f86679e62a4be48ce25afa5a4987a2b6678a357
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-21 16:48:20 +01:00
Thiago Macieira
bb07737614 Fix the %{time} printing to *not* default to the process's time
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>
2014-11-21 16:47:35 +01:00
Frederik Gladhorn
245acbf6e8 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
2014-11-21 13:44:26 +01:00
David Faure
eb466b636b Fix QAction::setFont crash on OSX, when font is unknown.
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>
2014-11-21 00:42:55 +01:00
Friedemann Kleint
6c5d1dbd75 Fix widget leak in tst_qmainwindow.
Task-number: QTBUG-38152
Change-Id: I4cf94a4a8977019dcfc099966643b5b036cc1021
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-11-20 22:30:28 +01:00
Friedemann Kleint
94e40c7c78 Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.
Pass it as additional boolean parameter to QLocaleData::validateChars().

Task-number: QTBUG-42522
Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-11-20 16:38:23 +01:00
Alex Trotsenko
6bded1695b Fix QString::section() behavior on negative and out-of-range indexes
Change-Id: I3bff6ba73b15ee810bb11b2902d11244c3205b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-20 15:37:18 +01:00
Tony Sarajärvi
07f234d2a8 Fix how qsocks5socketengine autotests are blacklisted
Change-Id: I6436491267b737fc00c33af7bd9491510c21b7c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-20 14:58:52 +01:00
Tony Sarajärvi
d29d727d72 fix how qnetworkreply autotests are blacklisted
Change-Id: Id5b0ec07504020f246e57d3ad57ffd5ce0be61ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-20 14:58:49 +01:00
Paul Olav Tvete
71ed74e72e Allow empty string as intermediate match
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>
2014-11-20 14:58:39 +01:00