summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Revert path() behavior to not expand a current path on a driveAndy Shaw2014-03-041-1/+1
| | | | | | | | | | | | | | | | | In the original change - cfb44c6528b2518274bf157388832d1d610ce0e4 - when querying for the path of a file that did not contain a slash after the drive indicator it would get the current path and return that as the path that the file resided on. However this meant that it would take the current path at that time which may not be the actual path that was expected. So it was decided that it should revert back to the original behavior which was to just return the drive letter followed by the colon which would thus indicate still that it represented whatever the current path was on that drive. Change-Id: Ic57ae9227882a66e9a4c4d6537d7f2cae829165a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Mention that QSortFilterProxyModel::lessThan() handles floatsSze Howe Koh2014-03-041-0/+1
| | | | | | Change-Id: Iaf97d22fad3724d1910b18b6d38a06eae4c909ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Clarify QJsonValue::fromVariant() type conversionsSze Howe Koh2014-03-041-12/+40
| | | | | | | | | | It wasn't obvious before that many QMetaType types get converted to the same QJsonValue type. Change-Id: I7bb02cb10b6c8a873e291cdf1e16c6c821d51208 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: fix Q_ASSERT exampleJoerg Bornemann2014-03-041-1/+1
| | | | | | | Task-number: QTBUG-37162 Change-Id: Ifef8a976d29125251d7d87028c29deee4353e10a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Atomics: implement fetchAndSub on top of fetchAndAddThiago Macieira2014-03-041-6/+2
| | | | | | | | | Instead of looping unnecessarily on top of testAndSet. Task-number: QTBUG-37031 Change-Id: I8120f8405eb76dccc9066749cee0a92b0f2da20e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix some typosSergio Ahumada2014-03-032-2/+2
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* 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>
* Fix ARM atomics for 8- and 16-bit typesThiago Macieira2014-02-271-10/+44
| | | | | | | | | | | This has apparently never worked for any negative value. That's because the compiler sign-extends the incoming expectedValue to fill the 32-bit register, instead of zero-extending it, and it also expects any returned values to also be sign-extended. Task-number: QTBUG-37031 Change-Id: I836eddba7b1acc56bb0ac1d41de7001d06255b9b Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Android: Make default permissions less confusingEskil Abrahamsen Blomfeldt2014-02-261-0/+3
| | | | | | | | | | Add comments to explain the magic placeholders for default permissions and features, and move the INTERNET and WRITE_EXTERNAL_STORAGE permissions from the manifest so that we use the same mechanism for all default permissions. Change-Id: Ia62dd4314c1c10eb201b5203772ffe88b1ce7a04 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Logging: Change 'rules' section name to 'Rules'Kai Koehne2014-02-262-3/+3
| | | | | | | | | This is more consistent with e.g. qt.conf, where section names also start with an upper case character. Change-Id: I9ddaf72baeb9334d081807412512242d5d46cbbf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Replace obsolete types with their newer counterpartsSze Howe Koh2014-02-255-30/+30
| | | | | | | | | 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>
* Fix link to argument formats in QString::setNum documentationKai Koehne2014-02-251-2/+2
| | | | | | | | Also drop mentioning of 'F', which is (though supported) not mentioned in the linked section. Change-Id: I9bf763f25b8b0309c338adbf3d63d94678ecee5e 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>
* QAssociative/SequentialIterable: add missing \since 5.2J-P Nurmi2014-02-251-4/+4
| | | | | | Change-Id: Ia78fa0d70c85f06f48c3bbab47370e15008abe03 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QJNI: optimize QSharedPointer creationMarc Mutz2014-02-241-1/+1
| | | | | | | | | | Instead of QSharedPointer<T>(new T), use QSharedPointer<T>::create(), since the latter co-locates the refcount and the T instance in a single memory allocation, unlike the first form, which uses separate memory allocations. Change-Id: I5095ac43448aad9a7e3ec07ed4dcdca869bcd9e8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix compilation on armv5Eskil Abrahamsen Blomfeldt2014-02-241-0/+14
| | | | | | | | | | | | | | | | | Two changes broke compilation on armv5, where we're currently not CI-testing: 634f82f1f1fda7983abf70b58e43c580b1f01df0 changed the signature in a function definition without changing its declaration, while it was actually intending to add this as a new overload. bfe0db6fbea6376dbe395af6d76995a54bbc3b49 added an #error condition without fixing compilation on armv5. I don't know if the fix is correct, but at least it compiles. Task-number: QTBUG-37034 Change-Id: If99142fafb9bd55afc20b17f8b3cce5ee0ffec13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArrayList: optimize op+Marc Mutz2014-02-241-3/+2
| | | | | | | | | | | | The old code creates a default-constructed QByteArrayList, then performed two list-appends, the first one of which just performs assignment. Optimize by replacing the default construction and assignment with a copy constructor call. Change-Id: I6d5bd14172798c925b05bd3602e6d1d037d90796 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Doc: Address some "No documentation for..." QDoc warningsSze Howe Koh2014-02-242-6/+14
| | | | | | | Task-number: QTBUG-36985 Change-Id: I8619fb77e7879399064281f7bbefe5f12d3849a2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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>
* Fix off-by-one error: the next ASCII character is next oneThiago Macieira2014-02-221-2/+2
| | | | | | | | | The bit scan function returns the index of the last non-ASCII character. The next ASCII is the one after this. This means all the benchmarks were made while reentering the SIMD loop uselessly... Change-Id: If7de485a63428bfa36d413049d9239ddda1986aa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-221-2/+2
| | | | | | | | | | | Profiling showed that Qt Creator spent 2% of its load time normalizing signals and slots. By pre-normalizing everything, we ensure that there is no runtime cost. Profiling after this commit and the others in this series shows that the cost dropped down to zero. Change-Id: Ifc5a2c2552e245fb9a5f31514e9dd683c5c55327 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Make QTextDecoder use our qt_from_latin1 codeThiago Macieira2014-02-222-6/+6
| | | | | | | | | | | | Disassembly shows the Intel compiler does expand to SIMD, but a much worse code than ours. Clang 3.4 does generate a compact SIMD version, probably of the same quality as our hand-written code. And GCC 4.7 through 4.9 don't generate SIMD at all. So let's use the most efficient version. Change-Id: I418e201a774ac0df1fb2b7a7d9589df7c9b655db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make sure all containers compile in strict-iterator modeThiago Macieira2014-02-222-3/+3
| | | | | | | | | | | | | | | | | | Unit-test this by making the QList, QVector, QHash and QMap unit tests be duplicated under strict-iterator mode. There's no test for QLinkedList. The tst_Collections test does not compile under strict-iterator mode. It generated over 15000 errors when I tried. The strict iterators required a small change: the difference_type typedef needs to match the operators that get distances (operator-(iterator)) and move the iterator around (+, -, +=, -=, etc.). Task-number: QTBUG-29608 Change-Id: I834873934c51d0f139a994cd395818da4ec997e2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.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>
* QMarginsF - Add new QMarginsF classJohn Layt2014-02-214-0/+655
| | | | | | | | | | | | Add a new QMarginsF class to complement QMargins in the style of QSize/QSizeF and QRect/QRectF. [ChangeLog][QtCore] Added class QMarginsF to support handling margins with floating-point values. Change-Id: Iaaa95ec85f5d126d9d864fc4b607241a8c8a8f3a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QRect - Add missing QMargins subtraction operatorJohn Layt2014-02-212-0/+15
| | | | | | | | [ChangeLog][QtCore][QRect] Added QMargins subtraction operator. Change-Id: I64d449e2bae81a34df2cd019cff3fb186f8aaaae Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QMargins - Add missing operatorsJohn Layt2014-02-212-0/+68
| | | | | | | | | | | Add missing standard operators. [ChangeLog][QtCore][QMargins] Added missing addition and subtraction operators. Change-Id: I6aeed39531a736c12d378a817a9431279da79bc4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QRect - Move QMargins operatorsJohn Layt2014-02-214-99/+99
| | | | | | | | Move QMargins operators to QRect file, change include sequence. Change-Id: I0e2ad91859ae65eb67c6ece50f8e4037516b463e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Blackberry: Fix QFileSystemEngine::tempPath()Sergio Ahumada2014-02-201-2/+2
| | | | | | | | | | | | Fall back to /var/tmp instead of /tmp if neither TMPDIR nor TEMP are set. /tmp is not a true filesystem on BB10 but rather a symbolic link to /dev/shmem For more info see http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/user_guide/fsystems.html#RAM Change-Id: Ie690ed74ffd81b52ef4623458c3ff88629aee00a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash: use prime numbers when rebucketingGiuseppe D'Angelo2014-02-191-8/+17
| | | | | | | | | | | | | | | | | | | | | QHash uses an array representing the difference between 2^i and the next prime; when growing, it calculates 2^x + array[x] (with `x' representing the "hash table size in bits"). For some reason lost in history the differences are actually wrong and the calculation above leads to using composite numbers. Hence: use the right sequence and always produce primes. The right sequence is actually A092131 from OEIS: http://oeis.org/A092131 Note that the sequence starts at A(1), but we need A(0) too. Also we truncate the sequence to when growing too much, just like the old code did, and use powers of two in that case instead. Task-number: QTBUG-36866 Change-Id: Id2e3fc9cb567c0fdca305dee38f480e17639ca04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Merge remote-tracking branch 'origin/dev' into stableOswald Buddenhagen2014-02-19201-17267/+22358
|\ | | | | | | Change-Id: Ice524edcc51373509f0023ae7f7c2963f4602f88
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-183-34/+42
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/android/qandroidplatformtheme.h Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
| * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-174-16/+21
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
| * | | Remove a not required whitespace when writing JSON in compact formatLars Knoll2014-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-36682 Change-Id: I0c1c0de850504c8dff20a5ae724cc868d9f983f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add the rest of the non-volatile members of std::atomic to QBasicAtomicThiago Macieira2014-02-164-3/+656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][Atomic support]Added more operations to the atomic classes, including operator T(), operator=(T), operator++, operator--. For the QAtomicInteger, bit-manipulation operations are also provided, both in operator and in fetchAndXxxYyyyyy modes. Change-Id: I39c07be74e15e0a48f9e931f4342b182004dee1a Reviewed-by: David Faure <david.faure@kdab.com>
| * | | Add a testAndSet overload to the atomics that returns the current valueThiago Macieira2014-02-1610-30/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is extremely useful, since the most common action after a failed compare-and-swap is to loop around, trying again with the current value as found in memory. Code currently written as: do { Type value = atomic.load(); ... } while (!atomic.testAndSetRelaxed(value, desired)); Becomes: Type value = atomic.load(); do { ... } while (!atomic.testAndSetRelaxed(value, desired, value)); In most CPU architectures, the value that was found in memory is known to the compare-and-swap code, so this is more efficient than the previous code. In architectures where the value is not known, the new code is no worse than before. The implementation sometimes modified an existing function, sometimes it added a new one, depending on whether more registers were needed in the assembly (like ARMv6-7), the code became more complex (ARMv5), the optimizer failed (C++11), or it was just plain equivalent (MIPS). Change-Id: I7d6d200ea9746ec8978a0c1e1969dbc3580b9285 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@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>
| * | | Centralize the merging toFloat conversionsThiago Macieira2014-02-164-59/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QByteArray version was missing the overflow check that the other versions had. Change-Id: I03cd92e5e5a84c038bee1f1ee217e93e9d9a675a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | Add qHash() overloads for floating-point typesMarc Mutz2014-02-162-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation is based on GCC's implementation of std::hash<FP>, but only to the extent of checking for zero before hashing the bits. The bit hasher is the Qt one; I didn't even look what GCC uses. The check against 0.0 is mandated by the requirement to have \forall x,y: x == y => qHash(x) == qHash(y) which would be violated for x = 0.0 and y = -0.0 if we only hashed the bits. Implemented out-of-line to avoid potential FP-comparison warnings, as well as to be able to use the file-static hash() functions, which gets inlined unlike qHashBits(), which cannot be. [ChangeLog][QtCore][QHash/QSet] Allowed to use float, double and long double as QHash/QSet keys. Change-Id: I38cec4afb860f17e9f8be7b67544e58b330f8fff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * | | Android: Add enablers for listening to activity resultsEskil Abrahamsen Blomfeldt2014-02-152-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you launch an activity through an intent, data can be provided back from the activity when it has finished using onActivityResult() in the activity which launched it. This is okay for applications, since they can easily create their own activities, but does not work for libraries that need to use intents. There is no listener API for activity results which allow external classes to eavesdrop. In order to support launching intents from third-party or add-on libraries, we provide a low-level way to hook into the activity result event. The corresponding public API will be added to QtAndroidExtras. Change-Id: I89417f485e2c0e69028dcccc7c155788346a7417 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
| * | | Add const overload for QLoggingCategory::operator()()Kai Koehne2014-02-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 85e57653 caused a compile error for code that does Q_DECLARE_LOGGING_CATEGORY(cat); //.. qCDebug(cat()) << // ... error: C3848: expression having type 'const QLoggingCategory' would lose some const-volatile qualifiers in order to call 'QLoggingCategory &QLoggingCategory::operator ()(void)' This is a regression from Qt 5.2. Fix the error by adding a const version of operator()(). Change-Id: I2fb04f2e155962adee0f98089fc5a159000bef56 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Revert "Logging: Don't use for loop in qCDebug macros"Kai Koehne2014-02-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of if {} else {} in the macro causes compiler warnings about "ambiguous 'else'" if qCDebug is used in an if / else without brackets. Revert to the for loop, but make the variable name less likely to clash. This reverts commit bab5f5873680aa3c5a22d94da112aafd2b0b53d3. Task-number: QTBUG-36605 Change-Id: Ie4b075b63b83b7f8a2ad61437b7bf3e6a6c0177a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | WinRT: Exit process event loop if WaitForMoreEvents is not setOliver Wolff2014-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic74a75a56ba3f014b108e96d7a79a8623e6fa1d1 Reviewed-by: Andrew Knight <andrew.knight@digia.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>
| * | | Mac: FSEvents-based QFileSystemWatcherEngine.Erik Verbruggen2014-02-144-2/+659
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FSEvents to monitor changes in the filesystem instead of the kqueue implementation. This removes the limit of wathed files: kqueue uses a file descriptor for each file monitored, for which the ulimit was set by default to 256. Now the OSX implementation on par with the other major desktop platforms. Change-Id: I2d46cca811978621989fd35201138df88a37c0fb Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
| * | | Let Q_DECLARE_LOGGING_CATEGORY and Q_LOGGING_CATEGORY return a const referenceKai Koehne2014-02-143-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general QLoggingCategory should be treated as a const object that's configured by the backend. The only legitimate place where user code should call setEnabled is in a CategoryFilter ... [ChangeLog][QtCore][Logging] Make Q_LOGGING_CATEGORY and Q_DECLARE_LOGGING_CATEGORY return a const object. Change-Id: I6140442ab48286e05cd3b55064a502bbe6dfb16a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add function to get the actual PID from QProcessChristian Strømme2014-02-142-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was not possible to get the actual process ID (in a cross-platform manner) from QProcess, as the user would need to handle the returned typedef (Q_PID) differently on Unix and Windows. On Unix Q_PID is the actual process ID, but on Windows it's a pointer to a PROCESS_INFORMATION structure, which among other fields contains the process ID. Instead of returning a pointer on Windows, QProcess::processId() will return the actual process ID on both Windows and Unix. [ChangeLog][QtCore][QProcess] Added processId() to QProcess. This function will, unlike pid(), return the actual process identifier on both Window and Unix. Task-number: QTBUG-26136 Change-Id: I853ab721297e2dd9cda006666144179a9e25b73d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>