summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 8221626e..9167c96d 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -125,12 +125,20 @@ static bool downloadResource (const KUrl& srcUrl, const KIO::MetaData& metaData
if (finfo.exists())
{
QDateTime now = QDateTime::currentDateTime();
- KIO::RenameDialog dlg (parent, 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( parent,
+ 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;
}
}
}