summaryrefslogtreecommitdiffstats
path: root/examples/demos/documentviewer/plugins/txtviewer/txtviewer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace Application example by documentviewer's TxtViewer pluginAxel Spoerl2023-06-261-0/+6
| | | | | | | | | | This patch adds a snippet based documentation of TxtViewer's code with the target to replace the Application example in widgets. Pick-to: 6.6 Change-Id: I25045c8f710ae110398e71099c276571cb32ecf3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* DocumentViewer demo: Use modern string literalsFriedemann Kleint2023-06-211-4/+9
| | | | | | | | This unearthes that JSON should convert from UTF-8. Pick-to: 6.6 Change-Id: If155b745cac0579232b927a3988588204c31d207 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* DocumentViewer demo: Fix tr() usageFriedemann Kleint2023-06-201-5/+11
| | | | | | | | | | 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>
* DocumentViewer demo: Reorder includesFriedemann Kleint2023-06-201-6/+8
| | | | | | | | Remove unused forward declarations and includes; reorder by module. Pick-to: 6.6 Change-Id: Id9468d1fdb2685df44f2b4a9407c6b12ac2859f3 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* DocumentViewer demo: Some modernizationFriedemann Kleint2023-06-201-3/+1
| | | | | | Pick-to: 6.6 Change-Id: I2169e8a109f30b6e4f18a4e2bce9d529c0096a5a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* DocumentViewer demo: Make plugins re-usableAxel Spoerl2023-06-201-3/+7
| | | | | | | | | | | | | | | | | | The DocumentViewer demo was originally developed as a self-contained application. Its dependency to PdfWidgets has lead to splitting it up into plugins: ba61af0bf3281cb93a4b8c5ae1410e5015766fa3 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>
* Migrate documentviewer example into plugin based architectureAxel Spoerl2023-05-021-0/+175
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>