mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 05:01:30 +00:00
Revert m_fileList removal, we actually need it
I can't read :-7
This commit is contained in:
parent
62bea46f5e
commit
5e64f0bfa1
|
@ -31,6 +31,14 @@ LatexRenderer::LatexRenderer()
|
|||
{
|
||||
}
|
||||
|
||||
LatexRenderer::~LatexRenderer()
|
||||
{
|
||||
foreach(const QString &file, m_fileList)
|
||||
{
|
||||
QFile::remove(file);
|
||||
}
|
||||
}
|
||||
|
||||
LatexRenderer::Error LatexRenderer::renderLatexInHtml( QString& html, const QColor& textColor, int fontSize, int resolution, QString& latexOutput )
|
||||
{
|
||||
if( !html.contains("$$"))
|
||||
|
@ -174,6 +182,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin
|
|||
}
|
||||
|
||||
fileName = tempFileNameNS + QString(".png");
|
||||
m_fileList << fileName;
|
||||
return NoError;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
#include "guiutils.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
class QString;
|
||||
class QColor;
|
||||
|
||||
|
@ -34,6 +36,7 @@ public:
|
|||
};
|
||||
|
||||
LatexRenderer();
|
||||
~LatexRenderer();
|
||||
|
||||
Error renderLatexInHtml( QString& html, const QColor &textColor, int fontSize, int resolution, QString &latexOutput );
|
||||
static bool mightContainLatex ( const QString& text );
|
||||
|
@ -41,6 +44,8 @@ public:
|
|||
private:
|
||||
Error handleLatex( QString &fileName, const QString &latexFormula, const QColor &textColor, int fontSize, int resolution, QString &latexOutput );
|
||||
static bool securityCheck( const QString &latexFormula );
|
||||
|
||||
QStringList m_fileList;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue