summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
* | Revert path() behavior to not expand a current path on a driveAndy Shaw2014-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the original change - cfb44c6528b2518274bf157388832d1d610ce0e4 - when querying for the path of a file that did not contain a slash after the drive indicator it would get the current path and return that as the path that the file resided on. However this meant that it would take the current path at that time which may not be the actual path that was expected. So it was decided that it should revert back to the original behavior which was to just return the drive letter followed by the colon which would thus indicate still that it represented whatever the current path was on that drive. Change-Id: Ic57ae9227882a66e9a4c4d6537d7f2cae829165a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Dynamic GL: remove exporting symbolsLaszlo Agocs2014-03-044-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Remove duplicated testsSze Howe Koh2014-03-041-14/+0
| | | | | | | | | | | | | | tst_QtJson::testValueSimple() tested bool and double values twice Change-Id: Ie6e58aab729c6ee20cb53d3b85746a05f7571f5e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Fix issue where revealed widget children do not receive paint event.Chris Colbert2014-03-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a child of a widget is spontaneously revealed due to a call to the parent 'resize' method, the child will not receive a paint event if it has the WA_StaticContents and WA_OpaquePaintEvent flags set. This is caused by the backing store being pre-emptively resized by the call to setGeometry_sys, which causes QWidgetBackingStore::sync to skip the block which handles the static contents. There doesn't appear to be any reason to preemptively resize the backing store, since it is always resized as-needed during the the 'sync' method. This change-set removes the code which preemptively resizes the backing store. Task-number: QTBUG-35282 Change-Id: Ie9942854ca5322dfe0f98ed8100810161576be80 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Remove use of templates in tst_qatomicinteger.Friedemann Kleint2014-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC 2008 is confused by TypeInStruct being a template, resulting in \tst_qatomicinteger.cpp(189) : error C2027: use of undefined type 'QStaticAssertFailure<Test>' with [ Test=false ] for int (and thus for all unsupported types). This appears to be a real Heisenbug-nature compiler bug as it can also be fixed by adding qDebug() << Q_ALIGNOF(TypeInStruct<T>) before the static assert. Task-number: QTBUG-37195 Change-Id: Ib2b60f3c1ffeb0b8bdeb1fb0c659655ce4ab10d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Turn off compiler optimization in tst_qtendian for MSVC2008.Friedemann Kleint2014-03-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This causes frequent compiler errors on Windows CE. tests\auto\corelib\global\qtendian\tst_qtendian.cpp(140) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'd:\orcas\compiler\utc\src\P2\main.c[0xCCCCCCCC:0xCCCCCCCC]', line 243) Task-number: QTBUG-37194 Change-Id: I2adbc1e3b1896fbe86780aa26a15e918333a09f2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | tests: Remove superfluous gui additions to QTSergio Ahumada2014-02-288-8/+7
| | | | | | | | | | | | | | by default QT contains both core and gui already Change-Id: I6f5b551104e40a024468e7cb62e302134e9472ec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | tst_qnumeric: Mark some tests as XFAIL on BlackBerry 10Sergio Ahumada2014-02-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | These tests seem to fail because denormalized numbers are not supported on QNX yet, so marking them as expected failures. - floatDistance(denormal) - floatDistance_double(denormal) Task-number: QTBUG-37094 Change-Id: I79dbc78da6e9bef8466264fd2cab4af0ee8b868f Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | tst_qtjson: Mark some test as XFAIL on BlackBerry 10Sergio Ahumada2014-02-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | These tests seem to fail because denormalized numbers are not supported on QNX yet, so marking them as expected failures. - testNumbers_2() - toJsonLargeNumericValues() - parseNumbers() Task-number: QTBUG-37066 Change-Id: Ifec95b936fb70253395dee4d1ca18e85870486a3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Logging: Change 'rules' section name to 'Rules'Kai Koehne2014-02-262-6/+6
| | | | | | | | | | | | | | | | | | This is more consistent with e.g. qt.conf, where section names also start with an upper case character. Change-Id: I9ddaf72baeb9334d081807412512242d5d46cbbf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QPrinter - Add more testsJohn Layt2014-02-261-6/+25
| | | | | | | | | | | | | | Add more missing tests. Change-Id: I801c5c67731075ccb3e62377c0eccc420e708365 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Revert "Fix application font removal when using FontConfig"Eskil Abrahamsen Blomfeldt2014-02-254-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a4ff400e25c76a32ec8252285dda043f07b19c15. The patch caused a regression for bold fonts which is currently blocking the alpha of Qt 5.3, so lets revert it and try resubmitting a fixed version later to avoid delaying any release. Task-number: QTBUG-36929 Change-Id: I8d474b09b2270eb2f861853e60605429be08e2d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | tst_spdy: Check network test serverSergio Ahumada2014-02-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | There is no need to even try to run the tests if the network test server is not present. Add a validation in initTestCase() since all test functions depend on the network test server. Change-Id: I8eca376a718ab5b6e1cc2c57f2e045dd0b58f52b Reviewed-by: Richard J. Moore <rich@kde.org>
* | QtNetwork tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Sergio Ahumada2014-02-2544-44/+0
| | | | | | | | | | Change-Id: If1cc5fafddc41ed19dd818caf294c69cd4969216 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Remove qSort usages from core testsSergio Ahumada2014-02-224-5/+13
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I355558fe6a51d00e9aa1f8b1221c6ec0c1e6bb77 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Make sure all containers compile in strict-iterator modeThiago Macieira2014-02-2214-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit-test this by making the QList, QVector, QHash and QMap unit tests be duplicated under strict-iterator mode. There's no test for QLinkedList. The tst_Collections test does not compile under strict-iterator mode. It generated over 15000 errors when I tried. The strict iterators required a small change: the difference_type typedef needs to match the operators that get distances (operator-(iterator)) and move the iterator around (+, -, +=, -=, etc.). Task-number: QTBUG-29608 Change-Id: I834873934c51d0f139a994cd395818da4ec997e2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | QMarginsF - Add new QMarginsF classJohn Layt2014-02-212-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | Add a new QMarginsF class to complement QMargins in the style of QSize/QSizeF and QRect/QRectF. [ChangeLog][QtCore] Added class QMarginsF to support handling margins with floating-point values. Change-Id: Iaaa95ec85f5d126d9d864fc4b607241a8c8a8f3a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QRect - Add missing QMargins subtraction operatorJohn Layt2014-02-211-0/+4
| | | | | | | | | | | | | | | | [ChangeLog][QtCore][QRect] Added QMargins subtraction operator. Change-Id: I64d449e2bae81a34df2cd019cff3fb186f8aaaae Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QMargins - Add missing operatorsJohn Layt2014-02-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | Add missing standard operators. [ChangeLog][QtCore][QMargins] Added missing addition and subtraction operators. Change-Id: I6aeed39531a736c12d378a817a9431279da79bc4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Strip any trailing spaces from the filename before trying to open itAndy Shaw2014-02-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, trailing spaces in a filename are silently ignored, so we need to strip it before trying to open a file with it. Otherwise it ends up being stripped later and in a case like " ." it will end up causing Qt to think that a folder exists when it does not. [ChangeLog][Platform Specific Changes][Windows][QtWidgets][QFileDialog] Handled the case of having trailing spaces in a filename correctly so if the filename ends up being empty that the parent path is used instead. Change-Id: I6500cc3a44746bf4a65e73bcfb63265a0a97c8a3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Loosen checks for Q_COMPILER_VARIADIC_MACROSKai Koehne2014-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we did bind the definition of Q_COMPILER_VARIADIC_MACROS to C++11 (so gcc, clang will not define it in default gnu++98 standard). However, variadic macros are a feature of the gcc preprocessor since version 2.97, and are enabled in the default configurations on gcc, clang, icc. This might cause warnings and errors though if one enables additional warnings in gcc, clang (e.g. by -pedantic). Anyhow, as a precedent qglobal.h already relies on 'long long' ... The warning can be disabled by adding '-Wno-variadic-macros'. [ChangeLog][Compiler Specific Changes] Variadic macros are now enabled more liberally for gcc, clang, icc. If you have warnings (because you e.g. compile with -pedantic), disable them by -Wno-variadic-macros. Change-Id: Ie979b85809508ad70cab75e6981f20496429f463 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix QFontMetrics widthBernd Weimer2014-02-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f4dd534 introduced a regression, so that QFontMetrics reported a wrong size (to be more specific width) for FreeType fonts. The calculation of glyph advances has to to reflect (rounded) integral number of pixels. This was only done when the glyph was cached. So in some cases the first call to QFontMetrics::size gave a different result than the second. This patch reverts f4dd5344fbbce257a40e014acc4e87f4773f40. The tst_QFontMetrics::same auto test only happened to work on some platforms, on BlackBerry for instance it did not. Extended the test case to make sure it works for different font sizes. Change-Id: Ia5bb9abd3ff98193c9bba048b85207672ed8d9c3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Remove qSort usages from gui testsSergio Ahumada2014-02-203-5/+11
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Idf0fc471f8ab7b30a097d8faf93c93d5ebbb03ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Remove qSort usages from testsSergio Ahumada2014-02-204-7/+15
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I4c48db80533802e37771d3967fa10bfb7000cb9a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | network: add support for the SPDY protocolPeter Hartmann2014-02-193-0/+698
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the only supported SPDY version is 3.0. The feature needs to be enabled explicitly via QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used can be determined via QNetworkRequest::SpdyWasUsedAttribute from a QNetworkReply once it has been started (i.e. after the encrypted() signal has been received). Whether SPDY can be used will be determined during the SSL handshake through the TLS NPN extension (see separate commit). The following things from SPDY have not been enabled currently: * server push is not implemented, it has never been seen in the wild; in that case we just reject a stream pushed by the server, which is legit. * settings are not persisted across SPDY sessions. In practice this means that the server sends a small message upon session start telling us e.g. the number of concurrent connections. * SSL client certificates are not supported. Task-number: QTBUG-18714 [ChangeLog][QtNetwork] Added support for the SPDY protocol (version 3.0). Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/dev' into stableOswald Buddenhagen2014-02-19392-4697/+12436
|\ \ | | | | | | | | | Change-Id: Ice524edcc51373509f0023ae7f7c2963f4602f88
| * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-184-16/+53
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/android/qandroidplatformtheme.h Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
| * \ \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-171-0/+20
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
| * | | Remove a not required whitespace when writing JSON in compact formatLars Knoll2014-02-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-36682 Change-Id: I0c1c0de850504c8dff20a5ae724cc868d9f983f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QOpenGLTextureBlitter: add some autotestsJørgen Lind2014-02-161-0/+191
| | | | | | | | | | | | | | | | | | | | Change-Id: I07a4847a19908c1a6d7fb02649b306dfa0148f49 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | | Make the printing of complex Unicode in a QString prettierThiago Macieira2014-02-168-72/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also has the advantage of not requiring the use of the locale codec. Quite an advantage if you're debugging the locale codec. But it's mostly so that we don't get question marks that hide the difference we were trying to locate. [ChangeLog][QtTest] QtTest now prints an escaped version of QStrings that failed to compare with QCOMPARE. That is, instead of converting non-printable characters to question marks, QtTest will print the Unicode representation of the character in question. Change-Id: I44c1ef3246b188c913dacd3ca4df02581356ea41 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | Add a testAndSet overload to the atomics that returns the current valueThiago Macieira2014-02-163-1/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is extremely useful, since the most common action after a failed compare-and-swap is to loop around, trying again with the current value as found in memory. Code currently written as: do { Type value = atomic.load(); ... } while (!atomic.testAndSetRelaxed(value, desired)); Becomes: Type value = atomic.load(); do { ... } while (!atomic.testAndSetRelaxed(value, desired, value)); In most CPU architectures, the value that was found in memory is known to the compare-and-swap code, so this is more efficient than the previous code. In architectures where the value is not known, the new code is no worse than before. The implementation sometimes modified an existing function, sometimes it added a new one, depending on whether more registers were needed in the assembly (like ARMv6-7), the code became more complex (ARMv5), the optimizer failed (C++11), or it was just plain equivalent (MIPS). Change-Id: I7d6d200ea9746ec8978a0c1e1969dbc3580b9285 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add qHash() overloads for floating-point typesMarc Mutz2014-02-161-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation is based on GCC's implementation of std::hash<FP>, but only to the extent of checking for zero before hashing the bits. The bit hasher is the Qt one; I didn't even look what GCC uses. The check against 0.0 is mandated by the requirement to have \forall x,y: x == y => qHash(x) == qHash(y) which would be violated for x = 0.0 and y = -0.0 if we only hashed the bits. Implemented out-of-line to avoid potential FP-comparison warnings, as well as to be able to use the file-static hash() functions, which gets inlined unlike qHashBits(), which cannot be. [ChangeLog][QtCore][QHash/QSet] Allowed to use float, double and long double as QHash/QSet keys. Change-Id: I38cec4afb860f17e9f8be7b67544e58b330f8fff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * | | tst_qsignalblocker: simplify testMarc Mutz2014-02-161-138/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test can assume that the QObject::signalsBlocked property works as advertized, so just check signalsBlocked() in repsonse to QSignalBlocker manipulations. Change-Id: I99e4ef9c4ed05c3840233d92a587636d2d78f59a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | | Add const overload for QLoggingCategory::operator()()Kai Koehne2014-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 85e57653 caused a compile error for code that does Q_DECLARE_LOGGING_CATEGORY(cat); //.. qCDebug(cat()) << // ... error: C3848: expression having type 'const QLoggingCategory' would lose some const-volatile qualifiers in order to call 'QLoggingCategory &QLoggingCategory::operator ()(void)' This is a regression from Qt 5.2. Fix the error by adding a const version of operator()(). Change-Id: I2fb04f2e155962adee0f98089fc5a159000bef56 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | WinRT: Added socket engine implementationOliver Wolff2014-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added basic functionality to socket for WinRT. Even though not all auto tests pass yet, this patch can be seen as a foundation for upcoming work in this area. Reading from and writing to TCP socket works and one can listen for tcp connections. Change-Id: Id4c25ba1c7187ed92b6368c785c4f62837faded7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * | | Enable QByteArrayList testsJędrzej Nowacki2014-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Id7e0550e857bf4221f49d08539a0b5c70d8386d3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * | | Dynamic GL switch on WindowsLaszlo Agocs2014-02-144-147/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces a new build configuration on Windows which can be requested by passing -opengl dynamic to configure. Platforms other than Windows (including WinRT) are not affected. The existing Angle and desktop configurations are not affected. These continue to function as before and Angle remains the default. In the future, when all modules have added support for the dynamic path, as described below, the default configuration could be changed to be the dynamic one. This would allow providing a single set of binaries in the official builds instead of the current two. When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are never defined. Instead, the code path that has traditionally been desktop GL only becomes the dynamic path that has to do runtime checks. Qt modules and applications are not linked to opengl32.dll or libegl/glesv2.dll in this case. Instead, QtGui exports all necessary egl/egl/gl functions which will, under the hood, forward all requests to a dynamically loaded EGL/WGL/GL implementation. Porting guide (better said, changes needed to prepare your code to work with dynamic GL builds when the fallback to Angle is utilized): 1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to differentiate between desktop and ES where needed. Keep in mind that it is the desktop GL header (plus qopenglext.h) that is included, not the GLES one. QtGui's proxy will handle some differences, for example calling glClearDepth will route to glClearDepthf when needed. The built-in eglGetProcAddress is able to retrieve pointers for standard GLES2 functions too so code resolving OpenGL 2 functions will function in any case. 2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds, but never "angle" or "opengles2". 3. The preprocessor define QT_OPENGL_DYNAMIC is also available in dynamic builds. The usage of this is strongly discouraged and should not be needed anywhere except for QtGui and the platform plugin. 4. Code in need of the library handle can use QOpenGLFunctions::platformGLHandle(). The decision on which library to load is currently based on a simple test that creates a dummy window/context and tries to resolve an OpenGL 2 function. If this fails, it goes for Angle. This seems to work well on Win7 PCs for example that do not have proper graphics drivers providing OpenGL installed but are D3D9 capable using the default drivers. Setting QT_OPENGL to desktop or angle skips the test and forces usage of the given GL. There are also two new application attributes that could be used for the same purpose. If Angle is requested but the libraries are not present, desktop is tried. If desktop is requested, or if angle is requested but nothing works, the EGL/WGL functions will still be callable but will return 0. This conveniently means that eglInitialize() and such will report a failure. Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will tell which implementation is chosen. The textures example application is ported to OpenGL 2, the GL 1 code path is removed. [ChangeLog][QtGui] Qt builds on Windows can now be configured for dynamic loading of the OpenGL implementation. This can be requested by passing -opengl dynamic to configure. In this mode no modules will link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will dynamically choose between desktop and Angle during the first GL/EGL/WGL call. This allows deploying applications with a single set of Qt libraries with the ability of transparently falling back to Angle in case the opengl32.dll is not suitable, due to missing graphics drivers for example. Task-number: QTBUG-36483 Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | | Fix QDateTime auto testBernd Weimer2014-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion from UTC to local time will result in same datetime value, if local time is in UTC. Change-Id: Icd4ea57cb46cc97bcc8fce4f4e579bf64a4d4b10 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * | | Add function to get the actual PID from QProcessChristian Strømme2014-02-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was not possible to get the actual process ID (in a cross-platform manner) from QProcess, as the user would need to handle the returned typedef (Q_PID) differently on Unix and Windows. On Unix Q_PID is the actual process ID, but on Windows it's a pointer to a PROCESS_INFORMATION structure, which among other fields contains the process ID. Instead of returning a pointer on Windows, QProcess::processId() will return the actual process ID on both Windows and Unix. [ChangeLog][QtCore][QProcess] Added processId() to QProcess. This function will, unlike pid(), return the actual process identifier on both Window and Unix. Task-number: QTBUG-26136 Change-Id: I853ab721297e2dd9cda006666144179a9e25b73d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add a CSV logging feature to the benchlibThiago Macieira2014-02-148-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only useful for logging benchmarks, since it won't print test passes, failures, etc. It's useful for importing to spreadsheets to do number-crunching. [ChangeLog][QtTest]Added a CSV logging mode that is suitable for importing benchmark results into spreadsheets. This can be enabled by the -csv option on the command-line. The CSV logging mode will not print test failures, debug messages, warnings, etc. Change-Id: I245d6f86bb380645c9bc0d748cf474b3ed42cab8 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
| * | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Konstantin Ritt2014-02-136-2/+121
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| | * \ \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-126-2/+121
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * | | | | new QByteArrayList classGlen Mabey2014-02-122-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial submission of a new class QByteArrayList with the purpose of aggregating and then joining QByteArray instances. [ChangeLog][QtCore] Added new QByteArrayList class. Change-Id: I2a9dc71ff7aadb19ebc129a0d47ac8cd33895924 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | | Move setWindowIcon() up to QGuiApplication.David Faure2014-02-121-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui][QWindow]QWindow::icon() now defaults to the application icon, which can be set with QGuiApplication::setWindowIcon(). Change-Id: Id1974e5cda81775e515c14b294f67fb99351c6c9 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | | | | Restore support for -title command line argument on X11, add -qwindowtitle.David Faure2014-02-121-0/+12
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -title disappeared between Qt4 and Qt5, due to all the refactorings around QPA. Making the caption of the mainwindow configurable allows custom setups for specific users or use cases. [ChangeLog][QtGui][QGuiApplication] Restore support for -title command line argument on X11, add -qwindowtitle on all platforms. Change-Id: I73e6bf21248f3419178eba583b257172a175e74e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | | | Allow configuration of logging rules from file systemKai Koehne2014-02-114-1/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow configuration of logging rules from outside of the application, either through a configuration file (.config/QtProject/qtlogging.ini), or through a file specified by a QT_LOGGING_CONF environment variable. The logging rules from the different sources are concatenated: First the rules from QtProject/qtlogging.ini are applied, then QLoggingCategory::setLoggingRules(), finally from the environment. This allows an application to overwrite/augment the system wide rules, and in turn that can be tailored for a specific run by setting a configuration in the environment variable. [ChangeLog][QtCore][Logging] The logging framework can now be configured with an .ini file. Change-Id: I442efde1b7e0a2ebe135c6f6e0a4b656483fe4b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-1120-7/+130
| |\ \ \ \ | | | | | | | | | | | | | | | | | | refs/staging/dev
| | * \ \ \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-0720-7/+130
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * | | | | | Print qCDebugs in arbitrary categories by defaultGiorgos Tsiapaliokas2014-02-101-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debug output of all categories will be visible by default, except from the "qt.*" categories. "qt.*" categories are private and their default debug output will be hidden. [ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f Reviewed-by: Kai Koehne <kai.koehne@digia.com>