Commit Graph

6 Commits

Author SHA1 Message Date
Friedemann Kleint 9c7d96e376 DocumentViewer demo: Remove OpenMode from class RecentFiles
A document viewer typically uses read-only.

Pick-to: 6.6
Change-Id: Ic5a601c0b5af9d0e97a47368d71e8daa9e5e0244
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 07fbbb3bec DocumentViewer demo: Streamline enumerations of class RecentFiles
Remove unused values and introduce Other for a number of RemoveReasons.

Pick-to: 6.6
Change-Id: I6ea170cac0dc04d0b5d9326441be5519ad544ba0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 7f3ffeee2f DocumentViewer demo: Remove unused signals of class RecentFiles
Pick-to: 6.6
Change-Id: I28c634948b802454e523409d60eafce7e8b9ed20
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint 2378671318 DocumentViewer demo: Do not derive class RecentFiles from QStringList
Inheriting containers is considered bad practice and also not
possible in Python.

As a drive-by, change the loop removing dangling files and duplicates
from range based for to index-based, as actually removing a file
would invalidate end().

Pick-to: 6.6
Change-Id: I826aebe1000d412d94e63a0564db7485b9550ca5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-07-03 16:10:36 +02:00
Friedemann Kleint c35c18ff2c DocumentViewer demo: Some modernization
Pick-to: 6.6
Change-Id: I2169e8a109f30b6e4f18a4e2bce9d529c0096a5a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 14:53:55 +02:00
Axel Spoerl ba61af0bf3 Migrate documentviewer example into plugin based architecture
This patch changes the document viewer example to a plugin based
architecture.
It adapts the documentation accordingly.

Change-Id: Ia24028aa27e21fb8ab36f5ef3a9953be60858b19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-02 10:11:06 +02:00