summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-19343-1504/+19432
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Change coreservices -> iosIan Dean2012-04-1924-54/+54
| | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* qdbusxml2cpp: fix build on WindowsKonstantin Ritt2012-04-191-0/+2
| | | | | | | | | bootstrapped process defines QT_NO_LIBRARY but QT_NO_LIBRARY is not supported on Windows Change-Id: I353a8690832e292522ed6c39a7e0ca19b0980e01 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not assert when QVariant is constructed from an invalid type idJędrzej Nowacki2012-04-193-4/+6
| | | | | | | | | | That change also fix moduleForType() which was wrongly recognizing negative ids as belonging to Core. New tests were added. Change-Id: I40a5819effb32489a45937011980457387c9f8be Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix memory leak when drawing text in non-common scriptEskil Abrahamsen Blomfeldt2012-04-181-3/+14
| | | | | | | | | | | | When the font engine cache was updated for new parameters, we would overwrite the cached engine, but not deref the old cached engine, thus it would never be deleted. This is manual cherry pick of 44c14470e5b28e45c19d6959b114e063cf3f4d83 from 4.8 branch. Change-Id: Ice2e555fe380dc9851ef490fa1a6928936ae4c35 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Optimized EGLFS backing store a bit.Samuel Rødal2012-04-181-8/+29
| | | | | | | | Avoid expensive image copying when possible. Change-Id: Ia79919ea7652d7bfdd744198c494c20cb78a0f48 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix unused variable warning.Stephen Kelly2012-04-181-0/+2
| | | | | Change-Id: I8daa2912e1c26e9e9f6bb77f64eb3e06c6715cce Reviewed-by: David Faure <faure@kde.org>
* Fix some unused variable warnings.Stephen Kelly2012-04-181-0/+3
| | | | | | Change-Id: I3ffbb155c0efa65bb33a0e2ce80dbd75dc56f3fc Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix some unsigned comparison warnings.Stephen Kelly2012-04-182-2/+2
| | | | | Change-Id: I4e72dbb6e207757c8bb75a7726c83ed5916df094 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix build with QT_NO_CLIPBOARD.Stephen Kelly2012-04-181-0/+4
| | | | | Change-Id: I82558e1e432934b98236d69106fb98e44e819095 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove todo comments that are no longer relevant.Kim Motoyoshi Kalland2012-04-182-5/+3
| | | | | | | | Task-number: QTBUG-25067 Change-Id: I5d3022a2881a3c6c97429f609fe567bd9970a046 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Revert "Fix memory leak of QFontEngineData"Lars Knoll2012-04-181-4/+4
| | | | | | | | | This reverts commit addffb71b45b5123ee449f0cfa4891dcab044a9f. The fix causes crashes on exit in Qt Declarative. Change-Id: Ib1fc67c27fb1869b7824ba080083da67b8878fff Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* change NSTextInput to NSTextInputClient in Cocoa pluginTasuku Suzuki2012-04-182-25/+23
| | | | | | | | NSTextInput protocol is slated for deprecation Task-number: QTBUG-23867 Change-Id: I3f9eadc31bdf4234c63f1bcde5172f22da8d340e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fixed libjpeg compiler warning about macro redefinition.Janne Anttila2012-04-181-1/+1
| | | | | | | | | | | When compiling Qt for Windows CE the MSVC reported the followin warning: warning C4005: '_CRT_SECURE_NO_DEPRECATE' : macro redefinition Fixed by adding ifdef quard for duplicate _CRT_SECURE_NO_DEPRECATE. Task-number: QTBUG-22512 Change-Id: I8c37ffe6ca275c80a7b7e6b23f39f3ab06b332f1 Reviewed-by: aavit <qt_aavit@ovi.com> (cherry picked from commit 1a1a8f004824b981865c6239747ff05d8e6f812a)
* remove useless workaroundMark Brand2012-04-171-2/+1
| | | | | | | | | | | | | | The workaround attempts to let the application reserve memory in QString for receiving the stored procedure output parameter. This does not work because the reserved capacity is not preserved through QVariant. Unfortunately, the application must actually populate QString with at least the number of characters that will be received. Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QTBUG-18435 fix stored procedure output parameters on ODBCMark Brand2012-04-171-5/+6
| | | | | | | | | | | | | | | | Follow-up to c55a99965d8c08d5f924d49db4fe4aa49df8096. 3 problems prevented stored procedure output parameters from working. - SQLBindParameter needs access to buffer provided by QByteArray. - The length of the buffer is measured in bytes. - A typo corrupted conversion back to QString. Also, data() makes more sense than constData() to expose the buffer. Task-Id: QTBUG-18435 Change-Id: I66444b13c0f584ed79bcf026e5a23caff83c22cb Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Only send progress bar updates when visible.Frederik Gladhorn2012-04-171-2/+4
| | | | | | | | | | | | | | | Screen readers tend to announce progress. Some applications (for example KMail) have hidden progress bars that update frequently. While the applications should be fixed, it's better not to spam the user with continous progress announcements. Ported from Qt 4 patch. Change-Id: I5f3b5a83dc80594d995b10e58527115de8601c77 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> (cherry picked from commit 90dc28900d3abfb00a65fef1d9daf36e727dfdca)
* Accessibility: Check for valid range of tree items.Frederik Gladhorn2012-04-171-0/+4
| | | | | | | This might lead to crashes otherwise. Change-Id: Ib28ac03b7d200571a0e759467eb692cfee3b05f3 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Use parentheses in statement with && and ||.Frederik Gladhorn2012-04-171-1/+1
| | | | | | | | Forwardport from Qt 4 Change-Id: I4f968559a7371b87343cb5825eb83b0099364cf2 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> (cherry picked from commit 330b0bece4d7805067f488c157532f9fb9b48bbc)
* QThreadPool: unify waitForDone() overloadsKonstantin Ritt2012-04-173-19/+5
| | | | | Change-Id: I1515a65fab37588372794422a43ed09ac076e108 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QThreadPool: optimize enqueueTask() for common caseKonstantin Ritt2012-04-171-12/+10
| | | | | | | | | | | the most-common case is: queue is empty or filled with tasks of the same priority; so the runnable would be put at the end of queue. both checks are cheap for us. also avoid detach()'ing by using const iterators Change-Id: Iab2255f852211f9accc8d717f778671661210ef3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* fix QChar::decompositionTag() returns wrong result for Hangul syllablesKonstantin Ritt2012-04-171-0/+2
| | | | | Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QChar::isPrint() returns an incorrect result.Konstantin Ritt2012-04-171-4/+12
| | | | | | | | results are now equals to results of ICU's u_isprint() for the entire set of the Unicode code points Change-Id: I763f4b37cccd285eb01543d486f25bd7ea011241 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed RGBA <-> BGRA bug in EGLFS backingstore.Samuel Rødal2012-04-171-1/+1
| | | | | | | | | Better to swizzle in the fragment shader than to do a byte swapping operation on the CPU. Change-Id: I01420c3a5ceb5309f5648e1f86979b025bdd88aa Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fixed MSVC compiler warning for zlib when compiling on WEC7.Janne Anttila2012-04-171-2/+6
| | | | | | | | | | | WEC7 mkspecs define _CRT_SECURE_NO_DEPRECATE globally. zlib redefined the same macro without checking if it is already defined. Added #ifdef guard to zlib when defining _CRT_SECURE_NO_DEPRECATE. Task-number: QTBUG-22512 Change-Id: I477b24b7bc0ebb4cd8a619b11668eceb0f5064d4 Reviewed-by: aavit <qt_aavit@ovi.com> (cherry picked from commit a0a970447d63e5c9afdb55d179d671d9c24e9061)
* Fix a thread safety issue with QTextLine::glyphRunsPierre Rossi2012-04-171-1/+7
| | | | | | | | | | | This is a very partial revert of 10ac80708. Revert back to using engineFromScript, which is reentrant, for cases other than the "rawfont mode". In that last case, reentrancy is not a big issue so far as the only client is WebKit, and this is used in the web process, with no threaded rendering. Change-Id: I047b04cf0236d52e6d548f34cddd3dcc7c3c5f83 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix memory leak of QFontEngineDataJian Liang2012-04-171-4/+4
| | | | | | | | | | | | | | | Move QFont::cleanup(); and cleanupThreadData(); to the end of destructor of QGuiApplicationPrivate class. This is because they will trigger the QFontCache::~QFontCache() function being called and at that time the platform_theme object still hold some fonts object, This will cause the QFontEngineData object hold by those fonts can never been deleted. Change-Id: I4d3f21c5e2683706f68395ba3ad24203081e1d1d Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add function getters in the native interfaceJørgen Lind2012-04-172-0/+33
| | | | | Change-Id: I4609071e38c3807479375ef98f260516da03ec15 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* QDoc: Write subclasses of namespaces in automatic ditamap.Casper van Donderen2012-04-171-13/+22
| | | | | | | Now we also write the subclasses of namespaces sorted to qt.ditamap. Change-Id: I4a4376bac208b9bacd5a2ddd5265faef13dc2eba Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Add some missing \internal for accessibilityJan-Arve Saether2012-04-171-0/+1
| | | | | Change-Id: I42c0a14908cfcccd2218f887b286515fef8d6611 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix out of bounds use of QVector API.Stephen Kelly2012-04-172-6/+7
| | | | | | | | | | | This is a regression introduced by commit 22b7d211865c1505862627a2e65bcd063e314e45. Task-number: QTBUG-24965 Task-number: QTBUG-25140 Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d Reviewed-by: David Faure <faure@kde.org>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-17417-20515/+19313
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge "Merge remote-tracking branch 'origin/master' into api_changes" into ↵Sergio Ahumada2012-04-17224-3390/+4995
| |\ | | | | | | | | | refs/staging/api_changes
| | * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-16224-3390/+4995
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | api: remove QWindow::moveGirish Ramakrishnan2012-04-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindow::setPos is the correct api. Change-Id: I5439338e9bc6933800d66331f20ce554b017c4fb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | | api: Fix const correctness of api in QScreenGirish Ramakrishnan2012-04-172-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const was missing in many convenience functions. grabWindow should not be const since it actually does something. Change-Id: I0ffa718878d4251c4fb5c34789cf58ebb85cff37 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | | api: Make QGuiApplication::styleHints() staticGirish Ramakrishnan2012-04-172-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Practically all functions in QGuiApplication are static. Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | | Make reallocData use QArrayData::AllocationOptionsJoão Abecasis2012-04-162-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Growth computations are deferred to QArrayData::allocate, except in the case of realloc as that functionality is currently lacking in QArrayData. Since that sits in library code, anyway, it can be changed later to use a future QArrayData::reallocate. As it is, reallocData is becoming a model for QArrayData::reallocate and what it can offer to containers of POD/movable types. Change-Id: I045483f729114be43e4818149d1be1b333bcbe13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Drop unnecessary assignmentJoão Abecasis2012-04-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this branch, !IS_RAW_DATA has already established that offset is sizeof(QByteArrayData) and realloc maintains the assumption. Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Migrate QByteArray over QArrayData.Jędrzej Nowacki2012-04-162-60/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the time being QByteArrayData keeps its independent existence, for the sake of other modules. Once they have been ported to use the new initializer macros it can be changed to: struct QByteArrayData { QArrayData array; }; Extra braces can then be added to the macros. With respect to source compatibility, the only concern is with other modules, as QByteArrayData has already changed in incompatible ways with Qt 4.x Done-with: João Abecasis Change-Id: I044e2a680317431777a098feec8839a90a3d3da3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Remove explicit checks for shared_null/emptyJoão Abecasis2012-04-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This eases porting to QArrayData and retains semantics. In append() and prepend() a conditional was generalized so that no work is done if there is nothing to add. Done-with: Jędrzej Nowacki Change-Id: Ib9e7bb572801b2434fa040cde2bf66dacf595f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | | Make QByteArray and QString keep track of terminating nullJoão Abecasis2012-04-164-46/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In conceptual terms, this change increments the Data::alloc member by one for all strings allocated and maintained by these classes. Instances initialized with fromRawData retain 0 as the member value, so they are treated as immutable. This brings QByteArray and QString closer to QVector, making it possible for them to reference and share the same data in memory, in the future. It also brings them closer to QArrayData. In practical terms all comparisons to the alloc member were changed to take into account that it also tracks the terminating null character. Aside from the increment in the alloc member, there should be no user visible changes. Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Show the type and address of QObjects in debug output.Stephen Kelly2012-04-161-1/+7
| |/ / | | | | | | | | | | | | Change-Id: I9f44ab80a6fb763adc9cbaf47de8e1b97212332d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * | api: fix constness of QOpenGLContext::getProcAddressGirish Ramakrishnan2012-04-162-3/+3
| | | | | | | | | | | | | | | | | | | | | Should be const just like Qt4's QGLContext::getProcAddress. Change-Id: I273467d5cf852cd49f48cec3f335c4ddac795363 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
| * | Update com.trolltech -> org.qtproject in the bootstrapped toolsThiago Macieira2012-04-162-18/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tools will now generate the new org.qtproject annotations only, matching the XML generator in the library. They accept both types of annotations as input though -- and will generate a warning about the older one. This commit should be backported to Qt 4, so XML files can start to be ported. Task-number: QTBUG-23274 Change-Id: If298c342ab4774cbca1be1898a01af8b46e80446 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
| * | Introduce the new UnknownProperty and PropertyReadOnly errorsThiago Macieira2012-04-163-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those error codes have been standardised for years but we haven't used them until now. Task-number: QTBUG-23274 Change-Id: Iebc9ded949f363281a4d43fd9d29a284f2e2df08 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
| * | Finish cleaning up com.trolltech -> org.qtproject in QtDBusThiago Macieira2012-04-165-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of uses of the annotations and error names, plus a bunch of local unit test names (including one file that had to be renamed). The meta object generator is updated to support both the old and new names. That means some references to com.trolltech *must* remain in the source code. Task-number: QTBUG-23274 Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
| * | Update the error codes in QtDBusThiago Macieira2012-04-162-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the old com.trolltech ones to org.qtproject and introduce Use the alternate domain name for the Qt Project because the dash character is not valid in interface and error names. Task-number: QTBUG-23274 Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| * | QHash security fix (2/2): enable QHash random seedGiuseppe D'Angelo2012-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Algorithmic complexity attacks against hash tables have been known since 2003 (cf. [1, 2]), and they have been left unpatched for years until the 2011 attacks [3] against many libraries / (reference) implementations of programming languages. This patch makes qHash use the QHash seed introduced in the previous commits, thus truly randomizing bucketing in QHash. [1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf [2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks [3] http://www.ocert.org/advisories/ocert-2011-003.html Task-number: QTBUG-23529 Change-Id: Ibee9cf6aa820af5d777fcde478647665c728052a Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| * | QHash: remove optimization for QHash<int, T>Giuseppe D'Angelo2012-04-141-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHash employs an optimization for int/uints, squashing the hash value and the key value inside an union. This obviously works iff qHash(int k) = k. If the hash value gets salted, the hash table is corrupted. This patch removes that optimization by means of a #if 0, so if further research finds out that we want those 4 bytes back it's pretty simple to revert. Change-Id: If273f0bf2ff007f4f2f7c46d2aab364a3b455cf1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>