summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22700-14282/+14282
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QFlags: don't provide a constructor from void**Marc Mutz2012-09-221-1/+2
| | | | | | | | | | | | | | | | Use a pointer-to-member instead of void** for Zero, the type that is used to accept only a literal 0, but not other ints, as QFlags ctor arguments. This was developed while trying to find the cause for a build failure in the qCompare<QIcon> specialisation after adding underlying-enum detection to QFlags, and it didn't help, but I think it's a saver alternative to void**, in particular since the ctor in question is implicit. Change-Id: I71c67b0b50e9404e4e42836d09d62663296f58af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* A step out from Harfbuzz (reduce dependency)Konstantin Ritt2012-09-224-64/+101
| | | | | | | | | | | | | | | | | Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt (in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm which has been moved from HB to Qt (well, most of it)). Rename some members to better reflect their meaning, remember to keep HB_CharAttributes in sync with QCharAttributes. Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct that will be replaced with a more efficient/friendly solution a bit later. The soft hyphen and the mandatory break detection has been factored out of the default text breaking algorithm to a higher level in order to refactor the QCharAttributes bitfields and to optimize the implementation for the common case. Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Document that date/time formats without separators are unsupported.Mitch Curtis2012-09-211-3/+3
| | | | | | | | | | The code is not handling formats like "HHmm ss" correctly, so it needs to be documented until such support is provided. Task-number: QTBUG-26067 QTBUG-26596 Change-Id: Ia456d8020e3e0aa9422e6e6987ac984f308facf9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add comments to document the internals of QMutexOlivier Goffart2012-09-212-4/+54
| | | | | Change-Id: Ieb5632017e5e8e09a11dc6b929efa19b4f350086 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* don't require a fake qconfig.h for the configure bootstrapOswald Buddenhagen2012-09-191-1/+1
| | | | | Change-Id: I3d1224ad19b9e5278e35cf7c5142a29ccb589140 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Split the qt_message_output function in twoThiago Macieira2012-09-191-31/+74
| | | | | | | | This way, I can ensure that the noreturn qFatal function calls a noreturn function as its last action. Change-Id: I6db7aa2539af430414645f386d7fce87cdb97186 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QVarLengthArray: provide STL-compatible member function namesMarc Mutz2012-09-192-0/+50
| | | | | | | | | This allows, among other things, to use QVarLengthArray as the target of a std::back_insert_iterator. Change-Id: I507f612a23da854bf865780aa0a7e6312f4a896b Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QTimer::singleShot take a pointer-to-const QObjectGiuseppe D'Angelo2012-09-192-7/+7
| | | | | | | | | | | The obvious idea is that a connect() happens behind the scenes. As QObject::connect takes a pointer-to-const, singleShot should do that as well. Change-Id: I36433c723441294b2088b23f0c37724ab43d9503 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove qUpperBound usages from qtbaseGiuseppe D'Angelo2012-09-193-3/+7
| | | | | | | | | Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-192-6/+8
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Introducing NoDropShadowWindowHint window flagGabriel de Dietrich2012-09-182-4/+5
| | | | | | | | | | Added suppport on QCocoaWindow. Also we deprecate WA_MacNoShadow since it isn't used anywhere, and updated the 'windowflags' example app. Change-Id: Id0b453ba15a23b768b0615838597bca139f507ad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Core: Fix gcc warning about signed/unsigned integer comparisonKai Koehne2012-09-181-1/+1
| | | | | | | Fix warning: 'comparison between signed and unsigned integer expressions' Change-Id: I5ce2857115137f9a06eddc74fda55ae49e37d345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QElapsedTimer: Fix typo in restart() documentationJonathan Liu2012-09-181-1/+1
| | | | | Change-Id: Iac5df9edbe16ec841f783bc5266091a6e34e9cab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2012-09-181-1/+5
| | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Let qVersion() be extern "C" if this is not a namespace buildThiago Macieira2012-09-181-1/+13
| | | | | | | | | | | This allows one to even dlopen() QtCore and call qVersion, to figure out which version it is. A bit crazy, but someone might want to do it. Change-Id: I932460515d07bed3f0e41c8ab2b46fc268ca73ff Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Exclude QIcuCodec when QT_NO_TEXTCODEC is definedJ-P Nurmi2012-09-162-0/+8
| | | | | | | Change-Id: Iec0178c427abcc1c79e4fe6ef449d399ac8ca363 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-144-7/+7
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QRecursiveMutexPrivate to qmutex.cpp and mark inlineThiago Macieira2012-09-142-14/+15
| | | | | | | | | | | | | | | | | Disassembly of the optimised code shows that the compiler was already inlining the bodies of one or both functions (since they're in the same .cpp, it's allowed to do that). However, since there was no "inline" marker, the compiler was also emitting an out-of-line copy, which wasn't used by anyone, as the class is not exported. So add the marker. To make sure that they don't get used by accident elsewhere, the class is moved to the .cpp file too. Change-Id: Iead578ec9c7d8dd6b4e6bb582ce5b829cdec5992 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove QBasicAtomic::tryLock with a timerThiago Macieira2012-09-141-2/+2
| | | | | | | | | | The non-futex implementation does not support timed locks in QBasicMutex. That is only supported in QMutex (due to the destructor). Change-Id: I46d33a66a36e05c8a4344823537178e80a6ddd76 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* #include the qmutex_xxx.cpp at the end of qmutex.cppThiago Macieira2012-09-141-1/+10
| | | | | | | | This produces slightly better inlining results. Change-Id: Ie86471577f888cb2d9c9989306ec69ce0a296108 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use storeRelease to unlock a mutex instead of fetchAndStoreReleaseThiago Macieira2012-09-141-1/+1
| | | | | | | | We're not checking the result anyway, so use a simpler operation. Change-Id: I8c2db35be86660b29d81dd97ce3e269de55a37df Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Avoid calling QElapsedTimer::nsecsElapsed before the first futex sleepThiago Macieira2012-09-141-4/+8
| | | | | | | | | | The first time we're going to sleep, the timeout should be exactly the value that was passed by the user. We don't need to calculate the time elapsed between start() and a few lines below. Change-Id: I99c363b6f0ecfd07ad787b79b75e61771733c2b3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Split the timed mutex lock from the non-timed lock functionsThiago Macieira2012-09-143-6/+91
| | | | | | | | | Non-timed mutex locks are by far more common, so let's try not to penalise the locking of those with code that won't get used that often. Change-Id: I37f56d6429836467fdec2e588c0fb22d914b5d75 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Simplify the futex lock loop: no need for nested whileThiago Macieira2012-09-141-25/+23
| | | | | | | | | | | | | Once we enter the inner loop, we never exit it except to return from the lockInternal() function, so the rest is never executed again. As a consequence of this, we won't try to fastTryLock() twice per mutex. Therefore, for a non-recursive mutex, if lockInternal() is entered, we'll definitely need to use futexes. Change-Id: Ice617ed27449c1fbdc112a159a86cd0660125e13 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make QBasicMutex be exclusively non-recursiveThiago Macieira2012-09-144-35/+52
| | | | | | | | | | | | | | | Dispatch to the recursive mutex functions from QMutex::lock, tryLock and unlock. This has the benefit that those using QBasicMutex will not go through the testing for recursive mutexes. It simplifies a little the code for those users. For the users of QMutex, the code required to perform a lock does not appear to change. Change-Id: I0ca9965e012b283c30f1fab8e9f6d9b3288c2247 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't recheck about timeout == 0 during mutex lockingThiago Macieira2012-09-141-3/+4
| | | | | | | | | | | | | | If the timeout wasn't zero, it can only become zero if we return from futex() with a non-timeout reason but subsequently expires while we're recalculating something. A side effect is that we try-lock a non-recursive mutex exactly once. Before this change, we'd fastTryLock() twice even with timeout == 0. Change-Id: I0af09fc2a84669a683a843fcf1513203b075dfb7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Hoist the recursive mutex check out of the inner loopThiago Macieira2012-09-142-27/+39
| | | | | | | | A non-recursive mutex doesn't suddenly become recursive, so we don't need to check it multiple times. Change-Id: Id040254b6142d320a7bd3111491082ad09968404 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* throw() is C++, so don't use it in C modeThiago Macieira2012-09-141-1/+3
| | | | | | | | Q_DECL_NOTHROW is used by qVersion(), which can be extern "C". Change-Id: If71f3bc3a0df3e8321237e5ac9f3bea82380c1e4 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed: QFileInfo::lastModified() returning wrong value.Markku Heikkila2012-09-133-5/+14
| | | | | | | | | | | | | | | Fixed so that empty QDateTime is returned for non existing file. Fixed also created() and lastRead() to return empty QDateTime for non existing file. QFileSystemEngine::fillMetaData() returned true for non existing files. This was also corrected. Task-number: QTBUG-25811 Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
* Fix QAbstractItemModel documentation errors.Mitch Curtis2012-09-131-1/+4
| | | | | | | | | | Added a dependency on the qtwidgets module to qtcore.qdocconf so that it has access to widgets examples. Also added examples/widgets to exampledirs. Change-Id: I7a69f51d51b65bd534950f0df5b348d6ef61a5d9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Docs: Add "\since" info for QEventLoopLocker.Christian Kandeler2012-09-131-0/+1
| | | | | | Change-Id: Ie749b6f2539be5bd08d7a6a00eb4e8655cec1227 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix QByteArray documentation errors.Mitch Curtis2012-09-132-0/+12
| | | | | | | | Add missing external resource link. Provide constructor documentation. Change-Id: I6d28a19da5c409dd0e0b48e0f693837b63de38f0 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Fix compilation for win32-g++ and C++11Kai Koehne2012-09-131-0/+3
| | | | | | | | | | | gcc defines __STRICT_ANSI__ implicitly for -std=c++0x. The MinGW headers however omit the declaration of common functions like putenv then. Instead of working around this MinGW particularity on a case by case basis, rather just use gnu++0x for QtCore. Change-Id: Iefe4e7f77014a4f1d501b149e34f7049deb52fb9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Kernel: Fix gcc warning in qsharedmemory_win.cppKai Koehne2012-09-131-2/+2
| | | | | | | | | Fix gcc 4.7 'arning: converting 'false' to pointer type 'HANDLE {aka void*}' [-Wconversion-null]' Change-Id: I28d890d5fd4975517a9329d68c9ef73f6fadf36c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Kernel: Fix gcc warning about narrowing conversionKai Koehne2012-09-131-1/+1
| | | | | | | | | | Fix gcc 4.7.1 warning: 'narrowing conversion of 'value' from 'int' to 'uint {aka unsigned int}' inside { } is ill-formed in C++11 ' Change-Id: I64ee1a35ecd60cc6a5d7d024c5f903078b3d4f60 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Threads: Fix mingw-gcc warning about 'cast to pointer from integer of ↵Kai Koehne2012-09-131-4/+4
| | | | | | | | | | different size' Use reinterpret_cast to convert from DWORD to pointer. Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improve QMetaType docs.Jędrzej Nowacki2012-09-132-11/+215
| | | | | | | Change-Id: I4ad4188d1bb984b83ffe4bb4ff098158e888d183 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix crash when invalidating a QSortFilterProxyModelStephen Kelly2012-09-131-9/+19
| | | | | | | Task-number: QTBUG-27122 Change-Id: Ibca46b88442f4f92422d9b3182e4bbf25716a07f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix build with QT_NO_EXCEPTIONSHarald Fernengel2012-09-121-0/+2
| | | | | | | | | qTerminate is declared within a #ifndef QT_NO_EXCEPTIONS block, so the implementation must use the same #ifdef Change-Id: I5d2d58a55fce5084c0538d18a9dd3998b12ed703 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Arvid Picciani <aep@exys.org>
* Doc: Fix misc. doc errors and document undocumented functionsaavit2012-09-121-0/+12
| | | | | | Change-Id: I0c1e0a36ee37d5a8f3741f0405f63f9b26967f32 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Don't manipulate immutable dataJoão Abecasis2012-09-111-1/+2
| | | | | | | | | | QArrayData can point to data it does not own (cf. fromRawData()), which shouldn't be modified. Not even upon destruction, as this data can live in Read-Only memory or be otherwise shared outside the QArrayData realm. Change-Id: I8bdf3050a17802fb003b77d5f543fe31769a7710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
* QFileSystemEngine: fix realpath() buffer sizeRafael Roquetto2012-09-111-1/+1
| | | | | | | | | realpath() returns at most PATH_MAX _plus_ the terminator. Change-Id: I4c2e3e166a5f476863ad8c6999800e6468535dbe Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: fix call to realpath() on QFileSystemEngineRafael Roquetto2012-09-111-1/+1
| | | | | | | | | | | | QNX6, as opposed to later QNX versions, does not define the behavior of realpath() when the second parameter is NULL. We leave it then for the compiler to decide which implementation to call, by relying on the _POSIX_VERSION_ macro, which in QNX6 happens to evaluate to < 200801L. Change-Id: I3a6d3859858f56b69f0d391384c2703083a01257 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* don't require (dummy) qconfig.h for qmake buildOswald Buddenhagen2012-09-112-2/+1
| | | | | | Change-Id: I22a2c9aa1366ff858b3bb646617543968c810136 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* compile without CamelCase headersOswald Buddenhagen2012-09-113-5/+4
| | | | | | | | for faster bootstrapping without a full syncqt run Change-Id: I648f0a8fb09be021590c46e8e5e15667a316c817 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Several modifications in phrasing.Nico Vertriest2012-09-111-13/+12
| | | | | | | | Corrections of syntactic and spelling errors. Change-Id: I9d880b4d3f33ace53815d734f99d0b0396497158 Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Doc: Remove references to the deprecated QGraphicsItemAnimationGeir Vattekar2012-09-111-6/+1
| | | | | | | | | Task-number: QTBUG-23711 Change-Id: I1c1ce049016d0bea03d43631493ed8d248162eee Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jason Barron <jason.barron@nokia.com>
* Fix example includes for qdoc.Frederik Gladhorn2012-09-111-3/+3
| | | | | | Change-Id: Ifa6a99db27ce51529489bf077a839a3107b524d2 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>