summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-127-6/+196
|\ | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * Fix disconnect()ing from signals declared in a base classOlivier Goffart2014-08-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 9cc106d9d7d951fcf30f4b0f8606afa6b50892ec 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>
| * network tests: add manual test for auth / proxy authPeter Hartmann2014-08-071-0/+82
| | | | | | | | | | | | | | | | | | 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>
| * Uncomment some tests which accidently got commentedAndy Shaw2014-08-071-6/+6
| | | | | | | | | | | | | | | | With SHA1 47b3ecf3f49933f2a7e3a9dd98f0641d513822bb some tests got commented out by accident. This re-enables those tests. Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Undo: Fix state entry bug for parallel state groupsPeter Kümmel2014-08-061-0/+3
| | | | | | | | | | | | | | | | | | | | This commit reverts c4cef6fae9f2a55f21fc9517855dfcf659c89081. The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not complete and introduces the regression QTBUG-30049. Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219 Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QHash: check which of several equal keys is insertedMarc Mutz2014-08-052-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test that checks that QHash keeps the first of the keys that compare equal. This may or may not be documented, but is inconsistent with the values in a QHash, where the last element with equal key is kept. Document this as a test. That way, we'll be informed when the behavior changes (e.g. by a port to std::unordered_map). Do the equivalent checks in tst_QMap, too. There, of course, instead of equal keys, check equivalent ones. Change-Id: I2c5f04f8e8a6bbc7dbaadadd878a4c876e4df042 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * tst_QSet: check which of several equal elements is insertedMarc Mutz2014-08-051-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Add a test that checks that QSet keeps the first of the elements that have equal value. This is documented, but inconsistent with values in a QHash, which keeps the last element with equal key. Document this as a test. That way, we'll be informed when the behavior changes (e.g. by a port to std::unordered_set). Change-Id: I4ca1718bb86599b925b3ccd13b0856917cd4ce67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Make the expose region local on all platformsLaszlo Agocs2014-08-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Trim the QString benchmark testThiago Macieira2014-08-099-76004/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Ensure that qCleanupFuncinfo works with some C++11 new constructsThiago Macieira2014-08-092-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QPair: add constexpr liberallyMarc Mutz2014-08-091-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Move the special QByteArrayList methods into QListThiago Macieira2014-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QPixelFormat: don't inherit itMarc Mutz2014-08-092-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Long live QByteArrayList!Glen Mabey2014-08-093-0/+297
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Long live QVersionNumber!Keith Gardner2014-08-093-1/+584
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix int conversion to stringFrederik Gladhorn2014-08-081-2/+2
| | | | | | | | | | | | | | 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>
* | OS X: Remove mnemonics in parenthesesTakumi Asaki2014-08-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add support for glMapBufferRange in the wrappers and resolversLaszlo Agocs2014-08-082-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 default format to QSurfaceFormatLaszlo Agocs2014-08-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QCommandLineParser: support extremely concise option configuration in C++11Marc Mutz2014-08-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this commit to make the code in the test work: QCommandLineParser parser; parser.addOptions({ { "a", "The A option." }, { { "v", "verbose" }, "The verbose option." }, { { "i", "infile" }, "The input file.", "value" }, }); For this, QCommandLineParser needs a version of addOption that can take a list of options. That's what addOptions() is for. More importantly, the QCommandLineOption ctors mustn't be explicit. OTOH, any implicit conversion from QString or QStringList to QCommandLineOption is also undesirable. To solve this dilemma, add new QCommandLineOption ctors that just take one argument and are explicit, and make the existing ctors implicit. In order to avoid ambiguities, remove the default values of their resp. 2nd arguments. The new ctors are by intention not \since 5.4, as they are completely transparent to the user. Et voila, even better than getopt_long(3). [ChangeLog][QtCore][QCommandLineParser] Added addOptions() method. Change-Id: I5e779f3406cd0f6c8ec6ecbf6c8074af226de300 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QProgressDialog: fix setBar() not properly adopting the new QProgressBarMarc Mutz2014-08-061-7/+0
| | | | | | | | | | | | | | | | The "adoption" code is taken from setLabel(). Task-number: QTBUG-40503 Change-Id: Id512b28eb756b4a80e5701e599e2cbdf5346ff62 Reviewed-by: David Faure <david.faure@kdab.com>
* | Implement QStringRef::splitJędrzej Nowacki2014-08-061-0/+75
| | | | | | | | | | | | | | [ChangeLog][QtCore] Added the QStringRef::split() function Change-Id: I28709c9761785dea7be4e7d621ecf4e1ae007a72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a test for some copy semantics to QPaletteMarc Mutz2014-08-061-0/+22
| | | | | | | | | | | | | | It isn't a thorough check of all the mutable methods for detaching, but a start. Change-Id: I523fd30d3459186654e12fd25c384ed990ab7a00 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QPalette: add move constructorMarc Mutz2014-08-061-0/+8
| | | | | | | | | | | | | | | | | | | | As with many other implicitly shared classes, efficient move semantics requires setting the d-pointer to nullptr, which then needs to be checked for in the dtor and the copy assignment operator. Change-Id: I654d181a1dfdd9a16e2f9fb96b57475cdd0b4561 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QHeaderView::restoreState(): Add sanity check.Friedemann Kleint2014-08-061-0/+1
| | | | | | | | | | | | | | | | Read data into local variables and apply only after a check. Task-number: QTBUG-40462 Change-Id: Id06060d0d5b0eafc2d303526a86d552ff5747a72 Reviewed-by: David Faure <david.faure@kdab.com>
* | QtConcurrent::run: allow to select the thread pool on which to run the taskMarc Mutz2014-08-051-2/+128
| | | | | | | | | | | | | | | | | | | | | | | | This is the second and last part of the forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1281 [ChangeLog][QtConcurrent] run() now optionally takes as its first argument the QThreadPool to run the task on. Task-number: QTBUG-17220 Change-Id: I4b46eca6ef7de9cd34dac07e6d4b8ad830426b97 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QFutureInterface: allow to work with a QThreadPool != globalInstance()Marc Mutz2014-08-051-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Background: It is often necessary/advisable to schedule tasks on thread pools != globalInstance(). As Herb Sutter writes in http://www.drdobbs.com/parallel/use-thread-pools-correctly-keep-tasks-sh/216500409 and the Qt Training Material stresses, tasks you schedule on a (global) thread pool should be non-blocking, which currently rules out using any of the QtConcurrent functions for, say, file I/O. Nonetheless it's often convenient to have thread pools also for file I/O, as the thumbnail viewer exercise in the Qt Training Material shows. In this case, you'd use a dedicated thead pool, leaving the global thread pool for CPU-bound tasks. Yet, none of the QtConcurrent functions allow to pick the QThreadPool instance on which to schedule the work created with them. This patch prepares for them to do so. This is the first part of the forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1281. Implement by using a new QThreadPool* member that defaults to nullptr, and adding setThreadPool to set this member, then using it in lieu of QThreadPool::globalInstance() everywhere. I chose to leave m_pool == nullptr to mean globalInstance() to avoid creating the global instance whenever a QFuture is created, even if the future represents the result of a calculation not run on the global thread pool. [ChangeLog][QtCore][QFuture] Can now be used with any QThreadPool, not just globalInstance(). Task-number: QTBUG-17220 Change-Id: I4e1dc18d55cf60141b2fa3d14e2d44a3e9e74858 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Logging: use the known function when the first frame of the backtrace is unknownOlivier Goffart2014-08-051-1/+2
| | | | | | | | | | | | Change-Id: Ia591805c82e7bf77dc7af04f1054c7daca58eb6a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Introduce QRasterWindowLaszlo Agocs2014-08-053-1/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simple convenience class providing a QWindow that has a paintEvent and supports opening a painter on itself. It behaves exactly like QOpenGLWindow in this respect, which is not surprising since they share the same base class (QPaintDeviceWindow). QRasterWindow does not however have any OpenGL dependencies and will be present in -no-opengl builds too. [ChangeLog] Added QRasterWindow, a thin convenience wrapper for a QWindow on which a QPainter can be opened. Done-with: Jorgen Lind <jorgen.lind@digia.com> Change-Id: I37e82720492945d7b85d5f713eea8d5f7556e511 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Introduce QOpenGLWindowLaszlo Agocs2014-08-053-0/+311
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog] Added QOpenGLWindow. This serves as a convenience class for creating windows showing OpenGL content via an API similar to QGLWidget and without any widget dependencies. Done-with: Jorgen Lind <jorgen.lind@digia.com> Task-number: QTBUG-36899 Change-Id: I52e9bc61acb129dbfd3841b3adeffab2dbcf7f05 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-08-051-4/+10
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-08-041-4/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/arch.cpp src/opengl/qgl_qpa.cpp src/widgets/kernel/qapplication.cpp Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
| | * Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-301-4/+10
| | |\ | | | | | | | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| | | * QNX: Fix QMdiWindow autotestsFabian Bumberger2014-06-251-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "setOpaqueResizeAndMove" this patch makes sure that the content of a subwindow actually fits into the window, otherwise the resize does not work properly. The content is dpi dependent and thus the pixel size of it increases with the display dpi value. Furthermore when moving the QMdiSubwindow this patch makes sure that we actually grab the window's header and not one of it's tool buttons (minimize, maximize, close). Change-Id: I88314994957c5883f57c09c9240a3b83f1ee42ed Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
* | | | Remove d3dcompiler_qtAndrew Knight2014-08-052-373/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This library was created as a work around for limitations on Windows Phone 8.0, which will not be supported going forward (Qt 5.4). Therefore, we no longer need (or want to maintain) this experimental feature and should remove it from the repository. Change-Id: Ia417833f9de43e2d3e0940df93625e7d87a555ea Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | Fix cmake-test for Dynamic OpenGL.Friedemann Kleint2014-08-051-12/+19
|/ / / | | | | | | | | | | | | Change-Id: I604501d07b4728c5158e88a6760b9f1e31311991 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Make QOpenGLWidget publicLaszlo Agocs2014-08-016-5/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | tst_QTimeZone: test QTimeZonePrivate::isValidId()Marc Mutz2014-07-311-0/+61
| | | | | | | | | | | | | | | | | | | | | This is in preparation of rewriting the function for efficiency. Change-Id: Id5c16b984b95d76e1f26d862e3813f75980f44fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add a test for move assignment to tst_QPaletteMarc Mutz2014-07-311-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | It was simply missing. Change-Id: I6645bb9fe9c81aec9c46ac5efc7d2295a3784ff6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Ensure valid data after QImage::invertPixelsAllan Sandfeld Jensen2014-07-311-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::invertPixels may produce invalid data after inversions of images with premultiplied alpha, because the inverted colors will be larger than the alpha. This patch converts any image with a premultiplied alpha channel to ARGB32 before inverting the pixels, and then back to the original format after the inversion. Support is added for correct inversion of RGBA8888 and RGB30 formats. Task-number: QTBUG-39901 Change-Id: Ief24c55f495e67ef2ad6429b5b418d02963a64dd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | tst_qwidget: Fix geometries.Friedemann Kleint2014-07-311-73/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use sizes relative to the test widget size; move windows relative to the top left point of the available screen geometry. Set a window title on widgets to be able to identify them. The test now passes on Windows using a 4K monitor. Task-number: QTBUG-38858 Change-Id: I5df9198e390befeb3ca18796e24180135a084aad Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | tst_qwindow: Fix geometries.Friedemann Kleint2014-07-311-55/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use sizes relative to the test window size; move windows relative to the top left point of the available screen geometry. The test now passes on Windows using a 4K monitor. Task-number: QTBUG-38858 Change-Id: Ia8d992f2a9bfa1cb1deacaf918ed0cfff7616959 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | | QTabletEvent manual test: show buttons, pressure, eraserShawn Rutledge2014-07-314-39/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Show which button was pressed or released - Render an ellipse proportional to pressure for each point drawn - Different color for the eraser - More complete output for each event - Don't show mouse events by default, just as most tablet applications can now ignore mouse events on the drawing canvas. But for the purpose of testing interleaving of tablet and mouse events, one can give the argument --mouse when starting this program to show them too, as before. Task-number: QTBUG-39458 Change-Id: I5e03f1aa748be39d524bd6984ff5d66579787cf9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Add QString::splitRef functions.Jędrzej Nowacki2014-07-311-15/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions can be used to optimize code that do not need to use the split results as QString directly. [ChangeLog][QtCore] QString can now split a string to a list of QStringRef. Change-Id: Ic2dc929e1fba82f9a060e37c51068a301cb5b866 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | QProgressDialog: make the cancel button retranslate on LanguageChangeMarc Mutz2014-07-301-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is documented to be, and the LanguageChange event is caught and processed. However, retranslateStrings() uses QProgressDialog::setCancelButtonText(), which unconditionally sets useDefaultCancelText=true, blocking any further changes to the button text by subsequent LanguageChange events. The fix is to use extracted QProgressDialogPrivate::setCancelButtonText() which - quite intentionally - doesn't set useDefaultCancelText. Task-number: QTBUG-40504 Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a Reviewed-by: David Faure <david.faure@kdab.com>
* | | QProgressDialog: don't crash when setting the same {bar,button,label} againMarc Mutz2014-07-301-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The associated test has unearthed that setBar() fails to make the new bar a child of the progress dialog. This will be fixed in a separate commit. Task-number: QTBUG-40502 Change-Id: I2d09ebb07ae6395449a4efe38a638df831eebdd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | tst_QProgressDialog: enable topLevelWindows() check in cleanup()Marc Mutz2014-07-301-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Detects widget leaks. Change-Id: Ia2287debc96a5b87b224b887661679eba8622dc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Clean up tst_QProgressDialogMarc Mutz2014-07-301-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove empty ctor and dtor. Change-Id: Ib89f463eb2623bbb66cc3faa2ab2d5992810f153 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-304-7/+109
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-294-7/+109
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b