Delete parametr name and use last parameter in string list instead.
--HG-- branch : feature
This commit is contained in:
parent
de85cad839
commit
2cddab80d4
|
@ -499,7 +499,7 @@ void TableWindow::EpsFile(const QString &name) const
|
||||||
QStringList params;
|
QStringList params;
|
||||||
params << "-eps" << tmp.fileName() << name;
|
params << "-eps" << tmp.fileName() << name;
|
||||||
|
|
||||||
PdfToPs(name, params);
|
PdfToPs(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,12 +513,11 @@ void TableWindow::PsFile(const QString &name) const
|
||||||
QStringList params;
|
QStringList params;
|
||||||
params << tmp.fileName() << name;
|
params << tmp.fileName() << name;
|
||||||
|
|
||||||
PdfToPs(name, params);
|
PdfToPs(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO delete parametr name and use last parameter in string list instead.
|
void TableWindow::PdfToPs(const QStringList ¶ms) const
|
||||||
void TableWindow::PdfToPs(const QString &name, const QStringList ¶ms) const
|
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
|
@ -534,10 +533,10 @@ void TableWindow::PdfToPs(const QString &name, const QStringList ¶ms) const
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QFile f(name);
|
QFile f(params.last());
|
||||||
if (f.exists() == false)
|
if (f.exists() == false)
|
||||||
{
|
{
|
||||||
QString msg = QString(tr("Creating file '%1' failed! %2")).arg(name).arg(proc.errorString());
|
QString msg = QString(tr("Creating file '%1' failed! %2")).arg(params.last()).arg(proc.errorString());
|
||||||
QMessageBox msgBox(QMessageBox::Critical, tr("Critical error!"), msg, QMessageBox::Ok | QMessageBox::Default);
|
QMessageBox msgBox(QMessageBox::Critical, tr("Critical error!"), msg, QMessageBox::Ok | QMessageBox::Default);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,11 +225,10 @@ private:
|
||||||
void PsFile(const QString &name)const;
|
void PsFile(const QString &name)const;
|
||||||
/**
|
/**
|
||||||
* @brief PdfToPs use external tool "pdftops" for converting pdf too eps or ps format.
|
* @brief PdfToPs use external tool "pdftops" for converting pdf too eps or ps format.
|
||||||
* @param name name output file.
|
|
||||||
* @param params string with parameter for tool. Parameters have format: "-eps input_file out_file". Use -eps when
|
* @param params string with parameter for tool. Parameters have format: "-eps input_file out_file". Use -eps when
|
||||||
* need create eps file.
|
* need create eps file.
|
||||||
*/
|
*/
|
||||||
void PdfToPs(const QString &name, const QStringList ¶ms)const;
|
void PdfToPs(const QStringList ¶ms)const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TABLEWINDOW_H
|
#endif // TABLEWINDOW_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user