Commit Graph

3654 Commits

Author SHA1 Message Date
Sergio Martins
3d2e45b5d5 tests: Add test for View::closeRequested 2022-05-02 22:00:15 +01:00
Sergio Martins
a49faeced6 Remove some duplicate TODOs, already in header 2022-05-02 21:35:04 +01:00
Sergio Martins
401ebc586e qtquick: Move all inline View methods into .cpp file 2022-05-02 21:33:07 +01:00
Sergio Martins
cccd3a47f0 View::closeWindow() is no longer virtual.
Implementation is common to all frontends.
Renamed it to closeRootView() to be consistent.
2022-05-02 17:54:00 +01:00
Sergio Martins
96912515a8 View::windowGeometry() is no longer virtual.
Implementation is the same for all frontends.
2022-05-02 17:33:44 +01:00
Sergio Martins
04785a8b49 View::parentSize() is no longer virtual
The implementation is common to all frontends.
2022-05-02 17:30:47 +01:00
Sergio Martins
2b129380d6 qtquick: Move a few implementations to cpp file 2022-05-02 17:28:41 +01:00
Sergio Martins
a6e698b0fe tests: Add a test for View::objectName 2022-05-02 17:23:39 +01:00
Sergio Martins
33d7d730f4 tests: Add a test for View::minSize() 2022-05-02 17:21:31 +01:00
Sergio Martins
5607fab8db tests: Add test for View::sizeHint 2022-05-02 10:29:46 +01:00
Sergio Martins
c2ae9abfb5 tests_createView() now receives a struct
As we'll be passing more parameters
2022-05-02 10:20:19 +01:00
Sergio Martins
a8cb498eb5 Amend previous commit, use *Controller as suffix 2022-05-02 00:05:18 +01:00
Sergio Martins
d0c1b94585 Remove *View and *Widget suffixes from layouts
They are controllers, not views.
2022-05-02 00:01:44 +01:00
Sergio Martins
e17f6c0066 Add some missing const 2022-05-01 23:58:14 +01:00
Sergio Martins
a550567a4c Rename asMultisplitterView to asDropArea
It's no longer a view.
2022-05-01 23:56:41 +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
0d02be6387 qtquick: Implement View::rootView() 2022-05-01 23:00:19 +01:00
Sergio Martins
fff3adf967 Rename View::window() to View::rootView()
window() was an artifact of Qt4 times, when QWindow didn't exist yet.
2022-05-01 22:52:00 +01:00
Sergio Martins
4b41291830 qtquick: Fix geometry() always returning 0,0 as position 2022-05-01 22:42:23 +01:00
Sergio Martins
8dd8eabf1a tests: tests_createView now can create visible views too 2022-05-01 22:21:08 +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
a069a812db tests: Remove qDebug() from doctest based tests
TestExplorer will fail to work if we print to stderr. Instead
we now print to stdout.
2022-05-01 20:17:51 +01:00
Sergio Martins
3416a74723 Don't make View::move(QPoint) pure-virtual
We already have a virtual overload, just call it.
2022-05-01 20:12:32 +01:00
Sergio Martins
58afb97eb2 qtquick: Move the rest of old/QWidgetAdapter_quick to View_qtquick 2022-05-01 20:01:46 +01:00
Sergio Martins
738a78d12b qtquick: Implement View::windowHandle() and Window_qtquick::rootView()
For QtWidgets it now calls create() in the ctor so we have a window
during tests.
2022-05-01 14:38:20 +01:00
Sergio Martins
545c45e78d qtquick: Port a bunch of methods from the old QWidgetAdapter 2022-05-01 13:11:32 +01:00
Sergio Martins
0a3c2433e7 qtquick: Implement setGeometry and related methods 2022-05-01 12:46:14 +01:00
Waqar Ahmed
df7627c08a Use QVariant::userType instead of QVariant::type 2022-05-01 02:43:31 +05:00
Sergio Martins
b089b49b28 qtquick: Implement and test View::hide() too 2022-04-30 11:47:02 +01:00
Sergio Martins
7547163d2d qtquick: Implement View::isVisible/setVisible 2022-04-30 11:42:53 +01:00
Sergio Martins
95f61629a9 tests: Print the name of the platform we're testing 2022-04-30 11:33:02 +01:00
Sergio Martins
3227ffab81 qtquick: Implemented and tested View::parentView/childViews
tst_view is now enabled for QtQuick too
2022-04-30 11:27:47 +01:00
Sergio Martins
1ecc42d50c tests: Fix memory leaks in tst_view 2022-04-30 11:19:12 +01:00
Sergio Martins
712751e89b tests: Make tst_view test View, not ViewWrapper 2022-04-30 11:08:54 +01:00
Sergio Martins
b6d87d10c4 Add a TestHelpers_ file for each platform
So we don't have too much ifdefed stuff that's only for tests in
the main files.
2022-04-30 10:31:31 +01:00
Sergio Martins
59e5759bc2 qtquick: initialize the the QQmlEngine during tests 2022-04-30 01:20:09 +01:00
Sergio Martins
ee256284cc Remove View::isWindow(), use isRootView() instead.
QWidget::isWindow() is misnamed in Qt, it's an artifact from Qt4
times.
2022-04-30 01:10:24 +01:00
Sergio Martins
f3934ebd2c Rename View::isTopLevel() to isRootView() 2022-04-30 01:06:03 +01:00
Sergio Martins
22a43eb9af Add 3rdparty/doctest
It's header only.
2022-04-30 00:56:28 +01:00
Sergio Martins
ba92225678 Implement View_qtquick::setParent and setObjectName 2022-04-30 00:43:27 +01:00
Sergio Martins
496451c434 Implemented Platform_qtquick::tests_createView()
Creates a view for us to test with.
2022-04-29 19:15:02 +01:00
Sergio Martins
9d52f40632 Make the qtquick files compile
They weren't being built.
Build-system is simplified for now.
2022-04-29 19:00:40 +01:00
Sergio Martins
c55cac97d0 tests: Add unit-test for View::setParent() 2022-04-29 18:46:28 +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
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
aa72a8cd5a Add Platform_qtwidgets::init(), so we can share some code with ctors 2022-04-29 15:09:43 +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