Commit edfee3a1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Astyle kdelibs

parent 9130ef86
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "csvimportexportplugin.h"
#include "csvimportexportplugininterface.h"
#include <kpluginfactory.h>
......@@ -35,7 +34,6 @@ CSVImportExportPlugin::~CSVImportExportPlugin()
}
PimCommon::AbstractGenericPluginInterface *CSVImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
{
CSVImportExportPluginInterface *interface = new CSVImportExportPluginInterface(parent);
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef CSVIMPORTEXPORTPLUGIN_H
#define CSVIMPORTEXPORTPLUGIN_H
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
......
......@@ -46,7 +46,6 @@ CSVImportExportPluginInterface::~CSVImportExportPluginInterface()
}
void CSVImportExportPluginInterface::createAction(KActionCollection *ac)
{
QAction *action = ac->addAction(QStringLiteral("file_export_csv"));
......@@ -62,10 +61,9 @@ void CSVImportExportPluginInterface::createAction(KActionCollection *ac)
connect(action, &QAction::triggered, this, &CSVImportExportPluginInterface::slotImportCVS);
}
void CSVImportExportPluginInterface::exec()
{
switch(mImportExportAction) {
switch (mImportExportAction) {
case Import:
importCSV();
break;
......@@ -226,13 +224,11 @@ void CSVImportExportPluginInterface::exportCSV()
}
}
bool CSVImportExportPluginInterface::canImportFileType(const QUrl &url)
{
return url.path().endsWith(QStringLiteral(".csv"));
}
void CSVImportExportPluginInterface::importFile(const QUrl &url)
{
//TODO
......
......@@ -44,7 +44,6 @@ private:
void exportToFile(QFile *file, const KContacts::Addressee::List &contacts) const;
void importCSV();
};
#endif // CSVIMPORTEXPORTPLUGININTERFACE_H
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "gmximportexportplugin.h"
#include "gmximportexportplugininterface.h"
#include <kpluginfactory.h>
......@@ -35,7 +34,6 @@ GMXImportExportPlugin::~GMXImportExportPlugin()
}
PimCommon::AbstractGenericPluginInterface *GMXImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
{
GMXImportExportPluginInterface *interface = new GMXImportExportPluginInterface(parent);
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef GMXIMPORTEXPORTPLUGIN_H
#define GMXIMPORTEXPORTPLUGIN_H
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
......
......@@ -49,7 +49,6 @@ GMXImportExportPluginInterface::~GMXImportExportPluginInterface()
}
void GMXImportExportPluginInterface::createAction(KActionCollection *ac)
{
QAction *action = ac->addAction(QStringLiteral("file_import_gmx"));
......@@ -67,7 +66,7 @@ void GMXImportExportPluginInterface::createAction(KActionCollection *ac)
void GMXImportExportPluginInterface::exec()
{
switch(mImportExportAction) {
switch (mImportExportAction) {
case Import:
importGMX();
break;
......@@ -445,7 +444,6 @@ void GMXImportExportPluginInterface::doExport(QFile *fp, const KContacts::Addres
t << "####" << endl;
}
void GMXImportExportPluginInterface::importGMX()
{
KAddressBookImportExport::KAddressBookImportExportContactList contactList;
......@@ -672,7 +670,6 @@ void GMXImportExportPluginInterface::importGMX()
}
bool GMXImportExportPluginInterface::canImportFileType(const QUrl &url)
{
return url.path().endsWith(QStringLiteral(".gmx"));
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "ldapimportexportplugin.h"
#include "ldapimportexportplugininterface.h"
#include <kpluginfactory.h>
......@@ -35,7 +34,6 @@ LDapImportExportPlugin::~LDapImportExportPlugin()
}
PimCommon::AbstractGenericPluginInterface *LDapImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
{
LDapImportExportPluginInterface *interface = new LDapImportExportPluginInterface(parent);
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef LDAPIMPORTEXPORTPLUGIN_H
#define LDAPIMPORTEXPORTPLUGIN_H
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
......
......@@ -37,7 +37,6 @@ LDapImportExportPluginInterface::~LDapImportExportPluginInterface()
}
void LDapImportExportPluginInterface::createAction(KActionCollection *ac)
{
QAction *action = ac->addAction(QStringLiteral("file_import_ldap"));
......@@ -49,7 +48,7 @@ void LDapImportExportPluginInterface::createAction(KActionCollection *ac)
void LDapImportExportPluginInterface::exec()
{
switch(mImportExportAction) {
switch (mImportExportAction) {
case Import:
importLdap();
break;
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "ldifimportexportplugin.h"
#include "ldifimportexportplugininterface.h"
#include <kpluginfactory.h>
......@@ -35,7 +34,6 @@ LDifImportExportPlugin::~LDifImportExportPlugin()
}
PimCommon::AbstractGenericPluginInterface *LDifImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
{
LDifImportExportPluginInterface *interface = new LDifImportExportPluginInterface(parent);
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef LDIFIMPORTEXPORTPLUGIN_H
#define LDIFIMPORTEXPORTPLUGIN_H
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
......
......@@ -46,7 +46,6 @@ LDifImportExportPluginInterface::~LDifImportExportPluginInterface()
}
void LDifImportExportPluginInterface::createAction(KActionCollection *ac)
{
QAction *action = ac->addAction(QStringLiteral("file_import_ldif"));
......@@ -64,7 +63,7 @@ void LDifImportExportPluginInterface::createAction(KActionCollection *ac)
void LDifImportExportPluginInterface::exec()
{
switch(mImportExportAction) {
switch (mImportExportAction) {
case Import:
importLdif();
break;
......@@ -86,7 +85,6 @@ void LDifImportExportPluginInterface::slotExportLdif()
Q_EMIT emitPluginActivated(this);
}
void LDifImportExportPluginInterface::importLdif()
{
KAddressBookImportExport::KAddressBookImportExportContactList contactList;
......@@ -206,7 +204,6 @@ void LDifImportExportPluginInterface::exportLdif()
}
}
bool LDifImportExportPluginInterface::canImportFileType(const QUrl &url)
{
return url.path().endsWith(QStringLiteral(".ldif"));
......
......@@ -36,7 +36,7 @@ private:
void slotImportLdif();
void slotExportLdif();
void importLdif();
void exportLdif();
void exportLdif();
};
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#include "vcardimportexportplugin.h"
#include "vcardimportexportplugininterface.h"
#include <kpluginfactory.h>
......@@ -34,7 +33,6 @@ VCardImportExportPlugin::~VCardImportExportPlugin()
}
PimCommon::AbstractGenericPluginInterface *VCardImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
{
VCardImportExportPluginInterface *interface = new VCardImportExportPluginInterface(parent);
......
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef VCARDIMPORTEXPORTPLUGIN_H
#define VCARDIMPORTEXPORTPLUGIN_H
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
......
......@@ -51,7 +51,6 @@ VCardImportExportPluginInterface::~VCardImportExportPluginInterface()
}
void VCardImportExportPluginInterface::createAction(KActionCollection *ac)
{
QAction *action = ac->addAction(QStringLiteral("file_import_vcard"));
......@@ -105,7 +104,7 @@ void VCardImportExportPluginInterface::slotExportVCard2()
void VCardImportExportPluginInterface::exec()
{
switch(mImportExportAction) {
switch (mImportExportAction) {
case Import:
importVCard();
break;
......@@ -408,7 +407,6 @@ bool VCardImportExportPluginInterface::doExport(const QUrl &url, const QByteArra
return job->exec();
}
void VCardImportExportPluginInterface::exportVCard()
{
QPointer<KAddressBookImportExport::KAddressBookContactSelectionDialog> dlg =
......@@ -429,7 +427,6 @@ void VCardImportExportPluginInterface::exportVCard()
return;
}
KContacts::VCardConverter converter;
QUrl url;
......@@ -449,8 +446,7 @@ void VCardImportExportPluginInterface::exportVCard()
return;
}
switch(mExportVCardType)
{
switch (mExportVCardType) {
case VCard2_1:
ok = doExport(url, converter.exportVCards(list, KContacts::VCardConverter::v2_1));
break;
......@@ -486,8 +482,7 @@ void VCardImportExportPluginInterface::exportVCard()
bool tmpOk = false;
switch(mExportVCardType)
{
switch (mExportVCardType) {
case VCard2_1:
tmpOk = doExport(url, converter.exportVCards(list, KContacts::VCardConverter::v2_1));
break;
......@@ -508,8 +503,7 @@ void VCardImportExportPluginInterface::exportVCard()
return; // user canceled export
}
switch(mExportVCardType)
{
switch (mExportVCardType) {
case VCard2_1:
ok = doExport(url, converter.exportVCards(list, KContacts::VCardConverter::v2_1));
break;
......@@ -529,7 +523,6 @@ void VCardImportExportPluginInterface::exportVCard()
}
}
bool VCardImportExportPluginInterface::canImportFileType(const QUrl &url)
{
return url.path().endsWith(QStringLiteral(".vcf"));
......
Supports Markdown
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