Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9ad33710 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to qfiledialog

parent aefba648
......@@ -32,6 +32,7 @@
#include <KSharedConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <QFileDialog>
#include "kopetemetacontact.h"
#include "kopetecontact.h"
......@@ -510,7 +511,7 @@ void Kopete::TransferManager::sendFile(const QUrl &file, const QString &fname, u
//If the file location is null, then get it from a file open dialog
if (!url.isValid()) {
url = KFileDialog::getOpenUrl(QUrl(), QStringLiteral("*"), 0l, i18n("Kopete File Transfer"));
url = QFileDialog::getOpenFileUrl(0l, i18n("Kopete File Transfer"), QString(), QStringLiteral("*"));
} else {
filename = fname;
size = sz;
......
......@@ -27,6 +27,7 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <QIcon>
#include <QFileDialog>
#include "gaduaccount.h"
#include "gaduprotocol.h"
......@@ -96,7 +97,7 @@ GaduContact::sendFile(const KUrl &sourceURL, const QString & /*fileName*/, uint
//If the file location is null, then get it from a file open dialog
if (!sourceURL.isValid()) {
filePath = KFileDialog::getOpenFileName(KUrl(), "*", 0l, i18n("Kopete File Transfer"));
filePath = QFileDialog::getOpenFileName(0l, i18n("Kopete File Transfer"), QString(), "*");
} else {
filePath = sourceURL.path(KUrl::RemoveTrailingSlash);
}
......
......@@ -28,6 +28,7 @@
#include <klocale.h>
#include <qtimer.h>
#include <QFileDialog>
/*
QString IRCContact::user_caption() const
{
......@@ -134,7 +135,7 @@ void IRCUserContact::sendFile(const KUrl &sourceURL, const QString&, unsigned in
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer")); //krazy:exclude=nullstrassign for old broken gcc
filePath = QFileDialog::getOpenFileName(0l , i18n("Kopete File Transfer"), QString::null, "*");
else
filePath = sourceURL.path(-1);
......
......@@ -44,6 +44,7 @@
#include <qinputdialog.h>
#include <kopeteview.h>
#include <QStandardPaths>
#include <QFileDialog>
#include "kopetecontactlist.h"
#include "kopetegroup.h"
......@@ -1110,7 +1111,7 @@ void JabberContact::sendFile ( const QUrl &sourceURL, const QString &/*fileName*
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
filePath = KFileDialog::getOpenFileName( QUrl(), QStringLiteral("*"), 0L, i18n ( "Kopete File Transfer" ) );
filePath = QFileDialog::getOpenFileName(0L, i18n ( "Kopete File Transfer" ) , QString(), QStringLiteral("*"));
else
filePath = sourceURL.adjusted(QUrl::StripTrailingSlash).path();
......
......@@ -23,6 +23,7 @@
#include <kfiledialog.h>
#include <qinputdialog.h>
#include <QAction>
#include <QFileDialog>
#include "jabberprotocol.h"
#include "jabberaccount.h"
......@@ -352,7 +353,7 @@ void JabberGroupContact::sendFile ( const QUrl &sourceURL, const QString &/*file
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
filePath = KFileDialog::getOpenFileName( QUrl(), QStringLiteral("*"), 0L, i18n ( "Kopete File Transfer" ) );
filePath = QFileDialog::getOpenFileName(0L, i18n ( "Kopete File Transfer" ) , QString(), QStringLiteral("*"));
else
filePath = sourceURL.adjusted(QUrl::StripTrailingSlash).path();
......
......@@ -20,6 +20,7 @@
#include "jabber_protocol_debug.h"
#include <KLocalizedString>
#include <kfiledialog.h>
#include <QFileDialog>
#include "jabberprotocol.h"
#include "jabberaccount.h"
#include "jabberfiletransfer.h"
......@@ -297,7 +298,7 @@ void JabberGroupMemberContact::sendFile ( const QUrl &sourceURL, const QString &
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
filePath = KFileDialog::getOpenFileName( QUrl(), QStringLiteral("*"), 0L, i18n ( "Kopete File Transfer" ) );
filePath = QFileDialog::getOpenFileName(0L, i18n ( "Kopete File Transfer" ) , QString(), QStringLiteral("*"));
else
filePath = sourceURL.adjusted(QUrl::StripTrailingSlash).path();
......
......@@ -42,6 +42,7 @@
#include <QIcon>
#include <QStandardPaths>
#include <KSharedConfig>
#include <QFileDialog>
#include "kopetecontactlist.h"
#include "kopetechatsessionmanager.h"
......@@ -410,7 +411,7 @@ void QQContact::sendFile( const KUrl &sourceURL, const QString &altFileName, uin
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
filePath = KFileDialog::getOpenFileName( KUrl(),QStringLiteral("*"), 0l , i18n( "Kopete File Transfer" ));
filePath = QFileDialog::getOpenFileName(0l , i18n( "Kopete File Transfer" ), QString(), QStringLiteral("*"));
else
filePath = 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