Summary: | premature file deletion when viewing font file | ||
---|---|---|---|
Product: | [Applications] ark | Reporter: | Martin Koller <kollix> |
Component: | general | Assignee: | Raphael Kubo da Costa <rakuco> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 2.15 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.5.5 | |
Sentry Crash Report: |
Description
Martin Koller
2011-01-01 15:03:51 UTC
Indeed, after the changes done to fix bug 216601 and your own bug 226123 Ark is deleting the previewed files too prematurely, as QDialog::exec() is not called anymore. Thanks for noticing. SVN commit 1210723 by rkcosta: Remove the temporarily extracted previewed file correctly. After r1067160, the QDialog::exec() call in ArkViewer was replaced by a call to QDialog::show(). This, in turn, made the call to KIO::NetAccess::del() be reached before the dialog was closed. We now manually remove the previewed file in all possible places in ArkViewer::view() with QFile::remove(), and call KRun::runUrl() with tempFile=true so that kioexec also takes care of removing the previewed file if that's the case. Finally, when ArkViewer::dialogClosed() is reached, it also tries to remove the file (this is the expected code path). Unfortunately, the code got uglier, so in the future we should try to centralize the calls to QFile::remove() in a single place. BUG: 261785 FIXED-IN: 4.5.5 M +20 -6 arkviewer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1210723 SVN commit 1210725 by rkcosta: Remove the temporarily extracted previewed file correctly. After r1067160, the QDialog::exec() call in ArkViewer was replaced by a call to QDialog::show(). This, in turn, made the call to KIO::NetAccess::del() be reached before the dialog was closed. We now manually remove the previewed file in all possible places in ArkViewer::view() with QFile::remove(), and call KRun::runUrl() with tempFile=true so that kioexec also takes care of removing the previewed file if that's the case. Finally, when ArkViewer::dialogClosed() is reached, it also tries to remove the file (this is the expected code path). Unfortunately, the code got uglier, so in the future we should try to centralize the calls to QFile::remove() in a single place. Forwardport of r1210723. CCBUG: 261785 M +20 -6 arkviewer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1210725 SVN commit 1210726 by rkcosta: Remove the temporarily extracted previewed file correctly. After r1067160, the QDialog::exec() call in ArkViewer was replaced by a call to QDialog::show(). This, in turn, made the call to KIO::NetAccess::del() be reached before the dialog was closed. We now manually remove the previewed file in all possible places in ArkViewer::view() with QFile::remove(), and call KRun::runUrl() with tempFile=true so that kioexec also takes care of removing the previewed file if that's the case. Finally, when ArkViewer::dialogClosed() is reached, it also tries to remove the file (this is the expected code path). Unfortunately, the code got uglier, so in the future we should try to centralize the calls to QFile::remove() in a single place. Forwardport of r1210723. CCBUG: 261785 M +20 -6 arkviewer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1210726 |