0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00

Redundant checks have been removed

This commit is contained in:
Arin Alexander 2016-02-18 21:09:00 +03:00
parent 200d8015a2
commit 4cfa653ed8
5 changed files with 8 additions and 17 deletions

View File

@ -174,13 +174,8 @@ BandDesignIntf::~BandDesignIntf()
// delete band;
// }
// }
if (m_bandMarker) {
delete m_bandMarker;
}
if (m_bandNameLabel){
delete m_bandNameLabel;
}
delete m_bandMarker;
delete m_bandNameLabel;
}
void BandDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget)

View File

@ -413,7 +413,7 @@ public:
bool isEditable() const {return false;}
bool isRemovable() const {return false;}
void invalidate(IDataSource::DatasourceMode mode){Q_UNUSED(mode)}
~CallbackDatasourceHolder(){if (m_datasource) delete m_datasource;}
~CallbackDatasourceHolder(){delete m_datasource;}
void update(){}
void clearErrors(){}
private:

View File

@ -220,8 +220,7 @@ void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer, cons
currenPage++;
}
if (painter) delete painter;
delete painter;
}
bool ReportEnginePrivate::printReport(QPrinter* printer)
@ -543,7 +542,7 @@ ReportEngine::ReportEngine(QObject *parent)
ReportEngine::~ReportEngine()
{
if (d_ptr) delete d_ptr;
delete d_ptr;
}
bool ReportEngine::printReport(QPrinter *printer)

View File

@ -268,10 +268,8 @@ QScriptValue groupFunction(QScriptContext* pcontext, QScriptEngine* pengine){
ScriptEngineManager::~ScriptEngineManager()
{
if (m_model){
delete m_model;
m_model=0;
}
delete m_model;
m_model = 0;
delete m_scriptEngine;
}

View File

@ -91,8 +91,7 @@ QObjectPropertyModel::QObjectPropertyModel(QObject *parent/*=0*/)
QObjectPropertyModel::~QObjectPropertyModel()
{
if (m_rootNode)
delete m_rootNode;
delete m_rootNode;
}
void QObjectPropertyModel::initModel()