summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-0/+9
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| * QFlags: mark as Q_PRIMITIVE_TYPEMarc Mutz2012-02-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally tried to put Q_DECLARE_TYPEINFOs into Q_DECLARE_OPERATORS_FOR_FLAGS, to declare not only the flags type, but also the underlying enum as primitive, but too many users (arguably correctly) used Q_DECLARE_OPERATORS_FOR_FLAGS at (non-global) namespace scope where QTypeInfo would have been specialised in the wrong namespace. So specialise QTypeInfo for QFlags<T> only. Change-Id: I4af6e29aefbd9460a3d2bc6405f03cdf6b1096bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Changed qlogging unittest to install subprogramKurt Korbatits2012-03-011-0/+3
|/ | | | | | | - Added install of app sub program so it works from install directory Change-Id: Ia83643519752a3cbb59d6da2aed132d683a94bee Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed tst_qlogging app silently not compiled in some -fast builds.Rohan McGovern2012-02-223-5/+5
| | | | | | | | | | | | | When configuring with -fast on Windows, a directory which contains two .pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile silently clobbered by the non-SUBDIRS Makefile. In practice, this may cause various subdirectories to be silently excluded from the build. Rearrange .pro files for this test to avoid triggering this bug. Task-number: QTBUG-21168 Change-Id: Ic51941db497d7b8fb004f3c50f5ea24d90ff3114 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Fix qlogging test.Friedemann Kleint2012-02-211-2/+3
| | | | | | | Build app sub-process first. Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix qlogging test for release configurationMiikka Heikkinen2012-02-172-12/+26
| | | | | | | | | | | | | | | The helper process 'app' wasn't built in release configuration. Also improved finding the helper executable to utilize QFINDTESTDATA and print out a proper errors if it could not be found or started. Note that adding ".exe" to process name in Windows is unnecessary as QProcess already does that for you, so removed the ifdeffing. Task-number: QTBUG-24330 Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QDebug: Add support for %{pid}, %{appname} and %{threadid}David Faure2012-02-172-7/+10
| | | | | | Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Eliminate duplicate data row names from corelib autotests.Jason McDonald2012-02-141-1/+1
| | | | | Change-Id: I57a37f19746b76c6c9c3534f5c66c5a5478dae24 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qlogging autotest for clangKai Koehne2012-02-101-0/+17
| | | | | | Change-Id: Iac82c4847554534174b5419ec78319c9ac381628 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Allow customization of qDebug output at runtimeKai Koehne2012-02-098-152/+719
| | | | | | | | | | | | | Check the QT_OUTPUT_PATTERN environment variable in the default message handler to customize the output of messages. Following place holders are right now supported: %{message}, %{type}, %{file}, %{line}, %{function} The original cleanupFuncinfo was written by Thiago Macieira. Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <faure@kde.org>
* QtDebug: Include file, line, function informationKai Koehne2012-02-013-1/+153
| | | | | | | | | | | | | | Record the file, line, and function where a qDebug, qWarning, qCritical or qFatal call happens, and make this information available in a custom message handler. The patch uses the C preprocessor to replace qDebug, qWarning, ... with a line that also records the current file, line, and function. Custom message handlers can access this information via a new QMessageLogContext argument. Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d Reviewed-by: David Faure <faure@kde.org>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-306-6/+6
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-236-6/+6
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-056-6/+6
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-061-3/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QInternal callbacks and internal functionsBradley T. Hughes2011-12-021-73/+0
| | | | | | | | | | | | | | | | After commit 79f675a1e0f628bbc25345ebc1eb1f5809166c6b, the connect and disconnect callback API effectively becomes useless. Now that these callbacks cannot/do not, it makes little sense to keep the backdoors added for Qt Jambi support. Remove them for now. Should the Qt Jambi team want/need to port to Qt 5, we can re-add them, possibly designing a better API for doing so as well. Change-Id: I6209a1d647d683c979d5294b632b8c12c0f9f91c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.Jędrzej Nowacki2011-12-011-0/+13
| | | | | | | | | | | | | By adding anonymous namespace and static linkage we are reducing visibility of implementation of these macros. This patch also fixes warning about a declared but unused variable which was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION. Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Change the return value of QObject::connectOlivier Goffart2011-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | From a bool to a handle to to connection. Also added a new overload of disconnect that disconnect a handle This is required because with the new syntax taking lambda or functors, it is the only way to disconnect a connection (as it is impossible to compare functors) The new return value is QMetaObject::Connection, it is a wrapper around the internal QObjectPrivate::Connection. QObjectPrivate::Connection is now reference counted. tst_qglobal.cpp: This test set up an internal callback, and the callback do not set any proper connection handle (and tbh, it would be hard for it to do so). So the returned QMetaObject::Connection is invalid, and ok is false (Internal callbacks are only used for jambi and should probably be removed) Change-Id: I111626fb4f47efc4db5e2ea5bff9da15f08fea7b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve Q_FUNC_INFO autotest.Jason McDonald2011-11-171-7/+6
| | | | | | | | | | | | | | The availableWithoutDebug() test was trying to force QT_NO_DEBUG to be defined, but was actually doing the opposite. While I'm not satisfied with the way this test works (it would be better to test with QT_NO_DEBUG already defined when Q_FUNC_INFO is included). at least this test now does what it says it does. Additionally, the test has been improved by checking that Q_FUNC_INFO returns a non-empty string, as opposed to just compiling. Change-Id: I9175e3a7406152b6250b507a61b5062e3cfabeb8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-116-20/+12
| | | | | | | | | | | | | Tidy the autotest .pro files. Most autotest .pro files should look like this: CONFIG += testcase TARGET = tst_something QT = core testlib SOURCES = tst_something.cpp Change-Id: I877c2194e9fa9dd13478d117895e1e255a948ad7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-071-15/+0
| | | | | | | Remove redundant empty constructors, destructors and test functions. Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use C++11 static_assertOlivier Goffart2011-11-021-0/+17
| | | | | | | Change-Id: I75aa2bc209cdc8869e7daa9fd0dd865ccf65a68e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Fix broken build.Jędrzej Nowacki2011-11-011-2/+3
| | | | | | | Variadic macros are not supported by C++98 standard. Change-Id: Ib520297e43b654b46925f3ee2735a975ebbe8e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* corelib: eliminated usage of qttest_p4.prfRohan McGovern2011-10-256-13/+18
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-211-1/+1
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-191-0/+68
| | | | | | | | | Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300): tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’ to incomplete type ‘QStaticAssertFailure<false>’ Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-09-121-6/+9
| | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/gui/text/qfont_qpa.cpp src/gui/widgets/qlinecontrol.cpp src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp tests/auto/gui.pro tests/auto/network.pro tests/auto/qstring/tst_qstring.cpp Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
* Moving relevant tests to corelib/globalHolger Ihrig2011-08-3019-0/+877
Task-number: QTBUG-21066 Change-Id: I011e601f599e11365c76598631a443b82ab9fb30 Reviewed-on: http://codereview.qt.nokia.com/3487 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>