Commit 25f40ea7 authored by Laurent Montel's avatar Laurent Montel 😁

Port to KDialog

svn path=/trunk/KDE/kdemultimedia/juk/; revision=539969
parent e10a9d88
......@@ -27,12 +27,16 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
DirectoryList::DirectoryList(const QStringList &directories, bool importPlaylists,
QWidget *parent, const char *name) :
KDialogBase(parent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true),
DirectoryList::DirectoryList(const QStringList &directories,
bool importPlaylists,
QWidget *parent) :
KDialog(parent, i18n("Folder List"), KDialog::Ok | KDialog::Cancel),
m_dirList(directories),
m_importPlaylists(importPlaylists)
{
setModal( true );
enableButtonSeparator( true );
m_base = new DirectoryListBase(this);
setMainWidget(m_base);
......@@ -66,7 +70,7 @@ DirectoryList::~DirectoryList()
DirectoryList::Result DirectoryList::exec()
{
m_result.status = static_cast<DialogCode>(KDialogBase::exec());
m_result.status = static_cast<DialogCode>(KDialog::exec());
m_result.addPlaylists = m_base->importPlaylistsCheckBox->isChecked();
return m_result;
}
......
......@@ -16,11 +16,11 @@
#ifndef DIRECTORYLIST_H
#define DIRECTORYLIST_H
#include <kdialogbase.h>
#include <kdialog.h>
class DirectoryListBase;
class DirectoryList : public KDialogBase
class DirectoryList : public KDialog
{
Q_OBJECT
......@@ -34,7 +34,7 @@ public:
};
DirectoryList(const QStringList &directories, bool importPlaylists,
QWidget *parent = 0, const char *name = 0);
QWidget *parent = 0);
virtual ~DirectoryList();
public slots:
......
......@@ -343,7 +343,7 @@ void PlaylistCollection::open(const QString &playlist, const QStringList &files)
void PlaylistCollection::addFolder()
{
kDebug(65432) << k_funcinfo << endl;
DirectoryList l(m_folderList, m_importPlaylists, widget, "directoryList");
DirectoryList l(m_folderList, m_importPlaylists, widget);
DirectoryList::Result result = l.exec();
if(result.status == QDialog::Accepted) {
......
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