summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add QSysInfo::osType()Thiago Macieira2014-05-092-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | This function returns the OS kernel type. It's usually the same as the first part of the mkspec, in qmake, or the result of uname. Usually, because it's not the case for a few systems, like Android, OS X, iOS, BlackBerry, etc. Change-Id: I295d92048d33ef02987e8696772ea89e925428d3 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Add QSysInfo::cpuArchitecture() and fullCpuArchitecture()Thiago Macieira2014-05-094-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | This uses the same logic as the config.test, so we will return the same string as the $$QT_ARCH variable in qmake for cpuArchitecture(). fullCpuArchitecture() is meant to be used in upgrade mechanisms, when combined with the OS type. Change-Id: If0dfee9eff75a07fa4c0778d204e0e768bf43074 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-063-14/+48
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-0/+3
| |\ | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * Deprecate setSharable in Qt containersThiago Macieira2014-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ability to set a container to be unsharable has very little use and it costs us an extra conditional for every refcount up and possibly down. This change is a no-op for current Qt 5. It shuffles a few things around just so Qt can compile if you define QT_NO_UNSHARABLE_CONTAINERS. That is done to ease the fixing of the code in Qt 6 and to make my life easier: I'll keep that defined in my local Qt build so I can catch any misuses of this deprecated API. The newly deprecated methods are not marked QT_DEPRECATED because the bootstrapped tools wouldn't build -- they're built with QT_NO_DEPRECATED defined, which causes build errors. [ChangeLog][QtCore] The setSharable() and isSharable() functions in Qt containers has been deprecated and will be removed in Qt 6. New applications should not use this feature, while old applications that may be using this (undocumented) feature should port away from it. Discussed-on: http://lists.qt-project.org/pipermail/development/2014-February/015724.html Change-Id: I789771743dcaed6a43eccd99382f8b3ffa61e479 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Jani Heikkinen2014-04-251-8/+15
| |\| | | | | | | | | | refs/staging/stable
| | * Disable C++11 initializer lists and rvalue refs for old libstdc++Thiago Macieira2014-04-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen if you're using a recent compiler other than GCC (that is, Clang or Intel) and using an older version of the GCC headers. The check is not strictly correct: we're disabling for libstdc++ that came with GCC 4.2 and enabling for everything afterwards, even though both of those features were not present in GCC 4.3. However, the __GLIBC_LIBSTD__ macro only exists on Apple's patched version of libstdc++ and they're not going to update it anyway. libstdc++ does not provide a version macro that we can use. Task-number: QTBUG-38193 Change-Id: I34d38a2f2e5b4ac51bce35c30ec0fcf19de9cdf4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
| | * Disable all C++11 rvalue refs with Dinkumware C++ library tooThiago Macieira2014-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our code assumes that Q_COMPILER_REF_QUALIFIERS implies Q_COMPILER_RVALUE_REFS. Technically, it should check both macros, but the only point of ref qualifiers is to have both lvalue- and rvalue- reference member functions. We might then use std::move without a check to see if the standard library does provide it. Change-Id: Ia3eedd298c2218f100aee2e41bdea6e2c5c07a15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| | * Remove the #ifdef check just before #undefThiago Macieira2014-04-141-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | No warning is printed anyway. This code is only for one compiler (GCC on QNX, a.k.a. QCC). Change-Id: I28d085c72ab5a957146efab0a36c72f213d9d2c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Allow logging to stderrBernd Weimer2014-04-241-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced a new environment variable "QT_LOGGING_TO_CONSOLE". When set on QNX for instance, log output is directed to the console instead of slog2. This can be more convenient when working on the command line. Besides, many declarative auto tests expect that, as well. Marked QT_NO_JOURNALD_LOG and QT_ANDROID_PLAIN_LOG as deprecated, to be replaced with QT_LOGGING_TO_CONSOLE. Change-Id: I7329fa2d10d31506eff145e956eaaa45d94f8e20 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * | Bump Qt version to 5.3.1Sergio Ahumada2014-04-241-2/+2
| |/ | | | | | | | | Change-Id: Ie84329ab67143c3a8560bc49c4f0f8e0c423bdfc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Add a more reliable replacement for qt_add/removeObject().Volker Krause2014-04-153-2/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These hooks only worked reliably with LD_PRELOAD on Linux/GCC, on other platforms they depended on what exactly the compiler optimizer is doing as well as some nasty assembler rewriting to actually access them. The new system uses a simple array of function pointers that can be set to custom hooks by tools that need this (based on ideas from Andre Poenitz). This also covers qt_startup_hook (similar problem), and the Qt version number that Andre had asked for. Change-Id: I2c3e7950fd49b1b1d04176be34c2fff3293981b0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-115-17/+27
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| * Only define Q_COMPILER_INITIALIZER_LISTS for MSVC 12 SP 2Frederik Gladhorn2014-04-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Nested initialization is broken before SP2, so just disable the whole feature as tst_qvector crashes(release)/fails(debug) Done-with: Jedrzej Nowacki Task-number: QTBUG-38186 Change-Id: I9c5c9e55c75854fc1f05a59fab2ac7dce9b37fbb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Mark Variable Length Arrays as a TS feature for C++14Thiago Macieira2014-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The feature was removed from the C++14 draft standard and moved instead to a Technical Specification. Since we don't know how to enable TS features in GCC 4.9 yet, remove it from the definition. The Clang definition is probably safe, since it is behind an #if __has_extension. Change-Id: Ibc32b35657b046680078b39a7678bd8e1e5395d2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Don't redefine dynamic_cast if it's already a macroThiago Macieira2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | Redefining macros is always a bad idea. On top of that, MSVC doesn't like when we #define dynamic_cast, even though the C++ standard explicitly allows it. Task-number: QTBUG-29093 Change-Id: I6e33d609ce213cf6a9085faa3f991a873d825dc6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Use category names when logging to the journalAlejandro Exojo2014-04-051-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | Use the custom field QT_CATEGORY to store the name of the QLoggingCategory used when writing to systemd's journal. To pass custom fields sd_journal_send() is needed, and is used in combination with #define SD_JOURNAL_SUPPRESS_LOCATION to store the metadata that is already in the QMessageLogContext. Change-Id: I6a120701f7012aaa46451dd3d91586a419c5f803 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * OS X: Improve QLibraryInfo app bundle testing.Morten Johan Sørvig2014-04-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLibraryInfo::location() paths are relative to "myapp.app/Contents/" when the application has a bundle and relative to the executable when not. However CFBundleGetMainBundle() can and will return a valid CFBundleRef even if the application is built as a standalone executable. Add a test that verifies that the path constructed with "/Contents" exists on disk. Fall back to the non-bundle code path if it doesn't. This bug was hit in cases where a qt.conf file was present side-by-side with the app binary, for example in qtbase/bin. Task-number: QTBUG-38039 Change-Id: Id993599208fe94fff283c725778f8ad47b610ba7 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Enable s390[x] detection.Lisandro Damián Nicanor Pérez Meyer2014-04-031-6/+6
| | | | | | | | | | | | | | It has been working in Debian for some time. Change-Id: Ib5741a4ba68bf95c7020336c84bc66257ff27809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add missing \since 5.2 for qFloatDistanceJan Arve Saether2014-04-071-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-38090 Change-Id: Icd46d7e3e95c9a019a94cfef3c51e3a6ee82bd91 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add detection for the Intel compiler in QLibraryInfo::build()Thiago Macieira2014-04-041-1/+3
| | | | | | | | | | | | Change-Id: I26ed74ac963226abc42d50c0edac6ce9a1c0fd23 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-246-9/+23
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * Stop omitted enum value from showing up in Qt namespace doc.Mitch Curtis2014-03-202-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following omitted enum description can be seen at [1]: "Ensures that the longest variant is always used when computing the size of a multi-variant string. (Internal)" This is because \omitvalue does not allow a description (whereas \value does). The description was moved to the qnamespace.h as a code comment. [1] http://qt-project.org/doc/qt-5/qt.html#TextFlag-enum Change-Id: I7983613bffa90f3071a4e2d678696391048c8757 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Remove level 4 compiler warnings from MSVC.David Schulz2014-03-151-0/+3
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-7233 Change-Id: I52067e3a22e98a62fd87415906e54a54ff2d6b49 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Dave McClelland
| * Document %{if-category} in default message patternKai Koehne2014-03-151-1/+4
| | | | | | | | | | | | | | | | Commit 15ddb91b introduced %{if-category}, and changed the default message pattern. Adapt the documentation accordingly. Change-Id: I1d500122300c4d62171de3607553b3a5a822d4a7 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * iOS: fix build failure __IPHONE_NA not definedRichard Moe Gustavsen2014-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | __IPHONE_NA was previously defined to 9999, but with iPhoneOS7.1.sdk it is now undefined. From Availability.h: "__IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable" This causes Qt to evaluate QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE to true when given __IPHONE_NA as argument. And then the build will fail. Change-Id: I11f1d0285329d90c633c00c0c4d446ef5cd8089b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Fix one bogus print to stderr: use toLocal8Bit()Alejandro Exojo2014-03-141-1/+1
| | | | | | | | | | | | Change-Id: I86341ccbd0251a9c858a5e1a9b7ea291d73cda01 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * Add compiler name for Clang in QLibraryInfo::build()Marcel Krems2014-03-141-2/+2
| | | | | | | | | | Change-Id: I88490f01edc00f5d3c9570fa630915a11c843311 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Make QtCriticalMsg exit on QT_FATAL_CRITICALSAlejandro Exojo2014-03-142-0/+7
| | | | | | | | | | | | | | Change-Id: I92e8f9851dd074f3bcded6981f5545d1e93b549f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * Fix docs: QT_FATAL_WARNINGS acts when not emptyAlejandro Exojo2014-03-141-1/+1
| | | | | | | | | | | | | | Change-Id: If68b98459eab3186e2f3d44f087b753d2c57b79d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-132-8/+10
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899
| * Doc: correction link, example and parameter issues qtbaseNico Vertriest2014-03-101-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Moved codecs folder to qtbase/examples Corrected quote in dropsite.qdoc Replaced snippet statement by include statement Added doc for undocumented parameters Task-number: QTBUG-34749 Change-Id: If4de95b8d39e5680fd0f63f8d2b6685a4b0a8052 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Make Q_NULLPTR be NULL on C++98Thiago Macieira2014-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers actually have a C++11-like null pointer constant in C++98 mode: $ gcc -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null $ icc -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null $ clang -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null Change-Id: Ie0bcaf36fed6ad27e761a0a24332817129128571 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Introduce Q_DECL_CONST_FUNCTION and Q_DECL_PURE_FUNCTIONGiuseppe D'Angelo2014-03-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | That expand to __attribute__((const)) and ((pure)). A "const" function is a function allowed to examine only its arguments, without modifying them. A "pure" function is also allowed to read memory. Currently working only on GCC/ICC/Clang, MSVC lacks these. Change-Id: Ie60a0847b193fb88e116f61611dc571296a3df1c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-285-17/+26
|\| | | | | | | | | | | | | Conflicts: src/network/access/qhttpthreaddelegate.cpp Change-Id: Ia15372687c93cd585967b006c0baaac3a5f29e91
| * automate handling of generated headers some moreOswald Buddenhagen2014-02-281-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | let the syncqt + qt_module_header.prf pair handle generation of forwarding headers. in qtbase this is ineffective to some degree, as the need to create QtCore's forwarding headers early for QtBootstrap requires qtbase.pro already doing the real work, but at least we get the verification that nothing breaks. Other Modules (TM) will need the full functionality. Change-Id: Ifd3dfa05c4c8a91698a365160edb6dabc84e553f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Doc: Replace obsolete types with their newer counterpartsSze Howe Koh2014-02-251-1/+1
| | | | | | | | | | | | | | | | | | This patch ignores: - Docs for obsolete types themselves - Comparisons between new and obsolete types Change-Id: Id9b1e628255113e7c44520abe0f8a4e0db4a283d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Document qPrintable encoding issuesKai Koehne2014-02-251-1/+6
| | | | | | | | | | | | Change-Id: I8936203afaa100ac4665ed668f7729fc8da1d445 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Fix typo in QLibraryInfo::build()Sergio Ahumada2014-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before: Config: Using QtTest library 5.4.0, Qt 5.4.0 (Feb 20 2014), GCC 4.6.3, 32 bit, release build) <QtBuild>Qt 5.4.0 (Feb 20 2014), GCC 4.6.3, 32 bit, release build)</QtBuild> after: Config: Using QtTest library 5.4.0, Qt 5.4.0 (Feb 20 2014, GCC 4.6.3, 32 bit, release build) <QtBuild>Qt 5.4.0 (Feb 20 2014, GCC 4.6.3, 32 bit, release build)</QtBuild> Change-Id: Ia4c9f994ef7e834831c78e8dbc00a52e06c0ed9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * QLibraryInfo: mark build() function as nothrowMarc Mutz2014-02-212-2/+2
| | | | | | | | | | | | Change-Id: Ie95fa52e4e00fd0747d3554c9f2a4d8076faaaf6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Loosen checks for Q_COMPILER_VARIADIC_MACROSKai Koehne2014-02-201-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we did bind the definition of Q_COMPILER_VARIADIC_MACROS to C++11 (so gcc, clang will not define it in default gnu++98 standard). However, variadic macros are a feature of the gcc preprocessor since version 2.97, and are enabled in the default configurations on gcc, clang, icc. This might cause warnings and errors though if one enables additional warnings in gcc, clang (e.g. by -pedantic). Anyhow, as a precedent qglobal.h already relies on 'long long' ... The warning can be disabled by adding '-Wno-variadic-macros'. [ChangeLog][Compiler Specific Changes] Variadic macros are now enabled more liberally for gcc, clang, icc. If you have warnings (because you e.g. compile with -pedantic), disable them by -Wno-variadic-macros. Change-Id: Ie979b85809508ad70cab75e6981f20496429f463 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Bump Qt version to 5.4.0Thiago Macieira2014-02-201-2/+2
| | | | | | | | | | | | Change-Id: I9eea1d2e383aff7eec4817b17c098a6fcc03e041 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add the option of using decltype() in Q_FOREACHThiago Macieira2014-02-191-3/+8
| | | | | | | | | | | | | | | | | | This should allow more compilers to use the shorter & simpler version of the macro. Change-Id: Ibd2bf20f479b707a7806d0265a5580ebfc2e7733 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Redo the Q_FOREACH loop control without GCC statement expressionsThiago Macieira2014-02-191-7/+17
|/ | | | | | | | | | | | | | | | | | It's possible to do without them, which probably makes the number of supported compilers a lot bigger: they just need to support decltype() or __typeof__. That includes the Intel compiler. The old code was also apparently working, but no one had realized the old workaround for some old version was still in place. The loop overhead is more or less the same. I have not done benchmarks, but inspection of the generated assembly shows more or less the same number of instructions. Change-Id: I32d499c84a6ddd19d994b49f17a469acb5c3a3f1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-171-0/+1
|\ | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
| * Added #include "qnumeric.h" to qglobal.hGlen Mabey2014-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | Including qnumeric.h causes QtGlobal to have all of the functions that the documentation indicates that it brings. Task-number: QTBUG-36715 Change-Id: Ib08ccc18a85dfe4ecd18ef1dfbfec3e90ab8ec2c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Initial support for the Intel Compiler 14.0 on OS XThiago Macieira2014-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | ICC 8 and 9 are positively ancient. I doubt anyone is using them for Qt, let alone Qt 5. ICC 11 through 13 haven't supported OS X. ICC now masquerades as Clang, so we need to let qmake and qcompilerdetection.h know about it. Change-Id: If0d2bd8b6a4a45250c15c9472c062effc76f17de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Work around ICC 14 bug: __attribute__((deprecated)) with textThiago Macieira2014-02-161-1/+1
| | | | | | | | | | | | | | | | Apparently it doesn't like the text. Change-Id: If8e14df84f0d9915018eac94df16bf1b679155e0 Reviewed-by: Keith Gardner <kreios4004@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Extending the inputMethodQuery APIPaul Olav Tvete2014-02-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, inputMethodQuery() only provides information about the current paragraph. On some platforms, such as Android, the input method needs information about the global cursor position, and more of the surrounding text. Some queries need to pass parameters. The current inputmethodQuery() implementation does not allow parameters to be passed. Changing this would require new or modified virtual functions, which is not possible until Qt 6. Therefore, a completely new mechanism is needed. Change-Id: Ic64fd90198ade70aa0fa6fa5ad3867dfa7ed763c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Dynamic GL switch on WindowsLaszlo Agocs2014-02-142-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces a new build configuration on Windows which can be requested by passing -opengl dynamic to configure. Platforms other than Windows (including WinRT) are not affected. The existing Angle and desktop configurations are not affected. These continue to function as before and Angle remains the default. In the future, when all modules have added support for the dynamic path, as described below, the default configuration could be changed to be the dynamic one. This would allow providing a single set of binaries in the official builds instead of the current two. When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are never defined. Instead, the code path that has traditionally been desktop GL only becomes the dynamic path that has to do runtime checks. Qt modules and applications are not linked to opengl32.dll or libegl/glesv2.dll in this case. Instead, QtGui exports all necessary egl/egl/gl functions which will, under the hood, forward all requests to a dynamically loaded EGL/WGL/GL implementation. Porting guide (better said, changes needed to prepare your code to work with dynamic GL builds when the fallback to Angle is utilized): 1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to differentiate between desktop and ES where needed. Keep in mind that it is the desktop GL header (plus qopenglext.h) that is included, not the GLES one. QtGui's proxy will handle some differences, for example calling glClearDepth will route to glClearDepthf when needed. The built-in eglGetProcAddress is able to retrieve pointers for standard GLES2 functions too so code resolving OpenGL 2 functions will function in any case. 2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds, but never "angle" or "opengles2". 3. The preprocessor define QT_OPENGL_DYNAMIC is also available in dynamic builds. The usage of this is strongly discouraged and should not be needed anywhere except for QtGui and the platform plugin. 4. Code in need of the library handle can use QOpenGLFunctions::platformGLHandle(). The decision on which library to load is currently based on a simple test that creates a dummy window/context and tries to resolve an OpenGL 2 function. If this fails, it goes for Angle. This seems to work well on Win7 PCs for example that do not have proper graphics drivers providing OpenGL installed but are D3D9 capable using the default drivers. Setting QT_OPENGL to desktop or angle skips the test and forces usage of the given GL. There are also two new application attributes that could be used for the same purpose. If Angle is requested but the libraries are not present, desktop is tried. If desktop is requested, or if angle is requested but nothing works, the EGL/WGL functions will still be callable but will return 0. This conveniently means that eglInitialize() and such will report a failure. Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will tell which implementation is chosen. The textures example application is ported to OpenGL 2, the GL 1 code path is removed. [ChangeLog][QtGui] Qt builds on Windows can now be configured for dynamic loading of the OpenGL implementation. This can be requested by passing -opengl dynamic to configure. In this mode no modules will link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will dynamically choose between desktop and Angle during the first GL/EGL/WGL call. This allows deploying applications with a single set of Qt libraries with the ability of transparently falling back to Angle in case the opengl32.dll is not suitable, due to missing graphics drivers for example. Task-number: QTBUG-36483 Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>