Sergio Martins
410d893de9
qtquick: Implement the missing methods in ViewWrapper
2022-05-27 15:39:08 +01:00
Sergio Martins
406dd19285
qtquick: Don't dereference null FloatingWindow controller
...
Controller is already gone
2022-05-27 14:29:51 +01:00
Sergio Martins
586ed8d70b
Replace View_qtquick::windowIsBeingDestroyed with View::aboutToBeDestroyed
...
Easier if it's generic.
2022-05-27 14:26:34 +01:00
Sergio Martins
da8539820e
qtquick: Find the correct controller when using ViewWrapper
2022-05-27 14:00:19 +01:00
Sergio Martins
267bc4ec79
tests: Test that a floating window is created
2022-05-27 13:35:52 +01:00
Sergio Martins
fb8639969c
Delete QObject::setParent() in the controller
...
To find places where we're setting parent on the controller instead
of in the view. Fix such case where the dock widget view
wasn't being parented to the frame view.
2022-05-27 13:25:06 +01:00
Sergio Martins
5fdbc12524
Add some asserts
2022-05-27 12:53:22 +01:00
Sergio Martins
18651bbf7a
qtquick: Add some qFatal to some unimplemented methods
...
So I can easy get feedback they are missing impl.
2022-05-27 12:47:44 +01:00
Sergio Martins
bcaf0737e9
Move Platform::createMainWindow() to dev mode
...
This is for tests only
2022-05-27 12:11: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
652286760b
qtquick: Fix creation of main window
...
It wasn't initializing the controller
2022-05-27 10:57:54 +01:00
Sergio Martins
df0dde80ef
Remove unneeded "initView" parameter from MainWindow
2022-05-27 10:41:50 +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
e20a8ba396
Remove unneeded KDDOCKWIDGETS_QTQUICK ifdef
2022-05-26 23:24:38 +01:00
Sergio Martins
73dd788fa1
cmake: Remove unneeded -DKDDOCKWIDGETS_QTQUICK
2022-05-26 23:20:27 +01:00
Sergio Martins
ebb623f080
Initialize static resources in the correct platform
...
Non-Qt platforms won't have to do this
2022-05-26 23:16:02 +01:00
Sergio Martins
1dde7e3e99
Add a generic interface for the classic indicator window
...
this removes QWidget references from ClassicIndicators.cpp.
Both the QtQuick and QtWidgets impl will implement this new
interface, which is what ClassicIndicators.cpp uses now
2022-05-26 23:10:26 +01:00
Sergio Martins
fc74698dac
Remove some unused qtwidget includes from controllers/
2022-05-26 10:02:28 +01:00
Sergio Martins
c554bdc68c
Fix DropArea only looking for QtWidget children
...
Instead of using findChildren(), just ask the layout for the
items.
tst_floatingWindow now doesn't crash anymore when looking for
the layout items.
2022-05-26 09:58:23 +01:00
Sergio Martins
4a8ac4a309
Remove unneeded assignment, since we're using scoped rollback
2022-05-26 09:54:31 +01:00
Sergio Martins
042cabbe5d
Use a RAII class to emit floatingChanging()
...
Otherwise during reparenting the signal can be emitted by mistake.
Now we only check at the end if we need to emit it.
2022-05-26 09:29:37 +01:00
Sergio Martins
a85c56a25a
Implement ViewWrapper::is()
2022-05-23 23:37:25 +01:00
Sergio Martins
ac51ffc7d4
tests: Add tests for DockWidget and FloatingWindow ctor
...
To catch potential QML errors in the .qml files.
2022-05-23 23:06:32 +01:00
Sergio Martins
c648e5fbba
qtquick: View::rootView() now returns itself if no parent
...
This matches QWidget::window() behaviour
2022-05-23 22:51:57 +01:00
Sergio Martins
6fd88a8570
qtquick: Add missing properties to floating window
...
They return QObject as they can't be fwd declared in Qt 6 and might
have circular dependency.
2022-05-23 22:31:54 +01:00
Sergio Martins
bab0c99d13
tests: Added tst_separator
...
Helps finding problems in the respective qml file
2022-05-23 19:12:32 +01:00
Sergio Martins
79ef648a27
tests: Added tst_stack and tst_tabbar
...
Finds errors in the respective qml files
2022-05-23 19:00:21 +01:00
Sergio Martins
0f55a2f87a
tests: Add tst_titlebar
...
At least for the ctor, which already helps to find bugs in
the .qml file
2022-05-23 18:07:56 +01:00
Sergio Martins
87e9cbc388
tests: Add tst_frame
2022-05-23 17:15:43 +01:00
Sergio Martins
821002ce43
qtquick: Add QML interface to TitleBar_qtquick
2022-05-23 17:12:35 +01:00
Sergio Martins
dab7195408
tests: Fix view factory being overridden
...
It's set during init
2022-05-23 16:39:03 +01:00
Sergio Martins
349816dab7
qtquick: Add QML interface for Frame
...
Since the controllers won't be QObjects eventually, we need the
C++ views to hold the properties.
2022-05-23 15:55:54 +01:00
Sergio Martins
46968556bb
tests: Add missing viewwrapper ctest
2022-05-23 14:59:48 +01:00
Sergio Martins
e09a328281
qtquick: Add missing isMDI Q_PROPERTY
2022-05-21 10:36:41 +01:00
Sergio Martins
8c757955b5
qtquick: Fix signal connection in Frame
2022-05-21 10:33:14 +01:00
Sergio Martins
e7d20a403a
qtquick: Dont' crash in frame ctor
2022-05-21 10:26:12 +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
4a7446e57b
qtquick: Build QmlTypes.cpp
...
Still a bit commented out
2022-05-20 15:02:33 +01:00
Sergio Martins
fc0fa1c58c
qtquick: Return the correct paths for qml files
2022-05-19 19:28:48 +01:00
Sergio Martins
bb4f5a5037
Mass renaming of last usages of FrameworkWidgetFactory
2022-05-19 08:12:29 +01:00
Sergio Martins
09eb303bab
Rename some methods from FrameworkWidget to View
2022-05-19 08:00:20 +01:00
Sergio Martins
4708b2c25d
Rename FrameworkWidgetFactory_qtwidgets|qtquick to ViewFactory_*
2022-05-19 07:51:50 +01:00
Sergio Martins
e514a8c3e1
Rename FrameworkWidgetFactory to ViewFactory
...
We now deal in views instead of widgets, and the "Framework"
part was redundant. It's also shorter now
2022-05-18 23:12:43 +01:00
Sergio Martins
aefbbd5738
Allow the classic/segmented views be created by FrameworkWidgetFactory
...
Instead of the controllers. We only allow the user to customize
the views.
2022-05-18 23:10:27 +01:00
Sergio Martins
ab881c9b5a
Fix fwd declaration typo
2022-05-18 22:54:49 +01:00
Sergio Martins
e54ebd096c
Both ClassicIndicatorsWindow qtquick and qtwidgets build
...
They don't clash anymore. Rename them to include the suffix.
Next step is abstracting the creation of IndicatorWindow so we
remove the last qtwidget traces from ClassicIndicators.cpp
2022-05-18 05:27:24 +01:00
Sergio Martins
6054ccfdf2
Move Indicator class into .cpp file
...
It's impl detail
2022-05-18 05:19:24 +01:00
Sergio Martins
2fda6d11e1
Removed the qtquick/qtwidgets ifdefs from ClassicIndicatorsWindow_*
...
They now each have their own implementation.
qtquick one still not compiling, as it duplicates symbols.
2022-05-18 05:10:01 +01:00