Commit Graph

32 Commits

Author SHA1 Message Date
Sergio Martins
1acbf48786 Don't depend directly on QSizePolicy, as that's QtWidgets
Introduce our own enum. Soon our qtquick frontend won't link
against QtWidgets
2022-06-11 18:22:38 +01:00
Sergio Martins
6aed1508af tests: Don't run tst_qtwidgets if only qtquick tests were specified 2022-06-11 12:38:57 +01:00
Sergio Martins
1070cbce87 tests: Remove unneeded test skipping on Qt < 5.15
Minimum is 5.15 nowadays
2022-06-10 23:12:10 +01:00
Sergio Martins
84561a9d67 tests: Remove unused color argument from createDockWidget() 2022-06-04 20:03:43 +01:00
Sergio Martins
affd1d12ae tests: Move the last qtwidgets only test to tst_qtwidgets.cpp
tst_docks.cpp is now completely rid of the widget ifdefs
2022-05-31 15:14:16 +01:00
Sergio Martins
230317551b Move installMessageHandler() to Platform.h
It's not Qt specific, as other frontends might want to install
their own handler
2022-05-30 18:31:14 +01:00
Sergio Martins
2421e607a9 Users now instantiate DockWidget view instead of controller
The controllers are private and not intentend for the public.
2022-05-30 11:45:43 +01:00
Sergio Martins
ad7f5f5970 tests: Remove some manual creation of QQuickView
It's abstracted by the platform now
2022-05-27 12:11:43 +01:00
Sergio Martins
03f1a6930c Added Platform::createMainWindow()
Called by tests and layout linter to create a main window.

Simplifies creation of the main window, we can now remove one of the ctors.
Before we supported both the controller creating the view and vice-versa,
while this is convenient it's complex to support, due to order or initializations.

Now, you a create a view, and it creates the controller behind the scenes.
MainWindow is special in this sense, as it's created by the end user, it's
not something internal we want in the ViewFactory.
2022-05-27 10:36:54 +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
65c1b53ea0 tests: Some include cleanup 2022-05-18 04:48:31 +01:00
Sergio Martins
cc8ee097a3 Remove last usage of QWidgetOrQuick type 2022-05-16 23:04:29 +01:00
Sergio Martins
a10187ed5d tests: Port away further from "QWidgetOrQuick" 2022-05-16 20:01:08 +01:00
Sergio Martins
97baed0ef9 Rename layoutWidget variable/method name to layout
It's a controller, so don't suffix it with Widget/View
2022-05-15 21:12:01 +01:00
Sergio Martins
383e4f8abd tests: Use tests_createView() instead of MyWidget2
Decouples tests from Qt a bit more
2022-05-15 12:20:30 +01:00
Sergio Martins
f719697852 Remove DockWidget::setWidget(QWidget) 2022-05-14 09:38:55 +01:00
Sergio Martins
9f7c4cb217 Removed the DockWidgetBase typedef
That existed only to ease porting
2022-05-10 22:53:16 +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
3fabf34bee Renamed View::windowHandle() to View::window()
windowHandle() is missnamed in Qt because QWidget::window() was already
taken in Qt4. But we can make it better here.
2022-05-01 23:09:18 +01:00
Sergio Martins
721d344533 tests: Delete platform when test finishes 2022-04-29 15:47:54 +01:00
Sergio Martins
9dc53f9755 tests: Create the QApplication in Platform ctor
Other frontends won't use QApplication, and QtQuick might even use
just QGuiApplication eventually
2022-04-29 15:36:16 +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
3d1b450cbb Remove View::minimumSizeHint()
It's a QWidget specific concept, so move it to the qtwidgets
frontendcode. QtQuick won't need it.
2022-04-29 00:27:07 +01:00
Sergio Martins
3bb0c6a8d2 Move MDIArea to qtwidgets/ as it was never ported to QtQuick
Can be ported if needed
2022-04-25 20:16:25 +01:00
Sergio Martins
0f61ef63a2 Split DropArea and MDILayout into View/Controller 2022-04-25 18:50:41 +01:00
Sergio Martins
daa6afd14c Move DropArea into controllers/
In preparation to split it into View/Controller.
This is just the move, no code changed yet.
Next will be the namespace change.
2022-04-23 11:46:11 +01:00
Sergio Martins
28754ec260 Fold DropAreaWithCentralFrame into DropArea
This separation was never useful
2022-04-23 00:17:20 +01:00
Sergio Martins
33073c75ee tests: Remove the last usage of asQWidget() from tests/
Now only a few remaining in src/
2022-04-19 19:26:34 +01:00
Sergio Martins
80beeb7ffb tests: Remove last 2 usages of asQWidget from tst_qtwidgets.cpp
That method will be removed from View soon
2022-04-19 19:17:48 +01:00
Sergio Martins
d2b5bedfa1 tests: Remove another usage of deprecated asQWidget() 2022-04-19 19:14:58 +01:00
Sergio Martins
d5cec9f5de tests: Move QtWidget specific tests to tst_qtwidgets.cpp
Let's have less ifdefs
2022-04-19 19:07:57 +01:00