Commit 98394329 authored by Laurent Montel's avatar Laurent Montel 😁

Minor fix

parent cbc03295
......@@ -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);
}
}
}
......
......@@ -102,7 +102,7 @@ void ImportExportEngine::importContacts()
}
mImportProgressDialog->show();
mImportDone = 0;
mNumberElementToImport = mContactsList.count();
for (int i = 0; i < mContactsList.addressList().count(); ++i) {
......
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