summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2298-2341/+2341
| | | | | | | | 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* [Qt5 Docs] Fix typos and style of qtimer.cpp and qdatetimeedit.cppDavid Gil2012-09-101-7/+7
| | | | | | | | | | Fix some typos. Fix some sentences to make them clearer to understand. Fix some Qt4-widget-centric info. Change-Id: I77f23ce8cb9a6752a0f8dd214c9ff550d620cd21 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QNX: Add some optional debug output to event dispatcherSean Harmer2012-09-091-0/+18
| | | | | | | Change-Id: I4353619f2dc889f50a139dd5e224a79b780fb316 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Removing duplicate includesSergio Ahumada2012-09-091-1/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix missing or improper include guard in headersSergio Ahumada2012-09-093-8/+8
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Icf7d7d4bed91443b3b21ef5d4219dbd260dffef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlesslyOswald Buddenhagen2012-09-081-4/+2
| | | | | | | | these macros behave counter-intuitively, so don't use them unless the code structure really suggests their use. Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf Reviewed-by: hjk <qthjk@ovi.com>
* Fix warning about not enough actual parameters for macro.Jędrzej Nowacki2012-09-081-1/+1
| | | | | | | | QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL ignores arguments anyway so it is not a problem to give a void type. Change-Id: I66109cc9ae43b48d5cacbd11bebe135a71e10ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: prevent QVariant(QMetaType::Type) from compilingMarc Mutz2012-09-071-0/+7
| | | | | | | | Reported-by: Stephen Chu <stephen@ju-ju.com> Change-Id: I298973174ff10f4462f04f3358c974c04dfd3383 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-071-1/+1
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix g++ compiler warnings.Friedemann Kleint2012-09-071-1/+1
| | | | | | | | Unused variables, unsigned comparison DWORD >= 0 is always true, format string. Change-Id: I9f0a20392e262b2542fb23ea4f513e4c4e354b68 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-1/+1
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix QT_{BEGIN,END}_INCLUDE_NAMESPACE mixupOswald Buddenhagen2012-09-041-0/+2
| | | | | Change-Id: Id25b6aa56681b5bb5989472a96128789c0c4e73a Reviewed-by: hjk <qthjk@ovi.com>
* Change SChar to metatype id 40.Stephen Kelly2012-09-032-5/+4
| | | | | | | | | This fills the gap left by QWidgetStar, making the sequence between FirstCoreType and LastCoreType contiguous, which some benchmarks assume to be true anyway. Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: fix example linkFrederik Gladhorn2012-09-031-1/+1
| | | | | Change-Id: Ie0235281c3a4d5e5dadc6e5823bbf722b7ca411f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Don't reference widgets/widgets in example doc.Frederik Gladhorn2012-09-011-3/+3
| | | | | Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix the name of the arguments of qAtan2 to match std::atan2Thiago Macieira2012-08-312-6/+6
| | | | | | | | | There is no change in functionality, just swapping of the names x and y. The std::atan2 function uses (y, x) in that order, so we should too. Task-number: QTBUG-27090 Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* doc: remove links to Qt DesignerFrederik Gladhorn2012-08-281-1/+1
| | | | | | | | Designer is in the tools repo, we cannot link there. Mentioning the name should be good enough. Change-Id: I55193aa31e60ae266a8890f706c332a63ed3610d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add automatic metatype registration for invokable methods.Stephen Kelly2012-08-282-10/+26
| | | | | | | | | | | This works similarly to the automatic registration for Q_PROPERTY types, but in this case it mostly affects the need for users to call qRegisterMetaType<T>() before using queued connections with methods using non-built-in metatypes, or before using invokeMethod manually. Change-Id: Ib17d0606b77b0130624b6a88b57c36d26e97d12d Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add automatic metatype registration for Q_PROPERTY types.Stephen Kelly2012-08-282-4/+20
| | | | | | | | | | | | | | | | In Qt 4, the user needs to call qRegisterMetaType if the property could otherwise be read before the type is registered with the metatype system. This patch makes that unnecessary and automatic by registering it when the first read indicates that it is not yet registered instead or when QMetaProperty::userType is called before it is registered. The types which are automatically registered exclude the built-in types, which do not need to be registered, and include metatypes which are automatically declared, such as pointers to QObject derived types and containers of existing metatypes. Change-Id: I0a06d8efdcb64121618e2378366d0142fa0771f5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* QMetaTypeId: optimize qt_metatype_id() in special casesMarc Mutz2012-08-261-48/+50
| | | | | | | | Same change as for Q_DECLARE_METATYPE, but in the container and smart pointer specialisations of it. Change-Id: If9390ccc43eb3b07122f5ea5b8094139b5e1ded0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMetaTypeId: optimize qt_metatype_id()Marc Mutz2012-08-261-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code resulted in one memory fetch for the test plus another one for the return value (at the assembler level). The new code reuses the already-loaded value: - movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %edx - testl %edx, %edx - je .L158 movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %eax - ret + testl %eax, %eax + je .L160 + rep; ret It also saves one load in the not-yet-initialised case: -.L158: +.L160: leaq .LC7(%rip), %rdi subq , %rsp .cfi_def_cfa_offset 16 movq himBH1, %rsi call _Z17qRegisterMetaTypeI12QDBusMessageEiPKcPT_ movl %eax, _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip) - movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %eax addq , %rsp .cfi_def_cfa_offset 8 ret Change-Id: I769950449822f2b1587680e05518be0a4f3120a2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: make 'impl' and 'ref' privateMarc Mutz2012-08-262-20/+21
| | | | | | | | | | | | This allows to fold the deref() and the destroy() operations into one, destroyIfLastRef(). The member variables were renamed since there's now a member function of the same name (ref()). Change-Id: Ib94416d9e658065bbf5d3711ecafaf0eb063af17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: make Operation enum protectedMarc Mutz2012-08-261-3/+5
| | | | | | | | | We don't want people to go and call through the function pointer directly. Change-Id: I386645239974f008d513eaa62593c1141b294b60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: remove misleading commentMarc Mutz2012-08-261-1/+1
| | | | | | | | | | | | These constructors might not benefit from being constexpr (as the objects are only created on the heap), so don't suggest so. There's no disadvantage of them begin constexpr, but their constexpr'ability depends on whether QAtomic has a constexpr constructor, and the added complexity of finding that out isn't worth it. Change-Id: I089a29dcb98ba935c339dce09d71f283522a9afd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtGlobal: remove Q_DECL_FINAL_CLASSMarc Mutz2012-08-261-3/+3
| | | | | | | | | | | Now that qvariant_p.h's HasIsNullMethod check is fixed so that it doesn't require Q_COMPILER_DECLTYPE anymore to be able to deal with final classes, there's no point in distinguishing Q_DECL_FINAL and Q_DECL_FINAL_CLASS anymore, so remove the latter. Change-Id: I31de5b63e7d2e44171a13e928997c946d93e05c9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: make the HasIsNullMethod check work across all compilers (maybe)Marc Mutz2012-08-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we have a C++11 version that requires Q_COMPILER_DECLTYPE support, and can deal with final classes, and a C++98 version that doesn't require any C++11 features, but fails on final classes. What we're missing is a version that works for MSVC v8 and v9 (2005 and 2008), which sport the 'sealed' non-standard keywords but lack decltype support. So far, we tried to solve the problem by making class-level final special (Q_DECL_FINAL_CLASS), not defining that macro for these two compilers, even though we did define Q_DECL_FINAL, the method-level keyword. This new formulation, taken from http://stackoverflow.com/a/9655327/134841 supposedly supports all compilers with a minor #ifdef for MSVC which doesn't like applying sizeof() the way we do. However, testing has shown this to blow up on OSX. So we use the less intrusive approach: add this variant as a third version, only used by VC 2005 and 2008. Change-Id: If1945f8a6e9ed36cb68212fa781d5e29eb2a082d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* blockSignals should block QML signal emission.Michael Brasser2012-08-261-3/+3
| | | | | | Change-Id: Ief35f3ca326173a87240e3cb558e47f721bd04b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use nanosleep instead of pthread_cond_timedwait for thread sleepingThiago Macieira2012-08-251-0/+1
| | | | | | | | | | | | | | | There's a comment saying nanosleep's availability is questionable, but the information of what systems don't have that is now lost in time. It's quite likely that they were older, Unix systems we no longer support anyway. nanosleep comes from POSIX.1b-1993, which is merged into POSIX.1-2001, so chances are that it's supported almost everywhere where Qt runs (except for Windows anyway). Change-Id: I4fd18f8715c43a42429000f3b3d2c3b7343f94b4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Compile without the deprecated filterEvent functionThiago Macieira2012-08-231-1/+1
| | | | | | | | Use the filterNativeEvent function, which also takes the name of the event. Change-Id: Ifa3dd6285a2a526b5c3de5a86a74ead706534759 Reviewed-by: David Faure <faure@kde.org>
* Extract the QMetaMethodPrivate::ownMethodIndex method.Stephen Kelly2012-08-231-5/+11
| | | | | | Change-Id: Ic96e3582ff4332ac489f7c51ed40eb1b1a0ac42d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-2321-0/+37
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Fix snippet and example referencing widget examplesAndy Nichols2012-08-232-4/+4
| | | | | | | | Widget examples were moved into a widgets subfolder, but qdoc references were not updated. Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* De-inline QVariant(float)Harald Fernengel2012-08-232-1/+4
| | | | | | | | | All QVariant constructors are not inline, so change QVariant(float) as well. This allows for refactoring of QVariant during lifetime of Qt 5 without breaking QVariant(float) case. Change-Id: Icd1fc331a1ef8a2872be811aa7d1160406038f06 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* doc: Added \relates command to some function qdoc commentsMartin Smith2012-08-211-0/+2
| | | | | | | | | | | | | When a documented function is global, it must be related to a namespace or class, or its documentation won't be included anywhere. When a documented function is a class member, the function signature in the \fn command must include the class name qualifier, e.g. QImage::isValid(), not just isValid() Change-Id: I53e2230fa9468f94d51aec8cc76781d7ab755a13 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Misc documentation fixes triggered by qdoc errors/warningsShawn Rutledge2012-08-201-3/+3
| | | | | Change-Id: I6ca3b138114fe957a09e8ec2f22273865635fc8b Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Doc: Work on QVariant's equality operator.Geir Vattekar2012-08-201-2/+13
| | | | | | Task-number: QTBUG-26018 Change-Id: I6627456d166bc0a036cadeee7bd51aa8e576a818 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix documented QMetaType::UserType value.Aaron McCarthy2012-08-201-1/+1
| | | | | | | | | QMetaType::UserType was changed from 256 to 1024, this was not reflected in the code parsed by qdoc. Change-Id: I0a02e8b020d495fbf2508d84b690adae1b677125 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Use QThread instead of QPushButton as an example in the docsLars Knoll2012-08-201-2/+2
| | | | | | | This keeps links local and inside the module. Change-Id: I5e267197c6356a2c4e231c1941ed4be33b96a16e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix more qdoc errorsLars Knoll2012-08-207-32/+43
| | | | | Change-Id: Ieed340068327f37ea0f549d24ea49235994118f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc errors in qcoreevent.Lars Knoll2012-08-201-4/+9
| | | | | Change-Id: Ic6cb963a7df643819dfdd93c7300d054e11cd0d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc errors in the QAbstractEventDispatcher documentation.Lars Knoll2012-08-201-4/+32
| | | | | Change-Id: I7de48286f05b14c831f1290e009a25630504a76e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a couple of qdoc errors.Lars Knoll2012-08-201-2/+8
| | | | | Change-Id: I0770fc61e265face4fa061be9e110814effee181 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor the automatic metatype templates into preprocessor lists.Stephen Kelly2012-08-201-24/+40
| | | | | | | This will allow re-use in moc. Change-Id: I99c5f8f0756fccf0fb2bb845c29255c14d4d703e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix a couple of qdoc errorsLars Knoll2012-08-181-1/+0
| | | | | Change-Id: I79f689e08ed4a496052529af38fca72c3d4e04cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>