summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Removed "url" variable from qdocconf files.Jerome Pasion2014-07-041-1/+0
| | | | | | | | url is set in qtbase/doc/global which is inherited by the Qt 5 module qdocconf files. Change-Id: Ieffa174f598f4a3b8ce8be9bfae7ca9b6981f12b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Add initializer list support in QJsonArrayJędrzej Nowacki2014-07-042-0/+39
| | | | | | | | | | | | | | It allows to create a QJsonArray instance in C++ by using a similar expression to JSON. For example: QJsonArray a = {1, 2, 4}; [ChangeLog][QtCore][QtJson] QJsonArray now supports C++11 initializer lists. Task-number: QTBUG-26606 Change-Id: Icc352e518d9649d24176c89e7113d200d5c50b0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tidy up and expand QSharedPointer documentation.Mitch Curtis2014-07-031-3/+24
| | | | | | | | Also adds the 5.4.0 changes file. Change-Id: I10967ca179b91229e7d1ee0fc666bbd8dbe54425 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typo in 'time' message pattern.Gunnar Sletta2014-07-031-1/+1
| | | | | Change-Id: I3f3861a0307aad9d5bb92c0fdeb719950aa370c8 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Ensure that QTemporaryFile clears all file mappings.Friedemann Kleint2014-07-033-3/+17
| | | | | | | | | | | Factor out code to clear all mappings into QFSFileEnginePrivate::unmapAll() and call that from QTemporaryFile. Task-number: QTBUG-39976 Change-Id: Ic1ceeba0ba4451866f1081fee430e5c458c0819d Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for initializer_list construction in QFlagsAdam Majer2014-07-022-0/+27
| | | | | | | | [ChangeLog][QtCore][QFlags] Added initializer_list constructor Task-number: QTBUG-39786 Change-Id: I36967c67b489c2a893fb031954f46f5243aba2c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix qRound64 Example documentationYAMAMOTO Atsushi2014-07-021-2/+2
| | | | | | | | | | Change Example code for qRound64. qRound to qRound64 and int to qint64. Task-number: QTBUG-39932 Change-Id: I6b423013ed539eaec396c84945e7a885b198aec4 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-0133-342/+412
|\
| * Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-0133-342/+412
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| | * Doc: Fix typo in QScopedValueRollbackKevin Funk2014-06-301-1/+1
| | | | | | | | | | | | | | | Change-Id: I9835b284d6bba5f7632cae6b179c6c1b08265e5c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Don't compare the target methods for SlotObject connectionsThiago Macieira2014-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new-style connection is created (a SlotObject), we don't store the method offset since there isn't one. So don't try to read it. Qt::UniqueConnection only applies to old-style connections, since we can't compare the slot objects for equality. In any case, an old-style connection and a new style will never be considered equal. Task-number: QTBUG-39927 Change-Id: I10a39a7bc97a2ec9509a0708038cc491bcc67329 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Elias Probst <mail@eliasprobst.eu>
| | * Add a comment stating QMutex::isRecursive should be made const in Qt6Olivier Goffart2014-06-261-1/+1
| | | | | | | | | | | | | | | Change-Id: I452b0764790112c59af77bc8d95f403ff37cbc4a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * Fix QMutex documentation saying some function are static while they are notOlivier Goffart2014-06-262-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdoc only see a fake QMutex class (the same as the one built in bootstrap) But that fake QMutex had static member while the normal QMutex class has non static member. QMutexLocker::mutex is also a const function in the real QMutexLocker Task-number: QTBUG-38522 Change-Id: I220434ffc6a9e990029f770e2536ecb55b4e2182 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * WinRT: no read-only paths in QStandardpaths::writableLocationOliver Wolff2014-06-261-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As FontsLocation, HomeLocation and RuntimeLocation are read- only on WinRT WritableLocation should return empty strings in these cases. In addition all the other options were added to the switch statement in writableLocation. Task-number: QTBUG-38581 Change-Id: Iab994556844e713c6fa02028a0ec824ecb5ee82b Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| | * Mark behavior of QFileInfo::absoluteFilePath as undefined in corner casesKai Koehne2014-06-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current description was misleading, since e.g. QFileInfo().absoluteFilePath() will always return an empty string. QFileInfo("").absoluteFilePath() however will return the current working directory ... Instead of documenting these small quirks we should rather mark the exact behavior as undefined, like we already do for absolutePath(). Change-Id: I70358413528429c2c2dee37480ad018aae26e6cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Fix logging file location docsFrederik Gladhorn2014-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | The location mentioned in the docs didn't work because it was wrong. Change-Id: I80bbc16bfecc5662317f9963299981266b95bba8 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| | * Fix QRingBuffer::readPointerAtPosition()Alex Trotsenko2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix condition to allow return a valid pointer when head != 0. Change-Id: I5215f7dfc44924016c2d9b67ab2d9935b5164d7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * Make the fetchAndAddRelaxed function a member templateThiago Macieira2014-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, no compiler can instantiate it at class instantiation time. We don't want them to do it for T that are function pointers (sizeof functions is meaningless). Change-Id: I6d5044bd5d9ffd0d347f1f38ab33c64213730788 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
| | * Doc: qInstallMessageHandler cannot return 0.David Faure2014-06-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 124044613dde9a9596312102ca377bc74ed08165 (in Nov 2011) changed that: the first call will return the builtin message handler, not 0. Change-Id: I535ad69639f2341f9b664a6e2e7b12802ae785e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Fix memory leaks in QFseventsFileSystemWatcherEngineErik Verbruggen2014-06-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Sprinkle in some NSAutoReleasePools. Task-number: QTBUG-38637 Change-Id: I0cb42d9d1cbcc4e9d273d0d43e4925fc02885b66 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
| | * Print the reason why SetWindowsHookEx failed.Sérgio Martins2014-06-231-1/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-14301 Change-Id: I4733a57034259b013864bf91aba6cce2f411ab48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Move most of the QLibraryPrivate initialization to its constructorThiago Macieira2014-06-213-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the setting of the loadHints to inside the constructor or to QLibraryStore::findOrCreate (which is under a mutex). This avoids data race conditions with two threads asking for the same plugin at the same time, with different load hints. This also opportunistically moves the setting of the error message for empty file names. Task-number: QTBUG-39642 Change-Id: I497a41781d10e407d6420116a0b05fdfe2b548de Reviewed-by: David Faure <david.faure@kdab.com>
| | * Fix data race on QLoggingCategory when using qDebug from multiple threadsDavid Faure2014-06-203-19/+56
| | | | | | | | | | | | | | | | | | | | | setEnabled() would race with isEnabled()/isDebugEnabled()/etc. Change-Id: I2004cba81d5417a634b97f5c2f98d3a4ab71770d Reviewed-by: David Faure <david.faure@kdab.com>
| | * fix QT_SUPPORTS macro with msvc2008Oswald Buddenhagen2014-06-201-1/+5
| | | | | | | | | | | | | | | Change-Id: I70ffba51d2672574d7cefc3cb44724341cd86f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Attempt to fix intel compiler build error.Jędrzej Nowacki2014-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h(625): error #68: integer conversion resulted in a change of sign Task-number: QTBUG-39678 Change-Id: Ifb175bdcad820aa58cc0a1bcf6985a164376baf5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QEventDispatcherWin32: Use a shared class name for the message window.Friedemann Kleint2014-06-191-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a global-static struct storing atom and class name for the message window to be shared between threads. This prevents RegisterWindow()/UnregisterWindow() of different threads (using exec()) from interfering and silently failing. Task-number: QTBUG-39471 Change-Id: I9bc1106a41f64749c55825a96973921bb831458f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| | * Fix compilation with the Intel compiler on certain systemsThiago Macieira2014-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | We require the intrinsics from immintrin.h, so include it unconditioanlly with that compiler. Change-Id: I4a17676631f9d89e2d22e486f40c9b177ca06c1e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Bump versionOswald Buddenhagen2014-06-181-2/+2
| | | | | | | | | | | | Change-Id: I867c3b4aecc82095e65bd7f820e7fe6d14005705
| | * Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-142-5/+15
| | |\ | | | | | | | | | | | | Change-Id: Icd073d40ce10ab4733b997036815795dd3fbaac1
| | | * Fix case insensitive comparisons using QCollatorLars Knoll2014-06-122-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ICU the strength parameter decides whether a comparison is case sensitive or not. Fix mac comparison code. It can't have worked before. Added some basic automated testing for QCollator. Change-Id: I2646c464fd22ccd3a93c461fa3dba4bd1d4c7b4b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | QProcess: Handle spurious socket notifications for stdout and stderrThiago Macieira2014-06-123-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Unix systems where the GUI event dispatcher uses a notification system for socket notifiers that is out of band compared to select(), it's possible for the QSocketNotifier to activate after the pipe has been read from. When that happened, the ioctl(2) call with FIONREAD might return 0 bytes available, which we interpreted to mean EOF. Instead of doing that, always try to read at least one byte and examine the returned byte count from read(2). If it returns 0, that's a real EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation. That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get notifications and those use kevent (and, apparently, an auxiliary thread) instead of an in-thread select() or poll(). That means the event loop would activate the QSocketNotifier even though there is nothing to be read. Task-number: QTBUG-39488 Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | Don't try to read from invalid file descriptors in QProcessThiago Macieira2014-06-123-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strace reveals that we do ioctl(-1, FIONREAD) and get EBADF. The only case where this could happen is inside _q_processDied, which calls the read functions without checking if the pipe is still open. Change-Id: I67637fc4267be73fc03d40c444fdfea89e1ef715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | QProcessPrivate: merge the functions dealing with stdout and stderrThiago Macieira2014-06-125-131/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code. Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | Rename QProcessPrivate::destroyChannel to closeChannelThiago Macieira2014-06-125-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QProcessPrivate::Channel object contains some structures that may survive the closing of the pipe, so calling this function "destroy" is incorrect. Let it be just the closing. For symmetry, the createChannel() function is renamed to openChannel(). Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | Move the QProcessPrivate Windows objects into QProcessPrivate::ChannelThiago Macieira2014-06-123-67/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the previous commit, this simplifies the code. Change-Id: Ia02b9b5174b4bc6fd04ec2534231b7db5fc914fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | Move the QProcessPrivate channel buffers into QProcessPrivate::ChannelThiago Macieira2014-06-124-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code. Change-Id: I70b26af69332f364d856042f114c37a70504d66f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | Doc: correct the format of Q_PLUGIN_METADATA macro in sample codesZhang Xingtao2014-06-121-1/+1
| | |/ | | | | | | | | | | | | Change-Id: I464a0c0a590b0b90cf0fe7ccd448ee9bf704bd4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Merge "Merge tag 'v5.3.0' into HEAD" into refs/staging/stableSergio Ahumada2014-06-111-3/+3
| | |\
| | | * Merge tag 'v5.3.0' into HEADOswald Buddenhagen2014-06-111-3/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 5.3.0 Release Conflicts: src/plugins/platforms/cocoa/qcocoaintegration.mm Manually removed call to setWindow in src/plugins/platforms/cocoa/qcocoawindow.mm to follow 1ac0f953ba70ceda76e90918ab4ae7ebe2339969. Change-Id: Ieddedf4cd7b47effce6b6865fb9c48df6c5838a7
| | | | * Update Copyright year in commercial nag screensv5.3.0Kai Koehne2014-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I70420c44c018dbe733a50badb7f9f7f419459f7a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * | | Fix QT_NO_SETTINGS build in QLibraryInfo.Steffen Imhof2014-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One reference to QSettings was only guarded by QT_BOOTSTRAPPED. Change-Id: I2f9761ee88b4a45edb16054fdba3c3f11fec12ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * | | Doc: QAtomicInteger first appeared in Qt 5.3David Faure2014-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I900e5b0ec8291d34685cb545540a5a9f54551d05 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Fix documentation about QStringLiteralKai Koehne2014-06-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fallback for QStringLiteral in case C++11 features are not enabled is QString::fromUtf8(), not QLatin1String(). Also, the result of a QStringLiteral expression _is_ a QString. Change-Id: Ib9c2f4c13fff237de3acb2e0f64027bacea6271c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Android: Use exceptionCheck() function.Christian Strømme2014-06-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the only place where we didn't use the exceptionCheck() function. Besides being more consistent, it's also more verbose if an exception occurs. Change-Id: Ib1e3dba82b0730cf189ec725f4da425d7ac85cdc Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | | | | Save the _MSC_VER variable instead of <unknown version>Thiago Macieira2014-07-011-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That way, for future or old versions, we at least will know which version it is. For example, for MSVC "14.0" (compiler version 19), it produces "MSVC _MSC_VER 1900". Change-Id: I86dcaea8e4b23bd052288cea5663b267da31c890 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | | Make QFreeList constexprThiago Macieira2014-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's still not a literal type because the destructor is not constexpr Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | | qHash overload for Q{Explicitly,}SharedDataPointerKevin Funk2014-06-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interestingly, before that patch this compiled fine: typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr; Ptr p(new QSharedData); auto hash = qHash(p); This was because both Q{Explicitly,}SharedDataPointer overload 'operator bool()' => qHash(int) was accepted. This, however, doesn't make sense. Someone should probably take care of applying the safe bool idiom to these classes as well. Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | | Emit a notifications when targetState and targetStates are changed.BogDan Vatra2014-06-302-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to properly use QAbstractTransition object in QML we need to know when these properties are changed. Change-Id: I5449ecf3fce33e164f645d7263f21b20abfcd026 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | | Emit a notifications when senderObject and signal are changed.BogDan Vatra2014-06-302-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to properly use QSignalTransition object in QML we need to know when these properties are changed. Change-Id: I7ca318d50513086146b85eaeee4dabbcdef8c299 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | | | Add QEnableSharedFromThis classRoman Pasechnik2014-06-293-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It enables you to get a valid QSharedPointer instance to 'this', when all you have is 'this'. Task-number: QTBUG-7287 Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c Reviewed-by: Richard J. Moore <rich@kde.org>