summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Fix MSVC warning about truncation from 64bit to 32bit int.Friedemann Kleint2013-04-061-1/+1
| | | | | Change-Id: Id3e2f148aa430045d32d61b61eabc3f7197cbbf0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Don't call virtual methods after the source model is destroyed.Stephen Kelly2013-04-052-1/+3
| | | | | | | | | | | | | Calling clear_mapping causes the persistent indexes to be queried, and mapped using map_to_source, so that they can be restored later. That is not the appropriate response to the source model being deleted because there won't be anything to restore. Simply clear the stored mapping information instead so that the source model actually exists when mapToSource is called by the framework. Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test that the CMake files create appropriate version variables.Stephen Kelly2013-04-051-1/+28
| | | | | | | Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QSaveFile: allow saving to a writable file in a non-writable directoryDavid Faure2013-04-053-17/+90
| | | | | | | | | | The only way to make this possible is to disable the atomic-rename-from-temp-file behavior. This is not done by default, but only if the application allows this to happen. https://bugs.kde.org/show_bug.cgi?id=312415 Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-04-032-1/+5
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-032-1/+5
| |\ | | | | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| | * qt.conf: default LibraryExecutables to bin/ on windowsOswald Buddenhagen2013-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this matches the platform-specific configure default. as a "side effect", this fixes the in-builddir execution of webkit examples, as the non-installed qmake now agrees with QLibraryInfo about the location of QWebProcess.exe. Task-number: QTBUG-30322 Change-Id: Id28f2c246e4bfda6d5f4d719a66a16f24bb7cdb7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| | * Doc: Fix typo in the property system documentationTopi Reinio2013-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | priorty -> priority Task-number: QTBUG-28756 Change-Id: I79138f49db78ee6d1b96e44585ae4c1565920b18 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | | Doc: Replaced canConvert() with canConvert(Int)Venu2013-04-031-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | This change amends my earlier change to make the function reference relevant to the example being discussed. Task-number: QTBUG-28204 Change-Id: I841a561ba117f83a96b8b4a3661cea2a7a3e47da Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | ApplicationState: Add new event class: ApplicationStateChangeEventRichard Moe Gustavsen2013-04-032-5/+9
| | | | | | | | | | | | | | | | | | | | | | This patch will follow up on e27ca37 (add more state to QT::ApplicationState), and add a new event class QApplicationStateChangeEvent with type Qt::ApplicationStateChange. Change-Id: Idee724f181f1fbb2321ddad7e0df00c88b3488b1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | qdoc: Use Q_QDOC in quuid.h to help qdocMartin Smith2013-04-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Some new ctor initializers were added that use curly braces. qdoc's dumb C++ parser can't handle curly braces in the ctor area; it thinks they are the body of the function. In this update, the Q_QDOC macro is used to isolate these problems so qdoc doesn't have to deal with them. Task-number: QTBUG-30254 Change-Id: Ie318e4ac58861f4ebd8a7b9f004d2677f850436e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Make sure QThreadData and QAdoptedThread object is destroyed at app exitjian liang2013-04-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-30134 Restore the lines in qcoreapplication.cpp removed by commit 950b35cf97ad398f97883efd2a18ee97994a8a9c to ensure QThreadData and QAdoptedThread object of main thread is destroyed at application exit. We don't set QCoreApplicationPriavte::theMainThread to 0 as before since it will be set to zero in QThreadData::~QThreadData() Change-Id: I8ee56aff5a933ce1d812b07fb00a29ed0839ab6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use Bionic's __pthread_cond_timedwait_relativeThiago Macieira2013-04-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The Linux futex interface uses relative timeouts anyway, so this avoids a double round-trip through clock_gettime: once in Qt code to calculate absolute from relative and once in libc for reversing. Glibc does not offer such a function because its pthread_cond objects use a kernel interface that works on absolute times. Change-Id: I8fbcd3f73d4364a16716b0eea17e8f5f9ab5cd05 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a function to do the relative waits, simplifying the code a littleThiago Macieira2013-04-021-3/+8
| | | | | | | | | | | | | | More to come. Change-Id: I108f23e94c322ad4e1466ff69100ad6af91d95e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Fix build on Android: libpthread is deficient and lacks functionsThiago Macieira2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Even if the monotonic clock is available, Android's Bionic lacks the pthread_condattr_setclock function, so we can't tell it to use the monotonic clock. Task-number: QTBUG-30450 Change-Id: I4f53708b1e834ff5d9462b3bf778b96c22662a04 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Reduce the likelihood of underflows in qFuzzyComparehjk2013-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | As indicated in the discussion of the bug report, this does not address the real problem but only reduces the frequency it occurs. Task-number: QTBUG-26453 Change-Id: I20ac3f41f52effb674bee6924ccdfd2f641576ef Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update the QMetaMethod::tag() documentation due to moc expanding macrosThiago Macieira2013-04-011-3/+11
| | | | | | | | | | | | | | | | | | | | | | Since 34a3b63dc7d3b09342647537d378f5a55d0c81f0 (Qt 5.0), moc expands macros to their defined values. This broke the example of tagging a method: in Qt 4, it never expanded anything, so the tag was always visible and extracted. Now it's necessary to avoid defining it to empty when moc is run. Change-Id: I89967f7f993cf8e14119b086f4dd5573b348646d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Document Q_REVISION macro betterAlan Alpert2013-04-018-5/+244
| | | | | | | | | | | | | | | | Previously it was only mentioned in properties.qdoc Task-number: QTBUG-18802 Change-Id: Iab23128c1567974154cdcce7412b2e1468bb846a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update QLocale data to CLDRv23Konstantin Ritt2013-04-013-4073/+4277
| | | | | | | | | | | | | | | | Say hello to Interlingua and Mongolian once again. Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3 Reviewed-by: Denis Dzyubenko <denis@ddenis.info> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Publish qEnvironmentVariableIs{Set,Empty}()Marc Mutz2013-03-301-7/+5
| | | | | | | | | | Change-Id: I81b960495c206024b4124cebf88b48b0c0d73619 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix typos in QBBSystemLocaleDataEl Mehdi Fekari2013-03-302-9/+9
| | | | | | | | | | Change-Id: Ic893cdf4a274af660fae7f39011851318f0d244b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QLocale: Report textDirection() by looking to the locale scriptKonstantin Ritt2013-03-301-13/+20
| | | | | | | | | | Change-Id: Ic562b0301271ba414d5d3ff75a308d84bd288f56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Document Q_OS_WIN* macrosTopi Reinio2013-03-291-1/+16
| | | | | | | | | | | | | | | | | | | | | | Fix the documentation for Q_OS_WIN32 and document Q_OS_WIN64 and Q_OS_WIN. Task-number: QTBUG-23120 Change-Id: Ie040c8deb6aeba326b6fafab302fadf4d93fa49f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | Doc: Replaced canConvert() with canConvert(int)Venu2013-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | This change makes the function reference more relevant to the example being discussed. Task-number: QTBUG-28204 Change-Id: I50bea45f1e11d7e1eef4bc6726ebb329151fbc3d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QEventLoop: fix race on 'exit' and 'returnCode' private membersDavid Faure2013-03-292-10/+14
| | | | | | | | | | Change-Id: I380046f386448783e3e4e93bde8cbe15b9b0279e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QMetaTypeId: use QByteArray, not QVarLengthArray, to construct type namesMarc Mutz2013-03-291-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, type-name strings for class template instantiations were constructed in QMetaTypeId::qt_metatype_id() by concatenating various bits and pieces into a QVarLengthArray<char>, presumably to avoid the dynamic memory allocation for small strings. Yet, when passing the result to qRegisterNormalisedMetaType, which takes a QByteArray, the QVarLengthArray was copied from, not by QByteArray::fromRawData(), but by QByteArray(const char*,int), which unconditionally results in a dynamic memory allocation after all. What's worse: the characters are copied twice: First into the QVarLengthArray, and then into the QByteArray. Remove the first of these copies by using QByteArray+reserve() to copy directly into the final QByteArray. Change-Id: Id915798a318fe97279a7cc0aca176544f99c7e86 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Populate includes, defines and pic flags in target interfaces.Stephen Kelly2013-03-271-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used by features in CMake 2.8.11. This matches the features in FindQt4 in that version of CMake, namely that the IMPORTED targets contain the appropriate INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS and that the qtmain.lib static library is automatically linked to on Windows by executables. Additionally, the INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately if Qt requires users to use position independent code. Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Make the inline CPU detection functions also staticThiago Macieira2013-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since qCpuHasFeature() checks the static qCompilerCpuFeatures variable and that variable's value might change depending on the compiler flags, it's best to ensure that the function is not subject to link-time merging. That would be bad if it happened when qCpuHasFeature() was used from a file with higher CPU compiler settings than the default, as it would incorrectly conclude that certain features are always available. Change-Id: I8bacde056fb89869ec1d306a163742e72522315e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Fix a bug in QSystemLocale on BB10El Mehdi Fekari2013-03-262-18/+20
| | | | | | | | | | | | | | | | | | Call qt_safe_open in the constructor to avoid opening the pps files several times. Change-Id: I1bf79284850353a47ee1fc17797cd667536e17b1 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | QLocaleBlackberry - fix include statementsRafael Roquetto2013-03-261-3/+3
| | | | | | | | | | Change-Id: Ifb5678094806e4aab19015d3a600217b4cf9ac5f Reviewed-by: David Faure <david.faure@kdab.com>
* | Revert "Don't duplicate the 'top-level' include dir in all modules."Stephen Kelly2013-03-262-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This will likely fix some odd cmake related tests in the CI. This reverts commit 316d8ececa3314ec16baf46ec4f1c5440cd951ef. Conflicts: mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in src/corelib/Qt5CoreConfigExtras.cmake.in Change-Id: Ib7714746f96bf12061d92242a42296d200c56c00 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Document undefined behavior regarding Qt::ItemNeverHasChildren.Stephen Kelly2013-03-262-0/+6
| | | | | | | | | | | | Change-Id: I4c044b206ad6dd57f11d791d8a6a6f3f931acf4f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QNonContiguousByteDevice: roll back complete internal state in reset()Peter Hartmann2013-03-251-0/+7
| | | | | | | | | | | | | | | | ... otherwise we would not start reading from the beginning when the device was reset. Change-Id: Ida196eb40790fba56ff2eed782fd93a3015222f9 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | QNonContiguousByteDevice: reset() instead of seek() if possiblePeter Hartmann2013-03-241-2/+2
| | | | | | | | | | | | | | | | | | ... because e.g. QHttpMultiPartIODevice does not implement seek at all (QTBUG-30295), which would make resetting such a device fail. Change-Id: I0a9c0f21047baa72146690bfdf638cdffab0e25f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | match #ifdefs relating to arm compilationOswald Buddenhagen2013-03-241-1/+1
| | | | | | | | | | | | | | | | use the same conditional around the #include as the actual code below uses, otherwise we risk mismatches. Change-Id: I8ca32c0178b1970928626a927948b06d4c6d31b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Ensure QTemporaryFile can create files when an identical dir exists.Mitch Curtis2013-03-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QTemporaryFile attempts to create a new file in createFileFromTemplate, it fails if the filename exists and is a directory. Windows returns error code 5 (ERROR_ACCESS_DENIED) in this case - rather than ERROR_FILE_EXISTS - which is not handled. This patch handles ERROR_ACCESS_DENIED in addition to the already handled ERROR_FILE_EXISTS, meaning that QTemporaryFile will continue to look for unique names when a directory with the same name exists. Task-number: QTBUG-30058 Change-Id: I42339887d7f5483e3dc6a03a9da15111c350da8f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Fix race condition in QThread::setPriorityDavid Faure2013-03-234-41/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | The value of priority was read without the mutex locked, from within the thread. Had to extract a QThreadPrivate::setPriority method so that it can be called with the mutex already locked. So if the main thread calls setPriority while the thread is starting, it will be either be before or after the "re-set priority" code at thread startup, but at least not in the middle of it. Change-Id: I7a054f68623f61482c749274da66f3b2dcd8bcee Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Mark Q_UNUSED the private members that aren't usedThiago Macieira2013-03-234-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple Clang 4.2 has a new warning, letting you know when a private member isn't used by any member function (and, I guess, if the class has no friends): private field 'd' is not used [-Werror,-Wunused-private-field] Qt has a few of those for future expansion. It's not an error for us. Change-Id: Id2edb1159589572f97a07f93181c9c96c5dd983c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | QThread: fix race when setting the eventDispatcherDavid Faure2013-03-2213-54/+58
| | | | | | | | | | | | | | Use QAtomicPointer to make this thread-safe. Change-Id: If71f204699fcefabdb59bd26342d777d1cc9e2a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove racy setting of eventDispatcher to 0.David Faure2013-03-221-2/+0
| | | | | | | | | | | | | | | | | | This is inconsistent (e.g. the glib event dispatcher doesn't do this) and unnecessary (already done by QThreadPrivate::finish before deleting the event dispatcher, and by the QCoreApplication destructor). Change-Id: Ib98147953a5e71ec87aab0ec7ef5063bb7d80134 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | renameOverwrite: don't allow cross-partition copyingDavid Faure2013-03-221-1/+1
| | | | | | | | | | | | | | This matches the Unix behavior, and ensures atomicity (as required by QSaveFile) Change-Id: I54ec98bcd7a0714ca968cad627a5e4d684fd7af6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QThreadDataPrivate: fix data race on canWait boolean.David Faure2013-03-223-3/+10
| | | | | | | | | | | | | | | | postEvent() accesses it with the postEventList mutex locked, but processEvent() was checking it without any mutex locked. Change-Id: I31bbb50f7a1c337067b8e3de16ee7cd11400b517 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QEventDispatcherUNIX: turn interrupt bool into an atomic int.David Faure2013-03-222-7/+5
| | | | | | | | | | | | | | It's read and written by different threads, so this was a race. Change-Id: Ieffaa169eb67f40dc935291b3994f9ff1c7e05f0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-214-132/+188
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * Make QVariant docs refer to QMetaType::Type.Mitch Curtis2013-03-191-115/+165
| | | | | | | | | | | | | | Task-number: QTBUG-30014 Change-Id: Ie4c0df92345bcb79ef44fb6f345cba9fc934d32f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * Correct QDate and QTime documentation.Mitch Curtis2013-03-141-6/+2
| | | | | | | | | | | | | | Task-number: QTBUG-30055 Change-Id: I94c8e023f5e3d23ff2f1c74d0763b1c825deb3d1 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Correct QString's warnings involving QRegularExpression.Mitch Curtis2013-03-121-5/+5
| | | | | | | | | | | | | | | | | | | | Replaces "QRegularExpresssion" with "QRegularExpression" and adds some auto tests for the warning itself. Task-number: QTBUG-30054 Change-Id: Iba333a4388795eccca809fb430c295f503794263 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * Revert 6497649730daeab5d3dfac7e806105e99a237656 and clarify docs.Mitch Curtis2013-03-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It introduced a regression by requiring that a p/P was also present: QTime time = QTime::currentTime(); qDebug() << time.toString("h:mm:ss a"); // Outputs "10:05:42 am" in Qt 4.8. // Outputs "10:05:42 a" with 6497649730daeab5d3dfac7e806105e99a237656. This patch also clarifies the QTime::toString(QString) documentation. Change-Id: I4d73a959c2ca76304f03a4ce9717b540ad4e8811 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Fix static builds with ICUKai Koehne2013-03-121-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we actually link against the static version of the ICU libs for static builds. Task-number: QTBUG-29478 Change-Id: Ida7b439f11c5393bee43bfe804f9ec84bf272b34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge "Merge branch 'dev' into stable" into refs/staging/stableSergio Ahumada2013-03-20366-14395/+25015
|\ \