summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Undefine overlapping variable names defined in VxWorks headersPasi Petäjäjärvi2013-01-231-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | VxWorks has defined variables with same name as in Qt's headers. Undefine those variables to avoid naming conflict. Change-Id: Ia8ca04a66acece683cd6c7f71df7e5a2800ec98d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Use time.h related includes from qfunctions_vxworks.h file.Pasi Petäjäjärvi2013-01-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In VxWorks qfunctions_vxworks.h file includes correct time related headers and it is included already at file qplatformdefs.h for all mkspecs targets. Change-Id: I8677eef8c79cebb445d89203284f3af27abbdd7f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Add support getting memory page size to RTP mode on VxWorks.Pasi Petäjäjärvi2013-01-232-1/+7
| | | | | | | | | | | | | | | Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Use taskIdSelf() function instead of taskIdCurrent global variablePasi Petäjäjärvi2013-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The uniprocessor taskIdCurrent global variable (declared in taskLib.h) does not exist in VxWorks SMP, because of concurrent execution on multiple CPUs. Any uniprocessor code that reads taskIdCurrent should make calls to taskIdSelf() instead. Change-Id: I4e0efef32297f339d6121c7d4bca3820e0fc9294 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Use Qt defined gettimeofday for VxWorks and no fallback to X11 versionPasi Petäjäjärvi2013-01-232-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | VxWorks don't have gettimeofday function so we always use the one implemented in Qt. VxWorks DIAB compiler is not supported building Qt for VxWorks 6.9.2. Anyone using older VxWorks should also not be affected so use new defines VXWORKS_DKM and VXWORKS_RTP for VxWorks version 6.9.2 onward. Change-Id: I2e9546a101256ea0557b65163b40cd0f28be8519 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-163-10/+36
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Merge remote-tracking branch 'gerrit/release' into stableFrederik Gladhorn2013-01-152-5/+5
| |\ | | | | | | | | | Change-Id: Ieb104d0e390218a063082c93bc9c7e412af2166d
| | * Change all shmget calls to user-only memoryThiago Macieira2013-01-152-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 Reviewed-by: Richard J. Moore <rich@kde.org>
| * | Ignore WasDeclaredAsMetaType flag during binary check.Jędrzej Nowacki2013-01-101-5/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody should break ODR, but we were living with apps breaking it for at least 8 years. Sure it is an undefined behavior but in many cases it works. I do not think that Qt should enforce usage of a proper C++, it is role of a tool chain. Qt can only indicate that something is going terribly wrong. Make message a bit more verbose. Sometimes the ODR violation is not that easy to fix, therefore a hint is a nice addition. Update documentation of qRegisterMetaType. Change-Id: I61dcccc840eec80a4ed5b8a212a912807d239d8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Q_COREAPP_STARTUP_FUNCTION macro.David Faure2013-01-152-0/+73
| | | | | | | | | | | | | | | | | | | | | | This is necessary for initializing things in a library, which require a QCoreApplication instance (unlike Q_CONSTRUCTOR_FUNCTION, which runs before that). Example use cases: KCrash (segv handler), and KCheckAccelerators (debugging tool triggered by magic key combination). Change-Id: I5f4c4699dd4d21aea72b007989ba57467e86ed10 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add support for Linux eventfd(7) in the UNIX event loopThiago Macieira2013-01-152-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | eventfd(7) uses less resources than a pipe, as it only needs to store a single 64-bit integer, as opposed to a full buffer. It was introduced first on Linux version 2.6.22 and glibc 2.7. However, both the configure-time test and the runtime usage require the use of EFD_CLOEXEC for thread-safety, so this code will be enabled only for Linux 2.6.27 and up as well as glibc 2.9 and up. Change-Id: Ic7e10b28d7b1d4ca24be614ed84055c4429a68e4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-01-099-18/+18
|\| | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * Fix compile when QT_EVAL is definedAndy Shaw2013-01-081-3/+3
| | | | | | | | | | | | | | Change-Id: Id1acae0c5941e5409ca540017c0c0139e1cc4d2f Reviewed-by: Samuli Piippo <samuli.piippo@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * Replace macro qdoc with Q_QDOCDebao Zhang2013-01-088-15/+15
| | | | | | | | | | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devJędrzej Nowacki2013-01-073-11/+23
|\|
| * BlackBerry: Reevaluation of timer list in event dispatcherBernd Weimer2013-01-041-10/+21
| | | | | | | | | | | | | | | | | | | | In the event dispatcher the timer list has to be reevaluated after each call to filterEvent, because timers could be started in event filters. Change-Id: I1a275845fb74c63441f2301555f3459f8295af27 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix copy-pasto in QMetaObject::methodCount docs.Stephen Kelly2013-01-031-1/+1
| | | | | | | | | | | | | | Copy-pasto'ed from the propertyCount docs. Change-Id: Iddb4ce9c9559ca274a80deb0785424df108af762 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Declare the QMetaType::WasDeclaredAsMetaType enum as privateThiago Macieira2013-01-031-0/+1
| | | | | | | | | | | | | | | | Omit its value in the documentation. Change-Id: I474faefde23b0e2e0a77a9e6391fd556a6523128 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSIONGiuseppe D'Angelo2013-01-076-22/+26
|/ | | | | | | | | | | | QRegExp and QRegularExpression are totally independent, therefore using two different defines is the right thing to do. Also, document the new define in qfeatures.{txt,h}. Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Make these headers includable directly, on all systemsThiago Macieira2013-01-011-5/+4
| | | | | | | | | | | | | For qwineventnotifier.h, just wrap the code around #ifdef Q_OS_WIN. This has the added benefit of fixing the current qt_no_master_include problem (that is, even if you #include <QtCore> on Windows, you wouldn't get it). For qtypetraits.h, it requires qglobal.h first. Change-Id: If1ba09a0a29de429a5b87e9878c8ac6a62a443c4 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix some typosSergio Ahumada2012-12-211-1/+1
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Delete the QSlotObject when disconnect()ingGiuseppe D'Angelo2012-12-171-0/+6
| | | | | | | | | | | | | | | When disconnect()ing through a QMetaObject::Connection, if the QObjectPrivate::Connection contains a slot object, deref it, so that it will be destroyed before the next run of cleanConnectionList. Previously, a copy of the functor passed to connect() was kept until QObjectPrivate::cleanConnectionLists was called (by adding a new signal, or the sender was destroyed), even after a successful call to disconnect(). That is, we were keeping that copy allocated without any good reason. Change-Id: Ie6074ea797df1611cb995dec07c5b5a742360833 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Reset the QMetaObject::Connection dptr when disconnect()ingGiuseppe D'Angelo2012-12-171-0/+4
| | | | | | | | | | | | The QObjectPrivate::Connection refcount was not decreased when disconnect()ing, therefore it was kept alive by the owning QMetaObject::Connection object. This removes a leak in case the QMetaObject::Connection survives the sender object, after a successful disconnect(). Change-Id: Ie2ea59b269a0e589ae23c1457df7533be77c0797 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Docs: Fix referencesChristian Stenger2012-12-132-6/+6
| | | | | Change-Id: I48173186afb874d307010f4f303d0e4f97ec0287 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QMetaType: remember whether a type was registered with Q_DECLARE_METATYPEMarc Mutz2012-12-111-2/+15
| | | | | | | | | | | | | | | | | | | | There are two ways to register a type: using Q_DECLARE_METATYPE(T) and using qRegisterMetaType<T>("T"). Doing one thing in one translation unit and another thing in another TU constitutes an ODR violation, because the value of QMetaTypeId<T>::Defined will differ in the two TUs. By adding the information whether a type was declared with Q_DECLARE_METATYPE to the typeFlags(), such a use will trigger the existing binary-incompatibility failure that checks for equality of the incoming type flags with the stored ones (if any). I had to encode the type as a defaulted function argument in order to avoid the linker merging instantiations of the function templates and therefore rendering the detection moot. Change-Id: I82017caf300458b411cc8ac2f6653536fac64117 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtBase: Doc: Replacing link with snippet in QTranslator.David Schulz2012-12-051-3/+3
| | | | | | | | Because the linguist examples are moved to qttools module, a link to the hellotr example broke. Change-Id: I2aeefc143578618396f5be38ed1d52afdd1f7436 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Remove QUUID_STRING from qfeatures.{h,txt}Tasuku Suzuki2012-12-051-4/+0
| | | | | | | It is too specific and relatively small Change-Id: I55ec15ecaac0692741996a5c15a111db696490cf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix connecting to a functor with 3 argumentsOlivier Goffart2012-11-301-1/+1
| | | | | | | Task-number: QTBUG-28285 Change-Id: I07bd870c093482035728aa783d0ecbc8aa8670d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow qmljsdebugger argument and value to be separated by a spaceAurélien Gâteau2012-11-261-0/+3
| | | | | | | | | | This change makes it possible to use the QML JS debugger with KDE applications. Change-Id: Id5838fa34dcb8b54127abc6da6fe7c2e9a5a1c2e Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change contact-us from Nokia to DigiaSergio Ahumada2012-11-261-5/+5
| | | | | Change-Id: I0d94b66d802c3899009dde1e570f195aadd861dc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move isBuiltinType() to namespace QtPrivate and export it.Friedemann Kleint2012-11-262-5/+9
| | | | | | | | | | | There is currently a symbol clash with a duplicated isBuiltinType() in ActiveQt's dumpcpp-tool, which breaks static building. Reuse the function. Task-number: QTBUG-28131 Change-Id: I4985e8405924754aa613311ca3f06d6ba29758b8 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Cleanup QCoreApplication::Type letfover docsJ-P Nurmi2012-11-261-8/+0
| | | | | | | | The enum was removed in 553e21. Change-Id: I29bf049010b0424af3ca00095d8a36d53a7538e4 Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Fix QVariant streaming in Qt3 compatibility mode.Jędrzej Nowacki2012-11-241-3/+3
| | | | | | Task-number: QTBUG-27700 Change-Id: I0408293e43c3330dbc4746198a19709e795f552a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove QApplication::type() and make QCoreApplication::Type internalJ-P Nurmi2012-11-232-6/+5
| | | | | | | | | | | | These Qt3 legacy application types do not match the application types available in Qt5. Thus, the decision was to kill the confusing and mostly useless type enum. Use for example qobject_cast instead to find out the application type. Task-number: QTBUG-28093 Change-Id: Ia8cf7c3ea98a3cea27f74760d62e519ea10bce9f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix outdated comment in kernel/qtranslator_p.h.hjk2012-11-231-2/+2
| | | | | Change-Id: I0e7cc1686c5bcce611e353987e41b4dae7af5c31 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Emit destroyed() signal before children get deletedLars Knoll2012-11-231-1/+1
| | | | | | | | | | | Make sure we always emit the destroyed() signal before we delete our children. This wasn't working correctly for QWidget based classes, as the QWidget destructor deletes all children itself. Task-number: QTBUG-24672 Change-Id: Iecdff3489196271177edfeba1c4a2c5800e255af Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Revise QObject::connect documentation.Mitch Curtis2012-11-231-4/+5
| | | | | | Change-Id: I07d593b6b2c3d5c8843212d5a888525ac29ca1b0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use QT_STRINGIFY in qobjectdefs.hOlivier Goffart2012-11-221-3/+1
| | | | | | | | | | | Since it is declared in qglobal.h, we do not need to re-implement the hack here. QTOSTRING was only defined if QT_NO_META_MACROS was defined, so practically not safe to use in other places. Change-Id: Ie5b07d0fa7537ba79380b882a4c822583ee5635e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* BlackBerry: Restore proper BPS channel in event dispatcherBernd Weimer2012-11-211-8/+36
| | | | | | | | | | This change ensures that BPS events are delivered to the proper channel even if the application code would change the channel. Change-Id: Id44efbdd99350c639e391161dd89b8d422c4b330 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Jeff Kehres <jkehres@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-101-1/+1
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Cleanup old signal handler mechanismsRafael Roquetto2012-11-083-67/+0
| | | | | | | | | | Remove watchUnixSignal(), unixSignal() and associated code. These are relics which were being used by QWS to detect virtual console switching. Currently they are not being used at all. The recommended way to watch for Unix signals in Qt is http://doc-snapshot.qt-project.org/5.0/unix-signals.html. Change-Id: Id34207cb8853442302a45b2816356da0f973ebb1 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Allow connect to functors with less parameters than the signalOlivier Goffart2012-11-061-1/+19
| | | | | | | | | | | | | | | | | | | | Before, the functor slot (or lambda expression) had to have the same amount of arguments as the signal. This shown to be a big problem to be able to connect to signals that had a QPrivateSlot. This implementation use the type of the operator() of the functor to know how many arguments we have. As a bonus, we also can check the arguments in a static assert. The test comes from https://codereview.qt-project.org/#change,38703 But this patch also works without variadic template If the compiler does not support decltype, we workaround the lack of it by using another level of indirection. Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix connection to const slots (or from const signals)Olivier Goffart2012-11-061-0/+121
| | | | | | | | Pointer to const member function have a different signature, and hence need their own traits code. Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QTranslator: Use resource memory instead of copying itThomas McGuire2012-11-021-35/+66
| | | | | | | | | Previously, translations in resource files were loaded through QFile and the data was copied. Now, simply use the resource memory in-place. Change-Id: I55a06c1e7bb15c169cc69b908b3021136beac9d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't return false from removeTranslator() just because of shutting downOswald Buddenhagen2012-11-021-3/+5
| | | | | | | | the condition is supposed to suppress the event emission, not to trash the return value. Change-Id: I3e327ceedb909ac29ba975c49b0f039b50eb4ee1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Blackberry: Fix QCoreApplication::applicationFilePath() performance.Sergio Martins2012-11-021-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Listing all files with QDir is slow. Instead, use argv[0] for zygotized apps and _cmdname() for non-zygotized. Apps run through the terminal will fall in the zygotized case, which is ok. Note about zygotized apps: Zygotized apps don't have an executable, they live in a shared object file. These apps are run through a deamon that forks and dlopens() the shared object ( for performance reasons ). For this reason we can't use _cmdname(), since it just contains the the file path of the daemon. On the other hand, non-zygotized apps have a bogus argv[0] when run through the navigator ( command line is fine ). Change-Id: I9953e8fa05c9fb11c33b3a38ebab00fe33ba4c44 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Define additional math.h constants if not already definedJonathan Liu2012-10-301-0/+48
| | | | | | | | | | | | The M_E, M_PI_2, etc. math.h constants are not defined with MinGW-w64 GCC when compiling with -std=c++11. Task-number: QTBUG-27561 Change-Id: I2267c170dd3788abc9c37425a9be514bbae51f5a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Alexey Pavlov <alexpux@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do the actual removal of the Soft Keys API and related codeJan Arve Saether2012-10-292-3/+0
| | | | | | | | | | | | | | | | | | | In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Remove some dead code in switch statementsSergio Ahumada2012-10-291-3/+0
| | | | | | | | | | Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc fixes for qcoreapplication.Frederik Gladhorn2012-10-272-8/+26
| | | | | | Change-Id: I58806424b37ebf7bdf9b7f1ead9953b605332361 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>