summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* make qlibraryinfo table-drivenOswald Buddenhagen2012-02-292-94/+34
| | | | | | | | | | | | switch blocks are noisy. this is nicer. reshuffled the LibraryLocation enum to make table lookups possible and future-safe. using pointer-free tables to avoid adding data relocations. Change-Id: I70ec2c2142ce02a15e67284e4b285d754d930da3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* remove pointless ifdefsOswald Buddenhagen2012-02-291-23/+1
| | | | | | | | configure always defines all of these constants. the exception is SettingsPath which is unix-only, so make the #ifdef explicit about that. Change-Id: I339d2d7cb9d188a8e74d79310c3a80b5d4dbb806 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge master -> api_changesRohan McGovern2012-02-295-162/+31
|\ | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| * remove library version matching from qt.confOswald Buddenhagen2012-02-271-65/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this feature was introduced in feb 2005 by Sam with this comment: > I have implemented a versioning into the keys and do environment > expansion there as well, these aren't immediately usefull but Marius > and I agreed that distributors will probably want such features at > times. The versioning fallbacks will be usefull to us over time no > doubt. imo the versioning is a contestant for the most useless feature ever: - (linux) distributors couldn't care less - they simply configure qtcore correctly. additionally, the packaging policies state that no config files should live in the binary dir at all, so no qt.conf for them. - ISVs don't care, because they ship their software with a particular qt version anyway. - SDK distributors don't care, because it doesn't solve any real problem for them: a) they will isolate the (qmake) versions and b) a distinction based on version number (as opposed to build configuration) is utterly useless in the first place. i left in the variable expansion, as it could at least theoretically be useful for creating relocatable packages. debatable - the file it easy enough to modify at installation time. Change-Id: Ida8a50b16d55d8d8613d1a98a51df56753f6a6e3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Remove more support for unsupported GCC versions.Stephen Kelly2012-02-271-6/+2
| | | | | | | | | | Change-Id: I827c9f982a7d7d20913b99c8fdaf98437a0a73db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QFlags<>: let the compiler generate copy ctor/op=Marc Mutz2012-02-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The user-defined copy constructor and copy-assignment operators were 100% equivalent to the ones the compiler would generate, so let the compiler generate them (so we reap move constructors, too, even though they're not needed on this class). Change-Id: Iecdd579fa5a819d083ec9b2f25734ddba85515e6 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove unused QT_NO_QWS_SHARE_FONTSStephen Kelly2012-02-241-1/+0
| | | | | | | | | | Change-Id: I47e8111d6caffd9b45096e52695acaa55945c612 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
| * Remove QT_NO_QWS_MULTIPROCESSStephen Kelly2012-02-241-2/+0
| | | | | | | | | | Change-Id: I1d6731dc5268919d0c36d5d27285321742be708f Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
| * Remove unused define QT_NO_COP.Stephen Kelly2012-02-241-4/+0
| | | | | | | | | | | | | | It used to relate to QCop and QWS, which are no more. Change-Id: Ie70c64a3a6ef60664009108b79eed7f33ea59f32 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
| * Require compiler support for deprecated constructors.Stephen Kelly2012-02-232-10/+0
| | | | | | | | | | Change-Id: I1d4cdcbbddb7895e6529e4f6b5295312e9a3a0e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove QT_ASCII_CAST_WARN_CONSTRUCTORStephen Kelly2012-02-231-7/+0
| | | | | | | | | | | | | | GCC version < 3 which it was created for is not supported anymore. Change-Id: I0b4df4c99600cacbaafbf0bc4270cd4978600956 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add WindowDoesNotAcceptFocus flag and use it in xcbJan Arne Petersen2012-02-232-0/+4
| | | | | | | | | | | | | | | | | | | | | | Add window flag to support windows which should not get the input focus. Sets the input field in the WM_HINTS structure of the window to false if the WindowDoesNotAcceptFocus flag is set on a window in xcb. Change-Id: Ifbc10695b83484c17dca0eb13ea826d74f174833 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Don't do macro self-expansion for moc anymore.Stephen Kelly2012-02-221-6/+2
| | | | | | | | | | Change-Id: Ia34cc244a160c6c4abe6dacd7a2ce29bc4fc7bfb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove unused Q_CANNOT_DELETE_CONSTANTStephen Kelly2012-02-221-2/+0
| | | | | | | | | | Change-Id: I697f3f786d84fa766b3bc48d93fc265deee5fdcf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove detection of GCC versions which are not supported anywhere.Stephen Kelly2012-02-221-31/+8
| | | | | | | | | | Change-Id: If254af51880e20be486b14f5237e6e1d4e4d6af3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fail with #error early if the compiler does not support bool or explicit.Stephen Kelly2012-02-222-28/+10
| | | | | | | | | | | | | | | | The fail mode for bool is moved from later in qglobal.h, and explicit is used unguarded throughout Qt, so the macro is already useless. Change-Id: Iff26892b025ba155e360a1f2dc93a67a6622dbc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove Q_DECLARATIVE_EXPORT and Q_QTQUICK1_EXPORTMatthew Vogt2012-02-271-16/+0
|/ | | | | | | | | Theses definitions are no longer required in qtbase. Task-number: QTBUG-23737 Change-Id: Ib11e5840086b44120adabe83a1b068c991920f2f Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QSysInfo out of qglobal.h and into a separate headerBradley T. Hughes2012-02-213-102/+157
| | | | | | | | | qsysinfo.h is still included by qglobal.h, but it may be possible to remove the include from qglobal.h and instead include qsysinfo.h only where needed (e.g. qendian.h, qdatastream.h). Change-Id: Ifa2c72e0dae206d88eaa192e15a906297673c048 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qMacVersion()Bradley T. Hughes2012-02-212-15/+10
| | | | | | | | Add QSysInfo::macVersion() instead, to match the windowsVersion() function. Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Include qt_windows.h for Windows CE.Andreas Holzammer2012-02-201-0/+3
| | | | | | | | | The include is needed for OutputDebugString, as it is defined in winbase.h. To include use the centralized header. Change-Id: I486da20d7b054cee352be085e65a0ede1394653d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move QTypeInfo out of qglobal.h and into a separate headerBradley T. Hughes2012-02-203-165/+220
| | | | | | | | | qtypeinfo.h is still included from qglobal.h, and defines QTypeInfo as well as all the specializations for built-in and default Qt types. Change-Id: I24116174de288a730cbb7aa2f80d346d2b2f9408 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWERBradley T. Hughes2012-02-202-12/+25
| | | | | | | | | 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-182-0/+218
| | | | | | | | | | 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>
* qnamespace.qdoc: Add doco for new values of Qt::MouseButtonRick Stockton2012-02-171-3/+49
| | | | | | | | | | | | | | QtTBUG-22642 added about 25 new values for the Qt::MouseButton Enum. This change adds documentation for the new values. Note that the special value 'Qt::AllButtons' is documented at the top (next to the other special value, 'Qt::NoButton'.) The new internal value 'Qt::MaxMouseButton' is listed as a \omitvalue. Task Number: QTBUG-22642 Change-Id: Iaec623754156fff8a2c73e357fef82e1fe36354b Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Enables QProcess back on QNX.Rafael Roquetto2012-02-171-2/+0
| | | | | | | | | | Because fork()/vfork() on QNX are not supported on multithreaded applications, QProcess had been disabled on this platform. The corresponding code has now been replaced with functions that wrap around spawn(). Change-Id: I46091b7d41f322a5cad07d17893aa929c84941ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove usages of QT_ARCH and QT_ARCH_* from qtbaseBradley T. Hughes2012-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The architecture is detected at compile time based on the predefined macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf files. The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present in the current copy of src/3rdparty/libpng, so no change in functionality is expected. The conditional for the SUPPORT_JIT define in pcre.pri is moved to src/3rdparty/pcre/config.h, again so that we can use the compiler's predefined macros to detect the architecture at compile time. Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their Q_PROCESSOR_* equivalents. Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with their Q_OS_* equivalents. Note that this commit also effectively disables the SPARC atomic implementation. An inline implementation for SPARC needs to be added, or we remove the current code and instead rely on the GCC intrinsic or C++11 std::atomic support on SPARC. Note also that this commit does not remove QT_ARCH from configure or qconfig.h. This will continue to be set until all Qt 5 projects can be moved away from using QT_ARCH. Change-Id: I5de747cc4436d21941329974cff3016970f497b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QDebug: Add support for %{pid}, %{appname} and %{threadid}David Faure2012-02-171-1/+22
| | | | | | Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix whitespace in qnamespace.qdocRick Stockton2012-02-151-24/+24
| | | | | | | | | | repair instances of (1) trailing ws; and (2) tabs+spaces. Task-number: QTBUG-22642 Change-Id: I775c6e1c65625340f6279bcff042dd8e74271021 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Move QtConcurrent configuration to a single fileJoão Abecasis2012-02-141-19/+0
| | | | | | | | | | | | | | This file lives in src/concurrent, alongside the rest of the library. Relevant configuration was moved out of qglobal.h, as it isn't relevant for other parties and thus isn't needed there. This introduces a global header that all QtConcurrent headers now include. This header includes qglobal.h and defines library-specific configuration for all to follow. Change-Id: If6f11e7bbc6139d29004eb1602bd579b75b637c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Reshuffle code between qglobal, qloggingKai Koehne2012-02-134-477/+473
| | | | | | | Make the content of the .h, .cpp files match. Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203 Reviewed-by: David Faure <faure@kde.org>
* Fix qmake compilationOlivier Goffart2012-02-131-1/+1
| | | | | | | No need to error out in bootstrapped mode because we don't use -fPIC Change-Id: I0cc2889c75b41968edfd8e801b9161a1eb63f6ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove HP PA-RISC atomic implementation.Bradley T. Hughes2012-02-131-6/+0
| | | | | | | | | | | This architecture is obsolete and discontinued. Support for PA-RISC can be re-added if needed, but it would be preferred to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for example). Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove failing for ARM Architectures.Andreas Holzammer2012-02-111-2/+0
| | | | | | | | Checks cover only V7, V6 and V5. But when trying to compile for V4 it fails. Change-Id: I573361c61acc904661bf2c8bfe1132cba57f296a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix qlogging autotest for clangKai Koehne2012-02-101-0/+5
| | | | | | Change-Id: Iac82c4847554534174b5419ec78319c9ac381628 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Force -fPIE on ELF if Qt is built with reduced relocationsOlivier Goffart2012-02-101-0/+6
| | | | | | | | | | | | | | | | Put in qconfig.h whether qt is compiled with reduced relocations. When using -Bsymbolic-functions (enabled by default on Qt) but not -fPIE, the comparison of the function pointers fail because the addresses are different in Qt, and in the executable. Hence we now enable -fPIE by default on qmake, and force a compilation error when it is not enabled and built with reduced relocations. Done-with: Sune Vuorela <sune@vuorela.dk> Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow customization of qDebug output at runtimeKai Koehne2012-02-092-9/+325
| | | | | | | | | | | | | 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>
* Various documentation fixes ported from 4.8Teemu Katajisto2012-02-091-1/+1
| | | | | | | | | | | | | | | | | | | Selected documentation fixes for qtbase from 4.8 commit 40fb4750910e23d3e7128ca8e0f1c5920b05bd5a Task-number: QTBUG-8625 Task-number: QTBUG-19808 Task-number: QTBUG-1231 Task-number: QTBUG-21073 Task-number: QTBUG-8939 Task-number: QTBUG-20399 Task-number: QTBUG-20944 Task-number: QTBUG-22095 Task-number: QTBUG-11278 Task-number: QTBUG-15653 Change-Id: Ia4f59fce7c85f04b6da953a3988f705d9d9a658a Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* fix msvc 2008 warning about downcasting to boolOswald Buddenhagen2012-02-081-1/+1
| | | | | | | | | | | | the compiler doesn't have static_assert yet, so we ran into the path which was not fixed by 10229ae. use !!() pattern instead of bool() cast, as the latter throws off macx (see 95d7abb). the other alternative - a c-style cast - would cause autotest failures (see 92464fa), and would be ugly anyway. Change-Id: Idbe9a3b60e17ae1f566f938d9b9be04f0c977492 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix compilation with -Werror -WshadowDavid Faure2012-02-081-2/+2
| | | | | Change-Id: I2ef8f288415820fa08e5bab8b99a00b1ad0f2988 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qprocessordetection.hBradley T. Hughes2012-02-083-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This detects the target processor based on preprocessor #defines, setting Q_PROCESSOR_${FAMILY} accordingly. Optional Q_PROCESSOR_${FAMILY}_${REVISION/VARIANT} #defines are also provided, usually dependent on how the compiler is invoked. Currently detected families (and variants) include: ARM (v5, v6, and v7) X86 (i386 and x86_64, as X86_32 and X86_64 respectively) IA-64 MIPS (I, II, III, IV, 32, 64) Other families that currently are not detected, but Qt has (or had) support for include: Alpha AVR32 Blackfin PA-RISC PowerPC (optional 64-bit variant) S390 (and S390X 64-bit variant) SH (and SH-4A) SPARC (SPARC V9) Detection for these is currently commented out, and can be easily enabled later. Change-Id: I571f245c189b9d80c7c3a5369ac595a271f37c8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add 'AllButtons' into Qt::MouseButton enum, for use by QMLRick Stockton2012-02-081-0/+1
| | | | | | | | | | | | This allows the QML programmer to set 'acceptedButtons', for a MouseArea, to accept all buttons with a single value. In comparison with OR'ing a long list of Qt::MouseButton values, this is shorter, easier, more clear, and less error-prone. Task-number: QTBUG-24106 Change-Id: I0259969223c0b44b6ce8ae84aed37d20cb77999b Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use Q_OS_WINCE instead of Q_WS_WINCEAndreas Holzammer2012-02-071-1/+1
| | | | | | | | | Window system defines have been deprecated, so use Q_OS_WINCE instead. Change-Id: I52059d0f854fe783ac20610ab248800c3e1e827c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make syncqt ignore qsystemdetection.h and qcompilerdetection.hBradley T. Hughes2012-02-072-28/+0
| | | | | | | | | | Remove the #if 0'd blocks and instead add these headers to sync.profile's @ignore_for_include_check, as documented at http://wiki.qt-project.org/Creating_a_new_module_or_tool_for_Qt#other_fields Change-Id: I3bd6e8cb21eca139fdca10fe970eeaf2e4e77c24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change #include "qlogging.h" to <QtCore/qlogging.h> in qglobal.hBradley T. Hughes2012-02-061-1/+1
| | | | | | | | | | This silences the warning from syncqt: QtCore: WARNING: qtbase/src/corelib/global/qglobal.h includes qlogging.h when it should include QtCore/qlogging.h Change-Id: I64bd92898190031eb0d3d1dfa5ba5bc56db01c00 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move compiler detection from qglobal.h to a separate headerBradley T. Hughes2012-02-063-492/+553
| | | | | | | | qcompilerdetection.h is included from qglobal.h, and does all Q_CC_* and compiler feature detection. Change-Id: Idd06054e172ef6fa73774e26fa38753996c4161b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move operating system detection from qglobal.h to a separate headerBradley T. Hughes2012-02-063-168/+225
| | | | | | | | | | | | | | qsystemdetection.h is included from qglobal.h, and does all Q_OS_* detection A side-effect of this change is that QT_BEGIN_HEADER and QT_END_HEADER started being defined on Mac OS X, which ends up breaking the build in some cases. Since QT_BEGIN_HEADER and QT_END_HEADER have been defined to nothing in the past, even on Mac OS X, change these 2 to be unconditionally defined to nothing. Change-Id: Ibc8a0aa2207664741c25627d7621e006c2ce80d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QtConcurrent into its own moduleLars Knoll2012-02-051-0/+8
| | | | | | | Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compilation on MinGW.Friedemann Kleint2012-02-031-1/+3
| | | | | | | | | | | - Add missing constant. - Make FontKey a pair instead of a function-local type which cannot be used as template parameter for gcc. - Fix warnings about redefinition of NOMINMAX and enumeration. Change-Id: Ie3eb6e5b8dd9cd81210d6e10270ada0158aaf809 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Added WindowOverridesSystemGesturesHint to our window flags.Gunnar Sletta2012-02-012-0/+5
| | | | | Change-Id: I42c3d3e5ef71960d16f85969b66380999fb15922 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-0/+1
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>