The test currently leaks 2 directories QFileDialogTestDir,
QFileDialogTestDir4SelectFiles in /tmp.
Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4
Reviewed-by: David Faure (KDE) <faure@kde.org>
Number literals are always interpreted as double. This lead to errors
on platforms that define qreal as float.
Change-Id: I838f690c33bb97e39a2cca2cfd3bdfb9482bc2b2
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate,
remove a redundant condition in qtextcodec_p.h.
Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Only run this test case when the widgets module is present, skip it
otherwise.
Change-Id: I84f48b670b967af3bf0701ceba5a192f33989034
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com>
Task-number: QTBUG-31569
Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The issue is already fixed in 5.0 but let's be nice and ensure the issue
won't be reintroduced later.
Task-number: QTBUG-30931
Change-Id: Ia6944acaf6e7217f8d0f1fa75d0e9977db11d892
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Because fonts are bigger on BlackBerry than those assumed when the test was
written, explicitly adjust the font size on this platform.
Change-Id: I6a23c28c2d32edf744dd5de09ea0a97fd5f9b6d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Some test cases rely on the fact that show() is not fullscreen, which may not
be true for some platforms. Explicitly make use of showNormal() to avoid
full-screen show on these platforms.
Change-Id: Ie62fe21bf0f466c561a27cffda99d0201b4a45af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Some tests assume that QWindow::show() behaves like
QWindow::showNormal(), which is not true for platforms in which the show is
fullscreen, forcing QWindow::showNormal() to be explicitly called.
Change-Id: Ib5f23a4d01bc6a3a2973f57488996c8c198c45f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
During a call to QDir::mkpath(), the same path could be created
by another process, in which case the OS mkdir will fail with EEXIST.
But the docs for mkpath() state that it's not an error if it
already exists, whereas for mkdir() it is an error. So
QFileSystemEngine::createDirectory should accept the EEXIST error
silently if it occurs while creating the sequence of parent directories
and the final leaf directory, but should fail if EEXIST happens when
it was called from QDir::mkdir(), which is when the createParents
parameter is false. We assume the operating system mkdir() and
CreateDirectory() are atomic, so there should be no race condition
in QDir::mkdir(). It's not necessary for mkpath() to call stat()
at each level, only to check whether an existing entry is a directory
or a file. Also added to the autotest to verify that if the
path is an existing file, creating a dir with the same name will
fail in either mkdir or mkpath.
Task-number: QTBUG-30046
Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
There is a mismatch how QML and C++ converts QJsonValue. This patch
unifies conversions by adding QJsonValue support in QVariant::convert().
Change-Id: I8a1db3d77c517945ef48064b4b66ba03aa4f2fd0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Initialize undockedGeometry to roughly the current position.
Task-number: QTBUG-31044
Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
this works with -no-gui, and doesn't interfere with our upcoming ANGLE
hackery.
Change-Id: I2985cc0acd1fbf185b8967ffe58606b1b7dd9d1e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
BlackBerry OS does not allow for explicitly controlling the locale through the
"LANG" environment variable. Locale is controlled by the underlying PPS
Service instead.
Change-Id: I22154e39f81a9467ad7fdb90a042396390398b1b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
In Qt 5, we declared that throwing from event handlers is undefined
behavior. So stop testing this.
We will try our best to capture and pass along std::bad_alloc, but even
that might not work, depending on compiler settings. In particular,
after the upgrade to MinGW/GCC 4.8 with DW2, this test stopped working.
Task-number: QTBUG-31615
Change-Id: Ibf5fb2ce0c48b983549096bf7aac434b6ed3ac2e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qt_nameprep is tested by tst_qurlinternal. We just need to be sure that
QUrl handles them correctly.
Change-Id: Ic563004870d2cf2fa7a31ce49fff7280d5ffb5f3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
warning C4804: '<=' : unsafe use of type 'bool' in operation
Remove outer loop and replace ugly ROW_NAME macro by
inline function.
Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Edge case: a > that should have been >=. Without it, we never ran the
rest of the IDN nameprepping.
Change-Id: I2276d660de3a70d0c561bb18816820d9a0f47e77
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
RFC 3454 says about prohibited characters (section 2, "Preparation
Overview"):
3) Prohibit -- Check for any characters that are not allowed in the
output. If any are found, return an error. This is described in
section 5.
In other words, we mustn't simply strip the output of prohibited
characters. We must generate an error if they are present. We do that by
clearing the data.
We already had tests for prohibited output, but they were
indistinguishable from being stripped. So instead add some extra
characters so that we can tell whether the label was cleared.
Change-Id: I2d95217c27be5e2d54deed0036cb009e3b7f4886
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Because tests are usually run as root on some setups, it does not
make sense to test for the right permissions of a readonly file.
Change-Id: I484f88722d3a9ce7123edc0fb57acae528fa194e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Update the test code to match the current Qt idiom for finding test data (and
fix it on QNX).
Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This only marks tst_qopengl as insignificant on Windows 7 32bit
with the Angle configuration.
Task-number: QTBUG-31611
Change-Id: I1876b6fdc32fef93edf34c2bd61d03cc9ba11135
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
On Mac it's expected that some elements are
filtered out of the a11y hierarchy.
We do this with the shouldBeIgnored function.
The problem is that we would ignore some objects
and then return them in the child attribute function.
This is inconsistent and leads to voice over not working.
For example having a plain QWidget with other widgets as
children would cut off all of these widgets, since the
plain QWidget would be ignored.
Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Add font combo to top level via layout and position top level
instead of the (child) font combo.
Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The TXT record is particular because each RR can contain multiple text
strings. So we need to join each RR's texts too.
To make it easy, I've made everything be QStrings.
Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The DNS protocol changes the order of the RRs in each reply it sends,
in an effort to balance the load in servers. For most tests, to ensure
that we get always the same result, we simply sort it back.
For MX and SRV, we can't sort because we also need to test that
QDnsLookup sorted correctly according to priority. So instead allow
that test to have multiple alternatives.
Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If no stretch factors were specified, we used the preferred size as a
stretch factor. Obviously, that didn't work if the preferred size was
actually 0.
This patch works around this by actually setting the stretch factor to
1.0 if this is the case.
This should work fine in most cases, except for the case where there
are also other items with a preferred size close to 0.
In this case, the item with preferred size 0 will just grow
faster than an item with e.g. preferred size 0.1.
Task-number: QTBUG-31217
Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The winapi call used to load the icon does not
support the arguments on windows ce
Change-Id: Ia600eb9b05d5eb40778d8c281e6ce8278bfd7177
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
"QTest" is the C++ namespace; "QtTest" is the library name
- Edited the logger output in qplaintestlogger.cpp
- Updated documentation
- Updated expected outputs for self-tests
Change-Id: I43c525c43221a8d4e843a00d6d55b0f06ef55fd7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Latin1 strings are usually stored as 8 bit data in the json binary
format. But that data structure has a size limitation of 16bit, so
we need to fall back to storing the string as 16 bit data if it is
too long.
Task-number: QTBUG-30946
Change-Id: I0069b1367030b0b2f819fd1f04e34c9e2534a2a3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Return the codec if one was found by QTextCodec::codecForUtfText,
instead of returning the default (UTF-8).
Task-number: QTBUG-31293
Change-Id: I95e3260376c00537006b7fbfdc3df5850e1ba657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Required to prevent qmlscene flicker on startup.
Also brings back that qWait() in tst_QGL::graphicsViewClipping()
that seems necessary after all.
Amended-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I14ba6e18ac98e5df1ce8ecbc263b30176b67d111
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>