This revision was automatically updated to reflect the committed changes.
Closed by commit R244:8ed107304694: Fix KAutoSave bug on file with white space
in it (authored by mardelle).
REPOSITORY
R244 KCoreAddons
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8084?vs=21868&id=21898
RE
dfaure accepted this revision.
This revision is now accepted and ready to land.
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D8084
To: mardelle, #frameworks, shaforostoff, dfaure
Cc: dfaure, ngraham, cfeck, ltoscano
mardelle marked 2 inline comments as done.
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D8084
To: mardelle, #frameworks, shaforostoff
Cc: dfaure, ngraham, cfeck, ltoscano
mardelle updated this revision to Diff 21868.
REPOSITORY
R244 KCoreAddons
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8084?vs=20216&id=21868
REVISION DETAIL
https://phabricator.kde.org/D8084
AFFECTED FILES
autotests/kautosavefiletest.cpp
src/lib/io/kautosavefile.cpp
To: ma
dfaure added a comment.
Thanks for the fix and autotest !
INLINE COMMENTS
> kautosavefiletest.cpp:83
> {
> -// TODO
> +QUrl normalFile = QUrl::fromLocalFile(QStringLiteral("/tmp/test
> directory/tîst me.txt"));
> +
Should use QDir::tempPath() for portability.
REPOSITORY
R244 KCo
cfeck added inline comments.
INLINE COMMENTS
> kautosavefiletest.cpp:87
> +QVERIFY(saveFile.open(QIODevice::ReadWrite));
> +saveFile.write(QStringLiteral("testdata").toUtf8());
> +// Make sure the stale file is found
saveFile.write("testdata") is sufficient.
REPOSITORY
R244 KCoreA
mardelle updated this revision to Diff 20216.
mardelle added a comment.
Added test to check stale file is correctly found
REPOSITORY
R244 KCoreAddons
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D8084?vs=20180&id=20216
REVISION DETAIL
https://phabricator.kde.org/D8084
AFFECTE
ltoscano added a comment.
I don't know the code too much, but would it be possible to add an autotest
for this?
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D8084
To: mardelle, #frameworks, shaforostoff
Cc: ltoscano
mardelle created this revision.
mardelle added reviewers: Frameworks, shaforostoff.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
KAutoSaveFile does not correctly handle simple characters like spaces in file
names!!!
When creating a stale file (backup file) , to determi