Commit Graph

107 Commits

Author SHA1 Message Date
Allen Winter
875544a449 Merge branch '1.2' 2021-01-02 09:32:20 -05:00
Allen Winter
a2f4c972a6 update copyright year 2021-01-02 09:27:50 -05:00
Sergio Martins
5582f37a18 Introduce InitialOption struct
addDockWidget() received a AddingOption enumerator. But that
enum isn't enough, as we also want to be able to specify an initial
QSize.

So, instead of adding yet another parameter to addDockWidget(), we
create a struct to old those "initial settings".

Implies a minor source break, but trivial to fix in user code,
just rename the enumerator.

Honouring preferredSize will be a followup.

Needed for issue #95
2020-12-27 20:22:02 +00:00
Sergio Martins
10f47a701f Fix -Wclazy-copyable-polymorphic 2020-12-22 15:38:50 +00:00
Sergio Martins
d3224ed266 Fix -Wclazy-qstring-arg 2020-12-22 15:28:29 +00:00
Sergio Martins
d2da07508a Replaced an include with a fwd decl 2020-12-15 22:58:10 +00:00
Sérgio Martins
c23d179385 Add support for Qt6
Adds the -DKDDockWidgets_QT6=ON option
Also you'll need to port any required Qt6 module first (For example QStateMachine).
2020-11-20 12:36:11 +00:00
Sergio Martins
7bfac091ae Rename DockRegistry::nestedwindows() to DockRegistry::floatingWindow
which is the naming we use everywhere else
2020-10-10 20:41:42 +01:00
Allen Winter
b4f49895c2 clarify: licensing is GPL2 or GPL3 or commercial licensed
follow the REUSE specs
2020-07-24 18:16:13 -04:00
Sergio Martins
709728e456 Revert "Add support for Qt6"
This reverts commit e1bf1cd786.

This breaks the build with older CMake (3.9 for example), which
doesn't support alias to imported targets.
2020-07-19 15:42:59 +01:00
Sergio Martins
e1bf1cd786 Add support for Qt6
Build with -DOPTION_QT6=ON
2020-07-18 21:56:18 +01:00
Allen Winter
2462f991be buildsystem - consistent formatting 2020-06-25 13:32:59 -04:00
Sergio Martins
d373585e0c get rid of some unneeded qobject_cast<FloatingWindow*> casts 2020-06-25 17:56:21 +01:00
Sergio Martins
19d5467f4d fuzzer: Also generate max-size constraints 2020-06-21 23:28:35 +01:00
Sergio Martins
be4a71685a Fix a fuzzer test
When restoring a layout it can happen that the widget has
different size constraints when being restored, so this warning
was benign. There's a chekcSanity() later, so that's what's matters
2020-06-20 14:00:33 +01:00
Sergio Martins
84989745b4 Use target_compile_options instead of the hammer
Doing per target ensures that the python stuff won't get -Werror.
We can now build the python bindings and still use the developer build
2020-06-17 14:37:42 +01:00
Sergio Martins
b7cb6afa49 Item: Also position the opposite position, not just the length
Fixes fuzzer test 20.json
2020-05-13 19:39:30 +01:00
Sergio Martins
0db40953ac fuzzer: don't dump invalid operations to the JSON 2020-05-13 19:37:47 +01:00
Sergio Martins
137cf017c4 fuzzer: add a nice place to set a breakpoint 2020-05-13 19:37:47 +01:00
Sergio Martins
68acdaeb9a Fix Items not being connected to their parent after a restore
Missing connectToParent() calls.
2020-05-13 12:24:46 +01:00
Sergio Martins
4dea453e7c fuzzer: Trim failling test 2020-05-11 00:25:09 +01:00
Sergio Martins
ca52d6f760 fuzzer: Add a failing test 2020-05-11 00:05:00 +01:00
Sergio Martins
5eff4f8df8 fuzzer: fix dumping to JSON skipping some operations
Operations that don't have any parameters werent being saved
2020-05-11 00:04:26 +01:00
Sergio Martins
cc2aa13eb7 fuzzer: Fix dockByName() returning nullptr
dockStr() is just for printing purposes
2020-05-10 23:44:48 +01:00
Sergio Martins
c4df3600af tst_docks|fuzzer: Use offscreen QPA by default too 2020-05-10 21:26:52 +01:00
Sergio Martins
97c1ca30fd Layouting engine rewrite
The layouting was becoming too complex to maintain and to introduce
new features. Was even buggy, the fuzzer was constantly finding
bugs, which took hours to workaround.

Problem with the old layout engine is that there was a catch 22, between
Items driving the separators, and separators driving the anchors.

