summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_p.h
Commit message (Collapse)AuthorAgeFilesLines
* qtlite: Fix build with -no-feature-commandlineparserMikhail Svetkin2019-07-031-0/+4
| | | | | | | Change-Id: Ie7b7b119073691c0d3b6358f876298fc86cfe9e9 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* QCommandLineParser: add --help-all, to show Qt options as wellDavid Faure2019-05-151-0/+3
| | | | | | | | | | | Sample output at http://www.kdab.com/~dfaure/2019/help-all-example.txt Fixes: QTBUG-41802 Change-Id: I7a3350200761d41481fcb10ec4328e96e548d246 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QCoreApplicationPrivate's destructor virtual in bootstrapped buildsGiuseppe D'Angelo2019-05-291-0/+5
| | | | | | | | | | | | | | | | | | In a bootstrapped build QCAP does not inherit from QObjectPrivate, meaning it won't get a polymorphic destructor, causing compile errors. This is necessary in preparation to add virtuals to QCAP. The "virtual" keyword is protected to avoid further warnings by compilers or linters telling that it's unnecessary because the base class' dtor is already virtual. Change-Id: Ifbd218154f74b4f1d2f2c5a3ef1fc31970f1c24b Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* More nullptr usage in headersKevin Funk2019-03-141-1/+1
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Modernize the "settings" featureLiang Qi2018-11-151-0/+2
| | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* macOS: Remove QMacRootLevelAutoReleasePool member from QCoreApplicationTor Arne Vestbø2017-09-081-4/+0
| | | | | | | | | | | | | | Tying the pool to the lifetime of QCoreApplication becomes a problem when the application is allocated on the heap, for example when Qt is used to create plugins, as NSAutoreleasePool should be allocated and drained in the same context, typically a function scope. The feature is disabled for now, until we can find a better way to achieve the same thing. Change-Id: I600587df62a8cc7caded5172ad914c0e04d794d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make calling QCoreApplication::translate() thread-safeAram So2017-07-061-1/+1
| | | | | | | | | | | | | | Fixed crash on QCoreApplication::translate() call from qqmlThread while QCoreApplication::{install,remove}Translator() is called from the GUI thread. [ChangeLog][QtCore][QCoreApplication] Calling QCoreApplication::translate() is now thread-safe. Task-number: QTBUG-57095 Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Add root level NSAutoreleasePool for objects autoreleased in main()Tor Arne Vestbø2017-05-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Any objects directly or indirectly autoreleased in main(), before we start the event loop, will never be released, as there are no pools present yet. This includes all resources allocated during application and window setup, unless those function have local pools. Ideally that setup code would be called from within the runloop callstack, where there is a pool present, but that requires a new main/startup-API for Qt. To aid in debugging object ownership and hierarchies within Qt, we set up our own root level pool tied to QApplication, which ensures that most objects autoreleased in main() will eventually be released and have their dealloc methods called. The feature can be disabled by setting an environment variable: QT_DISABLE_ROOT_LEVEL_AUTORELEASE_POOL=1 Combined with OBJC_DEBUG_MISSING_POOLS=YES, this allows breaking on the function objc_autoreleaseNoPool to weed out codepaths in Qt that should have local pools. Change-Id: Id02e1edaaaeaa04c53862d7228e519214c99ab51 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Provide sensible defaults for QCoreApplication::applicationVersionJake Petroules2017-01-121-2/+3
| | | | | | | | | | | | | | | | [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>
* Extracted cleanup from QCoreApplication::exec() into separate functionJørn Bersvendsen2016-10-101-0/+2
| | | | | | | | | | | | | | | | Not all Qt integration points can call QCoreApplication::exec(), in particular, ActiveQt. When an ActiveQt server is loaded, it tries to mimic the behavior of calling QCoreApplication::exec() by setting QCoreApplicationPrivate::in_exec = true. However, when unloading the DLL it is necessary to call the same clean-up (e.g. deferred delete) that QCoreApplication::exec() does. Extracting the cleanup in a separate function means implementation does not have to be duplicated. Task-number: QTBUG-56172 Change-Id: I061f1c06f38881032ad7044416c12c91e536478a Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Q*Application: fix UB caused by accessing QGuiApplication from ↵Marc Mutz2016-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCoreApplication ctor As reported by ubsan: src/gui/kernel/qplatformintegration.cpp:463:10: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:14: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:43: runtime error: member call on address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' to name just a few which are reported when running gui and widget auto-tests; there're definitely more where these came from. This is caused by QCoreApplication::init() being called from the QCoreApplication ctor, calling virtual functions on Q*AppPrivate, which happen to attempt, in this case, to emit QGuiApp signals. At that point in time, the QGuiApplication ctor has not entered the constructor body, ergo the object is still a QCoreApplication, and calling the signal, as a member function on the derived class, invokes UB. Fix by cleaning up the wild mix of initialization functions used in this hierarchy. The cleanup restores the 1. Q*ApplicationPrivate::Q*ApplicationPrivate() 2. Q*ApplicationPrivate::init(), calling each base class' init() as the first thing two-stage construction pattern commonly used elsewhere in Qt to make sure that the public class' object is fully constructed by the time each level's Private::init() is called. Change-Id: I290402b3232315d7ed687c97e740bfbdbd3ecd1a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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 two data races in QThread/QThreadDataDavid Faure2015-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * theMainThread is written by the main thread and read by QThreadData::~QThreadData() (any managed thread) * QThreadData::thread is written by QThread::~QThread (in the parent thread) and read+written by QThreadData::~QThreadData (in the managed thread). This can happen because QThreadData is refcounted so the managed thread (which derefs it) races with the parent thread (which sets it to 0). Change-Id: I72de793716391a0937254cda6b4328fcad5060c7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add a way for auxiliary threads to handle events without CoreAppThiago Macieira2015-07-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make the event delivery go through some more static functionsThiago Macieira2015-07-181-3/+3
|/ | | | | | | | | | | | | | | | This commit makes QCoreApplicationPrivate::checkReceiverThread, notify_helper, and sendThroughObjectEventFilters be static functions, since they only deal with global data or the parameters only. Making notifyInternal would have been binary incompatible (it's called from inline functions QCoreApplication::sendSpontaneousEvent and QCoreApplication::sendEvent), so instead add a new static notifyInternal2 and mark the older function deprecated and to be removed in Qt 6. Change-Id: I27eaacb532114dd188c4ffff13d59fe3b0661489 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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: Reintroduce copy of argv.Friedemann Kleint2015-02-101-1/+2
| | | | | | | | | | | | | | Since argc/argv is modified by QCoreApplication-derived classes, a copy of the original arguments is needed for comparison. This fixes a crash in Qt Quick 2 tests (which use the -qmljsdebugger=<port> argument) introduced by dff18b8e80609da91bf9e9134967dcf0d23eca9e . Task-number: QTBUG-30330 Change-Id: Ic145ac923e0a7c504ab16602c8686268e4fd9700 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Windows: Allow for passing a modified argv to QCoreApplication.Friedemann Kleint2015-02-051-3/+2
| | | | | | | | | | | | | | | | | 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-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove friends of QEvent.Friedemann Kleint2014-05-181-0/+1
| | | | | | | | Introduce function to set the spontaneous flag to QCoreApplicationPrivate to solve a few cases. Change-Id: I7c1f1f3644defe00deea9cecb244ca258afd5b94 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Setting QT_NO_DEBUG should not remove symbolsLars Knoll2014-03-211-2/+0
| | | | | | | | | | | | | | Removing symbols when defining QT_NO_DEBUG is a bad idea. In this case it means that you can't compile corelib as a release build and widgets as debug without getting an undefined symbol. Instead leave the method in the release build, but simply don't call it. Change-Id: I50426aefd62e82bccd933323aa0f67c6e5294961 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prevent foolish use of setuid when using Qt.Richard J. Moore2014-01-071-0/+1
| | | | | | | | | | | | | | | | In order to prevent people from shooting themselves in the foot, abort if we're running setuid. This behavior can be disabled by calling QCoreApplication::setSetuidAllowed(true) in order to support legacy code. [ChangeLog][QtCore][Important Behavior Changes] Running Qt applications that are setuid has been prevented. If you really need to do this then you can call QCoreApplication::setSetuidAllowed(true) before creating the QCoreApplication instance. Change-Id: I992a9a0cd8420693d438852a05666e3dbb2c9d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QCoreApplication: Add static setter for application file path.Friedemann Kleint2013-11-261-1/+3
| | | | | | | | | | | | | | | In cases where QGuiApplication is instantiated by a library embedded into another application via some plugin mechanism (for example, Active X controls built using Qt), the QPA platform plugin and other plugins cannot be found next to the application executable. In this case, the library should set the application file path to its deployment location such that plugin paths are set accordingly, the directory is added to the path and qt.conf is found, should it exist. Task-number: QTBUG-34989 Change-Id: I4a53104b5121a8d26751129912f999228be45dfd Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Don't cache QCoreApplication::appName.Robin Burchell2013-10-311-1/+0
| | | | | | | | | | | This isn't a hot codepath, there is no gain to doing this. It introduces unnecessary bloat (see e.g. https://www.webkit.org/blog/2826/unusual-speed-boost-size-matters/) and complicates boosting Qt application startup in cases where argv[0] is overwritten. Change-Id: I55b2b98b0de6b06fe7a049de262f3e19936b73db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPA: Fix event dispatcher dependent operations in platform integrationLaszlo Agocs2013-10-071-0/+1
| | | | | | | | | | | | | | | | | | 999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration implementations that perform tasks in their constructor that rely on the event dispatcher. For example creating a QSocketNotifier is not possible anymore since the event dispatcher is created later on. This is fixed by introducing an additional virtual in QPlatformIntegration that gets called after createEventDispatcher(). Two broken platform plugins have been identified so far: eglfs is creating socket notifiers to read events from input devices and xcb's input context plugins may use dbus. Both are updated accordingly. Task-number: QTBUG-33768 Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Don't assume QCoreApplication::applicationName() will never changev5.2.0-alpha1Tor Arne Vestbø2013-09-251-0/+1
| | | | | | | | | Tests will typically create multiple QCoreApplications, some of them with different argv[0] than others, so we can't use a static variable to keep the cached application name. Change-Id: Icd97527730558944473a71373326b4a82f1b7cf7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up evaluation license logicTor Arne Vestbø2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* add QCoreApplication to bootstrap libOswald Buddenhagen2013-03-141-14/+32
| | | | | | | | | | | this required making it compile with QT_NO_QOBJECT. of course this disables anything related to threading and event processing. needed for bootstrapping qmldevtools (qmlmin, lupdate) Change-Id: I6f8bd3996ac7b6eee49a5b8a55143d358abe35ee Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.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>
* Remove QApplication::type() and make QCoreApplication::Type internalJ-P Nurmi2012-11-231-0/+5
| | | | | | | | | | | | These Qt3 legacy application types do not match the application types available in Qt5. Thus, the decision was to kill the confusing and mostly useless type enum. Use for example qobject_cast instead to find out the application type. Task-number: QTBUG-28093 Change-Id: Ia8cf7c3ea98a3cea27f74760d62e519ea10bce9f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Re-revert "Delay creation of the process manager"Thiago Macieira2012-10-151-2/+0
| | | | | | | | | | | | | | | This reverts commit daba2c507ad42c66dafa6a29cffa94e9641e0c58, re-applying commit d9c06bf25210b3d0b31ee6126e57bcb82c292da1, because the change was accidentally brought back in commit eae8fb85997d82ecec0743ba3e470681129bff41. There's a potential deadlock when a QProcess is created while a QCoreApplication is instantiated but never executed, or if the main thread waits() for the child thread. Task-number: QTBUG-27260 Change-Id: I9e0fdc0341b3063de90979377bac35f2a827b260 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Provide public API for native event filtering, moved up from QPA.David Faure2012-07-201-2/+0
| | | | | | | | | | | | | | | | | | The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Fix applicationName() being empty in QApplication.David Faure2012-07-161-1/+1
| | | | | | | | | | | | | | | A virtual method was reimplemented to return an always-empty string, probably a leftover from a refactoring. This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5, a "Before" became "After", which made "Before" unused, and was masking the fact that the app name was empty by default. In addition, the earlier Qt5 change that made the app name default to argv[0] now requires updating this test, now that it's actually working. Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* QCoreApplication: No longer hardcode arguments to be filtered out.Friedemann Kleint2012-05-161-0/+4
| | | | | | | | | | | | On Windows, Unicode command line arguments are re-created from the original command line filtering out the known arguments. To avoid having to hard-code all arguments of derived application classes, keep the original argv-array and use that to verify if an argument is still present. Task-number: QTBUG-25724 Change-Id: I5d7bbd9530b1b74e1dcd22a0edc4f323ef687d23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid using iconv for text conversion where possibleLars Knoll2012-05-161-0/+2
| | | | | | | | | | | | Try to use a builtin codec as codecForLocale() if possible first. Fall back and instantiate the iconv codec only if that failed. In addition, make sure we initialize the locale correctly before we try to setup the codec. Change-Id: I86d635f9d11e8ff93093f162e79fb37f3d85731b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix ref counted window close handling.Stephen Kelly2012-02-161-0/+4
| | | | | | | | | | Instead of refcounting QWindow visibility, we ask the Application subclass whether quitting is appropriate. Task-Id: QTBUG-24120 Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add the event loop quitlock feature to QtCore.Stephen Kelly2012-01-311-0/+4
| | | | | | | | | | | | | | | | 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 Symbian specific code from QtCore.Xizhi Zhu2012-01-301-18/+1
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@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>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-191-0/+4
| | | | | | | | | | | | 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>
* Merge remote branch 'gerrit/master' into HEADSamuel Rødal2011-09-061-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/global/qglobal.h src/gui/kernel/qplatformnativeinterface_qpa.h src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qmenu_mac.mm src/gui/widgets/qmenu_p.h src/gui/widgets/qmenubar.cpp src/gui/widgets/qmenubar_p.h src/gui/widgets/widgets.pri src/plugins/platforms/wayland/qwaylandnativeinterface.cpp src/plugins/platforms/wayland/qwaylandnativeinterface.h src/src.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qstring/tst_qstring.cpp Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
| * Don't use QSettings to "cache" plugin informationBradley T. Hughes2011-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main rationale of the cache was to examine the plugin's build-key before loading it. Now that the build-key has been removed, the cache has lost its usefulness. This is part of a larger push to not use QSettings for Qt specific settings or caches. See also: http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000892.html http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000960.html http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000907.html http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000904.html Change-Id: I96e84aa25983c8e06e027ff70cef109444c362a2 Reviewed-on: http://codereview.qt.nokia.com/3978 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Merge remote branch 'gerrit/master' into refactorLars Knoll2011-07-061-3/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/opengldesktop/opengldesktop.cpp examples/itemviews/interview/interview.pro examples/mainwindows/mainwindow/mainwindow.pro examples/openvg/README examples/richtext/textedit/textedit.pro examples/tools/undo/undo.pro src/corelib/global/qglobal.h src/corelib/kernel/qcoreapplication.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qmetatype.h src/gui/kernel/qevent.cpp src/gui/kernel/qevent.h src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qpaintengine_raster_p.h src/gui/text/qfontdatabase.cpp src/opengl/qgl.h src/openvg/qpaintengine_vg.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp tests/auto/qmainwindow/qmainwindow.pro Change-Id: I6bfb586740a68379bb99f4612ec993393a5f3234
| * Remove the remaining QT3_SUPPORT code in corelibLars Knoll2011-06-291-3/+0
| | | | | | | | | | | | | | Change-Id: I6641c62d75d2034a46ea7cc869ae65285ae8b8f4 Reviewed-on: http://codereview.qt.nokia.com/866 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* | QWindowContext / QWindowFormat refactor.Samuel Rødal2011-06-101-0/+2
|/ | | | | | | | | | | | | To enable having a single GL context used for multiple drawables we need to de-couple the context class a bit more from the window class in the plugin API. Now contexts are created stand-alone based on a GL format and a share context, and when calling makeCurrent() a desired surface is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all support this use case. QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed to QGuiGLFormat. We have the ability to introduce a pbuffer or similar other offscreen GL drawable abstraction in the future.