Revert m_fileList removal, we actually need it

I can't read :-7
This commit is contained in:
Albert Astals Cid 2011-09-22 20:20:53 +02:00
parent 62bea46f5e
commit 5e64f0bfa1
2 changed files with 14 additions and 0 deletions

View file

@ -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;
}

View file

@ -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;
};
}