summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-08-03 07:16:56 +0200
committerMontel Laurent <[email protected]>2015-08-03 07:16:56 +0200
commit93ec5922a030053be4b316563c79faa577354a01 (patch)
tree9641ee34f86beda694a09308d68061c566890920
parent74a31de7294ec8cd28dd13c0065bfbb954c72ab8 (diff)
Port to QFileDialog
-rw-r--r--kaddressbook/xxport/vcard/vcard_xxport.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/kaddressbook/xxport/vcard/vcard_xxport.cpp b/kaddressbook/xxport/vcard/vcard_xxport.cpp
index b0cd727..85b3f3d 100644
--- a/kaddressbook/xxport/vcard/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard/vcard_xxport.cpp
@@ -38,7 +38,6 @@
#include "kaddressbook_debug.h"
#include <QDialog>
#include <QFileDialog>
-#include <KFileDialog>
#include <KLocalizedString>
#include <KMessageBox>
#include <QTemporaryFile>
@@ -67,11 +66,11 @@ bool VCardXXPort::exportContacts(const ContactList &contacts, VCardExportSelecti
bool ok = true;
if (list.count() == 1) {
- url = KFileDialog::getSaveUrl(
+ url = QFileDialog::getSaveFileUrl(parentWidget(), QString(), QUrl::fromLocalFile(
QString(list[ 0 ].givenName() +
QLatin1Char(QLatin1Char('_')) +
list[ 0 ].familyName() +
- QLatin1String(".vcf")));
+ QLatin1String(".vcf"))));
if (url.isEmpty()) { // user canceled export
return true;
}
@@ -159,11 +158,9 @@ ContactList VCardXXPort::importContacts() const
} else {
const QString filter = i18n("*.vcf|vCard (*.vcf)\n*|all files (*)");
urls =
- KFileDialog::getOpenUrls(
+ QFileDialog::getOpenFileUrls(parentWidget(), i18nc("@title:window", "Select vCard to Import"),
QUrl(),
- filter,
- parentWidget(),
- i18nc("@title:window", "Select vCard to Import"));
+ filter);
}
if (urls.isEmpty()) {