diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-29 11:24:11 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-29 11:24:11 +0200 |
commit | 82862fbd150afae0101757d1d6081e0e6ddf7baa (patch) | |
tree | c864003f3580d4eae365e3757c7a826ae3f6bfe7 /src/download.cpp | |
parent | Forgot to add it... ;) (diff) | |
download | rekonq-82862fbd150afae0101757d1d6081e0e6ddf7baa.tar.xz |
astyle
Diffstat (limited to 'src/download.cpp')
-rw-r--r-- | src/download.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/download.cpp b/src/download.cpp index e02b3565..9489b270 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -42,8 +42,8 @@ #include "mainwindow.h" -DownloadManager::DownloadManager() - : QObject() +DownloadManager::DownloadManager() + : QObject() { } @@ -68,17 +68,17 @@ void DownloadManager::newDownload(const KUrl &srcUrl, const KUrl &destUrl) QString typeText = KMimeType::extractKnownExtension(srcUrl.fileName()); typeText += " (" + mimeType->name() + ")"; - - int answer = KMessageBox::questionYesNoCancel( NULL, - i18n("Download '%1'?\n""Type: %2", srcUrl.prettyUrl(), typeText ), - i18n("Download '%1'...", srcUrl.fileName() ), - KStandardGuiItem::save(), - KStandardGuiItem::open(), - KStandardGuiItem::cancel(), - "showOpenSaveDownloadDialog" + + int answer = KMessageBox::questionYesNoCancel(NULL, + i18n("Download '%1'?\n""Type: %2", srcUrl.prettyUrl(), typeText), + i18n("Download '%1'...", srcUrl.fileName()), + KStandardGuiItem::save(), + KStandardGuiItem::open(), + KStandardGuiItem::cancel(), + "showOpenSaveDownloadDialog" ); - switch(answer) + switch (answer) { case KMessageBox::Cancel: return; @@ -108,7 +108,7 @@ void DownloadManager::newDownload(const KUrl &srcUrl, const KUrl &destUrl) // if user canceled download than abort if (destination.isEmpty()) return; - + Download *download = new Download(srcUrl, destination, type); connect(download, SIGNAL(downloadFinished(int)), this, SLOT(slotDownloadFinished(int))); m_downloads.append(download); @@ -127,7 +127,7 @@ KUrl DownloadManager::downloadDestination(const QString &filename) if (destination.isEmpty()) destination = KGlobalSettings::downloadPath(); destination.addPath(filename); - + if (!ReKonfig::downloadToDefaultDir()) { destination = KFileDialog::getSaveUrl(destination); @@ -177,7 +177,7 @@ Download::Download(const KUrl &srcUrl, const KUrl &destUrl, DownloadType type) Q_ASSERT(!m_srcUrl.isEmpty()); Q_ASSERT(!m_destUrl.isEmpty()); kDebug() << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); - + m_copyJob = KIO::file_copy(m_srcUrl, m_destUrl); connect(m_copyJob, SIGNAL(result(KJob *)), SLOT(slotResult(KJob *))); } |