This moves the socket backend's host name matching functions up to
QSslSocketPrivate so that they can be shared between backends. This
works, as there is no OpenSSL-specific code here.
Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626
Reviewed-by: Richard J. Moore <rich@kde.org>
Show debug output for rejected and currentColorChanged signals,
because accepting is not the only scenario to be tested.
Task-number: QTBUG-40855
Change-Id: If741ab19392e7d4314e0eff82a939d202ae86b48
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The QPanGesture recognizer requires single-point touch events. The touch
implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents
and forward single touch events if set.
Making this work in Qt 5 is a little bit more involved since the platform
plugins don't know about widgets.
Change the Cocoa touch implementation to send single-point touch events
to QWidgetWindow windows only. Make QApplication forward single-point
touch events only if the target widget has the
Qt::WA_TouchPadAcceptSingleTouchEvents attribute set.
Task-number: QTBUG-35893
Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The iterators for QJsonArray and QJsonObject are currently lacking an
operator-> definition. Unfortunately it is not possible to do in clean
way without redefining either the iterators or QJsonValueRef class.
This patch instead adds two fake pointer classes that are only used
to handle the operator-> return value.
Task-number: QTBUG-29573
Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This element can be used for backends that do not offer all the
information that is needed when implementing a ssl certificate backend.
WinRT and the SecureTransport lack functionality in this area for
example.
The sources and tests are added for ssl and openssl configurations in order
to be tested. The condition for adding these can be changed as soon
as they are used by an actual implementation
Change-Id: I2b836133105afdc178bf3b1ee7d732bea069effa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Useful if someone is ever forced to try diagnose what goes wrong with this test.
Change-Id: I4b5e607e6329b6ebad2b40b3f65d6cacbb6b7fcf
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Everything else passes, after some pending fixes in QtWayland.
Change-Id: Ibd8efcaab8c5210111854f1a7362434046a62898
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reduces the average runtime of this test for me by ~600ms, but due to the
threading variance the exact reduction is hard to tell.
Change-Id: I96a9f949ae2381f69d9364e6637db0db4bd3b165
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
In some CI configurations this fails from time to time. Have to disable
it unless we can make it more robust somehow.
Change-Id: Iadd8904d7223a6aeff53dafa36b94df3f60e1ad8
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
[ChangeLog][Important Behavior Changes] HarfBuzz-NG is now the default
shaper on all platforms. This results in a better shaping results
for various languages, better performance, and lower memory consumption.
Task-number: QTBUG-18980
Change-Id: I4d9454fc37e9050873df3857e52369dfc7f191b2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Makes the test behavior identical across all platforms.
Change-Id: I5e564598d8e61588af2b73f04b4ca7c9b899c02a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On both iOS and Android it is very confusing to be able to move the focus to both, the line edit and the outer frame that is the spin box.
For Linux this fixes an issue that orca would not read the value correctly after pressing the up/down buttons.
Task-number: QTBUG-39861
Task-number: QTBUG-39442
Change-Id: I73c50c91e9021324c52d168d537afd0ea719a48f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
WinRT is a sanboxed environment, hence files can only be created in
some writable location.
For some tests we reset the current directory to minimize the required
changes. We cannot do this for the application lifetime as the test
also has cases where it reads files relative to the executable inside
the sandbox.
Change-Id: Ib9d37c8cffd191f0d1055f835c11d10887923378
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Convert qWait to QTRY_ where we can, and make the qWait durations explicit (not
buried in a function call, but inline in the actual test) where we can.
Total runtime for me goes from 91 seconds to 2 seconds.
Change-Id: I45b3562cb94721a521718365fd51a4172a2e4e18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Takes the total time for this test from ~1.2 seconds to ~0.42 seconds for me.
Change-Id: I426e600a7afe01d7343108b432eda8b83d6f3d85
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This takes 300ms off the total time for this test.
Change-Id: I230b8a58315797a81579f6a07da282b0dc40637d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Time taken by this testcase reduced from 7 seconds to 5.1 seconds for me.
Change-Id: I93b1c5fbc7d9d6515c9ce51a64fdd5c2ffbd54c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Followup to da9e02eb83:
If the stylus is a Wacom Art Pen for example, the regular_widgets
test will show a rotated ellipse with size proportional to pressure
for each tablet point, instead of a circle.
Task-number: QTBUG-39458
Change-Id: I4bbb5f8ceabf7006928d95df3ecd62378394f085
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
So when they fail it's easier to figure out why.
Change-Id: I7e76a6e0b8076ede30a6bb9049a031063c569dfc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This takes the total runtime of tst_qlistview for me from ~47 seconds to ~10
seconds.
Change-Id: Ie6fe95fe0852c2de37e99c2ad02230de78e0995e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This allows for opening of public key files. It does not, however,
support opening private keys (or decrypting/encrypting them). This is
due to limitations in the native API.
Nearly all public key tests pass (the native API doesn't support the
40-bit key in the test set). The private key tests are expected to fail.
Task-number: QTBUG-40688
Change-Id: Id8f2f1ae6526540736ceb2e5371f6a5d80c4ba7b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Allows to retrieve information about mounted volumes such as label,
total/available size, filesystem type and so on.
Possible use cases are:
- allows to do checks about filesystem before performing actual
operation (such as available/maximum volume size)
- allows to retrive information about volume that can be shown in file
dialogs
- allows to retrieve volume for specific path and check if two or more
paths belong to the same volume or not
[ChangeLog][QtCore] Added QStorageInfo class to retrive information
about mounted volumes and drives
Change-Id: Ibf9c2e6b53ef39c5605894a4422acdbbca4030c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
WinRT stores settings inside the app bundle, not in the registry.
Some tests are not fully functional due to errors in the file
implementation (See QTBUG-40588).
QSettings::SystemScope translates to a roaming container on WinRT,
meaning that settings stored inside there should be uploaded and
shared among devices. However, this is untested so far.
The tests have been updated for those platforms which do not store
the order of keys. This has been done on some locations only so
far, but needed to be done on more places for WinRT.
Task-number: QTBUG-33498
Change-Id: Ifd0194387b09c220d31812b4b6fd0ce9a7d84d24
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Make the functions work consistently. For example asking for the line at
the cursor position when the cursor was at the end returned an empty
line before.
Task-number: QTBUG-38500
Change-Id: I60fc78c7be129a59c83efcfce6d8fdd16f2c3f65
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Manually included changes from
3a347a4e70
in src/opengl/qgl.cpp.
Conflicts:
src/opengl/qgl_qpa.cpp
src/plugins/platforms/android/androidjnimain.cpp
Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
QExposeEvent::region() reports a region in a random coordinate system.
The behavior is undocumented and the platform plugins do different things.
xcb, offscreen and ios are correct. These set the region in local coordinates,
which is the most logical interpretation of the expose region.
windows is almost correct, except for one occurrence.
cocoa and others need changes: passing in geometry() as the exposed region is
always wrong.
The patch documents the expected behavior both for QExposeEvent and
internally in QWindowSystemInterface. The problematic plugins are fixed to
use local coordinates.
Task-number: QTBUG-40470
Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Fix disconnection from pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.
Commit 9cc106d9d7 fixed connect, so apply
the same fix in disconnect
[ChangeLog][QtCore][QObject] Fixed disconnecting from pointer to member
signal that belongs in the base class but whose type is explicitly given
as a pointer to a member in the derived class
Task-number: QTBUG-40638
Change-Id: Ia546fc8f36e1ea0dd0645bdd820aea47f43677ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).
Please contact Thiago Macieira to obtain the benchmarks and test data.
Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit adds tests for ref-qualified member functions, the new
syntax for functions and decltype.
__PRETTY_FUNCTION__ for lambdas varies wildly between compilers and will
produce really bizarre results after cleanup. It's not tested and is
known to be broken.
Change-Id: I70c8dbcba54790357cecba35aa45c5cc672f29d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
On templates, adding constexpr makes a given instantiation constexpr
if it can be.
This turns qMakePair(0,0), say, into a compile-time constant.
The effects on existing code are small, but exist:
$ size lib/*{-baseline,-paircexp} | sort -nr
6516727 211192 2608 6730527 66b31f lib/libQt5Widgets.so.5.4.0-baseline
6516711 211192 2608 6730511 66b30f lib/libQt5Widgets.so.5.4.0-paircexp
5373720 44492 15976 5434188 52eb4c lib/libQt5Core.so.5.4.0-baseline
5373504 44492 15976 5433972 52ea74 lib/libQt5Core.so.5.4.0-paircexp
5107206 125072 6080 5238358 4fee56 lib/libQt5Gui.so.5.4.0-baseline
5107030 125072 6080 5238182 4feda6 lib/libQt5Gui.so.5.4.0-paircexp
1341290 30180 2600 1374070 14f776 lib/libQt5Network.so.5.4.0-baseline
1341210 30180 2600 1373990 14f726 lib/libQt5Network.so.5.4.0-paircexp
# no other libraries benefit
[ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts.
Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
and make QByteArrayList be a simple typedef.
As a side-effect, the constructor taking a QByteArray is no longer
available since I couldn't find a way to add it to QList<T> when T is
QByteArray. My template-foo failed me. I tried:
- QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type
=> makes QList fail to compile for any T that isn't QByteArray
- make the constructor a template member
=> it compiles if the parameter is a QByteArray, but not a const
char[4] like the test was
- inheriting constructors
=> runs into ICC and Clang bugs that I could not work around
Besides, the constructor with std::initializer_list is a superior
solution anyway.
Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Instead of abusing inheritance to provide convenience constructors,
use simple inline constructor functions. The name got a lower-case
q to indicate a free function. The usual fromXYZ() static methods
were deemed not fitting in this case in the initial round of review,
since they implied some kind of conversion while these functions are
simply constructors of formsts, which contain no data.
This also solves the problem that some of these ctors could have been
called with just one argument and were therefore candidates for hidden
QPixelFormat temporary injection.
QPixelFormatRgb was renamed to qPixelFormatRgba to explain the third
argument at the call site better.
There seem to be no users of this class in qt5.git at this time.
Change-Id: Ib4fe8ceb2d30744127b116a748724a3406400eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.
[ChangeLog][QtCore] Added new QByteArrayList class.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I503af58f125d7f44fef10360177490c933e5840f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The class provides compare operators, stream operators, and hashing
functions. This class aims to be compatible with (but not restricted to)
the Semantic Versioning 2.0 standard (semver.org).
[ChangeLog][QtCore] Added QVersionNumber class
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
clang warning: adding 'int' to a string does not append to the string
Change-Id: I6dc393269a52e9482fde106c17132336cf5ce226
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
In some language, mnemonics put after label text within parentheses.
e.g. "&Open" is translated to "開く(&O)" in Japanese.
OS X doesn't use mnemonics and '&' in label text is removed.
Mnemonics in parentheses (and spaces before them) also should be removed.
Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QOpenGLBuffer::map() and related helpers are becoming useless in
OpenGL ES 3.0 and up: instead of the old GL_OES_map_buffer,
glMapBufferRange, but not glMapBuffer, is now part of the standard.
On desktop GL_ARB_map_buffer_range is present by default in OpenGL 3.0
and newer.
[ChangeLog][QtGui] Added QOpenGLBuffer::mapBufferRange().
Task-number: QTBUG-38168
Change-Id: I4e9bbe8ced9ee4d535ac32849a8c08c26d79cb49
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat.
These define the default values for the requestedFormat members of
QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow,
QQuickWindow, etc.)
This replaces QQuickWindow::setDefaultFormat() which can now be removed.
The main inspiration here is not the convenience (avoiding setFormat() calls
for all windows/widgets), but robustness: by setting the format once at the start
of the application, all windows and contexts, including the internal share context
used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating
the possibility of failing due to trying to share between incompatible contexts.
Furthermore, since such a functionality is anyway mandatory for QQuickWindow
(due to the possibility of creating windows from QML code), extending it to
QSurfaceFormat and QOpenGLContext/QWindow is the next logical step.
Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This is helpful to e.g. test an NTLM proxy.
The test server currently does not support NTLM; this test offers a
possibility to specify a proxy server via environment variables.
Change-Id: Iea94656d38424c1d932fc854d13ca15ca47cdd68
Reviewed-by: Richard J. Moore <rich@kde.org>
With SHA1 47b3ecf3f4 some tests got
commented out by accident. This re-enables those tests.
Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>