From 0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Thu, 26 Nov 2015 10:37:24 +0100 Subject: Add support for ImhAnchorRectangle Adds the following API: * QInputMethod::anchorRectangle() * QPlatformInputContext::setSelectionOnFocusObject() This will be used for determining how to display selection handles. Change-Id: If57e3fd58ff0f1ba7899f7dd62bfa9c006028667 Reviewed-by: Richard Moe Gustavsen --- src/corelib/global/qnamespace.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 1a3536d45b..39ca6dcd3e 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1338,6 +1338,7 @@ public: ImTextBeforeCursor = 0x800, ImTextAfterCursor = 0x1000, ImEnterKeyType = 0x2000, + ImAnchorRectangle = 0x4000, ImPlatformData = 0x80000000, ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText | -- cgit v1.2.3 From 6c54e10144e7af02f4c35e20e5f375a0cf280b8b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 8 Mar 2016 11:07:53 +0100 Subject: Qt Meta macros: Allow tools to define annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Kevin Funk Reviewed-by: Milian Wolff Reviewed-by: Thiago Macieira Reviewed-by: Jędrzej Nowacki --- src/corelib/global/qglobal.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2551dcb5d3..98c9902674 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1050,8 +1050,6 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1); #endif // QT_NO_TRANSLATION -#define QDOC_PROPERTY(text) - /* When RTTI is not available, define this macro to force any uses of dynamic_cast to cause a compile failure. -- cgit v1.2.3 From f931e5e72d4617023bbea46cba2c0d61bb1efa4f Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 7 Apr 2016 15:07:04 +0200 Subject: add cross-platform tablet->mouse event synth; enable on Android 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 --- src/corelib/global/qnamespace.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 39ca6dcd3e..fc7ca9b216 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -507,6 +507,7 @@ public: AA_DisableHighDpiScaling = 21, AA_UseStyleSheetPropagationInWidgetStyles = 22, // ### Qt 6: remove me AA_DontUseNativeDialogs = 23, + AA_SynthesizeMouseForUnhandledTabletEvents = 24, // Add new attributes before this line AA_AttributeCount -- cgit v1.2.3