summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QDir: Do not assume that root ends with a slashOrgad Shaneh2014-01-221-4/+5
| | | | | | | | | Root can also be "//server" Task-number: QTBUG-35402 Change-Id: I25250b7dcb10cba7b676a0c88b64a402494d7481 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Conditionally disable deprecated warningsKurt Pattyn2014-01-211-2/+6
| | | | | | | | | | Warning C4786 has been removed from MSVC2013. Warning C4231 has been removed since MSVC2003 .net. Added #ifdef statements to only suppress these warnings when the compiler versions supports them. Change-Id: I47d6116bc02cdeef6b2172be0b09d105af9d0059 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Retain compiler warning stateKurt Pattyn2014-01-211-2/+5
| | | | | | | | | Added push and pop pragma warning statements. Suppression of warnings should not propagate to user code. Therefore, suppression of warnings is restricted to the file where it is used. Change-Id: Ib7973cbc0205ebbe75e002d035e44fd9b447460f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix cd(), cdUp() QDir member functions docs regarding nonreadable dirsBartosz Brachaczek2014-01-201-2/+2
| | | | | | | | | | | | | | The documentation implies that cd() and cdUp() functions return false if the new directory is not readable, but that is not the case. It is an obvious mistake in the documentation, because cd'ing into a nonreadable directory is perfectly valid. Provided also with a test to verify that cd() actually returns true with nonreadable directories. Change-Id: I4aa3e859b35c64266df510a203574e3701aea77c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typos in QUrl::toAce() documentation.Mitch Curtis2014-01-181-1/+1
| | | | | Change-Id: I6b101c57c537523fb48e57985e1d69c4327a67aa Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix crash when constructing a QVector with an empty initializer list.Volker Krause2014-01-181-5/+9
| | | | | | | | | Data::allocate(0) returns a pointer to read-only memory, updating d->size will segfault. The safety check for this exists in all other QVector ctors already. Change-Id: Ida0fe4182de56ee62c7f91e8652cfafbfd7b8410 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Fix compilation of qdatetime.cppSergio Ahumada2014-01-181-2/+2
| | | | | | | | | Adding std:: to pow() to make it compile for BlackBerry 10. Change-Id: I9ab3cc626eb2ba872c09df33cdb820b50d075428 Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize QDateTime string parsingJędrzej Nowacki2014-01-171-11/+31
| | | | | | | | | | The patch reduces amount of allocations during string parsing by using QStringRef. The operation is safe as neither QDate nor QTime uses QString as a storage type Change-Id: Ib9f40d86e8e420653ac4fe8ba883d554331ffc32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QCommandLineParser not crash if passed a bad QCommandLineOptionThiago Macieira2014-01-161-1/+2
| | | | | | | | | | | This otherwise crashed: QCommandLineOotion opt("with=equals"); parser.isSet(opt); Can't write a unit test because it produces a warning. Change-Id: Ifc67f20bb4b16b96d93dffbe4e82e6cc8a17584d Reviewed-by: David Faure <david.faure@kdab.com>
* Do not consider a signal to be connected if only a signal spy is installed.Volker Krause2014-01-162-5/+6
| | | | | | | | | | | | | This fixes QtQuick key handling not propagating key events beyond the specific onXPressed handlers, due to erroneously thinking those exist, when signal spy callbacks are present. Considering signal spies for isSignalConnected() goes back to 87239ef6 in Qt4, and seems to be there just due to this code being based on activate(), where this check obviously makes sense. Change-Id: Iad41e42a8d3ee2a16a55be7d1a7cdc51484981ce Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Android: Don't register main thread on loading libraryEskil Abrahamsen Blomfeldt2014-01-164-6/+8
| | | | | | | | | | | | | | | | | | | When building with debug, all SLOT or SIGNAL macros will expand to a function call, and then function will call QThreadData::current(), which will set QCoreApplication::theMainThread if it has not already been done. Since Qt Widgets has these macros in the static initialization of the library, we would register the Android main thread as the main thread of Qt, which would mean that the actual application object was created on a different thread than the main thread. This caused warnings to appear, and also triggered a race condition which caused widget applications to sometimes show a black screen instead of content on startup when run with the OpenGL plugin. Task-number: QTBUG-35048 Change-Id: Ie8979f5e7cd5662f8d7dd276de9f94f27cc120b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: QStandardPaths implementationChristian Strømme2014-01-162-0/+333
| | | | | | | | | | | | | Adds standard paths implementation for Android. [ChangeLog][QtCore][QStandardPaths] Added QStandardPaths implementation for Android. Task-number: QTBUG-34631 Change-Id: I38673204a521a990438470c4e165105a2b02b7ad Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Add convenience function to get the API level.Christian Strømme2014-01-162-0/+22
| | | | | | | | | It's common to check the Android API level at runtime to determine what functionality is available. This change provides a convenient way to get the Android SDK version (API level) from c++. Change-Id: I88f65ae87e0fa8ac0affefffbd1b1bba855c9f46 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Bump Qt version to 5.2.2Sergio Ahumada2014-01-151-2/+2
| | | | | Change-Id: Ia7dd68e0a280d12eba28932b4c5edb9948310a1e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Document QAbstractItemModels::roleNames() better.Mitch Curtis2014-01-151-0/+28
| | | | | | | | | List all of the default role names, and mention that the function must be overridden if the model is used within QML. Change-Id: I6ced5ac74143dcb97c527da2a6a23aa9d21f70e5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix some typosKurt Pattyn2014-01-151-3/+3
| | | | | Change-Id: I673ad09e458438b921fa093190bd983e8f9749b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MIPS DSP build system fix and additional optimizations.lpapuga2014-01-144-0/+502
| | | | | | | | | | | | | | | | | | | | | | | | Changed MIPS DSP portion of the mkspecs/features/simd.prf file in order to fix the corrupted build system for MIPS platforms. List of the additionally optimized functions from file src/gui/painting/qdrawhelper.cpp: - qt_blend_rgb16_on_rgb16 - qt_fetchUntransformed_888 - qt_fetchUntransformed_444 - qt_fetchUntransformed_argb8565 from file src/gui/image/qimage.cpp: - convert_ARGB_to_ARGB_PM_inplace from file src/corelib/qstring.cpp: - ucstrncmp - toLatin1_helper - fromLatin1_helper Change-Id: I5c47a69784917eee29a8dbd2718828a390b27c93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Do not print test output to both stdout and system debug logKai Koehne2014-01-131-1/+1
| | | | | | | | | | | | | | | Avoid piping the test output to both the Windows system debugger, and stdout. This fixes duplicate output in Qt Creator, which displays messages from both sources. [ChangeLog][QtTestLib] The (default) plain text logger on Windows now logs to either the system debug log (in case no console is open), or stdout, not both. Task-number: QTBUG-34630 Change-Id: I35fe9f4a50cc660d79fad7dffa6d19659b2102ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix typos in commentsKurt Pattyn2014-01-131-6/+6
| | | | | | | | | Comments contained some typos. Comments have been replaced with the ‘official’ description from http://msdn.microsoft.com/en-us/library/8x5x43k7.aspx. Change-Id: I25dda0911735b4a0d4f306bc95bc984be0080e2f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QNX: Fix compiler warning about unused variable.Sérgio Martins2014-01-121-0/+1
| | | | | Change-Id: I16e4aa32647793bf36fee60ed94db69a6ae2d8ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDate - Fix parsing Qt::ISODateJohn Layt2014-01-111-0/+5
| | | | | | | | | | | | | | | | Fix parsing of ISO Date from being totally lenient to being semi-strict by requiring the separator positions to be non-numeric. [ChangeLog][Important Behavior Changes] Parsing of Qt::ISODate by QDate::fromString() and QDateTime()::fromString() is not as lenient as before, the date component separators are now required to be non-numeric. This means a string like "2000901901" will no longer be recognized as a valid ISO Date, but "2000/01/01" will still be even though it doesn't strictly meet the ISO format of "2000-01-01". Task-number: QTBUG-34141 Change-Id: I0e481144136c60d4cac61364b9b2c1d2cd1e78fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Fix isValid() if invalid QTimeZoneJohn Layt2014-01-111-0/+9
| | | | | | | Explicitly check that the QTimeZone is valid before trying to use it. Change-Id: Iec415a2cb07071502fe71ee5ac92a7657e818f99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale - Check day number is validJohn Layt2014-01-111-0/+3
| | | | | | | Check day number falls in valid range before using as array index. Change-Id: I8d7c203b97988633fe4c345d5e7002bba9c2c68b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qtbase compile with QT_NO_TEMPORARYFILETasuku Suzuki2014-01-101-1/+4
| | | | | Change-Id: I0211ed44513723392e3f50b76be10b95c0bcddd5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* 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>
* 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>
* 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>
* 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>
* | | QMetaType: Fix equality comparison of type-erased iterators.Stephen Kelly2013-12-131-2/+12
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-33997 Change-Id: I0d4da562540df0e3732769881ba124cb980f6b82 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | QMetaType: Fix copy of type erased iteratorStephen Kelly2013-12-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavior differs depending on whether the iterator is a value_type*, or a different class entirely. Ensure that the correct behavior is used when copying. Task-number: QTBUG-33997 Change-Id: Ib6db2a3c4a5aa861b851833a7f0ecb855a3e828f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | QMetaType: Rename template type of type-erased iterator operations.Stephen Kelly2013-12-121-6/+6
|/ / | | | | | | | | | | | | | | This struct is a specialization for the case that the const_iterator is a pointer to the value type. Reflect that in the type name. Change-Id: I0a4ac03840658056285080860baec8313746c71c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Make QTemporaryDir file name more randomKai Koehne2013-12-121-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | qrand() returns a number between 0 and RAND_MAX, which is only guaranteed to be bigger than 32767. Dividing it repeatedly means that the last bytes are always 0. [ChangeLog][QtCore][QTemporaryDir] Fixed bug in QTemporaryDir name generator that dramatically reduced randomness of the name. Change-Id: I90613a652e6384296aed827e2714fe63cd8797ee Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>