summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qcoreapplication
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Fix tst_qcoreapplicationOliver Wolff2017-05-111-4/+9
| | | | | | | | | | | On winrt, the default application version is determined by its manifest file. The template's default version is 1.0.0.0. Additionally addRemoveLibPaths should not fail if libraryPaths only contains currentDir. Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-132-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Provide sensible defaults for QCoreApplication::applicationVersionJake Petroules2017-01-124-0/+47
|/ | | | | | | | | | | | | | | | [ChangeLog][QtCore] QCoreApplication::applicationVersion now defaults to an appropriate platform-specific value. On Windows, it defaults to the PRODUCTVERSION parameter of the VERSIONINFO resource for classic desktop apps, and the version attribute of the application package manifest for Univeral Windows Platform apps. On Apple Platforms (macOS, iOS, tvOS, watchOS), it defaults to the CFBundleVersion property of the information property list (Info.plist) file. On Android, it defaults to the android:versionName attribute of the AndroidManifest.xml manifest element. On other platforms, the default remains an empty string. Task-number: QTBUG-57715 Change-Id: I26f83dd00737e06f4321cf962aa5fab8398104ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-1/+1
| | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-212-36/+26
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-5/+0
|\ | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-5/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| | * Fix tst_QGuiApplication for embedded platforms using eglfs QPAPasi Petäjäjärvi2015-09-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Disable input and cursor for QGuiApplication instances used in autotest to initialize it properly. Change-Id: I78dc9b776269c082c20f244a51f858289129275d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Fix building with QT_NO_LIBRARYUlf Hermann2015-09-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QT_NO_LIBRARY isn't set we cannot test QCoreApplication's library path functions and none of the plugin and library related tests are applicable. Also, examples that rely on dynamic plugin loading for their core functionality obviously don't work. Change-Id: I2d381ee1bc8d944e1181557895a7e92a364fd778 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | tests/corelib: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-08-191-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Tests from corelib/tools were omitted in this change. Change-Id: I4c8786d33fcf429d11b2b624c7cd89c28cadb518 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Selectively update library paths when creating QCoreApplicationUlf Hermann2015-07-202-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We force a recreation of the library paths with added information on construction of QCoreApplication. This way we can find plugins in the application directory which only becomes known when QCoreApplication is created. When the user changes the library path we create a new list of the manually modified library paths and recalculate it from the delta of original vs. modified paths when QCoreApplication is created. The upsides of this approach vs. keeping an explicit delta are: * We don't need to introduce a separate data structure to hold the added/removed status for delta items or the information that the whole list got replaced. * The lists never get larger than the the real library paths. An explicit delta would have to record all modifications. * I don't think the delta replay algorithm we would have to do anyway could be made much more compact than the one this change introduces. Of course, if the user actually changes anything, the list is duplicated. Considering that this is a rarely used function and that we would have to save some extra information anyway, I think we can live with this. Task-number: QTBUG-38598 Change-Id: I3bfbbd1be62dd5804dcc7ac808b053428a4e3149 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a way for auxiliary threads to handle events without CoreAppThiago Macieira2015-07-183-0/+53
|/ | | | | | | | | | | | | | Long-lived threads started by Qt itself can now receive events even if QCoreApplication hasn't been created. This is required in all threads we start that will handle events, unless we're sure that the thread will exit before the global application object begins destruction. Otherwise, those threads will have race conditions dealing with the event delivery system trying to call the QCoreApplication::notify() virtual while the object is being destroyed. Change-Id: I27eaacb532114dd188c4ffff13d4ad2a4bb443e6 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Autotest: Check where global event filters get runThiago Macieira2015-06-192-0/+58
| | | | | | | | Global (application-level) event filters are supposed to be run only in the main thread, so ensure that it is the case. Change-Id: I27eaacb532114dd188c4ffff13d5a17d991b8bd2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Don't overwrite applicationName if already set.David Faure2015-05-091-0/+16
| | | | | | | | | | | | My commit 6c973dee2cb1686ea32657 broke the case where setApplicationName is called before the QCoreApplication constructor. Fixed and added autotest. Task-number: QTBUG-45283 Change-Id: If7bdb0d82be50b50a95a04027f5f9d7143c1a7ac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make QCoreApplication::applicationName available after app destruction.David Faure2015-03-051-4/+9
| | | | | | | | | | | | | | | | Calling applicationName() in the destructor of a global static (e.g. via QLockFile) was working when calling setApplicationName explicitly but otherwise it would suddenly return an empty string. This led to inconsistencies, the application name switching from non-empty to empty at saving-on-destruction time. There was already a global static, used when setting the app name explicitly before construction. Use it now to store the app name in all cases (explicitly set, or fallback). Change-Id: I71d3a0c40158f8bfd022c385b198346a2594b1cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-112-14/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Windows: Allow for passing a modified argv to QCoreApplication.Friedemann Kleint2015-02-052-6/+3
| | | | | | | | | | | | | | | | | Check by comparing __argc/__argv whether a modified argv was passed to QCoreApplication. If that is the case, build QCoreApplication::arguments() from that argv instead of using the command line. [ChangeLog][Important Behavior Changes][QCoreApplication] On Windows, QCoreApplication::arguments() now returns a list built from argv on Windows as well if a modified argv was passed to the class' constructor. Task-number: QTBUG-30330 Task-number: QTSOLBUG-184 Change-Id: I2498bb554130e7bfaeada3aebe786dfdd0eb534d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-242-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Base tst_QGuiApplication on tst_QCoreApplication to increase GUI ED coverageTor Arne Vestbø2013-10-013-45/+111
| | | | | | | | | | The QCoreApplication test has quite a few test cases that we would like to exercise using the GUI event-dispatcher. Instead of duplicating the tests for the GUI dispatcher, we inherit tst_QCoreApplication, which also lets us add extra tests that are specific to tst_QGuiApplication. Change-Id: Ib411457131b8d3fed871f682c1c0568577f6127d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Expose QTest::currentAppName() and remove hard-coded argv[0] in testsTor Arne Vestbø2013-09-261-16/+16
| | | | | | | | Except where we're actually testing QCoreApplication::applicationName() and friends. Change-Id: I25514884c11f43a4f82b1f818f822dc3d79f69a3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix dead lock in the Qt event handlingOlivier Goffart2013-07-101-0/+28
| | | | | | | | | | | | | | | The deadlock is caused because the QEvent is destroyed while holding the event list mutex. And the QEvent may have a custom destructor that will re-enter the event handlng code. The QScopedPointer that should destroy the event must be created after the MutexUnlocker. Regression introduced by commit f9035587b98ac5dc9491e642b8ec84470ec03f0e Task-number: QTBUG-31606 Change-Id: I6b2cbc2656eacdec61b641886953f00bf5b3ff36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qcoreapplication: Remove QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-04-122-2/+1
| | | | | Change-Id: I6d5098ff57293171b5ddd3a58c53718cbbc8e4bf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clear the current thread data for the main threadThiago Macieira2013-03-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This avoids crashes accessing deleted memory when creating a QObject after the last QObject had been deleted, like a qDebug() in global destructors. ==41000== Invalid read of size 4 ==41000== at 0x5F01ED5: bool QBasicAtomicOps<4>::ref<int>(int&) (qatomic_x86.h:208) ==41000== by 0x5F01309: QBasicAtomicInteger<int>::ref() (qbasicatomic.h:147) ==41000== by 0x5F24051: QThreadData::ref() (qthread.cpp:100) ==41000== by 0x614A984: QObject::QObject(QObject*) (qobject.cpp:681) ==41000== Address 0x6ee73f0 is 0 bytes inside a block of size 152 free'd ==41000== at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480) ==41000== by 0x5F240BF: QThreadData::deref() (qthread.cpp:109) ==41000== by 0x6113F6B: QCoreApplicationData::~QCoreApplicationData() (qcoreapplication.cpp:268) The comment right above the change in qthread.cpp looks eerily similar to the problem I'm trying to fix. However, the actual change that introduced the change is not in the Qt public history, so we can't know for sure what the problem was then. Change-Id: I0dba895b041fe6cf81e6f8939ca85035cd00aad1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Test: remove QSKIP in tst_QCoreApplication::argcCaroline Chao2012-10-161-3/+6
| | | | | | | | Instead omit the whole test when Q_OS_WIN is defined since the test is invalid on this platform. Change-Id: Idb77df96b0c2a223cddbfffb4e24c6d1f5d33dfb Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make the event notification on Windows be mandatory in all dispatchersThiago Macieira2012-05-041-0/+5
| | | | | | | | | | | | | This way, QWinEventNotifier will work on all Windows systems, not just with the default event dispatcher. Other dispatchers (other than QWin32EventDispatcher) are permitted, so the class should not abort just because of that. If a dispatcher really doesn't want to implement this, they need to implement the virtuals to do nothing, possibly print a warning. Change-Id: I2c132bcde95b9d5941c8906a0fcd2ad964087772 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-1/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Make QCoreApplication::applicationName() default to argv[0]David Faure2012-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This makes it more useful in all the Qt apps that don't set it, given that it's used internally by QTemporaryFile, QTemporaryDir, QStandardPaths, QDBus, QAccessibleApplication, etc. Qt4 compatibility in the deprecated QDesktopServices is preserved, no fallback there. Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a remainingTime() method to the public interface of the QTimer classLaszlo Papp2012-04-031-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | It is an extension coming from the use case when you, for instance, need to implement a countdown timer in client codes, and manually maintain a dedicated variable for counting down with the help of yet another Timer. There might be other use cases as well. The returned value is meant to be in milliseconds, as the method documentation says, since it is reasonable, and consistent with the rest (ie. the interval accessor). The elapsed time is already being tracked inside the event dispatcher, thus the effort is only exposing that for all platforms supported according to the desired timer identifier, and propagating up to the QTimer public API. It is done by using the QTimerInfoList class in the glib and unix dispatchers, and the WinTimeInfo struct for the windows dispatcher. It might be a good idea to to establish a QWinTimerInfo (qtimerinfo_win{_p.h,cpp}) in the future for resembling the interface for windows with the glib/unix management so that it would be consistent. That would mean abstracting out a base class (~interface) for the timer info classes. Something like that QAbstractTimerInfo. Test: Build test only on (Arch)Linux, Windows and Mac. I have also run the unit tests and they passed as well. Change-Id: Ie37b3aff909313ebc92e511e27d029abb070f110 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix compile warnings in QCoreApplication autotest.Jason McDonald2012-03-121-17/+22
| | | | | | | | | - Use const_cast to avoid "deprecated conversion from string constant to 'char*'" warning when building argv arrays from string literals. - Use Q_UNUSED to avoid warnings on unused local variables. Change-Id: Idd2c8279adc102b6ebc6af7486ba26fe9ed4e7c1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make "nmake check" pass for corelib tests in Windows.Miikka Heikkinen2012-02-091-0/+3
| | | | | | | | | | | | | | | | | | - Marked four tests insignificant due to failures, these need to be fixed later and then re-enabled: - tst_qfilesystemwatcher - tst_qsettings - tst_qlibrary - tst_qsharedpointer - Skipped one invalid case (tst_QCoreApplication::argc()) - Ifdeffed around vsprintf issue in MSVC (tst_QByteArray::qvsnprintf()) Task-number: QTBUG-24157 Task-number: QTBUG-24146 Task-number: QTBUG-24128 Change-Id: I4db957a65fbf0093f5ae3dc1a04d792492818104 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Add the event loop quitlock feature to QtCore.Stephen Kelly2012-01-312-2/+114
| | | | | | | | | | | | | | | | A feature of a ref-counted quit (managed by a quit-lock class) is added to both QEventLoop and QCoreApplication. This allows, for example, an event loop to quit() when there is no more work for it to do. quitOnLastWindowClosed is implemented in terms of the refcount in QCoreApplication so that jobs can be completed before the application quits. Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove many deprecated methodsLars Knoll2012-01-311-4/+4
| | | | | | | | | | Remove methods that have been marked as deprecated before Qt 4.6. Keep others, but inline them where possible and mark them as QT_DEPRECATED_SINCE(5, 0). Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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-231-1/+1
| | | | | | | 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-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()Bradley T. Hughes2012-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and deprecate the old registerTimer() functions. The new pure- virtual registerTimer() breaks source-compatibility. Subclasses cannot be instantiated anymore, since the pure virtual function signature has changed. QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a struct with timerId, interval, and timerType members. This is a source incompatibility that should only affect subclasses of QAbstractEventDispatcher, which will need to pass 3 arguments to the TimerInfo constructor instead of 2. If the subclass used QPair<int,int> instead of the TimerInfo typedef, the QPair<int,int> declarations will need to be replaced with TimerInfo. Call the new registerTimer() function with the type from QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher to reimplement the new virtual function. The type argument is unused at the momemnt, except to ensure that registeredTimers() returns the type each timer was registered with. Implementations for the various dispatchers will be done in separate commits. Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed compile of autotests with -qtnamespace.Rohan McGovern2011-11-181-1/+0
| | | | | | | Make sure to use the Qt namespace for qGlobalPostedEventsCount. Change-Id: I558a0b0fba1e22a2edd96f9499a2bab82046c4a4 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Allow to create a custom event dispatcher for specific QThreads.Sven Anderson2011-11-151-0/+55
| | | | | | | | | | | | | | QAbstractEventDispatcher() does no longer install itself into the current thread. Instead the new methods QThread::setEventDispatcher() and QCoreApplication::setEventDispatcher() allow to install a custom event dispatcher into any QThread as long as there is no default event dispatcher created yet. That is, before the thread has been started with QThread::start() or, in case of the main thread, before QCoreApplication has been instantiated. Change-Id: I7367e13d8d8aebed5a5651260bb69b8818eb1b90 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-111-3/+2
| | | | | | | | | | | | | 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>
* corelib: eliminated usage of qttest_p4.prfRohan McGovern2011-10-251-2/+3
| | | | | | | | | 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>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-191-0/+8
| | | | | | | | | | | | Move handling of -qmljsdebugger= argument from QApplication to QCoreApplication. It makes sense to allow debugging also for applications based on QCoreApplication (which we intend to support in QtDeclarative). Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36 Reviewed-on: http://codereview.qt-project.org/5121 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Moving relevant tests to corelib/kernelHolger Ihrig2011-09-013-0/+587
Added Test for qmetaproperty Marked QSocketNotifier Autotest as insignificant. See QTBUG-21204 Marked qtranslator Autotest as insignificant. See QTBUG-21125 Marked corelib/io/qfile/largefile as insignificant. See QTBUG-21175 Task-number: QTBUG-21066 Change-Id: I2a7f6587845c355091bb07c8dd3d1557d16db0be Reviewed-on: http://codereview.qt.nokia.com/3598 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>