I don't know why they are added but it cannot be opened.
Details
- Reviewers
leinir - Group Reviewers
Calligra: 3.0 - Commits
- R8:f8717365d240: [gemini] Fix loading of templates and files creation
You can now open the templates.
Create file still not work it tells "Cannot open "/newfile:///""
Did someone knows how should it look?
Diff Detail
- Repository
- R8 Calligra
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
The idea is that the template protocol gets caught by the components, which marks the file as new, resets the filename and so on (the way you would expect a template to work). Doing it this way just opens the template as a file, and requires the user to manually do the save-as thing... Unless you are trying to actually edit the template, this isn't the solution... Create file will be something similar.
It's handled by the components: https://phabricator.kde.org/source/calligra/browse/master/components/impl/TextDocumentImpl.cpp$225 for text documents, and https://phabricator.kde.org/source/calligra/browse/master/components/impl/PresentationImpl.cpp$171 for presentations
Test plan:
- Open existing document -> works
- Open template document -> works
- Create new document -> works
Something tells me there's going to be problems on windows if this gets done... since that is the precise reason that code exists in the first place: https://phabricator.kde.org/R8:c1866b590bd6103fdf118558834104be2737cca4
however, if it could be made windows-only, that would work for me. That would likely require exposing that from MainWindow::initTouchView() (where there's already some windows detection code and such) Something like adding an osIsWindows root context property and setting that to true, and then checking for that in the if statement there in addition to the filename check, ought to do the trick.
Also, thanks for taking an interest in the code, it's really great to see work happening on it :D
Long as that works on linux, that ought to do the trick, yes :) (probably ought to have been there to start with anyway)