Commit Graph

7 Commits

Author SHA1 Message Date
Axel Spoerl 5682c13aa8 DocumentViewer demo: Replace connect-by-name with explicit connect
Replace autoconnections with old_style_slot_names by explicit connect
statements with camelStyle.

Pick-to: 6.6
Change-Id: I1e1ddee064ee183c4baba3253c69eae7931ad459
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-21 21:41:59 +02:00
Friedemann Kleint 818c4b6468 DocumentViewer demo: Improve file dialog handling
Loop in the open dialog until opening the file
succeeds so that the directory is not reset.

Set a suffix for saving.

Pick-to: 6.6
Change-Id: Ic5a83d13148cfc16e5605abed7a2d965b6a6d149
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:05:10 +02:00
Friedemann Kleint a212b57f25 DocumentViewer demo: Fix tr() usage
Try to avoid concatenating translated texts and parameters; this may
not work in all languages. Use QDir::toNativeSeparators() for file
names.

Pick-to: 6.6
Change-Id: I00c058a91cab04c04580045229350ba3d9951d5e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:04:37 +02:00
Friedemann Kleint e00a8ad305 DocumentViewer demo: Reorder includes
Remove unused forward declarations and includes; reorder by module.

Pick-to: 6.6
Change-Id: Id9468d1fdb2685df44f2b4a9407c6b12ac2859f3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 16:04:26 +02:00
Axel Spoerl 01b7e2d091 DocumentViewer demo: Make plugins re-usable
The DocumentViewer demo was originally developed as a self-contained
application. Its dependency to PdfWidgets has lead to splitting it up
into plugins: ba61af0bf3

The new architecture re-uses the viewer objects, but it doesn't reset
them properly. This is why viewer-specific UI-assets (menus, toolbars
and buttons) get duplicated.

This patch adds cleanup functionality and removes duplications.

Fixes: QTBUG-114615
Fixes: QTBUG-114617
Pick-to: 6.6
Change-Id: I4f123f8a69be978f992531603b15de71069d5a66
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-06-20 09:18:32 +02:00
Paul Wicking 1261ff785c Doc: Fix typo in demo
s/thow/the

Task-number: QTBUG-114618
Pick-to: 6.6 6.5
Change-Id: I39b770063e8ee33f84cf348ca7655a4ee6033b38
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-06-17 16:34:44 +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