mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Don't check pointer before to delete it
This commit is contained in:
parent
09fb933d2b
commit
17ae9c2510
4 changed files with 5 additions and 9 deletions
|
@ -104,8 +104,7 @@ KfindDlg::~KfindDlg()
|
|||
{
|
||||
stopSearch();
|
||||
|
||||
if (dirwatch)
|
||||
delete dirwatch;
|
||||
delete dirwatch;
|
||||
}
|
||||
|
||||
void KfindDlg::finishAndClose()
|
||||
|
@ -142,8 +141,7 @@ void KfindDlg::startSearch()
|
|||
enableButton(User2, true); // Enable "Stop"
|
||||
enableButton(User1, false); // Disable "Save As..."
|
||||
|
||||
if(dirwatch!=NULL)
|
||||
delete dirwatch;
|
||||
delete dirwatch;
|
||||
dirwatch=new KDirWatch();
|
||||
connect(dirwatch, SIGNAL(created(const QString&)), this, SLOT(slotNewItems(const QString&)));
|
||||
connect(dirwatch, SIGNAL(deleted(const QString&)), this, SLOT(slotDeleteItem(const QString&)));
|
||||
|
|
|
@ -44,7 +44,7 @@ ScanManager::ScanManager(const QString& path)
|
|||
ScanManager::~ScanManager()
|
||||
{
|
||||
stopScan();
|
||||
if (_topDir) delete _topDir;
|
||||
delete _topDir;
|
||||
}
|
||||
|
||||
void ScanManager::setListener(ScanListener* l)
|
||||
|
|
|
@ -211,7 +211,7 @@ DrawParams* RectDrawing::drawParams()
|
|||
|
||||
void RectDrawing::setDrawParams(DrawParams* dp)
|
||||
{
|
||||
if (_dp) delete _dp;
|
||||
delete _dp;
|
||||
_dp = dp;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,7 @@ OpenSearchEngine::OpenSearchEngine(QObject *)
|
|||
|
||||
OpenSearchEngine::~OpenSearchEngine()
|
||||
{
|
||||
if (m_scriptEngine) {
|
||||
delete m_scriptEngine;
|
||||
}
|
||||
delete m_scriptEngine;
|
||||
}
|
||||
|
||||
QString OpenSearchEngine::parseTemplate(const QString &searchTerm, const QString &searchTemplate)
|
||||
|
|
Loading…
Reference in a new issue