Commit Graph

8 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
Alexandru Croitor 6b722fd0a0 Fix documentviewer namespace build
Sprinkle some QT_BEGIN_NAMESPACE in the right places to avoid build
failures.

Pick-to: 6.5 6.6
Change-Id: I9cbfadb414881ef32405f0ad99c1009e89466490
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-08 09:54:59 +02:00
Topi Reinio 8f66cabc1d Doc: Update documentation for Document Viewer demo
The source code has seen multiple revisions and the documentation
was referring to types and implementation details that no longer
exist or hold true.

Reorganize the content, simplify the language, and fix the source
file quoting.

Change-Id: If22c052460b4dc2f1e321eb423c6f2a415cd26f5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-05-10 07:44:05 +00: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