Version: 0.0.1 (using KDE 4.5.90) OS: Linux When you download a zip file containing a font (e.g. a TTF file, e.g. from http://www.1001freefonts.com/font/BaroqueScript.zip ) and you double click on the font file, then the KDE font viewer is opened and this has a button "Install...". When I click it, I get an error dialog telling me e.g.: file:///tmp/kde-koller/arkV2TvUd/BaroqueScript.ttf is not a font and the reason is: the given file no longer exists. So it seems ark is deleting the temporary file immediately after starting the viewer, which is too early. Reproducible: Always OS: Linux (i686) release 2.6.34.7-0.5-desktop Compiler: gcc openSuse 11.3
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