On Windows, having read-only files in a directory can cause removal
to fail. When file deletion fails, check on the permissions, set
write permissions and retry.
Split apart code paths by OS in tst_QDir::removeRecursivelyFailure();
deletion of the read-only directory on UNIX should still fail.
Change-Id: I36e54be5229a7b552e90fd5f42722b868fa0b6ee
Reviewed-by: David Faure <david.faure@kdab.com>
The test showed failures on OS X:
FAIL! : tst_QListView::batchedMode() Compared values are not the same
Actual (ba.size()): 2
Expected (3) : 3
Loc: [tst_qlistview.cpp(848)]
Use QTRY_COMPARE() to count the number of visible indexes with
a helper function instead of using hard-coded timeouts. Item 3
appears with a little delay on OS X.
Change-Id: I2fb2ff5ebdf9dbe85bdc79401375ad6f47b7b12b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The test checks whether a child window receives
mouse events synthesizes from touch. Enlarge the child
window so that it fully covers the parent and move the
touch point a bit inside so that it is not affected
by window manager positioning issues.
Use QTRY_VERIFY.
FAIL! : tst_QApplication::touchEventPropagation() 'widget.seenMouseEvent' returned FALSE. ()
Loc: [/work/build/qt/qtbase/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp(2107)]
Change-Id: Ic08e68b1e547cc7148cd8994464fdc2a14ac507b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The test sends touch events to the root item at the top left
corner which fails if the views starts to scroll.
Make the view sufficiently large to prevent scrolling and align
at top left.
FAIL! : tst_QTouchEvent::touchBeginWithGraphicsWidget() Compared values are not the same
Actual (((root->touchBeginCounter))): 0
Expected (1) : 1
Loc: [/work/build/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1471)]
Change-Id: I357322ccc809ddb5cb587febf3c75cbe497e59d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
An object that throws in its constructor cannot be reentered. This
violates both C++11 and C++98. It's also a regression from MSVC 2013.
The unit test is renamed to indicate what it really does, as opposed to
a misleading name that was probably a "thinko" on my part.
Task-number: QTBUG-47224
Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QTemporaryFileEngine does not store the pattern, so it needs to get it
again from QTemporaryFilePrivate prior to reopening the file. It's
possible to lose the pattern when remove() is called on the object.
Task-number: QTBUG-46156
Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Make the name of the signal and the name of the getter unambiguous,
which in turn allows the easy use of Qt 5-style connects.
[ChangeLog][QtCore] Deprecated QProcess::error() signal in favor
of new QProcess::errorOccurred() one.
Change-Id: Ic5bcf7d6878e6985f1b4fed9dbe247527d13758c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The test is crashing regularly (see bugreport).
Currently the test is not run in the regular CI system, that is why
the failures were not noticed.
Task-number: QTBUG-47128
Change-Id: I70d4ada0872316cc63d7629bb9ab2d055d70cf2a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
There was an attempt to allow static instances of QIcon in
7727a4355876607a1a022ff54e2570dae883f79c (Qt 4). This patch does only
solve some of the corner cases and broke with
aa5f70c00a. Since the "breakage" has been
there for two years, let's officially declare it unsupported instead of
trying to work around the issue.
Change-Id: I61e12fd03953763ee2e70eae58bcaecabdcb85b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We have ownership for a reason - and there seems to be
no good reason not to accept it here.
[ChangeLog][QtWidgets][QComboBox] QComboBox::setView no longer
deletes the old view directly. It now checks the ownership first.
Change-Id: Icb5e5c0a6e9dc93c1d1c1a90ff57fbcc0786aa60
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
On Windows, t->timeout was updated only once, at creation time, so the
timer would always show as "overdue" after the first activation.
The timer is updated to indicate the full remaining time during the slot
activation, which is the behavior of the Unix and Glib dispatchers.
Task-number: QTBUG-46940
Change-Id: I255870833a024a36adf6ffff13ecadb021c4358c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Sending several key presses with repeat=true should trigger the action
several times, unless autoRepeat is set to false.
Change-Id: I6469bbd78a608a87852554882c1632ce34422662
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Not all empty states were considered equal.
[ChangeLog][QtCore][QProcessEnvironment] Fixed a bug in
operator== involving different empty states.
Change-Id: I13c3200897847475bde2f963db0d2c587336b8a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Wasn't checked, and with all the mutex locking going
on under the hood, we better rule out that there's a
deadlock.
Change-Id: I5a2ef1a524fb42b7840c9f3c18395cde05b7ef28
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.
[ChangeLog][QtCore][QByteArray] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.
Task-number: QTBUG-25919
Change-Id: Id5aefb52635f029305135afcd99db0b036a7af82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.
[ChangeLog][QtCore][QString] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.
Task-number: QTBUG-25919
Change-Id: I1d48729c76e510c1e49c0e5dc41691aa662fdf21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With two alpha-bits half opacity can not be represented, so we must use
one third (85) instead of half (127).
Change-Id: I2b3f1c983a3034196bf2604840945ad3a81f5b38
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
QLocales can be compared for equality,
so qHash should be overloaded, too.
[ChangeLog][QtCore][QLocale] Added qHash(QLocale).
Change-Id: Ia0fdf1207b842b9bb20b8f9ab0165016915debf4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Keeping the reference may end up in a crash if a created
QIcon outlives the QFileIconProvider and we then try to
generate a pixmap.
The reference is not necessary since the options are queried
only when creating the icon, so they can be saved in the icon
provider.
Task-number: QTBUG-46755
Change-Id: I5c60887c2ed39030a2a20298ff10fd652189e4e7
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
When executing the test in a sequence (as done by make check after
tst_qstackedlayout), tst_QToolTip::task183679 often fails since
apparently the tooltip is hidden when the cursor is near it.
Move to the cursor to the right corner of the widget to fix this.
Change-Id: I3b13239e77cb387f1b1425fab79c8d6faa27b5bb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Instantiate widgets on stack and add cleanup function for the check.
Change all functions instantiating a QFormLayout without widget on
the stack to use a toplevel widget and pointer variables since
otherwise, the labels automatically created by a call like
QFormLayout::addRow("bla", widget) leak.
Change-Id: I72a7a9c3175b5793a9450c6fcb970012ccd2274b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Instantiate widgets on stack and add cleanup function for the check.
Change-Id: Ia527c228f9173d1b5aeba94ba4e14e1beba60731
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Gather member variables testWidget, testLayout, w1..w3 and sp
used in getItemPosition() and itemAtPosition() in Helper
class ItemTestWidget.
Remove member variables m_grid, m_toplevel and instantiate the
top level widget on the stack in minMaxSize().
Remove empty slots and functions.
Add a cleanup() test checking that no visible top levels
are leaked with explanatory comment about data driven tests.
Change-Id: Ia30120d78144dab3b7c73864c6fbcef606cb19d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Conflicts:
src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
Manually fixed src/testlib/qtestcase.cpp to return the right type.
Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
os.version is the kernel version which is just not very useful or easy to
use for us. Instead, introduce a string that allows easy differentiation
between Windows 7 and 8.
From the adapter identifier the driver description is often helpful too,
especially in virtual machines.
These allow writing rules like:
{ "description": "Use WARP in some Win 8 and 8.1 VMs",
"os": { "type": "win", "release": [ "8", "8.1" ] },
"driver_description": "VMware SVGA 3D",
"features": [ "disable_desktopgl", "disable_d3d9", "disable_d3d11" ]
}
Change-Id: I196f6b44d7bb9e42ef47f61f4c28d8aa79afb7c4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Merely filling with Qt::transparent is not enough, as the default blend
mode of QPainter is QPainter::CompositionMode_SourceOver, where the alpha
of the source is used to blend the pixel on top of the destination. The
destination in the case of an FBO may contain garbage, and we end up with
the same garbage as the alpha is 0.
This was evident when running the ellipses and porter_duff/porter_duff2
tests on OS X. These tests can now be un-blacklisted.
Change-Id: I315fa764fa29fb3a06e38945a738a6feadf4502d
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
The test tried to position the mouse cursor over item #0 . This
sometimes results in the cursor being outside the window when
the window manager adds the window decoration on X11.
Move the cursor to the center of the window instead.
Add cleanup slot checking top level leaks, remove empty
functions.
Change-Id: I908240e1cc3fdbe370b43eae0015272ca342a312
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
If we have a filter applied that removes all entries, the source
model is sorted, and then we remove the filter, QSortFilterProxyModel
never emits rowsInserted. This is because it doesn't have the correct
source mapping and doesn't update when the filter is removed.
Change-Id: I447b2d150e509b128d27f4dabc4e081ca4ef037f
Task-number: QTBUG-46282
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The rationale being that the empty string is not a valid path component.
[ChangeLog][QtCore][QDir] QDir::relativeFilePath() now returns "."
instead of an empty string if the given path is the same as the
directory.
Change-Id: Ibcf31904b2ae5edf5639d4c2e5ba234365d347fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Gives more information to user in case of failure. Also, fix the
order of parameters for some QCOMPARE's.
Change-Id: I3ea91f9602d4d32ac79027b6093caea749633c01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since of Windows (Phone) 8.1 most of the desktop's thread functionality
is also available, so we might be able to share the code and get rid of
the extra implementation for WinRT.
Task-number: QTBUG-43837
Change-Id: I0ce907cd94899834527f88c70e1e395bafdb14b3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This reverts commit a6000e2b66.
Temporarily remove this to unblock the qtdeclarative dev CI.
While Windows 8 VMs are fixed by this patch, Windows 7 has different
problems.
Change-Id: I45ef064ed953cc4b7bbf19657300d4fc43d82452
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
ad9698713f reduced the curvethreshold
for wide lines, to fix QTBUG-46151. But as a side effect, the
threshold was increased for lines of widths >=0 and <4. This commit
fixes that, and also adds a lance test for the issue in QTBUG-46151.
Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Move the code path handling widgets embedded in QGraphicsProxyWidget
into the loop moving up the parent hierarchy.
Add child widget to test.
Task-number: QTBUG-41135
Change-Id: Ibd86413faaa927145a85a2f5864f162979135053
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This isn't specific to an Ubuntu version, unfortunately. It also fails
on OpenSuSE occasionally and other Ubuntu versions.
Change-Id: I6a1ca55a198270f1a1e8a9916e9f768762211550
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
When the test fails, show the actual signals spy count.
Change-Id: Id7312bfbfb6531404a9df73234031f13295c80ea
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>