BUG: 319546
Non-blocking portable solution without any shell use.
Details
- Reviewers
elvisangelaccio meven ngraham - Group Reviewers
Dolphin - Commits
- R449:0df2e299f415: Fixes svn plugin issuing "mkfifo" on Windows.
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Just read doc of QTemporaryFile, this is already taken care of.
svn/fileviewsvnplugin.cpp | ||
---|---|---|
312 | You don't need a pointer I think QTemporaryFile file(tmpFileNameTemplate, process); |
svn/fileviewsvnplugin.cpp | ||
---|---|---|
312 | The QTemporaryFile object will be destroyed right after function ends not when QProcess got destroyed. At that time comparator process could not even start to loading it (I see it on my machine). |
Seems fine to me, please wait for others to have some time to review.
I will accept it eventually.
svn/fileviewsvnplugin.cpp | ||
---|---|---|
312 | Thanks |
svn/fileviewsvnplugin.cpp | ||
---|---|---|
311 | Please use QStringLiteral("%1/%2.XXXXXX").arg(...) instead. No need to use QDir::separator(). | |
315 | No space before/after () | |
315 | I'd just show a generic "Could not show local SVN changes.". Maybe we could print a qWarning() saying that the temporary file could not be created (which is unlikely though...). | |
330 | "Could not show local SVN changes: svn diff failed". | |
343 | "Could not show local SVN changes: could not start kompare". This would also help in the case kompare is not installed. |
svn/fileviewsvnplugin.cpp | ||
---|---|---|
315 | Don't know if we should add qWarning() only here. Maybe we should add it on every error in this function or nowhere. |
I noticed the following warning if I close dolphin while kompare is still running:
QProcess: Destroyed while process ("kompare") is still running.
We should find a way to close kompare gracefully in this case, or even keep it running if possible (which is the current behavior).
svn/fileviewsvnplugin.cpp | ||
---|---|---|
315 | It's okay, it's never gonna happen anyway... |
Thanks for comments.
Updated: now we are using startDetached() because one may close Dolphin but need kompare running.
Provided solution has a flaw: temporary files will be deleted on Dolphin close. So we make an assumption: when the file got deleted diff program should already load it and no longer needs it.
This flaw seems insignificant.
Also patch keeps current behavior of kompare running after Dolphin close intact.
Patch doesn't seem to apply, can you rebase it on master please?
svn/fileviewsvnplugin.cpp | ||
---|---|---|
345 ↗ | (On Diff #72302) | This return is redundant since there is nothing after. |
I wish i could but i don't have developer account. Need invitation or something i guess.
I can merge this for you, I just need your email, I already know your name thanks to phabricator but it does not let me see your actual commit for some reason and your email that's in there.