summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-1/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+21
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * Fix QVariant conversion to an enum type.Olivier Goffart2016-05-161-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariant::canConvert<Enum> was returning true for everything can can be converted to integer, but not for integer itself. That's because in QVariant::canConvert we set the targetType to Int of it's an enum, but the Int->Int case was not on the conversion matrix. So this commits adds it to the conversion matrix and now QVariant::canConvert<Enum> returns consistently true for int itself. But even tough canConvert returned true, it did not actualy do any conversion to the enum type itself. Fix that by handling the case properlt in 'convert' [ChangeLog][QtCore][QVariant] Fixed QVariant::canConvert and conversion from integer types to enumeration types. Task-number: QTBUG-53384 Change-Id: I6ac066f3900e31bfcea7af77836ddfc7730bd60b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | winrt: Remove explicit exit callMaurice Kalinowski2016-05-191-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c3ae221 introduced a mean to actually close an application. Otherwise the application was in an undefined state and did not exit. Since 5.6 we switched to Xaml and the explicit call to Exit() is not required anymore. This also allows using multiple application objects sequentially as the unit tests do in some cases. Change-Id: I9030afec72a4534e818c77c373dc3a81b922a480 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Collate conversion functions for Core Foundation/Foundation typesTor Arne Vestbø2016-05-192-1/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it easier to apply similar changes across all related functions, and to implement functions for new types by having the previous approaches available in one place. Change-Id: I3f0590d67d0e6deb1c6c856ab1de96b55b6af058 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Add support for Apple tvOSMike Krus2016-05-173-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-1212-29/+96
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * | Be more specific what is in Core and what is notJędrzej Nowacki2016-05-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | !isComplex is quite good heuristic, but we know for sure which types should be included. Change-Id: I609d021b8a668e6c1945ed2b11d69f5a82b5e2bf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| | * normalize structure of plugandpaint exampleOswald Buddenhagen2016-05-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | as in other examples which come with plugins, use an additional hierarchy level which contains the app and plugin subdirs. Change-Id: I2487755967aa3474c337c8c8af10be49627b63d0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * | Tune fast-exit for signal activation for QML.Erik Verbruggen2016-05-032-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QML, it quite often happens that only the QML engine is connected to a signal, and no C++ handlers. By splitting up the fast-exit case and handling QML separately, we can prevent a call to QThread::currentThreadId, and locking+unlocking the mutex. On x86 this saves ~130 instructions according to valgrind. Change-Id: I947fe42afe351922339ac982a6d498bc2f7b5192 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-293-4/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| | * Make it clear that QObject::tr() falls back to QString::fromUtf8()Sérgio Martins2016-04-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The reference to trUtf8() made it even more confusing, so remove it. It's redundant and deprecated anyway. Change-Id: I9921297160db3660bb5099692bbfdaf6e85637aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Silence MSVC warnings when using certain std algorithmsMarc Mutz2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC STL warns when passing naked pointers as non-bounded iterators to algorithms such as std::equal and std::copy, in an attempt to inform users that the range specified by that iterator has an implicit minimum size that the caller of the algorithm must ensure is met: warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \ this call relies on the caller to check that the passed values are correct. To \ disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \ use Visual C++ 'Checked Iterators' When building Qt, as well as when building user projects with qmake (cf. 0a76b6bc7f98900ea884cd10ccca1a332e5bdba5), we globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS), but since we started using STL algorithms in public headers (e.g. in qvector.h), users get this warning in their own projects now, unless they, too, define said macro. But such a requirement is against the Qt policy to have headers that are warning-free as much as possible. The suggested way of fixing this warning is to wrap the naked pointer in a stdext::unchecked_array_iterator before passing it to the algorithm, cf. examples in https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx or, together with the capacity-made-explicit, in a stdext::checked_array_iterator. To avoid ifdefs for platforms that don't have these extensions (which, incidentally, for the unchecked case, includes MSVC 2012), wrap the calls in macros. The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least for public headers, even though this commit also adds the wrapper to implementation and private header files. An alternative to the wrapper would have been the version of std::equal that takes four iterators. However, that is a C++14 library feature, while this version of Qt still needs to compile with a C++98 compiler, and, more importantly, there isn't, and never will be, a corresponding 4-iterator version of std::copy. Task-number: QTBUG-47948 Done-with: Stephen Kelly <steveire@gmail.com> Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26 Reviewed-by: Stephen Kelly <ske@ableton.com>
| | * Add missing initializersTimur Pocheptsov2016-04-251-0/+2
| | | | | | | | | | | | | | | | | | | | | Coverity, CIDs: 10724, 10725. Data member _iterator is not initialized. Change-Id: I0c94f5cef031e208aab1687209282fae0317f0ab Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| * | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-04-266-8/+60
| |\ \
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-256-8/+60
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| | | * Improve performance of socket notifications on WinCEAlex Trotsenko2016-04-192-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEventDispatcherWin32 on WinCE uses a separate low-priority thread to monitor sockets activity, so changing the state of notifiers occurs asynchronously to the main thread. This makes a message-based socket activation mechanism ineffective. To avoid timeouts in the helper thread, update the thread's pool directly from the (un)registerSocketNotifier() functions. Change-Id: I702c32d69dce09323ca5f65dc2ee1407842e41ef Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | | * QWinEventNotifier: compile with -Wzero-as-null-pointer-constantMarc Mutz2016-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems to be the last 5.6 QtBase public header that didn't, paving the way to add the warning to the headersclean check. Change-Id: Ib2655782e34ec58e5d9b1b9c0ec31a965a38f9b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | | * Fix build when Qt is used in an automatic reference-counted environmentTor Arne Vestbø2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When automatic reference-counting (ARC) is enabled on Darwin platforms the NSAutoReleasePool class should not be used directly, which caused a build error if qglobal.h was included after the Foundation.h in client code. The preferred alternative for ARC is the scoped @autoreleasepool construct, which allows the compiler to reason about needing to insert _objc_autoreleasePoolPush and _objc_autoreleasePoolPop calls. Note that ARC translation units can be combined with non-ARC translation units, so Qt and the QMacAutoReleasePool class can still be used in ARC client code even if Qt is not built with ARC. Task-number: QTBUG-51332 Change-Id: I7ef1c3146aa416a9d6a1dc299ce7b17f22f889e5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
| | | * Don't copy the functor object for each signal emissionOlivier Goffart2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior was different in the variadic template code and in the C++98 code. The code without variadic template support was not copying the functor object (e.g. a lambda) before calling it. However, in the variadic template section, QtPrivate::FunctorCall::call took the functor by value instead of by reference resulting in a copy. QtPrivate::FunctorCall::call is a helper function for QtPrivate::FunctionPointer::call which is only needed for variadic template expension. [ChangeLog][QtCore][QObject] If the compiler supports variadic templates, no longer copy functor connected to a signal each time the signal is emitted. Restoring the C++98 behavior. Task-number: QTBUG-52542 Change-Id: I3ca20ef6910893b8a288e70af7de4c7b69502173 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * winrt: Try to acquire CoreDispatcher from multiple sourcesMaurice Kalinowski2016-04-131-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the system launches the application via different activation mode (eg. app registered for sharing) no main window will be created. Hence accessing the core window will return null and event dispatcher initialization will fail. In that case iterate through all available views and try to get access to their dispatcher to be able to invoke code on the xaml thread. Task-number: QTBUG-49276 Change-Id: I8c78baa27747a0465ff7a1b2ead6c9e03f0e05a8 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * | | QtCore: mark more types as primitive/movableMarc Mutz2016-04-251-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | These types are held in QVarLengthArrays, so benefit from being trivially relocatable. They are also part of the private API, so there's no BC issues with potential uses of these types in QList. Change-Id: I8adc0c801885f8fffa05eb1f173d7e4bb085ba7b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Let Q_DECLARE_METATYPE and Q_DECLARE_FLAGS be undefined under Q_MOC_RUNThiago Macieira2016-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | That's required so that they remain in the output from the preprocessor Change-Id: Id69569111e7d4e619e22ffff144b4a1ee90865f0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-033-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/double-conversion/include/double-conversion/utils.h src/corelib/global/qnamespace.qdoc src/corelib/tools/qsimd_p.h tests/auto/corelib/io/qfile/tst_qfile.cpp Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
| * | CoreLib: use const (and const APIs) moreAnton Kudryavtsev2016-04-183-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For CoW types const methods will be called. Mark store_persistent_indexes() as const, because this method does not modify the object. Change-Id: Ic867913b4fb5aaebfbaaffe1d3be45cf7b646403 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtBase: use printf-style qWarning/qDebug where possible (II)Marc Mutz2016-05-033-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this second part, replace qWarning() << "" << non-QString with qWarning("..%.", non-QString). QString (and QUrl etc) have special escaping handling when streamed into QDebug, so leave those alone. They also seem to expand to less code than the qPrintable() alternative, so there's no reason to replace them. Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui, Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds. Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Revert "Optimize QMetaObject::activate."Milian Wolff2016-04-251-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andre reported issues to me which seem to arise from this patch. Most notably, he showed me a backtrace containing the following assertions. Note how the dtor of ConnectionListsRef is accessing shared data which used to be guarded by the connection lock, which got broken by my patch that is now reverted hereby. A future patch can potentially reintroduce my performance optimization but that will require more evaluation and better checks with TSan or helgrind. Sorry for this. Thread 7 (Thread 0x7fffc7fff700 (LWP 32705)): .0 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .1 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .2 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1647 No locals. .3 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc7ff8650, msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/ qlogging.cpp:792 message = {static null = {<No data fields>}, d = 0x7fffc14f5050} ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffc7ff8630, reg_save_area = 0x7fffc7ff8570}} .4 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8 "connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp", line=3646) at global/qglobal.cpp:3036 __PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*, int)" .5 0x00007ffff64db388 in QMetaObject::ConnectionListsRef::~ConnectionListsRef (this=0x7fffc7ff8710, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646 No locals. .6 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110, signalOffset=3, local_signal_index=1, argv=0x7fffc7ff8850) at kernel/ qobject.cpp:3685 locker = {val = 140737328754040} connectionLists = {connectionLists = 0xa9c460} lists = {0xa9c4e8, 0x7ffff64a0ceb <QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>} numLists = 1 currentThreadId = 0x7fffc7fff700 signal_index = 4 empty_argv = {0x0} __PRETTY_FUNCTION__ = "static void QMetaObject::activate(QObject*, int, int, void**)" .7 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110, m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>, local_signal_index=1, argv=0x7fffc7ff8850) at kernel/qobject.cpp:3602 No locals. <snip> Thread 4 (Thread 0x7fffc77fe700 (LWP 32712)): .0 <function called from gdb> No symbol table info available. .1 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .2 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .3 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1647 No locals. .4 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc77f7500, msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/ qlogging.cpp:792 message = {static null = {<No data fields>}, d = 0x7fffb94f14b0} ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffc77f74e0, reg_save_area = 0x7fffc77f7420}} .5 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8 "connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp", line=3646) at global/qglobal.cpp:3036 __PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*, int)" .6 0x00007ffff64db388 in QMetaObject::ConnectionListsRef::~ConnectionListsRef (this=0x7fffc77f75c0, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646 No locals. .7 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110, signalOffset=3, local_signal_index=1, argv=0x7fffc77f7700) at kernel/ qobject.cpp:3685 locker = {val = 140737328754040} connectionLists = {connectionLists = 0xa9c460} lists = {0xa9c4e8, 0x7ffff64a0ceb <QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>} numLists = 1 currentThreadId = 0x7fffc77fe700 signal_index = 4 empty_argv = {0x0} __PRETTY_FUNCTION__ = "static void QMetaObject::activate(QObject*, int, int, void**)" .8 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110, m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>, local_signal_index=1, argv=0x7fffc77f7700) at kernel/qobject.cpp:3602 No locals. .9 0x00007fffe2a7aa0a in CppTools::CppModelManager::documentUpdated (this=0x9d2110, _t1=...) at .moc/debug-shared/moc_cppmodelmanager.cpp:299 _a = {0x0, 0x7fffc77f7740} This reverts commit 8619214c5e76c70e32b47cd002be1adb1bc2f5bf. Change-Id: I13df84012e74a01db750a99a8e5e4bf5357c7f78 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove dynamic loading of functions that are present in Windows Vista onwards.Friedemann Kleint2016-04-192-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | Invoke functions directly and add libraries accordingly. Task-number: QTBUG-51673 Change-Id: Ie19d1fc6aa932d6e93a7d310048e4c162fb81046 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-113-26/+55
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * | add cross-platform tablet->mouse event synth; enable on AndroidShawn Rutledge2016-04-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's urgent to fix the issue that on Android, it became impossible to interact with any widget or MouseArea which handles only mouse events but not tablet events, using the stylus, because stylus events are sent only as QTabletEvents. Before 5.6 (change 01d78ba86a631386a4d47b7c12d2a359da28f517) they were sent as touch events, and mouse events were synthesized from those. Whereas on other platforms, every QTabletEvent is followed by a synthesized QMouseEvent. This fix proceeds in the direction that event synthesis should be done in cross-platform code so that platform plugins don't have to repeat it, following the same pattern as for touch->mouse synthesis. Just as in that case, the application can disable it, and the platform plugin can also report that it's unnecessary for Qt to do the synthesis because the platform already does. So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the tablet->mouse synthesis from all platform plugins, because the plugin does not know whether the tablet event was accepted or not, so it does not have enough information to decide whether to synthesize a mouse event. Synthesis has been unconditional until now, which contradicts what the documentation says: the mouse event should be sent only if the tablet event is NOT accepted. We can now gradually make this promise come true. [ChangeLog][QtCore][Tablet support] A synthetic mouse event will no longer be sent after every QTabletEvent, only after those which are not accepted (as documented). Task-number: QTBUG-47007 Task-number: QTBUG-51618 Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-23/+50
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| | * Qt Meta macros: Allow tools to define annotationsOlivier Goffart2016-04-061-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This might be useful for IDE or other tools to be made aware of Qt macros. This is inspired to what QtCreator[1] and moc-ng[2] does. But they are forced to redefine or inject code at precise location which might be difficult. This is going to make it easier to use libclang in qdoc. With this change, the tooling can just predefine the macro QT_ANNOTATE_FUNCTION and QT_ANNOTATE_CLASS to get what they need. Example with libclang: "-DQT_ANNOTATE_CLASS(type,...)=static_assert(sizeof(#__VA_ARGS__),#type);" "-DQT_ANNOTATE_CLASS2(type,a1,a2)=static_assert(sizeof(#a1,#a2),#type);" "-DQT_ANNOTATE_FUNCTION(a)=__attribute__((annotate(#a)))" "-DQT_ANNOTATE_ACCESS_SPECIFIER(a)=__attribute__((annotate(#a)))" "-DQ_CLASSINFO(name,value)=static_assert(sizeof(name,value),\"qt_classinfo\");" "-DQ_REVISION(v)=__attribute__((annotate(\"qt_revision:\" QT_STRINGIFY2(v))))" [1] qt-creator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h [2] https://code.woboq.org/mocng/src/qobjectdefs-injected.h.html Change-Id: I88fcb28f1dbb3d26ea82f10e9948e68a18c795e9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| * | Move QThread::currentThreadId() down to the loop using it.Erik Verbruggen2016-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the call from happening in case no C++ signal is connected. Change-Id: I32027df446391f3fc979528738a106223042d632 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | qdoc: Remove Q_QDOC for int type() in qmetatype.hMartin Smith2016-04-082-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It probably wasn't necessary in the first place, but it certainly isn't needed now. Also changed a pair of internal qdoc comments on static functions that are not declared outside the .cpp file. Now they are no longer qdoc comments. This change does not require clang in qdoc. Change-Id: I39df3eb1e3f57ba1da93f27892d0c3af8f9481ef Task-number: QTBUG-52454 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Unify naming of LIBS/CFLAGS for 3rd party librariesLars Knoll2016-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Most libs use QMAKE_LIBS/CFLAGS, but some have other naming conventions. Unify them into using QMAKE_LIBS/CFLAGS. Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-056-9/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-1/+1
| |\| | | | | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| | * QVariant: Fix flags for type-erased associative iterator keyStephen Kelly2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flags here are passed to a private QVariant constructor, and they really represent a boolean - IsPointer or not. Because the flag for the key_type was incorrectly populated with the flag for the value_type, memory would be corrupted when using a mapping type whose value_type is a pointer, but whose key type was not, such as QMap<QString, int*> This typo has been there since the concept was introduced in commit v5.2.0-alpha1~807 (Add container access functionality for associative containers in QVariant., 2013-04-05). Task-number: QTBUG-52246 Change-Id: I9ecb13c603015eed2dc2ca43947fa0ecd6be8b5a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Remove the traces of the discontinued android-no-sdk platformEirik Aavitsland2016-03-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning out the workarounds for the discontinued "Embedded Android" platform of Boot2Qt. Change-Id: I0ff9d770e82a43457fb7e5da0428f4597ead4038 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | Unify license header usage.Jani Heikkinen2016-03-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Fix some documentation warnings.Friedemann Kleint2016-03-242-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:87: warning: Cannot find 'atEnd(...)' in '\fn' virtual bool QNonContiguousByteDevice::atEnd() qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:107: warning: Cannot find 'size(...)' in '\fn' virtual qint64 QNonContiguousByteDevice::size() qtbase/src/corelib/io/qsettings.cpp:2387: warning: Unexpected '\endlist' qtbase/src/corelib/kernel/qcoreevent.cpp:90: warning: Undocumented enum item 'Pointer' in QEvent::Type qtbase/src/corelib/kernel/qmetaobject.cpp:346: warning: No documentation for 'QMetaObject::inherits(const QMetaObject *metaObject)' qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: No such parameter 'sourceSate' in QSignalTransition::QSignalTransition() qtbase/src/corelib/global/qglobal.cpp:945: warning: Undocumented parameter 'memberFunctionPointer' in qConstOverload() qtbase/src/corelib/global/qglobal.cpp:956: warning: Undocumented parameter 'memberFunctionPointer' in qNonConstOverload() qtbase/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc:519: warning: Command '\snippet (//! [96])' failed at end of file 'code/doc_src_stylesheet.cpp' Change-Id: I7da69b9b535f484e10ca030dbf64b6007dce0df3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-3012-1261/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Fix Q_QDOC code for PointerToMemberFunctionOlivier Goffart2016-03-294-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In functions such as QObject::connect and similar which are using pointer to member function or functor, we have a different declaration for qdoc because we don't want to show the QEnableIf and other type traits in the doc. However, The code still needs to be valid, as we will use clang to parse the documentation. Fix it by making 'PointerToMemberFunction' and 'Functor' template parameters (which they actually are). Change-Id: Ie2648407bae21ba6d1677f6de2d6f597486b5c98 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | Fix parsing of documentation for QByteArrayList and QStringListOlivier Goffart2016-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QListSpecialMethod is an internal class. Everything needs to be hidden from Q_QDOC otherwise while parsing with clang, we get errors. Importantly, hides it while inheriting from QList so it does not appear in the documentation Change-Id: If2ac158f35d6a367aa033cfc7e6a054c912359b9 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-2213-71/+98
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-212-13/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| | * winrt: process all triggered timers in processEventsOliver Wolff2016-03-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If only one timer is processed in there it is possible that a reoccuring timer which has a very low timeout blocks all the other timers from being triggered. This high frequency timer might be the only one to be triggered in every processEvents call. Task-number: QTBUG-51888 Change-Id: I8a0026d1e8519171ab60d1b47c494a15d30328b3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| | * Add argument names to the function signatures in headersOlivier Goffart2016-03-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, in the .cpp, the declaration has the argument name in comments because it is not used (instead of using Q_UNUSED). The old qdoc could parse that, but once clang is used, these comments are not seen anymore. So add the argument names to the headers. This is also good for things like auto completion, which uses only the header to know what the argument name is. I grepped for " */)" and made sure all the functions that are documented have the right arguments. I also added the name to all the function around for consistency. Change-Id: I1aaa37e25a1985f7f51653f047a1ac2633242b56 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| * | Dedupe QMetaObject::castSean Harmer2016-03-151-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | By implementing in terms of QMetaObject::inherits(). Change-Id: I39a039539b05a20bc1713bd450d8a998c78433aa Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>