summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
| * QCoreApplication: Removed out-of-date docs (argv() method).Tomasz Olszak2013-07-121-5/+1
| | | | | | | | | | | | | | | | QCoreApplication::argv() method was obsolete in Qt4.8 and removed in Qt5.0. Change-Id: I217402f774f5509c8ca317a35c831ffa5ac2af06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-118-66/+65
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Accept defeat when select(2)ing without a monotonic clockThiago Macieira2013-07-101-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We prefer to use the monotonic clock because it's never affected by time jumps (such as the user changing the date, or the system adjusting for any other reasons, including automatic leap seconds). But if a system doesn't have a monotonic clock, we simply accept the regular, real time clock and hope it doesn't jump. This is better than the current code that never restarts a call. The side-effect is that a 30-second select may become a 3630-second select if someone sets the clock back one hour. Task-number: QTBUG-22301 Change-Id: Ia5a3bb453cd475f45b03637e2549165589fd2524 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Fix dead lock in the Qt event handlingOlivier Goffart2013-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deadlock is caused because the QEvent is destroyed while holding the event list mutex. And the QEvent may have a custom destructor that will re-enter the event handlng code. The QScopedPointer that should destroy the event must be created after the MutexUnlocker. Regression introduced by commit f9035587b98ac5dc9491e642b8ec84470ec03f0e Task-number: QTBUG-31606 Change-Id: I6b2cbc2656eacdec61b641886953f00bf5b3ff36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Uniformize the syntax description of Q_PROPERTYOlivier Goffart2013-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In the qobject.html page, the description of the syntax of Q_PROPERTY does not include the MEMBER keyword added in Qt 5.1. But it was well documented in the documentation of the property system. Merge the two code snipppets. Task-number: QTBUG-32211 Change-Id: I7b57329c201b6f3bc812155f21dbfb2c6423494e Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Clean up evaluation license logicTor Arne Vestbø2013-07-053-47/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * QtCore: Fix remaining MSVC-64 warnings about integer truncation.Friedemann Kleint2013-07-021-5/+5
| | | | | | | | | | | | | | | | | | warning C4267: 'argument' : conversion from 'size_t' to ' int', possible loss of data. Change-Id: I8d1ca27d4d66a9ce0deb70766446e780308bba33 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * BlackBerry: Increased loop level around bps_get_eventBernd Weimer2013-06-291-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | This is needed, because bps_get_event can also invoke callbacks. Deferred deletions in such a callback are not executed for instance, because the loop level might already be at its minimum. Change-Id: I8a1b3a3f92de139575654de011352f8abc6c3c1a Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Jeff Kehres <jkehres@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-281-1/+1
| |\ | | | | | | | | | Change-Id: I53112e20a65b7d706755b4a22622979f3b91a2c2
| | * Fix compilation with ICC 13.1: the MSVC 2005 & 2008 code is badThiago Macieira2013-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | qvariant_p.h(226): error: name followed by "::" must be a class or namespace name template<class C> static Yes test(char (*)[(&C::isNull == 0) + 1]); ^ Change-Id: I42eef44d46ca0fb7aac8f82150e917c4fb912b15 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-271-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * | Further followup to Q_OS_MACX changes.Jake Petroules2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate, remove a redundant condition in qtextcodec_p.h. Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | Make the qfatal for redeclaring a type with the same name a warning.Richard J. Moore2013-06-251-5/+5
| | | | | | | | | | | | | | | | | | Change-Id: I5a25b2043a6b5a598a004d30c9a8056564c136e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-208-26/+72
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * | Doc: QTranslator::translate() isn't an overload anymoreDavid Faure2013-06-191-2/+0
| | | | | | | | | | | | | | | | | | Change-Id: Ib50044da48be3fb4f43300aa285e15403bd8d65e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * | Remove use of 'register' from Qt.Stephen Kelly2013-06-176-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Add basic conversion functions from QVariant(QJsonValue).Jędrzej Nowacki2013-06-141-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | There is a mismatch how QML and C++ converts QJsonValue. This patch unifies conversions by adding QJsonValue support in QVariant::convert(). Change-Id: I8a1db3d77c517945ef48064b4b66ba03aa4f2fd0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-122-2/+3
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenubar.mm Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
| * | Mark the Q_DECLARE_OPAQUE_POINTER macro as introduced in 5.0Laszlo Papp2013-06-121-0/+1
| | | | | | | | | | | | | | | Change-Id: Ida52c9f1f72b628d9a7faaf7998798e781b53df2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QtCore: Fix MSVC-64 warnings about integer truncation.Friedemann Kleint2013-06-081-2/+2
| |/ | | | | | | | | | | | | | | warning C4267: 'argument' : conversion from 'size_t' to ' int', possible loss of data. Change-Id: I79af7497420d468b5bc7c48c9ae21b86117519a9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Add internal functions to QObjectPrivate for signal & slot connections in QMLSimon Hausmann2013-06-073-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QML it is common to connect signals to slots that are implemented as JavaScript functions. QML used to maintain separate data structures that mirrored the QObject connection list and kept references to the JavaScript objects necessary to perform the call on signal activation. The recent addition of functor based QObject::connect makes it possible to store this information in QSlotObjectBase sub-class instead, which eliminates any extra bookkeeping. This patch adds internal connect and disconnect overloads to QObjectPrivate that allow for connecting QObject *sender, int signalIndex to a given QSlotObjectBase and similar for disconnect. Change-Id: I90f43d13eb95bd884d752484cf4faacc446f4d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Don't convert built-in types to strings for qDebug.Stephen Kelly2013-06-071-2/+4
| | | | | | | | | | | | | | | | | | This was introduced by 7ed15da3 (Core: QDebug and comparison operator support metatypes,, 2013-03-20). Change-Id: Id89aaffeee8d519ca73f0b52b1ac8b9d233cb5f1 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Fixed evaluation of application file pathBernd Weimer2013-06-051-27/+30
| | | | | | | | | | | | | | | | | | | | Empty arguments list could lead to crash, due to access of first element. Besides, empty application file path will be cached now universally. Change-Id: Ibe1a668da364d87d8431567dfc999cb394686081 Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-041-0/+8
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/plugins/platforms/cocoa/qnsview.mm Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
| * Disable precision timers when running MSVC2012 code on pre-Windows 8.Friedemann Kleint2013-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | Precision timers can cause the event loop to lock up when running MSVC2012 code on pre-Windows 8. Task-number: QTBUG-27266 Change-Id: Idd73731e82843d0d140859bab825bc1a54eccf1a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Core: QDebug and comparison operator support metatypes.Christoph Schleifenbaum2013-05-274-27/+373
| | | | | | | | | | | | | | | | This patch adds a way to enable operator<, operator== and operator<< into QDebug for QVariants with custom types. Change-Id: I3d12d891bd7252ad2b8f1de69bced354800a1f29 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-233-8/+10
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Fix QEventDispatcherBlackberry build when debug is onRafael Roquetto2013-05-201-0/+1
| | | | | | | | | | | | | | Change-Id: Ia00d0f32e7d552421cc230ffca25085ab0a3a31e Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Implement apostrophe in windows cmd argsJørgen Lind2013-05-101-5/+2
| | | | | | | | | | | | | | Task-number: QTBUG-15379 Change-Id: I4a2ca942d2dbfa490302858b589e00bd91e25636 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Fix a case of connect()ing to signals declared in a base classOlivier Goffart2013-05-091-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix connection to pointer to member signal that belongs to the base class, but whose type is a pointer to a member of the derived class. The current code only use the QMetaObject of the type coming from the function type to look up the signal id. But if the signal was casted to a pointer to member function of a derived type, then we also need to look in the base classes Change-Id: Ib98fc38f63942946acb34d9f83c100991d58e4e5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make it possible to access QPair and std::pair elements from a QVariant.Stephen Kelly2013-05-203-0/+149
| | | | | | | | | | Change-Id: I9dc73748073d0d1e43bdadbce73339dfcc1bc647 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add container access functionality for associative containers in QVariant.Stephen Kelly2013-05-204-4/+610
| | | | | | | | | | Change-Id: I4763a4c157e52918a0a68cba63624c0649aca235 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Change the ownership semantics of metatype converter functions.Stephen Kelly2013-05-202-47/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Destroying the instances is a problem because the instances might have been created in a plugin. In that case, the destructor of the instance will be implemented in the plugin. As the instance destruction code is run very late, the plugin might have already been unloaded by the time an attempt is made to destroy the instance. The workaround is to create static instances on the stack. Task-number: QTBUG-31142 Change-Id: Ic2632c3548a734b742da46d90249916c35705d46 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Improve Qt-in-namespace implementation in the Cocoa platform pluginRomain Perier2013-05-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Objective-C++ does not support namespaces. In order to make this work, we decorate each symbol with suffix using the macro QT_MANGLE_NAMESPACE. However, with such a technic each public symbol needs to be explicitly exported through this macro. The use of @compatibility_alias allows to define alias to use it automatically and transparently. Task-number: QTBUG-23946 Change-Id: Id521b8160bab126fda40a9d960277b1c04cc8b66 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | BlackBerry: Revised error handling in event dispatcherBernd Weimer2013-05-101-40/+42
| | | | | | | | | | | | | | | | | | | | | | Added an upper bound check for socket notifier file descriptors. Too high FDs have been a real source of failure. Added compiler hints to allow error-free code path run faster (errors are highly unlikely) and adjusted warning messages (some were misleading and too long). Change-Id: I1c9c41f5d006ca9d3a28214c3a464555b8a1c71f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Fix since version of new metatype conversion functions.Stephen Kelly2013-05-081-8/+8
| | | | | | | | | | Change-Id: Icedd0942eaef9bdcf034d747f0a03a00ca461a95 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Add automatic container access registration for built-in containers.Stephen Kelly2013-05-083-8/+75
| | | | | | | | | | Change-Id: I4d590c23e072994930922ff73367600f848fbcf0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add QVariantList extraction from a QVariant with a sequential container.Stephen Kelly2013-05-082-0/+23
| | | | | | | | | | Change-Id: Id9fac7bf47ed3fbb385222b25941215ac24b8b88 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Add QVariant container iteration API.Stephen Kelly2013-05-084-3/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new set of classes is introduced for iterating over the contents of a container within a QVariant without knowing the exact type of the container, but with the guarantee that the element type within the container is a metatype. The implementation of the iterable interface uses the stl-compatible container API so that we can also iterate over stl containers, or any other container which also conforms to stl norms. This enables the functionality in the bug report. Task-number: QTBUG-23566 Change-Id: I92a2f3458516de201b8f0e470982c4d030e8ac8b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Core: Support for converting user defined QVariant types.Christoph Schleifenbaum2013-05-084-8/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patchs allows the user to convert defined QMetaType types like MyType to be converted by using e.g. QVariant::toString(), mapping to MyType::toString(). Also all the other QVariant::toXYZ() methods are supported so far. The patch adds static methods QMetaType::registerConverter supporting: - implicit convertion - conversion using member method of source type - conversion using unary functor Change-Id: I4f1db83d9c78bcc9df5c42f82f95cce0480cdcc3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-04-261-2/+4
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-221-2/+4
| |\| | | | | | | | | | Change-Id: I059725e3b7d7ffd5a16a0931e6c17200917172b5
| | * Micro-optimization of list string list construction in qmetaobject.Jędrzej Nowacki2013-04-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | We know the size of constructed list, so it may be worth to reserve memory space for it. Change-Id: Idad061bc1dbf5acecaec48d2e00ca3504b9db8b8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Use variadic templates to mark function pointers as non-QObjects.Stephen Kelly2013-04-241-0/+5
|/ / | | | | | | | | Change-Id: I4d4e7a0498ff8f5b834dae4008d1311838180036 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-121-0/+1
|\| | | | | | | Change-Id: Iee73c93067c5822d8dd51a8692e6da9df4ba49f5
| * Merge branch 'release' into stableSergio Ahumada2013-04-101-0/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qwindowsvistastyle.cpp Change-Id: Ifd17532393ebab8ed454c6a79bab622959ceef95
| | * Clear the WA_QuitOnClose flag from EvalMessageBox.Michael Brüning2013-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation message box caused the QtWebProcess to quit due to the fact that the process has no other windows and EvalMessageBox was both set to be closed on quit and ended up being the last window in the process. Change-Id: Iad6461d014258fdc5fade7dafe48da33903377bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Merge branch 'stable' into devSergio Ahumada2013-04-102-2/+2
|\| | | | | | | | | | | Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
| * | 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>
| * | 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>