summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-12 19:36:17 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-12 19:36:17 (GMT)
commit98394329783f0a2b4733eedcee1eb93f734e48b0 (patch)
tree57df17e74377c4fb297d9ca07430b6e785df2e5b
parentcbc0329559939ce6bf4c66261bbf503fdfe175b1 (diff)
Minor fix
-rw-r--r--kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp7
-rw-r--r--kaddressbook/importexportplugins/shared/importexportengine.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp
index 3cde0b4..00816fa 100644
--- a/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp
@@ -240,10 +240,11 @@ void GMXImportExportPluginInterface::doExport(QFile *fp, const KContacts::Addres
// Assign categories as bitfield
const QStringList categories = addressee->categories();
long int category = 0;
- if (categories.count() > 0) {
+ if (!categories.isEmpty()) {
for (int i = 0; i < categories.count(); ++i) {
- if (categoryMap.contains(categories[i])) {
- category |= 1 << categoryMap.indexOf(categories[i], 0);
+ const QString cat = categories[i];
+ if (categoryMap.contains(cat)) {
+ category |= 1 << categoryMap.indexOf(cat, 0);
}
}
}
diff --git a/kaddressbook/importexportplugins/shared/importexportengine.cpp b/kaddressbook/importexportplugins/shared/importexportengine.cpp
index 13a0431..0d78e53 100644
--- a/kaddressbook/importexportplugins/shared/importexportengine.cpp
+++ b/kaddressbook/importexportplugins/shared/importexportengine.cpp
@@ -102,7 +102,7 @@ void ImportExportEngine::importContacts()
}
mImportProgressDialog->show();
-
+ mImportDone = 0;
mNumberElementToImport = mContactsList.count();
for (int i = 0; i < mContactsList.addressList().count(); ++i) {