| Summary: | "the file was created by another program" | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | RJVB <rjvbertin> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | christoph, ekigwana, loh.tar |
| Priority: | NOR | ||
| Version First Reported In: | 5.27.0 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | All | ||
| Latest Commit: | https://invent.kde.org/frameworks/ktexteditor/commit/1d696d7571196e12c4c81981aa431a6a7d957b47 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
RJVB
2016-11-18 16:48:13 UTC
This one is a little tricky. Open file that is not on disk then use some other process to create the file e.g. touch <file> and you'll find that the current code makes sense. Perhaps if a file exists and is open generate a modified event instead. If the file did not exist on disk when opening generate created event. I'm also annoyed by this warning when I have some file in more that one instance of Kate open. But no idea how to fix that. Some communication may needed in that case. This are the strings we use ATM:
switch (m_modOnHdReason) {
case OnDiskModified:
return i18n("The file '%1' was modified by another program.", str);
break;
case OnDiskCreated:
return i18n("The file '%1' was created by another program.", str);
break;
case OnDiskDeleted:
return i18n("The file '%1' was deleted by another program.", str);
break;
default:
return QString();
}
We can improve on that easily, beside that I think this is overkill for such a minor inconvenience.
I have already lost some changes due to this warning, so it's not only "a minor inconvenience" Git commit 1d696d7571196e12c4c81981aa431a6a7d957b47 by Christoph Cullmann. Committed on 08/01/2022 at 22:04. Pushed by cullmann into branch 'master'. improve wording for modified on disk warnings M +3 -3 src/document/katedocument.cpp M +3 -3 src/include/ktexteditor/modificationinterface.h M +1 -1 src/view/katestatusbar.cpp M +1 -1 src/vimode/appcommands.cpp https://invent.kde.org/frameworks/ktexteditor/commit/1d696d7571196e12c4c81981aa431a6a7d957b47 Ah, the diplomatic approach ... and now we wait for someone to complain that s/he doesn't know what a disk is? ;) |