summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix compilation warnings on MSVC.Jędrzej Nowacki2012-01-291-2/+2
| | | | | | | | Q_STATIC_ASSERT as condition should accept anything cast-able to "bool". Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Introduce QTypeInfo::sizeOf.Jędrzej Nowacki2012-01-291-5/+10
| | | | | | | | In QMetaType "void" is a regular type, lack of c++ sizeof operator force us to write a template specialization for the type. Change-Id: I9a56e135223b416b8031836d29ef33ef3fb750e4 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Mark the single argument containers as movable.Stephen Kelly2012-01-261-0/+25
| | | | | | Change-Id: I1557b9f3c2d3ad805e1ab7bf4d49973f08664a79 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Wrap unimplemented clang feature in __has_featureOlivier Goffart2012-01-261-4/+13
| | | | | | | | So that when they are actually implemented in future version, the proper defines get defined. Change-Id: I5cc3e3ef64b06facc27e6d697700dcb7a96300d5 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-136/+1
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Q_COMPILER_FINALOlivier Goffart2012-01-241-7/+1
| | | | | | | | | | | | | Merge it with Q_COMPILER_EXPLICIT_OVERRIDES No compiler will implement one and not the other, "overrideS" is a shortcut for the two features It was even wrongly not defined with clang Change-Id: I22dcffe6f0c96285c2b409a5ae9ce2f6f1652094 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update obsolete contact address.Jason McDonald2012-01-231-2/+2
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Id689fdb78727abafba033bed7b0402e2cf27aba1 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> 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 QBool and use bool instead.David Faure2012-01-201-17/+0
| | | | | | | | | | | | QBool was introduced with Qt-4.0, to detect Qt3-like code like if (c.contains(d) == 2) and break compilation on such constructs. This isn't necessary anymore, given that such code couldn't possibly compile in Qt4 times. And QBool was confusing developers, and creating compile errors (e.g. QVariant doesn't have support for it), so better remove it for Qt 5. Change-Id: I6642f43f5e12b872f98abb56600186179f072b09 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Q_CC_MWERKS.Robin Burchell2012-01-191-11/+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>
* Remove Q_CC_NOKIAX86.Robin Burchell2012-01-191-6/+3
| | | | | | | | This is no longer supported. Change-Id: Ic393bc48c4c842514da69b6696cfb62b54360070 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* qglobal: Remove symbian specific featuresOlivier Goffart2012-01-161-115/+7
| | | | | Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add Q_COMPILER_* defines for C++11 features supported by clangBradley T. Hughes2012-01-121-1/+40
| | | | | Change-Id: I9487720c33e6ac628f7e13f80057524a950c4c5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Q_ASSERT_X to handle QT_FORCE_ASSERTSHarald Fernengel2012-01-111-3/+3
| | | | | | | This change aligns the behavior of Q_ASSERT and Q_ASSERT_X Change-Id: Iac9f399da6462fcf70826d3ce1177522bed9f897 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Add defines for explicit virtual overrides.Stephen Kelly2012-01-101-0/+17
| | | | | | Change-Id: Ia9a610e81eeaaa0a08ca6ef4945b002bdb13fe8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove symbian debug macro definition.Stephen Kelly2012-01-101-9/+0
| | | | | Change-Id: I3c4cc5cfd8e157587dbda1589501bb829a5a18db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add define for C++11 explict delete methodsStephen Kelly2012-01-091-8/+8
| | | | | Change-Id: Ief4b8949acb528dcfc0be725b562ae71bd1640cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-081-6/+0
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-051-0/+1
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUTDavid Faure2012-01-051-7/+9
| | | | | | | | | | | | | | | | All QDebug operator << in custom classes were disabled by QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT. Now QT_NO_DEBUG_STREAM is never set automatically, but remains available for reducing the feature set altogether (qconfig.h). Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it doesn't even undefine QTextStream, and this is unrelated to QDebug streaming anyway. Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* corelib: Introduce Q_ALLOC_SIZE and use it on qMalloc and friendsHolger Hans Peter Freyther2012-01-021-4/+11
| | | | | | | | | GCC 4.3 introduced the alloc_size attribute to hint the compiler that allocated memory will be returned, inform the compiler which parameter holds the size of the allocation. Change-Id: I8734868f6bd19e201abdacd0a1b0fb80a27883c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not unconditionally define QT_BEGIN_MOC_NAMESPACEDenis Dzyubenko2012-01-021-0/+8
| | | | | | | | | | | | | | | | | | Qt5 modules are supposed to be in a namespace, but if the namespace definition is hidden in a macro, then moc doesn't know about it and generates invalid moc_xx.cpp that cannot be compiled due to usage of classes outside of their namespaces - e.g. in qtjsondb we have QtAddOn::JsonDb::Foo class, but the moc_foo.cpp expects to find that class in the global namespace instead. Fixed it in QtJsonDb to define QT_BEGIN_MOC_NAMESPACE="QT_USE_NAMESPACE QT_ADDON_JSONDB_USE_NAMESPACE", however we need to ensure qglobal.h doesn't re-define that macro back. Change-Id: Ic8407f50c11d2d787167ad2f92457aa3ec126d45 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Enable variadic macros if building in c++0x mode.Stephen Kelly2011-12-291-0/+1
| | | | | | Change-Id: I40d1f1f64ad31a299ccad9258f70e9bf3255c3cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove QT_NO_STL_WCHAR hackHarald Fernengel2011-12-221-1/+0
| | | | | | | We don't support gcc 2.95 any more. Change-Id: I842f1f8ac64b9006516c104add0991830ac9a46a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q_STATIC_ASSERT: fix C style castOlivier Goffart2011-12-191-1/+1
| | | | | | | | Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in some headers included by moc generated files Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add specialization for QTypeInfo<void>Jędrzej Nowacki2011-12-131-0/+13
| | | | | | | | QTypeInfo uses sizeof which is illegal operation for void type. Change-Id: Idf43551bdfafbb76e32f4f2785af5f4291981e73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QT_DEPRECATED_SINCE evaluationBradley T. Hughes2011-12-051-23/+23
| | | | | | | | | | | | | | | | QT_DEPRECATED is defined by default by the logic in qglobal.h, but QT_DEPRECATED_SINCE is evaluated before that definition, making QT_DEPRECATED_SINCE evaluate to 0, disabling all deprecated code (even though it shouldn't be disabled). Fix this by moving the QT_DEPRECATED_SINCE evaluation to after the evaluation of QT_NO_DEPRECATED and/or definition of QT_DEPRECATED, to ensure that QT_DEPRECATED_SINCE works as expected. Change-Id: I57d9f6a3e1859b0057fd4f37bcf2d2cc3dfba230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.Jędrzej Nowacki2011-12-011-23/+12
| | | | | | | | | | | | | 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>
* Fix QT_DEPRECATED_SINCE on windows.Olivier Goffart2011-11-231-2/+7
| | | | | | | | Apparently, MSVC preprocessor do not understand correctly the defined() in that macro (used in another #if) Change-Id: I9bd102eb4e0cbaa65bea48db786a45d861491ad7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add a -force-asserts option to configureHarald Fernengel2011-11-111-3/+3
| | | | | | | | | | | We have the following scenario: Either you build a release package without asserts, or a debug package with asserts. However, in embedded development, we need asserts also in release packages. This flag allows you to build a release package, but Q_ASSERTs still fire. Change-Id: Icd1dd4dd63c3cafecf515b40741263d902ad42d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Q_STATIC_ASSERT on MacJoão Abecasis2011-11-101-1/+1
| | | | | | | | | | | gcc 4.2.1 complains about the use of C++-style cast in the macro. error: template argument 1 is invalid . Changing the bool-cast to a C-style cast makes the test compile. Change-Id: Ie9082a3adbfd53147bfd0bfe36dd9e7328e01ee8 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Enable deprecated feature for nowOlivier Goffart2011-11-031-2/+3
| | | | | | | | | | | | | | | Rationale is that it makes it possible to deprecate functions without breaking other modules. After the feature freeze, this should be reset to 5 Notice that QT_DEPRECATED is not defined while bootstrapping Qt (QT_NO_DEPRECATED defined) This also means that compilation is tested Change-Id: I85f0e65ac3a160e9aba3833787ded3f94304cb90 Reviewed-by: David Faure <faure@kde.org>
* Use C++11 static_assertOlivier Goffart2011-11-021-0/+10
| | | | | | | 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/+2
| | | | | | | Variadic macros are not supported by C++98 standard. Change-Id: Ib520297e43b654b46925f3ee2735a975ebbe8e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compiler warnings.Friedemann Kleint2011-10-271-1/+1
| | | | | | | | - Fix gcc 4.6.X warnings about assigned but unused variables - Remove trailing ';' from inline functions (Clang) Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* corelib: Remove Q_WS-macros.Friedemann Kleint2011-10-241-70/+2
| | | | | | | | | | | | | | | | | | | | 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>
* Fix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...David Faure2011-10-221-1/+1
| | | | | | | | Shows that there should be an automated build with QT_DISABLE_DEPRECATED_BEFORE set to 0, too... Change-Id: If154786ea26bcbfab41efcd7001c222cc258a8af Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Expand QT_TR_NOOP("str") to "str", not ("str").Jan-Arve Saether2011-10-211-4/+4
| | | | | | | | | | | | | | This enables us to write code like : QStringLiteral(QT_TR_NOOP("Press")) or just: QT_UNICODE_LITERAL(QT_TR_NOOP("Press")) It also makes it consistent with the QT_TRANSLATE_NOOP3, QT_TRANSLATE_NOOP3_UTF8 and QT_TRID_NOOP macros, as they don't surround the string literals with parenthesis. Change-Id: I67c30bcd88609f897bd22afb44266affa4dcfc8f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-191-0/+9
| | | | | | | | | 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>
* Remove Sensors and Location related macros/defines from qglobal.h.alex2011-10-191-26/+0
| | | | | | | | | This reduces interdependencies between QtCore and other modules. Individual modules handle this by themselves. Change-Id: I82cb96326b8ccb0b6acb88d899ed811f80f47ec1 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-111-0/+12
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Clean-up a macro for CocoaMorten Sorvig2011-10-101-5/+0
| | | | | | | | | Remove the usage of Q_MAC_USE_COCOA and Carbon code paths. Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112 Reviewed-on: http://codereview.qt-project.org/5100 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-031-8/+8
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the remaining traces of QT3_SUPPORTLars Knoll2011-10-031-5/+1
| | | | | | | | | | The only place that now still knows about it is moc, so it can still parse old headers. Change-Id: Iafec080f99c67560974e9ebc0cbfb27d9a4b2d6f Reviewed-on: http://codereview.qt-project.org/5755 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: fixed compile of libQtPlatformSupportRohan McGovern2011-09-141-0/+15
| | | | | | | | | | | It is incorrect to use QT_GUI_EXPORT to export symbols from any library other than libQtGui. When used outside of libQtGui, QT_GUI_EXPORT attempts to _import_ symbols rather than _export_ them. Change-Id: I7489067f479edd3acd9bf08bcaa24ee4dea4c3cc Reviewed-on: http://codereview.qt-project.org/4838 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Merge branch 'refactor'Gunnar Sletta2011-09-131-19/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qws/linux-lsb-g++/qmake.conf src/gui/image/qpixmap_mac.cpp src/gui/painting/qpaintengine_x11.cpp src/gui/painting/qtessellator.cpp src/gui/text/qfontengine_qws.cpp src/gui/text/qfontengine_x11.cpp src/gui/widgets/qlinecontrol.cpp src/opengl/qgl.h src/opengl/qgl_x11egl.cpp src/plugins/plugins.pro Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
| * Merge remote branch 'gerrit/master' into HEADSamuel Rødal2011-09-061-4/+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
| * | Introduce Q_QTQUICK1_EXPORT fixing exports in declarative.Friedemann Kleint2011-08-311-0/+8
| | | | | | | | | | | | | | | | | | Change-Id: Id70c6792b5342074ef78944e7e28bd9c9b83c107 Reviewed-on: http://codereview.qt.nokia.com/3983 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * | Fix build.Friedemann Kleint2011-08-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduced EXPORT definition for new QPrintSupport library. - Fixed dependencies in src.pro - Fixed some includes. Change-Id: I9863233ca2767928b37cf3fd1fdec31351b5da6b Reviewed-on: http://codereview.qt.nokia.com/3253 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>