Implemented Platform_qtquick::tests_createView()

Creates a view for us to test with.
This commit is contained in:
Sergio Martins
2022-04-29 19:15:02 +01:00
parent 9d52f40632
commit 496451c434
2 changed files with 15 additions and 2 deletions

View File

@@ -24,6 +24,7 @@
#include <QApplication> // TODO: Make it QGuiApplication
#include <QWindow>
#include <QScreen>
#include <QQuickItem>
using namespace KDDockWidgets;
@@ -129,9 +130,13 @@ void Platform_qtquick::tests_deinitPlatform_impl()
Platform_qt::tests_deinitPlatform_impl();
}
std::shared_ptr<ViewWrapper> Platform_qtquick::tests_createView(std::shared_ptr<ViewWrapper>)
std::shared_ptr<ViewWrapper> Platform_qtquick::tests_createView(std::shared_ptr<ViewWrapper> parent)
{
return {};
auto parentItem = parent ? Views::asQQuickItem(parent.get()) : nullptr;
auto newItem = new QQuickItem(parentItem);
auto wrapper = new Views::ViewWrapper_qtquick(newItem);
return std::shared_ptr<ViewWrapper>(wrapper);
}
#endif