The new layout is much simpler, both in implementation and conceptually.
There's simply a recursive hierarchy of Item elements. An Item can either
have a QWidget to show, or be a ItemContainer, which contains Item children,
and so forth. Each ItemContainer is either vertical or horizontal. That's enough
to represent the "nested multi-splitter" concept which KDDW uses.

After each item insertion/deletion/resize, the separators are regenerated. They
are essentially dumb now.

TODO:
- Separators are drawn, but are not interactive yet
- There's 5 tests failing
- LayoutSaver scalling functionality
2020-05-04 00:02:03 +01:00
Sergio Martins
7a2aa43b2d Fuzzer: Add SaveLayout and RestoreLayout operations too 2020-02-19 14:12:44 +00:00
Sergio Martins
52e53c4fd9 fuzzer: Trim the failing test 2020-01-29 15:04:51 +00:00
Sergio Martins
07f9e9a0df Fix fuzzer testcase failing/2.json
And renamed it to 17.json, as we already have an unrelated 2.json.

The removed check isn't needed, as we'll check again when we
finish restoring the placeholder. It was also a false-positive
warning sometimes because boundPositionForAnchor() would fail
since the "anchors following" wasnt initialized yet, as we do
a clearAnchorsFollowing while restoring the placeholder
2020-01-27 18:47:37 +00:00
Sergio Martins
195c8121c0 fuzzer: Simplify names for 2.json 2020-01-27 15:17:30 +00:00
Sergio Martins
2b1518b1c2 Fuzzer: Add a new failing testcase 2020-01-27 15:10:55 +00:00
Sergio Martins
ca98d376b7 fuzzer: Move 14.json from failing to ok
It passes now
2020-01-24 20:05:43 +00:00
Sergio Martins
16b564a005 Add a test which is failing on macOS 2020-01-24 20:02:26 +00:00
Sergio Martins
162bf0e828 Don't move anchors that are following others
Move the real ones instead. Fixes some bugs found with the fuzzer.
2020-01-24 16:19:42 +00:00
Sergio Martins
068eb7cc25 fuzzer: trim 15.json a bit
smaller and still repro
2020-01-24 11:52:51 +00:00
Sergio Martins
8c37c3a7ec fuzzer: print the name of the failing test 2020-01-24 11:38:21 +00:00
Sergio Martins
e2d47001db fuzzer: Move failing tests to a failing directory
So we can run the correct ones with *.json
2020-01-24 11:37:45 +00:00
Sergio Martins
4a6b73cae1 fuzzer: Decouple skipping last from no quitting
There's two separate options now, as it's useful to pause without
skipping the last test
2020-01-22 14:44:56 +00:00
Sergio Martins
d738fbd154 fuzzer: Fix description of skipped operation
Only generate the description after all other dockwidgets are placed
, as the state of the others will be in the last description too
2020-01-22 12:47:42 +00:00
Sergio Martins
7c10ab37f4 fuzzer: print description of skipped operation
involves making sure the description is generated
2020-01-22 11:54:09 +00:00
Sergio Martins
460d3f9ec1 fuzzer: Print the skipped operation 2020-01-22 11:48:04 +00:00
Sergio Martins
4c19ccade7 fuzzer: don't destroy the windows when we use -d
so we can debug the app
2020-01-22 11:36:49 +00:00
Sergio Martins
03cc8abd94 fuzzer: Add skipAndPause (-d) option
So we can pause before the last test and debug the app
2020-01-22 11:17:59 +00:00
Sergio Martins
8447cefc14 fuzzer: trim testcase 16
Now has the minimum to reproduce
2020-01-22 10:56:11 +00:00
Sergio Martins
141cbc55f4 add a failing testcase 2020-01-21 22:05:32 +00:00
Sergio Martins
873978a99e Add some failing testcases 2020-01-21 22:05:03 +00:00
Sergio Martins
b8279633ac fuzzer: add an -l option, so it loops until it crashes 2020-01-21 17:10:29 +00:00
Allen Winter
df692686e7 various - update copyright year 2020-01-07 11:36:56 -05:00
Sergio Martins
6a9b02ea63 Fix ensureMinSize_recursive
It doesn't make sense to only grow one side, as sometimes the item
must grow in both sizes, as the right side might now have enough
to acomodate its needs.

This also allows us to not use Anchor::ensureBounded(), as separators
being within their bounds doesn't imply min sizes being respected, while
the inverse is true

fuzzer testcase 10.json now passes
2019-10-20 16:57:52 +01:00
Sergio Martins
195390aa9e Fix build with msvc2015, it doesn't have <optional> 2019-10-18 17:37:25 +01:00