summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 4caf5a83..42193ed0 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -312,12 +312,13 @@ void WebPage::downloadRequest(const QNetworkRequest &request)
if (finfo.exists())
{
QDateTime now = QDateTime::currentDateTime();
- KIO::RenameDialog dlg (view(), i18n("Overwrite File?"), srcUrl, destUrl,
- KIO::RenameDialog_Mode(KIO::M_OVERWRITE | KIO::M_SKIP),
- -1, finfo.size(),
- now.toTime_t(), finfo.created().toTime_t(),
- now.toTime_t(), finfo.lastModified().toTime_t());
- result = dlg.exec();
+ QPointer<KIO::RenameDialog> dlg = new KIO::RenameDialog( view(), i18n("Overwrite File?"), srcUrl, destUrl,
+ KIO::RenameDialog_Mode(KIO::M_OVERWRITE | KIO::M_SKIP),
+ -1, finfo.size(),
+ now.toTime_t(), finfo.created().toTime_t(),
+ now.toTime_t(), finfo.lastModified().toTime_t());
+ result = dlg->exec();
+ delete dlg;
}
}
}