mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Redundant saveToFile() has been removed
This commit is contained in:
parent
5b81a75d3c
commit
04bf1dfbdb
@ -95,7 +95,6 @@ public:
|
||||
bool loadFromString(const QString& data);
|
||||
QString reportFileName();
|
||||
void setReportFileName(const QString& fileName);
|
||||
bool saveToFile();
|
||||
bool saveToFile(const QString& fileName);
|
||||
QByteArray saveToByteArray();
|
||||
QString saveToString();
|
||||
|
@ -755,9 +755,10 @@ bool ReportEnginePrivate::loadFromString(const QString &report, const QString &n
|
||||
|
||||
bool ReportEnginePrivate::saveToFile(const QString &fileName)
|
||||
{
|
||||
if (fileName.isEmpty()) return false;
|
||||
QFileInfo fi(fileName);
|
||||
QString fn = fileName;
|
||||
if (fileName.isEmpty() & m_fileName.isEmpty()) return false;
|
||||
QString fn = fileName.isEmpty() ? m_fileName : fileName;
|
||||
QFileInfo fi(fn);
|
||||
|
||||
if (fi.suffix().isEmpty())
|
||||
fn+=".lrxml";
|
||||
|
||||
@ -833,12 +834,6 @@ bool ReportEnginePrivate::isNeedToSave()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ReportEnginePrivate::saveToFile()
|
||||
{
|
||||
if (m_fileName.isEmpty()) return false;
|
||||
return saveToFile(m_fileName);
|
||||
}
|
||||
|
||||
QString ReportEnginePrivate::renderToString()
|
||||
{
|
||||
LimeReport::ReportRender render;
|
||||
@ -1255,12 +1250,6 @@ void ReportEngine::setReportFileName(const QString &fileName)
|
||||
return d->setReportFileName(fileName);
|
||||
}
|
||||
|
||||
bool ReportEngine::saveToFile()
|
||||
{
|
||||
Q_D(ReportEngine);
|
||||
return d->saveToFile();
|
||||
}
|
||||
|
||||
bool ReportEngine::saveToFile(const QString &fileName)
|
||||
{
|
||||
Q_D(ReportEngine);
|
||||
|
@ -95,7 +95,6 @@ public:
|
||||
bool loadFromString(const QString& data);
|
||||
QString reportFileName();
|
||||
void setReportFileName(const QString& fileName);
|
||||
bool saveToFile();
|
||||
bool saveToFile(const QString& fileName);
|
||||
QByteArray saveToByteArray();
|
||||
QString saveToString();
|
||||
|
@ -69,8 +69,7 @@ public:
|
||||
virtual void emitSaveFinished() = 0;
|
||||
virtual bool isNeedToSave() = 0;
|
||||
virtual void emitSaveReport() = 0;
|
||||
virtual bool saveToFile() = 0;
|
||||
virtual bool saveToFile(const QString& fileName) = 0;
|
||||
virtual bool saveToFile(const QString& fileName = "") = 0;
|
||||
virtual bool isSaved() = 0;
|
||||
virtual QString reportName() = 0;
|
||||
virtual bool loadFromFile(const QString& fileName, bool autoLoadPreviewOnChange) = 0;
|
||||
@ -139,8 +138,7 @@ public:
|
||||
bool loadFromString(const QString& report, const QString& name = "");
|
||||
QString reportFileName(){return m_fileName;}
|
||||
void setReportFileName(const QString& reportFileName){ m_fileName = reportFileName;}
|
||||
bool saveToFile();
|
||||
bool saveToFile(const QString& fileName);
|
||||
bool saveToFile(const QString& fileName = "");
|
||||
QByteArray saveToByteArray();
|
||||
QString saveToString();
|
||||
bool isNeedToSave();
|
||||
|
Loading…
Reference in New Issue
Block a user