Commit 13ea3e4c authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QFileDialog

parent 2f48ff3f
......@@ -22,7 +22,7 @@
#include <QDebug>
#include <QtCore/QTimerEvent>
#include <kfiledialog.h>
#include <qfiledialog.h>
#include <kfileitem.h>
#include <kmessagebox.h>
#include <kmessagebox_queued.h>
......@@ -548,7 +548,7 @@ QUrl Kopete::TransferManager::getSaveFile(const QUrl &startDir) const
{
QUrl url = startDir;
for (;;) {
url = KFileDialog::getSaveUrl(url, QStringLiteral("*"), 0, i18n("File Transfer"));
url = QFileDialog::getSaveFileUrl(nullptr, i18n("File Transfer"), url, QStringLiteral("*"));
if (!url.isValid()) {
return url;
}
......@@ -589,7 +589,7 @@ QUrl Kopete::TransferManager::getSaveDir(const QUrl &startDir) const
{
QUrl url = startDir;
for (;;) {
url = KFileDialog::getExistingDirectoryUrl(url, 0, i18n("File Transfer"));
url = QFileDialog::getExistingDirectoryUrl(nullptr,i18n("File Transfer"), url);
if (!url.isValid()) {
return url;
}
......
......@@ -35,7 +35,6 @@
#include <qmap.h>
#include <qstring.h>
#include <QAction>
#include <kfiledialog.h>
class GaduAccountPrivate;
......
......@@ -37,7 +37,7 @@
#include <qinputdialog.h>
#include <kfiledialog.h>
#include <qfiledialog.h>
#include "kopeteaccount.h"
#include "kopetechatsessionmanager.h"
......@@ -360,9 +360,9 @@ void OscarContact::sendFile( const QUrl &sourceURL, const QString &altFileName,
QStringList files;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
files = KFileDialog::getOpenFileNames( KUrl() ,"*", 0l , i18n( "Kopete File Transfer" ));
else {
if( !sourceURL.isValid() ) {
files = QFileDialog::getOpenFileNames( nullptr, i18n( "Kopete File Transfer" ), QString() , "*");
} else {
//FIXME KF5 files << sourceURL.path(KUrl::RemoveTrailingSlash);
}
......
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