aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/texteditor/documenthandler.h
Commit message (Collapse)AuthorAgeFilesLines
* texteditor: replace setFileUrl() with load()J-P Nurmi2016-08-121-8/+3
| | | | | | | | This allows to remove the text property to avoid storing the whole document's initial content for no real purpose. Change-Id: Iad59576b5304be9739c1dfb0a7d4c263323b0edb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add fileName & fileTypeJ-P Nurmi2016-08-121-5/+4
| | | | | | | | | 'document.fileName' reads better than 'document.documentTitle', and 'document.fileType' can be set as the default suffix for the file save dialog. Change-Id: I935586296c91d3efdd5edea03d81c685e7edcab2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: cosmetic cleanupJ-P Nurmi2016-08-121-1/+1
| | | | | Change-Id: Id1d5f0f8c1e7851ea33241fa09af5c0029b74db3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: remove uninitialized/duplicate pointer memberJ-P Nurmi2016-08-121-3/+3
| | | | | | | | Use textDocument() similarly than textCursor() is already used, to access the underlying document and cursors. Change-Id: I1f90f95420132251792f4f9dda302c0509fbad0c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: re-order the property accessorsJ-P Nurmi2016-08-121-20/+23
| | | | | | | | | | There's no reason to register all setters as slots. Properties are fine for QML usage. Re-order them also in the .cpp file in the same order than they are in the header. It's a bit easier to follow when logical pairs are next to each other. Change-Id: Ib8097ecafe10f2c785b05b045694c338977860ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: simplify saveAs() - let FileDialog handle the suffixJ-P Nurmi2016-08-121-1/+1
| | | | | Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add Text Editor exampleMitch Curtis2016-08-111-0/+173
A follow up commit will contain the touch UI. Change-Id: I26275fdd31294506821fa3e3e4a4bb63329665b9 Task-number: QTBUG-54952 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>