summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation for Android ARMv5Eskil Abrahamsen Blomfeldt2013-05-071-0/+4
| | | | | | | | | | | | | | | We have to use the 4.4.3 compiler toolchain for producing binaries for ARMv5 on Android, since the 4.7 toolchain has a regression for this architecture. The regression has been fixed, but the fix has not been released yet, so until it has, we need to use the 4.4.3. However, the 4.4.3 toolchain has a different bug, which breaks compilation in qtimageformats with a message about redefinition of uint. This works around that bug for Android builds. When the patched compiler has been released, we can revert this. Task-number: QTBUG-30921 Change-Id: I620c186c6e932413a4de1dd331fbf4b9401f2e72 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Reduce the likelihood of underflows in qFuzzyComparehjk2013-04-021-2/+2
| | | | | | | | | | | | As indicated in the discussion of the bug report, this does not address the real problem but only reduces the frequency it occurs. Task-number: QTBUG-26453 Change-Id: I20ac3f41f52effb674bee6924ccdfd2f641576ef Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Introduce macros for simplifying platform checks on Mac OS and iOSTor Arne Vestbø2013-02-181-0/+10
| | | | | Change-Id: Ibab8486e1e6d7e4d8922fce96add055e60c6095c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qunsetenv(), next to qputenv() and friends.David Faure2013-02-071-0/+1
| | | | | | | | | | | | | | | | | The existing tst_qgetputenv shows that qputenv with an empty value doesn't lead to the same result on Windows and on Unix, and there was no way to fully delete an env var on Unix (which is needed for some env vars where not-set and empty are different, such as TZ, see `man tzset`). This is also why qglobal has qEnvironmentVariableIsSet() vs qEnvironmentVariableIsEmpty(), on the getter side. Qt4's ifdefs around unsetenv in qapplication_x11.cpp show that this is needed within Qt too (although this particular startup notification code has to be re-imported into Qt5 still). Change-Id: I631c8cddbcf933d4b9008f11aefc59f5a3c7c866 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add note about QT_{BEGIN,END}_HEADER removal for Qt 6Sergio Ahumada2013-02-061-0/+1
| | | | | | | | This macro usage has been removed from most of the Qt 5 code, so adding a note to be completely removed in Qt 6. Change-Id: I19a90db78745f3cacbcbf206e8642c7d7c36e04a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QT_{BEGIN,END}_HEADER definition backSergio Ahumada2013-02-051-0/+3
| | | | | | | | This commit partially reverts 07e3bcdc106ac42703ae0fb88b6cac2d2bfdd072 The empty macro defition was not supposed to be removed yet. Change-Id: Ie83b2adbe2328b83c70a70274a401e1e6c74498f Reviewed-by: David Faure (KDE) <faure@kde.org>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-6/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-231-1/+1
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Add a new Q_GLOBAL_STATIC implementationThiago Macieira2013-01-221-119/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the previous implementation, this implementation is locked: only one initialisation is ever run at the same time. It is exception-safe, meaning that a throwing constructor will restart the process. Also, start using the thread-safe behaviour that GCC has offered for a long time and C++11 requires. Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* / Bump Qt version to 5.1.0Frederik Gladhorn2013-01-151-2/+2
|/ | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Bump Qt version to 5.0.1Sergio Ahumada2012-12-211-2/+2
| | | | | Change-Id: Ie8f437b8dfe8a67c7b34321439dd988a02612437 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the TRUE and FALSE macrosDavid Faure2012-12-061-11/+0
| | | | | | | | | | They are completely unused in Qt, and are a potential source of compilation errors in application code. Change-Id: I6dfe2891f3b2365a30048f99c31e8e3a2425e62b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Ignore the QT_NAMESPACE for moc runsLars Knoll2012-09-251-1/+1
| | | | | | | | | | Moc should not see a defined QT_NAMESPACE, to keep the names of all symbols consistent with an un-namespaced Qt. Change-Id: Ia72afabaa0820b02a0863148510122ce942a5082 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* don't require a fake qconfig.h for the configure bootstrapOswald Buddenhagen2012-09-191-1/+1
| | | | | Change-Id: I3d1224ad19b9e5278e35cf7c5142a29ccb589140 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Let qVersion() be extern "C" if this is not a namespace buildThiago Macieira2012-09-181-1/+13
| | | | | | | | | | | This allows one to even dlopen() QtCore and call qVersion, to figure out which version it is. A bit crazy, but someone might want to do it. Change-Id: I932460515d07bed3f0e41c8ab2b46fc268ca73ff Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* don't require (dummy) qconfig.h for qmake buildOswald Buddenhagen2012-09-111-1/+1
| | | | | | Change-Id: I22a2c9aa1366ff858b3bb646617543968c810136 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Move the non-C++ parts of qglobal.h outside of __cplusplusThiago Macieira2012-09-101-135/+134
| | | | | | | | This allows some more goodies to be available in C mode. Change-Id: I5c8a19b6150081a20aae8d3d9d8d7cb30d750536 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move the constructor and destruction function macros to the C++ partThiago Macieira2012-09-101-22/+22
| | | | | | | | | These macros expand to C++ code, so there's no point in having them defined in the non-C++ part of qglobal.h. Change-Id: Ic5763196391798e362d33466114969818e7e6793 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make the default Qt API be Qt 5.0'sThiago Macieira2012-09-081-2/+1
| | | | | | | | | | | | This means user applications will default to Qt 5.0's API. Higher versions or Qt 4 compatibility are opt-in. Also set the default for Qt's own build to be 5.0 on all platforms except Windows. On Windows, we need to set it to 4.9. Task-number: QTBUG-25053 Change-Id: I603e0fda4785e64e1413cd82153a89e48005aa40 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtGlobal: mark qVersion() and qSharedBuild() as nothrowMarc Mutz2012-09-071-2/+2
| | | | | Change-Id: Id9dcf71363754cf6aae94012b22d144455e213eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the package macros from qglobal.hThiago Macieira2012-09-031-4/+0
| | | | | | | It's the wrong place to have these. Change-Id: I3b716317ba02ea2baf0f7053c8b16128e4c88e17 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix warning when compliling with -Wconversion.Frederik Gladhorn2012-08-281-2/+2
| | | | | | Change-Id: I90bf9f9a1860cabb67bc92599e7ccce94496d134 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not consider sign in qIsNull.Mitch Curtis2012-08-221-4/+4
| | | | | | | | | | | | | | | The current implementation of qIsNull only returns true if the value is positive zero. This behaviour is not useful for use cases like QPointF::isNull, where QPointF(-0, -0).isNull() will return false. There doesn't seem to be a reason why the function exhibits this behaviour (-0.0 is not accounted for in the unit tests), and for the case of QSizeF::scale it causes a bug: qIsNull is used to check for division by 0.0 before it proceeds, which fails in the case of -0.0. Task-number: QTBUG-7303 Change-Id: I767e5280bd26614e8e78ae62b274eb9bc4ade385 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* QtGlobal: (new) qEnvironmentVariableIs{Set,Empty}()Marc Mutz2012-08-091-0/+3
| | | | | | | | | | | | | These functions are a faster version of {,!}qgetenv().is{Null,Empty}(), a common pattern in Qt code. Their main advantage is that they don't need to allocate memory, so they can be used in noexcept functions, or dynamic initialisation of namespace-scope statics, because throwing in these contexts invokes std::terminate(). Change-Id: I651c5bd72f450b5d7df76590f8791572fe992af5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Logging: mark qt_assert()/qt_assert_x()/qFatal() as nothrowMarc Mutz2012-08-091-2/+9
| | | | | | | | | | | | | | | | | | | | | | These functions are not supposed to return, not even by exception. qt_message() _can_ throw, but we're fine with the compiler calling std::terminate() then, since the backtrace will still include the assertion location. This behaviour is ensured by a new macro, QT_TERMINATE_ON_EXCEPTION, which expands to something like try { expr; } catch(...) { std::terminate(); } if the compiler doesn't support Q_DECL_NOEXCEPT (but maybe Q_DECL_NOTHROW), and to something like just expr; otherwise (including in the QT_NO_EXCEPTION case). The real macro preserves scopes in all cases, and aims to work even if <exception> isn't included in the TU it's used in, so is a little bit more complex than that. Change-Id: Ie6a2b7776e6aa77e57bd9aea6e184e5fa1cec81c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unnecessary extra indentation in the EXPORT macrosThiago Macieira2012-08-091-23/+22
| | | | | Change-Id: I54585fa7e38ea1984018c5cbff9bc4626016bace Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove the Q_xxx_EXPORT macros of other modules from qglobal.hThiago Macieira2012-08-091-31/+0
| | | | | | | The macros have been moved to their respective modules. Change-Id: I653668b608cd3b79824a25b0e7b1c238330c0007 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-291-56/+3
| | | | | | | | | | | | | | | | | | | | QtPlatformSupport is a static library. It should never export anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary. QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros on their own source trees. It's possible these modules might be separated out from qtbase in the future. For QtDBus, the macros are moving back to where they used to be. This also leaves qglobal.h only creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the core libraries. Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used anywhere in the Qt sources, so simply delete them. And the Q_QUICK1_EXPORT macro in the static section was wrong, so remove it too. Change-Id: I50bdf86e783338f814903b25979721f788a7becf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update the macros for shared/DLL and static buildsThiago Macieira2012-06-281-80/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, we had a mess of different macros used for building DLLs, for building shared libraries on Unix systems and for building static libraries. Some of the macros were contradictory and did not work. From now on, there shall be only: - QT_STATIC: indicates that it's a static Qt build and the export macros should expand to empty - QT_SHARED: indicates that it's a shared / dynamic Qt build and the export macros should expand to Q_DECL_EXPORT or Q_DECL_IMPORT, depending on whether the macro corresponds to the current module being built (the QT_BUILD_XXXX_LIB macro comes from the module's .pro file) QT_BOOTSTRAPPED implies QT_STATIC since the bootstrapped tools link statically to some source code. QT_STATIC is recorded in qconfig.h by configure when Qt is configured for static builds. Nothing is recorded for a shared / dynamic build, so QT_SHARED is implied if nothing is defined. This allows for the existence of a static_and_shared build: with nothing recorded, defining QT_STATIC before qglobal.h causes the export macros to be that of the static form. Linking to the static libraries is out of the scope of this change (something for the buildsystem and linker to figure out). From this commit on, the proper way of declaring the export macros for a module called QtFoo is: #ifndef QT_STATIC # ifdef QT_BUILD_FOO_LIB # define Q_FOO_EXPORT Q_DECL_EXPORT # else # define Q_FOO_EXPORT Q_DECL_IMPORT # endif #else # define Q_FOO_EXPORT #endif The type of the Qt build is recorded in QT_CONFIG (in qconfig.pri) so all Qt modules build by default the same type of library. The keywords are "static" and "shared", used in both QT_CONFIG and CONFIG. The previous keyword of "staticlib" is deprecated and should not be used. Discussed-on: http://lists.qt-project.org/pipermail/development/2012-April/003172.html Change-Id: I127896607794795b681c98d08467efd8af49bcf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compile-time error macro when building with -fPIEGabor Ballabas2012-06-201-1/+1
| | | | | | | | This macro causes a compile-time error using LLVM with Clang when the target that includes qglobal.h is built with -fPIE. Change-Id: I2e82e1a8feed9009c814f187b06501b26ea3b3b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unconditionally enable Q_OF_ELF for any ELF platformPino Toscano2012-06-011-3/+1
| | | | | | | Just enable ELF stuff on any platform which uses ELF format, instead of a selected subsets of those. Change-Id: I0753c020c718bc67b4b50c3957fe8dc10afd2c61 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtPrintSupport: Add CUPS printsupport pluginJohn Layt2012-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CUPS code around to create a new CUPS printsupport plugin, this fixes QPrinterInfo for CUPS which depends on the plugin to work. It QT_NO_CUPS is defined then the plugin is not built and only Print to PDF is supported under Linux. * Move unused genericiunixprintersupport plugin to start new CUPS printsupport plugin * Split QPdfPrintEngine to create QCupsPrintEngine * Remove LPR related code from QPdfPrintEngine * Move CUPS specific code from plugin base class to derived CUPS class * Remove forcing CUPS print engine to use PDF mode as PDF is now Native * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove all QT_NO_LPR uses There is now no CUPS specific code left in printsupport/kernel except QCUPSSupport which is needed for the dialogs. Task-number: QTBUG-23060 Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* turn off exceptions by default where they aren't requiredLars Knoll2012-05-171-5/+4
| | | | | | | | | | | | | This significantly reduces the size of the generated code in places where we don't need exceptions. The -(no-)exceptions configure flag has been removed in the process, as there is now a fine grained way to control this on a per module level, and Qt is being compiled without exceptions in most places. Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "QtPrintSupport: Remove remaining LPR specific code"Rohan McGovern2012-05-081-0/+1
| | | | | | | | | | | | | | | | This doesn't compile with a typical cross-compilation setup, which generally won't include cups headers. The commit should have been rejected, but wasn't, due to a bug in the Qt Project CI. Since it now causes all other modules depending on qtbase to fail their CI, it must be reverted to minimize disruption while the commit can be amended and/or the test toolchain updated to include cups headers. This reverts commit 80f7a388906f94f58bf765a32b9abbb16f967db2. Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* QtPrintSupport: Remove remaining LPR specific codeJohn Layt2012-05-071-1/+0
| | | | | | | | | | | | | | | | | | CUPS is the only supported print system on UNIX, LPR/PS support has already been dropped but some LPR specific code still remains. * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove LPR related code from QPdfPrintEngine * Remove all QT_NO_LPR uses * Remove most QT_NO_CUPS uses, use QT_NO_PRINTER where necessary Some QT_NO_CUPS uses remain in QPdfPrintEngine, these will be removed in a following change implementing a CUPS plugin. Change-Id: I439b6fad9cf88c3d24aa48e49475f49ad310dbad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Disable force_align_arg_pointer function attribute with MinGW-w64Jonathan Liu2012-04-301-1/+1
| | | | | | | | | | The force_align_arg_pointer function attribute is not necessary for MinGW-w64 to align stack for SSE and generates a compiler warning as it is ignored. Do not use force_align_arg_pointer with MinGW-w64 to silence the warning. Change-Id: I58a754dc3ec01b36a1d3c9490f45ccf0824468ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* get rid of Q_*_EXPORT_INLINE macrosKonstantin Ritt2012-04-261-52/+0
| | | | | | | | | | | | > Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Move Q_FUNC_INFO to qcompilerdetection.hThiago Macieira2012-04-231-13/+0
| | | | | | Change-Id: Ibc63913f070febe561890e98ef079ca883d9bfc9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Move the QT_STRINGIFY macro to the top of qglobal.hThiago Macieira2012-04-231-10/+4
| | | | | | | | | This will allow me to use them in qcompilerdetection.h. Also, leave them defined. Change-Id: I73cb39e3cfcc2463d1d47a856e4a64354ebe743c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Move Q_DECL_{IMPORT,EXPORT,HIDDEN} to qcompilerdetection.hThiago Macieira2012-04-211-29/+0
| | | | | | | | | | | | | | Mindful of QT_VISIBILITY_AVAILABLE and Q_OS_WIN for GCC: when GCC is used on Windows (i.e., MinGW or potentially Cygwin), use the declspec variant so we produce proper DLL imports and exports. When used on other platforms, rely on configure adding QT_VISIBILITY_AVAILABLE to qconfig.h, which confirms that the -fvisibility argument is available. That flag has been available since GCC 4.0 on ELF targets, but it could be missing on some other targets. Change-Id: I3dbc0043c1eaee0c469c5b1dc8bf05842fe9cd47 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Move the compiler-related macros to qcompilerdetection.hThiago Macieira2012-04-211-105/+0
| | | | | | | | This cleans up qglobal.h a little further and organises things a bit more. Change-Id: Ic025e720941cdf59b8a1a0baf515b29f25eba0f1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Mark qt_assert and qFatal as non-returning functions (excpt. MSVC)Thiago Macieira2012-04-191-0/+7
| | | | | | | | | | | | | | | | | | | This allows the compiler to optimise the code a bit better: since they don't return, it can assume in the code after the Q_ASSERT that the condition was true. MSVC is the exception: with MSVC, we have the CrtDbgReport dialog, which allows the developer to continue execution, inside the debugger. Therefore, we can't mark any of those functions as non-returning because they can, after all, return. Unfortunately, the Q_ASSERT usually expands to no code in release mode, so the improvement in code generation happens in debug mode only... Change-Id: I4d542d6853cd51c71ffab1d563ed64ef7c419115 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-85/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Move QFlags to qflags.hThiago Macieira2012-04-131-85/+1
| | | | | | | | | | | | | | This is a verbatim copy of the source code. Change-Id: I1f7efc75cad1ba05dda31d8ccfd091ae9ae40fd5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove references to QT_NO_STL from QtCoreThiago Macieira2012-04-071-8/+0
| | | | | | | | | | | | | | | | QT_NO_STL is now no longer defined, so remove the conditionals and select the STL side. Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>