summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index ea2add6d..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;
}
}
}
@@ -139,7 +147,7 @@ static bool downloadResource (const KUrl& srcUrl, const KIO::MetaData& metaData
// Save download history
Application::instance()->addDownload(srcUrl.pathOrUrl() , destUrl.pathOrUrl());
- if (ReKonfig::kgetDownload())
+ if (!KStandardDirs::findExe("kget").isNull() && ReKonfig::kgetDownload())
{
//KGet integration:
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.kget"))