using support::makeDisplayPath;
using support::onlyFilename;
using support::tempName;
-using support::unlink;
using support::unzipFile;
using std::endl;
{
zipped_ = false;
if (!unzipped_filename_.empty())
- unlink(unzipped_filename_);
+ unzipped_filename_.removeFile();
unzipped_filename_.erase();
if (remove_loaded_file_ && !file_to_load_.empty())
- unlink(file_to_load_);
+ file_to_load_.removeFile();
remove_loaded_file_ = false;
file_to_load_.erase();
to_.erase();
converter_.reset();
cc_.disconnect();
- success = !file_to_load_.empty() && file_to_load_.isFileReadable();
+ success = !file_to_load_.empty() && file_to_load_.isReadableFile();
if (!success) {
LYXERR(Debug::GRAPHICS, "Unable to find converted file!");
setStatus(ErrorConverting);
if (zipped_)
- unlink(unzipped_filename_);
+ unzipped_filename_.removeFile();
return;
}
// Clean up after loading.
if (zipped_)
- unlink(unzipped_filename_);
+ unzipped_filename_.removeFile();
if (remove_loaded_file_ && unzipped_filename_ != file_to_load_)
- unlink(file_to_load_);
+ file_to_load_.removeFile();
cl_.disconnect();
setStatus(Converting);
// First, check that the file exists!
- if (!filename_.isFileReadable()) {
+ if (!filename_.isReadableFile()) {
if (status_ != ErrorNoFile) {
setStatus(ErrorNoFile);
LYXERR(Debug::GRAPHICS, "\tThe file is not readable");
// Remove the temp file, we only want the name...
// FIXME: This is unsafe!
- unlink(to_file_base);
+ to_file_base.removeFile();
// Connect a signal to this->imageConverted and pass this signal to
// the graphics converter so that we can load the modified file