mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
make ps transform work again. It was not working because openurl called closeurl that deleted the temporary file. I added a new check not to delete the temporary file if that's the file we are opening :-D
svn path=/trunk/playground/graphics/okular/; revision=647619
This commit is contained in:
parent
06d18ea3cc
commit
233c5c6e0f
9
part.cpp
9
part.cpp
|
@ -627,7 +627,7 @@ bool Part::slotImportPSFile()
|
|||
m_temporaryLocalFile = tf.fileName();
|
||||
tf.close();
|
||||
|
||||
// setLocalFilePath( url.path() );
|
||||
setLocalFilePath( url.path() );
|
||||
QStringList args;
|
||||
QProcess *p = new QProcess();
|
||||
args << url.toLocalFile() << m_temporaryLocalFile;
|
||||
|
@ -776,7 +776,7 @@ bool Part::openUrl(const KUrl &url)
|
|||
|
||||
bool Part::closeUrl()
|
||||
{
|
||||
if (!m_temporaryLocalFile.isNull())
|
||||
if (!m_temporaryLocalFile.isNull() && m_temporaryLocalFile != localFilePath())
|
||||
{
|
||||
QFile::remove( m_temporaryLocalFile );
|
||||
m_temporaryLocalFile.clear();
|
||||
|
@ -1488,8 +1488,9 @@ void Part::psTransformEnded(int exit, QProcess::ExitStatus status)
|
|||
senderobj->deleteLater();
|
||||
}
|
||||
|
||||
// setLocalFilePath( m_temporaryLocalFile );
|
||||
openUrl( KUrl( m_temporaryLocalFile ) );
|
||||
setLocalFilePath( m_temporaryLocalFile );
|
||||
openUrl( m_temporaryLocalFile );
|
||||
m_temporaryLocalFile.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue