summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* QTimer: add convenience singleShot methods for functorsDario Freddi2014-05-282-4/+245
| | | | | | | | | | | | | | | | | | | | | This brings QTimer::singleShot on par with QObject::connect in terms of the new Qt5 syntax. With this patch, it is now possible to connect singleShot to a member pointer, a static function pointer and a functor (with or without a context object). The short code path for 0 msec is not yet implemented - it will require further modifications to QMetaObject before it will be. An additional SFINAE on the new singleShot overloads had to be implemented to prevent tricking the compiler into believing const char * might be a function pointer. [ChangeLog][QtCore][QTimer] Implemented new style connect syntax, including functors, in QTimer::singleShot Task-number: QTBUG-26406 Change-Id: I31b2fa2c8369648030ec80b12e3ae10b92eb28b4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-223-15/+14
|\ | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Fix minor coding style issues in new code in QtCoreThiago Macieira2014-05-192-13/+12
| | | | | | | | | | | | | | Change-Id: I444daf8e81257f55746f9d32fbcb60a2e1b69444 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Revert "fix build for MSVC 2010"Joerg Bornemann2014-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | The condition in WinUser.h is _WIN32_WINNT >= 0x0602. The original #if was correct. This reverts commit 42d162addf82aa2064600219b9b3224836f676ac Change-Id: I7a3098ced143fba7b31b138cc7aaaf8f6920bef3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Remove friends of QEvent.Friedemann Kleint2014-05-182-6/+1
| | | | | | | | | | | | | | | | Introduce function to set the spontaneous flag to QCoreApplicationPrivate to solve a few cases. Change-Id: I7c1f1f3644defe00deea9cecb244ca258afd5b94 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove friend class QETWidget.Friedemann Kleint2014-05-162-2/+0
| | | | | | | | | | | | | | The class no longer exists in Qt 5. Change-Id: Icd98c151f8e06910a3240d0bec6fff333a8ef3e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Windows: Use WinAPI CommandLineToArgvW() to create argv from command line.Friedemann Kleint2014-05-152-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the Windows CE/Desktop Windows code paths in winmain. Use CommandLineToArgvW() to obtain argv[] for Desktop Windows. [ChangeLog][QtCore][Windows] Command line parsing on Windows now uses the WinAPI function CommandLineToArgvW() to exactly match the quoting of the command interpreter. Task-number: QTBUG-35432 Task-number: QTBUG-23687 Change-Id: I6743e73649d953497642f7717d3731a83ffda2a2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-2/+8
|\| | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| * QPpsObject compile added for QNX platformNedim Hadzic2014-05-131-2/+8
| | | | | | | | | | | | | | | | | | QPpsObject was only compiled for BlackBerry and not for QNX. Now, QNX platform is included together with lpps lib. Change-Id: Ib521664b430b202c0e67987d0bfda8373d2be70e Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-133-5/+5
|\| | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| * Doc: removed references to QtSharedMemory.Nico Vertriest2014-05-061-5/+3
| | | | | | | | | | | | Task-number: QTBUG-38772 Change-Id: Ibc71acfafcb93d0c7e6c8ae84d412c34aacd2967 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Use QCoreApplication::postEvent() for replaying popup mouse events.Friedemann Kleint2014-05-061-0/+1
| | | | | | | | | | | | | | | | | | When replaying the mouse events synchronously, nested calls of QEventLoop::exec() may happen in conjunction with menus. Task-number: QTBUG-38550 Change-Id: I2b1dafdac59d1a080775af5f165d1e594ea58804 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-031-0/+1
| |\ | | | | | | | | | | | | | | | | | | Manually fixed up: isES -> isOpenGLES src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
| | * Add a comment about not obvious code in VariantData.Jędrzej Nowacki2014-05-021-0/+1
| | | | | | | | | | | | | | | Change-Id: I943af28c47b396aa35173da2a1294b86c8a522fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-065-107/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-1/+1
| |\| | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * Un-export QSignalBlocker: it's all inlineThiago Macieira2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I0fb5a30eebd9edba853b7e4bd74cc7e9b06da486 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Jani Heikkinen2014-04-252-5/+14
| |\ \ | | | | | | | | | | | | refs/staging/stable
| | * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-232-5/+14
| | |\| | | | | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | | * Doc: recommend using QLocale for loading translationsLeena Miettinen2014-04-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users can choose to use different UI languages and regional settings on their devices. QTranslator::load(const QLocale &) function uses QLocale::uiLanguages() and not to the locale name, which refers to the formatting of dates and numbers. Change-Id: Iec6327dd1e91d913176499b23482d725b9d0a8aa Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | | * docs: Q_CLASSINFO is used in a couple more places besides ActiveQtShawn Rutledge2014-04-141-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I000f538dc11477224efbf2edc91873822eb9fef2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * | | Document that the connection stay active when objects used in a lambda are ↵Olivier Goffart2014-04-251-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | destroyed Task-number: QTBUG-37472 Change-Id: I44a6d7f8bf6928cd99a05d1b00fe36313cb18ffa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * / Unite the documentation for qmath.h functionsAllan Sandfeld Jensen2014-04-152-101/+78
| |/ | | | | | | | | | | | | | | | | | | Some functions in qmath.h was documented under QtMath, and some under QtCore/qmath.h, the latter does not appear to lead to functional links in the function list, so we should move them all to QtMath. Task-number: QTBUG-37799 Change-Id: I3118c65ccbfb2401bdc324dbef2885d4e7d1c8f6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | Removed unused function stringSize() in qmetaobject.cpp.Ivan Komissarov2014-04-281-5/+0
| | | | | | | | | | | | | | Change-Id: I56e90d2cdd736aaa0ea1e7f6abde958c77fe0d32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Build fix for auto-registration of Container<void*>Jędrzej Nowacki2014-04-231-2/+9
| | | | | | | | | | | | | | | | IteratorOwner pointer specialization was failing for void* because of an invalid function overload. Change-Id: I80355ddd2b871c1fa2fa5bf5a4ed8bc7768fc3c9 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QMetaType: Specialize IsPointerToTypeDerivedFromQObject for const void*Stephen Kelly2014-04-221-0/+5
| | | | | | | | | | | | | | | | | | 'const void' is not derived from QObject, and is not a type we can use sizeof to determine that. Change-Id: I008f444bbed9fc8f9147da0f7f336757f660e224 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add a more reliable replacement for qt_add/removeObject().Volker Krause2014-04-152-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These hooks only worked reliably with LD_PRELOAD on Linux/GCC, on other platforms they depended on what exactly the compiler optimizer is doing as well as some nasty assembler rewriting to actually access them. The new system uses a simple array of function pointers that can be set to custom hooks by tools that need this (based on ideas from Andre Poenitz). This also covers qt_startup_hook (similar problem), and the Qt version number that Andre had asked for. Change-Id: I2c3e7950fd49b1b1d04176be34c2fff3293981b0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-112-3/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| * fix build for MSVC 2010Joerg Bornemann2014-04-071-2/+2
| | | | | | | | | | | | | | The Windows version for QS_TOUCH and QS_POINTER was slightly off. Change-Id: Idb8a8219e09c6aa1a1b24e45b9da640c8d4b7161 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Windows XP target support for MSVC >= 2012Joerg Bornemann2014-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To enable windows xp support, we must do two things: 1. linker flag must be /SUBSYSTEM:CONSOLE,5.01 or /SUBSYSTEM:WINDOWS,5.01. For x64, the version is 5.02. 2. Do not use Windows Kit 8. Win SDK v7.1A is recommended. Prepend the right include paths and lib paths to INCLUDE and LIB before building. The Windows XP target support is enabled by passing "-target xp" to configure. Task-number: QTBUG-29939 Change-Id: I84c8439606cc2a9d27d64947702846faa4f1e4a2 Reviewed-by: Lucas Wang <wbsecg1@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Android: Stop ART from complaining about missing thread names.Christian Strømme2014-04-031-1/+10
| | | | | | | | | | | | | | | | | | | | The new Android jvm (ART) complains loudly if we attach without supplying a thread name. Task-number: QTBUG-35441 Change-Id: I962d613be0db50f3ca9a4c786b36003f31c9db14 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | QEvent: mark registerEventType() as no-throwMarc Mutz2014-04-072-2/+2
| | | | | | | | | | | | | | | | | | The new implementation using an atomic bit field performs no memory allocations and thus cannot throw anymore. Change-Id: If6a98f307ab4e6a7c3fe3c54763ac0c6d2da4ac0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QEvent: optimize registerEventType()Marc Mutz2014-04-071-30/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of always searching from the end of the range [User, MaxUser], cache the next available id and start searching from there. Instead of saving the already-allocated IDs in a QSet, use an atomic bit-field. This removes the need to use a mutex. The QBasicAtomicBitField class is designed to be reusable, but lacks features that are not needed by QEvent::registerEventType(). It is also unclear how this could be made more encapsulated without losing the property that the whole instance is placed in the BSS segment, since making the data fields private will make the type non-POD. Change-Id: I4012fa114d9d9e85e9e881e100a2c021fa09a0d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devIikka Eklund2014-04-015-40/+19
|\| | | | | | | Change-Id: I2a6eb9dd7724931bc89f28bcc156e77c4e26d069
| * QEvent: document and check when registerEventTypes() returns -1Marc Mutz2014-03-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tst_QEvent, add a check that exhausts the available event type ids and verifies that registerEventTypes() returns -1 in that case, as documented. I haven't found a way to test the other case in which -1 is returned. Since this test operates on a global write-only registry the new test case needs to keep track of whether the earlier test cases have run successfully. If they didn't, skip this test case. Change-Id: I68ea9d17d10dcec22175994aba269dd09c9adf43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Reduce clang compilation time of tst_qmetatype by ~2%Jędrzej Nowacki2014-03-281-35/+7
| | | | | | | | | | Change-Id: I64fe12dd0bf9c35ae06fc5a68addc36848cdda3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * WinRT: Prevent GUI dispatcher lookup from non-GUI threadAndrew Knight2014-03-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | When we create an event dispatcher outside of the main thread, we shouldn't be looking up the core event dispatcher as it will fail. This ends up printing a scary warning for all e.g. Qt Quick apps when in reality nothing bad actually happened. Task-number: QTBUG-35327 Change-Id: I2060f0a9d4baffc42ca727e8d4e1ef7c13f6a2df Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
| * Fix some documentation errors.Friedemann Kleint2014-03-242-5/+3
| | | | | | | | | | | | | | | | Correct links and fix typos, remove obsolete documentation, fix some snippets, mark some classes as internal. Change-Id: I9a3266605f060783413d32740057a57a820c8929 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-248-9/+82
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * QNX: Fix crash in bb_selectFabian Bumberger2014-03-211-2/+2
| | | | | | | | | | | | | | Change-Id: Ic1a414c9d89b790ed9fb9f5c989b6018de78b465 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Setting QT_NO_DEBUG should not remove symbolsLars Knoll2014-03-212-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing symbols when defining QT_NO_DEBUG is a bad idea. In this case it means that you can't compile corelib as a release build and widgets as debug without getting an undefined symbol. Instead leave the method in the release build, but simply don't call it. Change-Id: I50426aefd62e82bccd933323aa0f67c6e5294961 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Check for exception before calling NewGlobalRef().Christian Strømme2014-03-201-2/+14
| | | | | | | | | | | | | | | | | | | | Calling NewGlobalRef() throws an exception if it gets an invalid ref. If one of the jni object-calls throws an exception and the returned reference is invalid, the subsequent call to NewGlobalRef() will trigger the second exception and the process will be terminated. Change-Id: I50c622e695542373d5b2eebd911c882e8e0f6bf7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| * Fix Q_DECLARE_METATYPE macroJędrzej Nowacki2014-03-171-1/+2
| | | | | | | | | | | | | | | | | | The macro should stringify value of the given token not the token itself. Task-number: QTBUG-37547 Change-Id: I90f4fa613bd13d5a581828ab13f620b40dfd3593 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove level 4 compiler warnings from MSVC.David Schulz2014-03-152-0/+6
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-7233 Change-Id: I52067e3a22e98a62fd87415906e54a54ff2d6b49 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Dave McClelland
| * BB select(): move special select method to qcore_unix_p.hPeter Hartmann2014-03-142-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and make it independent of QProcess, because we want to use it from QtNetwork as well. In addition, move select_msecs() to qcore_unix_p.h as well and rename it to qt_select_msecs(). Task-number: QTBUG-36144 Change-Id: Ief681b6f6c80e85aa5091a5a04bcedb60f353217 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * BlackBerry: Improve platform specific documentationBernd Weimer2014-03-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | Updated BlackBerry specific documentation around QSettings to make the differences more obvious for developers. Change-Id: Ib9acc2409379a836713f1a7e9d6189585a35aa61 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Erin Rahnenfuehrer <erahnenfuehrer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Don't show evaluation popup for unsupported evaluationKai Koehne2014-03-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not show the popup for unsupported evaluations on every launch of a QWidget based application. This is causing problems e.g. for applications that are run by Qt Creator in the background, like qmlpuppet. Instead, we'll show a similar dialog on Qt Creator startup. Change-Id: I6b44c24865ed6992a70f8a9dd0bcd08a4744cb28 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com> Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Do not assume that a class name is the first string in metaobject.Jędrzej Nowacki2014-03-141-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | The patch removes unwritten requirements of having a class name as the first string in qt_meta_stringdata_XXX::stringdata. It allows us to use the name for suffix check in moc and potentially reduce the object size. The patch actually fixes QMetaObject, so it properly interpret classname field in qt_meta_data_XXX, which was previously ignored. Change-Id: Id31aaf214b6d48c9dd1063ef9c00ec6b22738cbf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add ReadOnlyChange event to widgets that support setReadOnly(bool).David Faure2014-03-132-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is useful for widget styles to react when widgets are set read-only, e.g. to update their palette accordingly. [ChangeLog][QtWidgets] All widgets with a setReadOnly method now send a ReadOnlyChange event (e.g. for app-specific palette changes) Change-Id: I74719a3e1b7d034d9bfc94305f846f42aae935bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-132-0/+3
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899