Sergio Martins
b6460c11f7
Add EventFilterInterface::onMouseEvent()
...
Some event consumers don't want to overload N methods and just
overload one instead
2022-07-04 22:06:30 +01:00
Sergio Martins
9283a55364
Fix Platform only sending mouse press event
...
Was ignoring other mouse event types
2022-07-03 22:26:15 +01:00
Sergio Martins
35c1517709
Handle double click event in EventFilterInterface too
2022-07-03 22:21:57 +01:00
Sergio Martins
84da42c262
Add Platform_qt::isLeftMouseButtonPressed()
2022-07-03 21:44:42 +01:00
Sergio Martins
1bcd425849
Add Platform::displayType()
2022-07-03 21:36:32 +01:00
Sergio Martins
aafa9526f6
Add Platform::organizationName()
...
So we don't use QCoreApplication::organizationName() directly
2022-07-03 20:56:48 +01:00
Sergio Martins
16565fcd46
Add Platform::setMouseCursor()
...
So we don't depend directly on qGuiApp
2022-07-03 20:04:53 +01:00
Sergio Martins
f288d953fc
Add Platform::applicationName()
...
so controllers don't access qGuiApp directly
2022-07-03 19:55:26 +01:00
Sergio Martins
c63290e6d3
Port WidgetResizeHandler away from Qt event filter
2022-07-02 21:27:11 +01:00
Sergio Martins
0963967939
Add mouse move and release events to EventFilterInterface
2022-07-02 20:15:13 +01:00
Sergio Martins
edb2538220
Port DockRegistry away from Qt event filters
...
Uses our filter abstraction now
2022-07-02 12:50:52 +01:00
Sergio Martins
5639b5632a
tests: Construct QCoreApplication earlier
...
The global event filter wasn't being set as it didn't have
a qGuiApp at that point
2022-07-02 12:48:16 +01:00
Sergio Martins
c72fdf3586
Add EventFilterInterface and port DockRegistry to it
...
Some classes wont have any Qt in it, so they need another way
to install global event filters. Added API to Platform.h for this
purpose. Implemented as regular event filter in Platform_qt.
2022-07-01 15:28:15 +01:00
Sergio Martins
a690477b73
Move isProcessingAppQuitEvent from DockRegistry to Platform
...
As different platforms will do this differently
2022-07-01 11:31:40 +01:00
Sergio Martins
91e2df3ead
Fix QtTest being included without a dev-mode guard
2022-06-29 10:19:57 +01:00
Sergio Martins
aff9806ab1
Port away from using event filter in DockWidget.cpp
...
Platform now abstract the emittion of window activation/deactivation
2022-06-28 18:36:10 +01:00
Sergio Martins
10c918b93c
Use View instead of ViewWrapper in the api
...
The latter will be an implementation detail soon
2022-06-24 00:10:50 +01:00
Sergio Martins
c0d1bd3f92
tests|qtquick|Windows: Stabilize a test
...
The warning is benign and unrelated to anything kddw is doing
(cherry-picked from commit 1f638d2c7a )
2022-06-19 12:16:46 +01:00
Sergio Martins
755bc6ac14
cmake: Don't add src/ to include path
...
Fully qualify includes instead
2022-06-14 16:57:22 +01:00
Sergio Martins
0031f1bcfd
Release build now builds
2022-06-11 15:24:19 +01:00
Sergio Martins
02a8da4fb8
tests: Remove whitelisted warning
...
It doesn't happen anymore
2022-06-11 14:10:00 +01:00
Sergio Martins
29fd6f4a40
qtquick: Fix binding loops
...
This also restores behaviour with v1.x regarding setParent
2022-06-11 14:03:41 +01:00
Sergio Martins
5faf36700b
Use qGuiApp instead of qApp
...
As QtQuick applications might not have QApplication.
2022-06-06 13:24:38 +01:00
Sergio Martins
a48ce5ccff
tests: Don't fail due to benign warnings
2022-05-30 18:07:14 +01:00
Waqar Ahmed
39c058cd29
Fix messageHandler installation for Qt backends
2022-05-30 20:28:44 +05:00
Sergio Martins
5fdbc12524
Add some asserts
2022-05-27 12:53:22 +01:00
Sergio Martins
bafa21d11c
tests: Abort tests if there were warnings
2022-05-21 00:00:14 +01:00
Sergio Martins
07fc7d0437
tests: Move waitForDeleted() into Platform
...
So each platform can implement their own.
Meaning old Testing.cpp can be deleted too.
2022-05-20 16:41:59 +01:00
Sergio Martins
cc1f75b1b3
tests: Move our message filter into Platform_qt
...
So it can be reused by other tests
2022-05-20 16:29:14 +01:00
Sergio Martins
9173226be7
tests: Normalise signature of argc/argv to match QApplication's
...
Fixes crash when passing "platform -xcb", because argc was being
passed by value, decremented in QApplication, then going out
of bounds in QTest
2022-05-09 15:16:36 +01:00
Sergio Martins
985224f24b
tests: Run tst_view on offscreen by default
...
Moved the QPA offscreen defaulting to Platform_qt
2022-05-08 19:38:52 +01:00
Sergio Martins
1591ed49da
tests: Added tests for View::geometry,pos,x,y,width,height,rect
2022-05-01 21:15:27 +01:00
Sergio Martins
8d09acdf5f
tests: Fix warning about requiring to call init after qApp
2022-04-29 18:05:24 +01:00
Sergio Martins
fcf02fc8bf
tests: Move isGammaray() into Platform_qt
2022-04-29 15:52:46 +01:00
Sergio Martins
721d344533
tests: Delete platform when test finishes
2022-04-29 15:47:54 +01:00
Sergio Martins
099a9018df
Make it easier for tests to init the platform
...
Only a single static method is needed now, instead of 2.
2022-04-29 14:34:32 +01:00
Sergio Martins
34b07ef340
Delete the Platform when a test is complete
...
So that we support testing multiple platforms in the same test run
2022-04-29 14:05:35 +01:00
Sergio Martins
4946cdeed3
Add Platform::screenNumberFor, removes more asQWidget() usage
2022-04-21 21:47:55 +01:00
Sergio Martins
a6cbfbf065
Rename tests_sendEvent() to sendEvent()
...
Non-test code will also need it
2022-04-19 19:32:56 +01:00
Sergio Martins
05deea3cd8
tests: Move some ifdefed code to their respective platforms
2022-04-19 17:44:36 +01:00
Sergio Martins
201e631a0b
tests: Remove some QPointer usage
...
Which in turn also removes some asQWidget() usage
2022-04-14 18:22:32 +01:00
Sergio Martins
924b32b3c5
tests: Port some QWindow based utils to Window::Ptr
...
So it doesn't depend on Qt
2022-04-13 23:49:29 +01:00
Sergio Martins
664798ee6e
tests: Remove some asQWidget() calls
2022-04-13 22:28:04 +01:00
Sergio Martins
90bd78846a
tests: Port away from a few Qt specific waitForEvent
...
Removes a bunch of asQWidget() from the tests
2022-04-11 15:14:51 +01:00
Sergio Martins
31db3d9562
Port away from QTest::qWaitForWindowActive, it's Qt specific
...
Simpliy moved it to Platform_qt
2022-04-11 11:37:31 +01:00
Sergio Martins
037140b980
Add KDDockWidgets::initPlatform()
...
Instead of using the static variable, which is initialized before
having QApplication.
Will allow us to remove the QTimer from Platform init
2022-04-11 00:55:28 +01:00
Sergio Martins
d6fd54cec4
Por all usages of QWindop/windowHandle to KDDockWidgets::Window
...
Removes a lot of asQWidget() code and is also prepared for non-Qt
views.
2022-04-09 19:21:56 +01:00
Sergio Martins
95671f9d9a
Add Platform_qt, a baseclass for both Qt frontends
...
So we can share some code between QtQuick and QtWidgets
2022-04-07 23:48:40 +01:00