summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Document missing QLatin1String methodsThiago Macieira2014-08-071-0/+88
| | | | | | | Most of them were added before 5.0, but it's ok to just list as 5.0. Change-Id: I6e83a210a0165659f710d47ed595e9e89d5dbac9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Android: Fix recursion bug in callStaticMethod()Christian Strømme2014-08-061-3/+3
| | | | | | | | calling callStaticMethod() with template type jlong, jdouble or jboolean would cause the call to loop indefinitely. Change-Id: I99caa576e761fdef623ece04e0779e4cf2535592 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Undo: Fix state entry bug for parallel state groupsPeter Kümmel2014-08-061-5/+1
| | | | | | | | | | This commit reverts c4cef6fae9f2a55f21fc9517855dfcf659c89081. The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not complete and introduces the regression QTBUG-30049. Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219 Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-302-8/+17
|\ | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| * Support MIPS atomic on pre-MIPS32 architecturesAurelien Jarno2014-06-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atomic functions on MIPS are based on the sync opcode with an immediate argument, which is something introduced in the MIPS32 instruction set. This prevent to use Qt on pre-MIPS32 CPU, like the Loongson 2 CPU. However some of the pre-MIPS32 CPUs interprets the sync opcode with and immediate argument as a sync opcode without argument (which is a stronger ordering than with the argument), and for the others the kernel emulates it. It is therefore fine to use the current MIPS atomic functions on pre-MIPS32 CPU. This patch allows that by temporarily changing the instruction set to MIPS32 around the sync instruction, so that binutils doesn't choke on it. Change-Id: I9cc984bd55b5f172736ce9e638a6f4e271b79fe7 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Enable sparc detection.Lisandro Damián Nicanor Pérez Meyer2014-06-271-6/+9
| | | | | | | | | | | | | | | | It has been working in Debian for some time. It also adds detection for 64bits Sparc. Change-Id: Ie4fc0f58b37672b79191ebe51de0caf2eaf8a1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Work around ICC bug in local static symbols for Q_GLOBAL_STATICThiago Macieira2014-07-301-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling the innerFunction() of the Q_GLOBAL_STATIC expansion, ICC emits global symbols for the internal "holder" local static variable and its guard. If there are two global statics of the same name in two different .cpp files, the linker will incorrectly merge the two "holder" variables. This was noted between the "customTypes" global statics of qmetatype.cpp and qdbusmetatype.cpp in a static build. The C++ standard requires that local static variables declared in inline functions must be the same, regardless of whether the body of the function got inlined or not. The IA-64 C++ ABI does that by requiring local static symbols for inline functions to be global and mergeable ("link once"). However, two functions in anonymous namespaces in different files are not considered to be the same function, so their local statics should not be merged. This is where ICC failed: the local statics are global and mergeable, even though the function is in an anonymous namespace. ICC correctly emits the function itself as a local symbol. Alternative solutions were: 1) add "static", but you can't use a static symbol in a template parameter in C++98 mode 2) remove the "inline" keyword, but then GCC 4.8 will not inline Intel issue ID: 6000058488 Task-number: QTBUG-40053 Change-Id: I307622222499682dde711b2771c8cf7557400799 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Use the stateless UTF-8 encoder in QStringRef::toUtf8Thiago Macieira2014-07-251-1/+1
| | | | | | | | | | | | | | | | QString::toUtf8 already does it. I guess I forgot to update this part in d51130cc3a00df8147e2eb0799e06865c901c6e0. Change-Id: I83feafcb0383758f7e64d5142f57a7ae6a2ff351 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Doc: corrected autolink errors in qnamespace.qdocNico Vertriest2014-07-231-5/+5
| | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: Ic2a0740a12c98a60cb1d178c4d42c4ae1c39869c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Work around ICC bug in brace initializations containing constexprThiago Macieira2014-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICC miscompiles this: struct Inner { int i; constexpr Inner(int i) : i(i) {}}; struct Outer { Inner i; }; const Outer x = { -1 }; (Inner = QBasicAtomicInt; Outer = QtPrivate::RefCount, then again for QListData::Data) We expect x to be placed in read-only memory and require no load-time constructor. ICC unfortunately does not do that. By adding a constexpr constructor to Outer, it starts behaving like we expect it to, but falls apart again if you do "const Outer x[]" (the QArrayData statics). The solution is to probably make the varaibles constexpr too, but that's a job for the development branch. Intel issue Id: 6000056211 Intel bug: DPD200534796 Change-Id: Ie9fb5428106486254b7329403890754f300d58c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fixed wrong function name in a file snippetIvan Komissarov2014-07-101-1/+1
| | | | | | | | | | Change-Id: I453c5085685badeb6577009a0c6935dfe384258f Reviewed-by: Richard J. Moore <rich@kde.org>
* | Fix for code snippet in commandlineparser documentationNiels Weber2014-07-071-1/+2
| | | | | | | | | | | | | | One line in the code snippet wasn't translated whlie the others were. Change-Id: Ie77a317833f800087b485609cd001dd26060a40f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | Android: Refactor exception checking in qjni.Christian Strømme2014-07-071-19/+16
| | | | | | | | | | | | | | | | | | In places where we call java/jni functions that can throw exceptions, we check and clear the exception, if necessary. This change moves the "checking" code into a single (private) function. Change-Id: Ic3de2be51305972b096e1ed0a477e341eb5d9404 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Attempt to work with Visual Studio in -Za (strict ANSI) modeThiago Macieira2014-07-051-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visual Studio always treats enum values as signed int, even when the value doesn't fit in a signed int (like 0x80000000 or larger than 32- the tags themselves are still signed. That causes ambiguity in creating a QFlag from an enum value. Visual C++ defines __STDC__ in C mode, but we have no macro in C++ mode. Also note that the Windows SDK headers don't compile in -Za mode. Task-number: QTBUG-39700 Change-Id: Ia943cef37ac1f539bd461c3c18200b0c365c72b3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | qDebug: fix data race in qt_message_printDavid Faure2014-07-011-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting of (static) messageHandler to qDefaultMessageHandler if null was happening in multiple threads simultaneously, so it needs synchronization. Used an atomic pointer in case qInstallMessageHandler is called from a thread, but more importantly, initialized the static vars right away. Improve auto test to ensure that qInstallMessageHandler(0) still sets the default message handler. Change-Id: I70335af38c1d28a1cdba1df8a79c6006f227422e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix annoying warning from ICC 14 on WindowsThiago Macieira2014-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It says that defining a macro that does defined() is not portable. The solution implemented for MSVC 2008 and earlier does work, however, and is portable to all compilers (the parentheses around the macro are unnecessary). Incidentally, this makes d98004cd2f33e8147cff9f3cb203fdef5e6dd00e actually work: Q_CC_MSVC wasn't defined at that point in the file, so that change had never taken effect. warning #3199: "defined" is always false in a macro expansion in Microsoft mode Task-number: QTBUG-39597 Change-Id: Iaa2895e7f63d97c439090043435a2b8d2f185c3a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Doc: Various \note fixes in Qt namespace documentation.Jerome Pasion2014-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | -changed \note and \warning to "Note:" and "Warning:" -\note and \warning split the table. -other minor \note changes Task-number: QTBUG-36972 Change-Id: I88042550cd01101e7225cd3b5f4e0115ea102ea9 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | 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>