summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-1333-202/+202
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* d-pointerize QWinOverlappedIoNotifierJoerg Bornemann2014-01-132-72/+104
| | | | | | | | | Preparation for removing the qt_windows.h include from qwinoverlappedionotifier_p.h. Change-Id: I27ab3891962327ab5db75fbfcc3cf57c50a0d1c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Update the time zones database from CLDR v.24Konstantin Ritt2014-01-131-845/+851
| | | | | | Change-Id: Icab298f971980982412621a48c635a05f6ef5d36 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Update the internal CLDR tables up to v.24Konstantin Ritt2014-01-133-4359/+4541
| | | | | | | Change-Id: I9c0b110e36dd80c6a0b7275aa13bc548419aca9c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
* Compile fix for Windows PhoneAndrew Knight2014-01-131-1/+3
| | | | | | | | Shlobj.h should not be included on Windows Phone. As it isn't needed for WinRT in general here, exclude it. Change-Id: I1eaa50ab8825d2f43d59272c841673c3e9e1e12a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QTimeZone - Change from Olson ID to IANA IDJohn Layt2014-01-118-101/+101
| | | | | | | | Complete changes from using Olsen/Olson in the code to IANA. Completes a change started in 5.2 release branch on the public occurrences. Change-Id: Ib077fcda2c77eef6f04ec28901d8d2d7210b8c72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* BlackBerry: Add a private PPS APINehme Bilal2014-01-117-2/+1768
| | | | | | | | | | | The PPS API is needed to implement other Qt APIs on BlackBerry. It is a private API that cannot be accessed from outside Qt (*_p). Change-Id: Id33d2f9a415f49d51812ae860a15e8cc5636676b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-105-17/+21
|\ | | | | | | Change-Id: I99af0bef7f1c931533a324ebcfb27c40ee871a5e
| * Fix function-not-used warnings detected by Clang 3.4Thiago Macieira2014-01-101-6/+6
| | | | | | | | | | | | | | | | | | | | These functions have been turned to static (although inline), which means they need to be used or marked as possibly unused. qglobal.h:712:37: error: unused function 'qFuzzyCompare' [-Werror,-Wunused-function] Change-Id: Ie2ee713d26c86e0574b579c1ea42b9404c3d2035 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * don't make msvc see digraphsOswald Buddenhagen2014-01-091-1/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-35816 Change-Id: I996a86233f771d6a466c5c5eb6116df14cd00dbd Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Ensure that the Qt5Core library does not contain "QTMETADATA ".Friedemann Kleint2014-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | In the event the plugin loader encounters it due to some configuration problem, it is otherwise detected as a plugin causing a crash when trying to read the meta data. Task-number: QTBUG-35970 Change-Id: I34182b3a61125e3b192dfd4b1dc03bd1e98c693e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Don't define MAC_OS_X_VERSION_MIN_REQUIRED on iOSTor Arne Vestbø2014-01-061-7/+10
| | | | | | | | | | | | | | | | | | | | Lack of the define is commonly used (and recommended by Apple) as a way to distinguish iOS from OS X. Task-number: QTBUG-35888 Change-Id: I5f3327e001c0af630984fbfde780d9b0c3e30754 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * Fix include guard typo.Sérgio Martins2014-01-061-2/+2
| | | | | | | | | | Change-Id: If9400eb5965c739334b3638731e7c80834de72b8 Reviewed-by: David Faure <david.faure@kdab.com>
* | Add QTypeInfo<T>::isIntegral traitThiago Macieira2014-01-091-13/+30
| | | | | | | | | | | | | | | | | | | | This allows us to know whether a given type is an integer or not. It's going to be useful for QAtomicInteger, to know whether certain operations can be performed on the type. Change-Id: Ie64b24993e4021b44c97952d7d3973759fef3d4c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Use the new UTF-8 codec in QUrl and QUrlQueryThiago Macieira2014-01-091-120/+66
| | | | | | | | | | | | | | | | The new code is based on what QUrl already had, so this should have no net effect in performance. Change-Id: Ibb2fabd5a108e99a44e0e6e3f713ce2f8b26e4d7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Use the new UTF-8 codec in QJsonDocumentThiago Macieira2014-01-093-79/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | The encoder is in qjsonwriter.cpp, which requires special handling for ASCII due to the use of escape sequences. The decoder is in qjsonparser.cpp, which only scan one character at a time. As a side-effect, the JSON parser now reports the UTF-8 error in the first character with error, instead of the last. This is probably what should have been expected. Change-Id: I52e5bc30d71466b6a36098b4150c61b2e385d8e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a new UTF-8 decoder, similar to the encoder we've just addedThiago Macieira2014-01-093-87/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like before, this is taken from the existing QUrl code and is optimized for ASCII handling (for the same reasons). And like previously, make QString::fromUtf8 use a stateless version of the codec, which is faster. There's a small change in behavior in the decoding: we insert a U+FFFD for each byte that cannot be decoded properly. Previously, it would "eat" all bad high-bit bytes and replace them all with one single U+FFFD. Either behavior is allowed by the UTF-8 specifications, even though this new behavior will cause misalignment in the Bradley Kuhn sample UTF-8 text. Change-Id: Ib1b1f0b4291293bab345acaf376e00204ed87565 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a new UTF-8 encoder and use it from QStringThiago Macieira2014-01-093-46/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new and faster UTF-8 encoder, based on the code from QUrl. This code specializes for ASCII, which is the most common case anyway, especially since QString's "ascii" mode is actually UTF-8 now. In addition, make QString::toUtf8 use a stateless encoder. Stateless means that the function doesn't handle state between calls in the form of QTextCodec::ConverterState. This allows it to be faster than otherwise. The new code is in the form of a template so that it can be used from QJsonDocument and QUrl, which have small modifications to how the encoding is handled. Change-Id: I305ee0fd8523cc4ec74c2678cb9ea88b75bac7ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Optimize QObject::senderSignalIndex to only iterate the d->senders once.Milian Wolff2014-01-092-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObject::senderSignalIndex is, combined with ::sender(), the current hotspot in the QWebChannel which makes heavy use of it in its 1-to-many QSignalSpy implementation. This patch optimizes the senderSignalIndex by only iterating over the linked senders list once, instead of twice. I.e. it first iterated over it to find the signal index, then again to find the sender to convert to a method-offset. Change-Id: Ic86aed0dce891b87b953a6ec2364a81695bd4876 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Add QVarLengthArray::{indexOf,lastIndexOf,contains} functionshjk2014-01-092-0/+88
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QVarLengthArray] Added the indexOf, lastIndexOf and contains functions to QVarLengthArray. These functions make the class more similar to QVector. Change-Id: I9bd2b22bd8b7151c2d17aede36e5f2126570600b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Send DynamicPropertyChange event only when value is changed.Tomasz Olszak2014-01-091-0/+2
| | | | | | | | | | | | | | | | | | According to docs DynamicPropertyChange event should be sent from setProperty function only when property is added, removed or changed. Change-Id: I080a27a4119a63580b03172f4b5b367338c6f440 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-01-081-1/+0
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-1/+0
| |\| | | | | | | | | | Change-Id: I0b021b369725b73f09faa14b9da9e2431dc24fad
| | * Remove disabling of warning 4660 on MSVCThiago Macieira2014-01-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This warning no longer exists since at least MSVC.NET 2003. It's reported to have existed on MSVC 6 and older only. Task-number: QTBUG-35815 Change-Id: Ifb35d027edc3c1cbadac9a0d0a9c26524c52c87f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Move no-pch extra compiler to common featuresAllan Sandfeld Jensen2014-01-081-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we add more classes with RValue ref qualified methods we will need the same _compat trick and no-pch support as QString. This patch moves the extra compiler to precompile_header.prf which is automatically included when pch is used. Change-Id: I422a355fd11f499ce0648a90b0385f2a6f699fcb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Mark QTzType as Q_PRIMITIVE_TYPE.Sérgio Martins2014-01-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | sizeof(QTzType) == sizeof(void*) on my platform, so it will benefit from the type info classification. Change-Id: I07146372da4381dba72da3718bc9c0b76a22b4fb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Windows/Windows CE: Do not dynamically load shell32/coredll.Friedemann Kleint2014-01-072-32/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those libraries are contained in QMAKE_LIBS_CORE and GetSpecialFolderPath() is present in all supported versions. Change-Id: Iae40714e0f234625b063aeb50e29fc79c4aaa6ea Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Prevent foolish use of setuid when using Qt.Richard J. Moore2014-01-073-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to prevent people from shooting themselves in the foot, abort if we're running setuid. This behavior can be disabled by calling QCoreApplication::setSetuidAllowed(true) in order to support legacy code. [ChangeLog][QtCore][Important Behavior Changes] Running Qt applications that are setuid has been prevented. If you really need to do this then you can call QCoreApplication::setSetuidAllowed(true) before creating the QCoreApplication instance. Change-Id: I992a9a0cd8420693d438852a05666e3dbb2c9d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | WinRT: Clean up core event dispatcherAndrew Knight2014-01-073-139/+88
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move private classes in the .cpp file (they aren't needed outside) - Conform to Qt style, such as includes and braces - Use ComPtr where appropriate - Use foreach where appropriate - Remove non-functional wake/interrupt leftovers - Remove redundant timer list - Make the timer callback a static method, so it won't crash if it gets called on shutdown Task-number: QTBUG-35945 Change-Id: I5426fba2735e908a04ea60287f9936f5abde6644 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-036-45/+56
|\| | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * Add missed header to qfileselector.cpp.Ivan Komissarov2014-01-031-0/+4
| | | | | | | | | | Change-Id: I2fd6fb2ae1663730a008221f6beeef19a5307246 Reviewed-by: David Faure <david.faure@kdab.com>
| * Fix some typos in documentation.Jeff Tranter2014-01-022-3/+3
| | | | | | | | | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2e946fda0bd9a2117f8e9b2fb300df9bf0a98a6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Improve QFileSelector docAlan Alpert2013-12-301-27/+36
| | | | | | | | | | | | | | | | | | Mostly just adding proper tags and sections, as well as a few grammatical fixes. Change-Id: I219517d740fa7385e923a9e09cb7e241378fcbdd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Doc: Polish Qt::ConnectionType descriptionsSze Howe Koh2013-12-301-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Shorten Qt::AutoConnection description, rearrange to match the order of the subsequent rows. - Note the thread used in Qt::DirectConnection - "Emitter's thread" is ambiguous -- a signal is not necessarily emitted from the thread that the emitter lives in. - Misusing Qt::BlockingQueuedConnection WILL (not "can") cause a deadlock. Qt even issues an error message before it freezes. - Remove the \note command -- it breaks the table and displays the note in a new paragraph. Change-Id: Ib60cb665e0cd23e1e072402ec5d8be344b8454f7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Fix ‘looses precision’ warning in public APIKurt Pattyn2013-12-272-4/+4
| | | | | | | | | | Change-Id: I935e6f278e539f8e6aaca0bc381371ec85aa5c67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Extend multimedia keysAllan Sandfeld Jensen2014-01-021-0/+5
| | | | | | | | | | | | | | | | | | Extends the Qt keycodes with four missing keys, common on remote controls: Guide, Info, Settings and Exit. Change-Id: I6789f13dbb662da4261a3c947757644e12306dd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Retain space settingKurt Pattyn2013-12-241-6/+22
| | | | | | | | | | Change-Id: I4584de9ba51610907c917a0e0ddf5f6f28d304a0 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-2412-78/+63
|\| | | | | | | Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
| * Doc: corrected broken linksNico Vertriest2013-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-34749 Corrected link to drag and drop example. Corrected link to {mandatory fields} Created target referring to macros for defining plugins Change-Id: I387a2d9bab428b2eacd8d371f08c72f42f7e2be2 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Fix qlocale_blackberry buffer initializationRafael Roquetto2013-12-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QVarLengthArray inside qlocale_blackberry.cpp was being preallocated with 512 bytes, that means internally it could grow up to 512 bytes using the stack before switching to the heap, but its actual semantic size was still 0. After qt_safe_read(... buffer.data() ...) was being called, data was written to the QVarLengthArray buffer, but its semantic size was still 0, since it was not resized or anything. This triggered an assertion when buffer[bytes] = '\0' was assigned, since 'bytes' > buffer.size() ( == 0) despite buffer.capacity() == 512. Change-Id: I5503ee9b02413794f67730700fba05a4c194d465 Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Introduce Q_ATTRIBUTE_FORMAT_PRINTFHarald Fernengel2013-12-173-62/+20
| | | | | | | | | | | | | | | | Removes a lot of copy-paste code for flagging printf style functions. Change-Id: Iecc1e312d1f28b5cbb6b297039f1cdbbc888f843 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * qthread_win.cpp: Fix warnings when waiting for adopted threads.Friedemann Kleint2013-12-171-1/+5
| | | | | | | | | | | | | | Task-number: QTBUG-35591 Change-Id: I63169bd8a9758a7dad33d4231d3d6c9d71c7e252 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Clarify foreach's documentation on valued-containersAlejandro Exojo2013-12-171-3/+5
| | | | | | | | | | | | | | | | | | | | - Explain that values() is unnecessary and causes an extra copy. - Replace "are fastest" with "are faster". - Briefly explain the snippet. Change-Id: Iff1d3a0b6140fca1d78157aeeca3d538c4d78b84 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Use the short time format of the current locale on WindowsThiago Macieira2013-12-161-2/+10
| | | | | | | | | | | | | | | | Windows 7 and later have LOCALE_SSHORTTIME, which is what we need. Task-number: QTBUG-33718 Change-Id: I4c3f113d17102a37fb752de56f06b312f27c7887 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * CMake: Generate config-specific moc parameters file.Stephen Kelly2013-12-161-0/+1
| | | | | | | | | | | | | | | | | | When using the visual studio generators, a moc parameters file for each configuration is generated. The content differs because the -DQT_NO_DEBUG may be added or not, depending on the configuration. Change-Id: I52eae536289d451df72df2e4dba709851279694a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-12-163-6/+17
| |\ | | | | | | | | | refs/staging/stable
| | * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-123-6/+17
| | |\ | | | | | | | | | | | | Change-Id: I0cd3b1b33e6d9bec729d941b06aeeb3d21851820
| | | * Fix QtDeclarative and QtQml co-existence part three ;(v5.2.0Simon Hausmann2013-12-062-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the QObject destroyed callbacks for QtQml and QtDeclarative can't be called in sequence, because if the QQmlData has the ownsMemory bit set, then the destroyed callback will delete the QQmlData, and the sub-sequent call to the destroyed callback of qml1 will try to dereference the QQmlData's first bit (ownedByQml1), which is already destroyed. This patch fixes that by simply sharing the assumption of the first bit indicating module ownership (QtQml vs. QtDeclarative) also to qtbase and using it to distinguish between which destroyed callback function to call. Task-number: QTCREATORBUG-10273 Change-Id: I2773a31a3e9b3a1c22d1c1f33b2f29f3296cb3cf Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | | * Windows command line parsing: Do escape backslash.Friedemann Kleint2013-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will break network paths passed as command line arguments. Introduced by 4ff6951550cb6e39c3b31895c3af57037e90c9ac . Task-number: QTBUG-35432 Task-number: QTBUG-30628 Change-Id: Ice9ce15275ef69e9e9e82daf5a303e7c56294368 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Simon Hausmann2013-12-2312-92/+179
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/dev