Commit 908354d8 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Port away from deprecated KUrlRequester::fileDialog and KFileDialog

parent d9d044ee
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
#include "fileview.h" #include "fileview.h"
#include <QFileInfo> #include <QFileInfo>
#include <QFileDialog>
#include <QHeaderView> #include <QHeaderView>
#include <QItemSelectionModel> #include <QItemSelectionModel>
#include <QMenu> #include <QMenu>
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include <KConfigGroup> #include <KConfigGroup>
#include <KFileDialog>
#include <KIconLoader> #include <KIconLoader>
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox> #include <KMessageBox>
...@@ -278,8 +278,7 @@ namespace kt ...@@ -278,8 +278,7 @@ namespace kt
QModelIndexList sel = selectionModel()->selectedRows(); QModelIndexList sel = selectionModel()->selectedRows();
QMap<bt::TorrentFileInterface*,QString> moves; QMap<bt::TorrentFileInterface*,QString> moves;
QString dir = KFileDialog::getExistingDirectory(QUrl("kfiledialog:///saveTorrentData"), QString dir = QFileDialog::getExistingDirectory(this, i18n("Select a directory to move the data to"));
this,i18n("Select a directory to move the data to."));
if (dir.isNull()) if (dir.isNull())
return; return;
...@@ -299,8 +298,7 @@ namespace kt ...@@ -299,8 +298,7 @@ namespace kt
} }
else else
{ {
QString dir = KFileDialog::getExistingDirectory(QUrl("kfiledialog:///saveTorrentData"), QString dir = QFileDialog::getExistingDirectory(this, i18n("Select a directory to move the data to"));
this,i18n("Select a directory to move the data to."));
if (dir.isNull()) if (dir.isNull())
return; return;
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include "kget_debug.h" #include "kget_debug.h"
#include <KFileDialog>
KGET_EXPORT_PLUGIN_CONFIG(BTSettingsWidget) KGET_EXPORT_PLUGIN_CONFIG(BTSettingsWidget)
BTSettingsWidget::BTSettingsWidget(QWidget * parent, const QVariantList &args) BTSettingsWidget::BTSettingsWidget(QWidget * parent, const QVariantList &args)
...@@ -35,9 +33,7 @@ BTSettingsWidget::BTSettingsWidget(QWidget * parent, const QVariantList &args) ...@@ -35,9 +33,7 @@ BTSettingsWidget::BTSettingsWidget(QWidget * parent, const QVariantList &args)
void BTSettingsWidget::load() void BTSettingsWidget::load()
{ {
torrentEdit->setMode(KFile::Directory); torrentEdit->setMode(KFile::Directory);
torrentEdit->fileDialog()->setWindowTitle(i18n("Select a default torrent folder"));
tempEdit->setMode(KFile::Directory); tempEdit->setMode(KFile::Directory);
tempEdit->fileDialog()->setWindowTitle(i18n("Select a default temporary folder"));
defaults(); defaults();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment