summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Properly guard rand_r use with _POSIX_THREAD_SAFE_FUNCTIONS for Android.Robin Burchell2012-05-041-1/+1
| | | | | | | | Android does not support this, or other thread-safe functions. Change-Id: Id2a918f83e6138795196c45f89613c5b46911901 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Allow qDebug output to be configured by qSetMessagePattern()Kai Koehne2012-04-241-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qSetMessagePattern() to configure the default message pattern. This one can still be overwritten by setting the QT_MESSAGE_PATTERN environment variable. Without this method, there's actually no way to change the default output programatically. Since QT_MESSAGE_PATTERN is evaluated when the first message arrives, setting it via e.g. qputenv might have no effect/be too late. Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Logging: Change arguments of message handler to avoid conversionsKai Koehne2012-04-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new QtMessageHandler that takes QString instead of char *: This avoids converting to local8bit , only to convert it back to utf16 for Windows. The old QMessageHandler is kept for a transition period, but will be removed before Qt 5.0. Also fix qEmergencyOut (that is called in OOM situations) to not rely on the default message handler. Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-146/+57
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* | Change coreservices -> iosIan Dean2012-04-191-4/+4
|/ | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-1/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * Add OS version detection for windows 8Shane Kearns2012-04-121-0/+4
| | | | | | | | | | | | | | Based on consumer preview, the internal version is 6.2 Change-Id: I9d6ff6c7614f46a20d489e8a8f4aefeb60c547f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QTypeInfo: document Q_PRIMITIVE_TYPE existing practiceMarc Mutz2012-04-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite the documentation requiring Q_PRIMITIVE_TYPEs to be PODs, existing practice in Qt (QFixed, QFlags, QUuid) is to allow constructors on primitive types as long as every bit pattern represents a valid object (ie. memory doesn't have to be initialised to hold an object of the type) and memcpy() can be used to create an independent copy of the object (memcpy()ing QString, e.g., while creating two valid objects, doesn't create independent copies). Change-Id: Ia85d48b89f6cc84e69ea76719eab9a858d247ad6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-7/+0
|/ | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Logging: Make sure documentation shows upKai Koehne2012-04-021-0/+199
| | | | | | | | | | | | | Move the documentation for qDebug, qWarning, qCritical, qFatal, QMessageHandler, QtMsgHandler, qtInstallMsgHandler, qInstallMessageHandler from qlogging.cpp to qglobal.cpp. For some reason it's not picked up from qlogging.cpp otherwise. Also, tweak the output so that e.g. qDebug and friends are correctly listed as macros. Change-Id: I8cabf04bae0e8ae9a31a40ebe2d3272c3a33653b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add macros for assuming and unreachable codeThiago Macieira2012-03-241-0/+57
| | | | | | | | | | Use these macros to tell the compiler about conditions that may happen, so it will generate better code. But do not assume that they will do anything special. Change-Id: I89ec4f65f48a9340ccf5ffc4ae4b8c3d8897c8b1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove codecForTr().Robin Burchell2012-03-061-3/+1
| | | | | | | | | | Similarly to change id I2f429fa7ef93bd75bb93a7f64c56db15b7283388, the capability to arbitrarily alter the encoding of literals is very destructive, especially in a world with libraries and plugins. Change-Id: If0d4cd8dcf89792e39c1984cbde6b036cebfc02f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-7/+7
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove qMacVersion()Bradley T. Hughes2012-02-211-11/+9
| | | | | | | | Add QSysInfo::macVersion() instead, to match the windowsVersion() function. Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWERBradley T. Hughes2012-02-201-6/+15
| | | | | | | | | IBM's POWER and the PowerPC architecture have been merged into a single ISA, the Power ISA (see http://www.power.org). Use this unified name in Qt. Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document Q_PROCESSOR_* macrosBradley T. Hughes2012-02-181-0/+215
| | | | | | | | | | All known processors and their variants/revisions are documented. I added Q_PROCESSOR_MIPS_V based on the MIPS64 online documentation, which documents MIPS64 as a superset of MIPS IV and MIPS V. Change-Id: Ie2796d4f03499283aa2c96d60f5e37bd74a36ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Reshuffle code between qglobal, qloggingKai Koehne2012-02-131-467/+0
| | | | | | | Make the content of the .h, .cpp files match. Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203 Reviewed-by: David Faure <faure@kde.org>
* Allow customization of qDebug output at runtimeKai Koehne2012-02-091-8/+13
| | | | | | | | | | | | | 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-011-41/+164
| | | | | | | | | | | | | | 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 Symbian specific code from QtCore.Xizhi Zhu2012-01-301-7/+0
| | | | | 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>
* Remove Q_CC_MWERKS.Robin Burchell2012-01-191-25/+1
| | | | | | | | This is no longer supported. Change-Id: I3914f5007595fd699fa1e9a565a0a3f59a0e135e Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* qglobal: Remove symbian specific featuresOlivier Goffart2012-01-161-381/+8
| | | | | Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Document Q_DECL_CONSTEXPROlivier Goffart2012-01-141-0/+11
| | | | | Change-Id: I61f4017186e8c7b943855723d7c677a01f7a7bf7 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@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>
* Re-add QInternal::EventNotifyCallbackBradley T. Hughes2011-12-051-0/+41
| | | | | | | | | This is needed by QtScript, so we need to keep it for now. Change-Id: Iee6bd7daf7e86a09242523f5aca72ede413a6981 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove QInternal callbacks and internal functionsBradley T. Hughes2011-12-021-102/+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>
* QGlobal: Define a default message handlerAurindam Jana2011-11-081-16/+26
| | | | | | | | | | | | | Currently, qInstallMsgHandler() does not return the handle to the default message handler. This patch defines a default message handler. This is returned by qInstallMsgHandler() when called for the first time. A call to qInstallMsgHandler(0) will restore the default message handler as was the case previously. Change-Id: I42f06654d45fb0e633f3c6d912fc8f05c23249aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* corelib: Remove Q_WS-macros.Friedemann Kleint2011-10-241-113/+6
| | | | | | | | | | | | | | | | | | | | Q_WS_QPA is the only active code path after merging refactor, other Q_WS-macros are no longer used. Enable compilation without -qpa. - Remove Q_OS_MSDOS, Q_OS_OS2 - Remove Q_WS_QWS - Remove/replace definitions/conditionals of Q_WS_XX - Remove qpa branches from profiles - Replace Q_WS_MAC by Q_OS_MAC - Replace Q_WS_MAC && !Q_WS_QPA by Q_OS_MAC && !QT_NO_CORESERVICES - Similarly in profiles: mac:contains(QT_CONFIG, coreservices) - Replace Q_FS_FAT by Q_OS_WIN Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Changed QLibrary::resolve() to return a function pointer.Kim Motoyoshi Kalland2011-07-251-0/+7
| | | | | | | | | | | According to the C++ standard, there is no guarantee that you can cast between function pointers and void pointers without data loss (section 5.2.10-6). Change-Id: I27f4d835e4c8ca8ecca0d76cfea9ce34491956bd Reviewed-on: http://codereview.qt.nokia.com/1995 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Doc: Removed documentation for deleted code.David Boddie2011-07-211-120/+0
| | | | | | | Change-Id: Icdbc05decac3dfe3fc18ce073c494e1fce4ea347 Reviewed-on: http://codereview.qt.nokia.com/1824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Introduce QT_DEPRECATED_SINCEOlivier Goffart2011-07-121-0/+15
| | | | | | | | | | | To be used to versionize deprecated symbols Symbols deprecated in Qt 5.0 need to be inlined Change-Id: I696a834c25b7e86acf14ae081ea91ef993a5b19e Reviewed-on: http://codereview.qt.nokia.com/431 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove QT3_SUPPORT in src/corelib/globalLars Knoll2011-06-291-53/+0
| | | | | | | Change-Id: I3bda38801659125b49ef74537b22281a530b8e0a Reviewed-on: http://codereview.qt.nokia.com/862 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Doc: Applied pending fixes to API documentation.David Boddie2011-05-231-4/+4
|
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+3653
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12