Commit 9ed4ad35 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

Remove supported{Write}MimeTypes from Interface, it's implemented in kerfuffle/archive.cpp.

svn path=/trunk/KDE/kdeutils/ark/; revision=999051
parent 53ce871d
......@@ -22,6 +22,7 @@
*
*/
#include "mainwindow.h"
#include "kerfuffle/archive.h"
#include "part/interface.h"
#include <KPluginLoader>
......@@ -192,7 +193,7 @@ void MainWindow::openArchive()
Interface *iface = qobject_cast<Interface*>(m_part);
Q_ASSERT(iface);
KUrl url = KFileDialog::getOpenUrl(KUrl("kfiledialog:///ArkOpenDir"),
iface->supportedMimeTypes().join(" "),
Kerfuffle::supportedMimeTypes().join(" "),
this);
openUrl(url);
}
......@@ -228,7 +229,7 @@ void MainWindow::newArchive()
{
Interface *iface = qobject_cast<Interface*>(m_part);
Q_ASSERT(iface);
QStringList mimeTypes = iface->supportedWriteMimeTypes();
QStringList mimeTypes = Kerfuffle::supportedWriteMimeTypes();
kDebug() << "Supported mimetypes are" << mimeTypes.join(" ");
......
......@@ -29,9 +29,6 @@ class Interface
public:
virtual ~Interface() {}
virtual QStringList supportedMimeTypes() const = 0;
virtual QStringList supportedWriteMimeTypes() const = 0;
virtual bool isBusy() const = 0;
};
......
......@@ -24,6 +24,7 @@
#include "archiveview.h"
#include "infopanel.h"
#include "arkviewer.h"
#include "kerfuffle/archive.h"
#include "kerfuffle/extractiondialog.h"
#include "kerfuffle/jobs.h"
#include "settings.h"
......@@ -335,9 +336,9 @@ bool Part::openFile()
QHash<QString, QString> mimeTypes;
if (arguments().metaData()["createNewArchive"] == "true")
mimeTypeList = supportedWriteMimeTypes();
mimeTypeList = Kerfuffle::supportedWriteMimeTypes();
else
mimeTypeList = supportedMimeTypes();
mimeTypeList = Kerfuffle::supportedMimeTypes();
foreach(const QString& mime, mimeTypeList) {
KMimeType::Ptr mimePtr(KMimeType::mimeType(mime));
......@@ -386,16 +387,6 @@ bool Part::saveFile()
return true;
}
QStringList Part::supportedMimeTypes() const
{
return Kerfuffle::supportedMimeTypes();
}
QStringList Part::supportedWriteMimeTypes() const
{
return Kerfuffle::supportedWriteMimeTypes();
}
void Part::slotLoadingStarted()
{
}
......
......@@ -51,9 +51,6 @@ public:
virtual bool openFile();
virtual bool saveFile();
QStringList supportedMimeTypes() const;
QStringList supportedWriteMimeTypes() const;
bool isBusy() const {
return m_busy;
}
......
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