contacts: ensure basic categories exist
Issue: #80834
Change-Id: I61679f4859f79bdea1f4ac7a6c7a01d2b83f0bfc
diff --git a/src/main.mm b/src/main.mm
index ac35048..ef72cbc 100644
--- a/src/main.mm
+++ b/src/main.mm
@@ -31,6 +31,7 @@
#import <personmodel.h>
#import <categorizedhistorymodel.h>
#import <localhistorycollection.h>
+#import <numbercategorymodel.h>
#import "backends/AddressBookBackend.h"
#import "delegates/ImageManipulationDelegate.h"
@@ -55,6 +56,12 @@
CategorizedHistoryModel::instance()->addCollection<LocalHistoryCollection>(LoadOptions::FORCE_ENABLED);
+ /* make sure basic number categories exist, in case user has no contacts
+ * from which these would be automatically created
+ */
+ NumberCategoryModel::instance()->addCategory("work", QVariant());
+ NumberCategoryModel::instance()->addCategory("home", QVariant());
+
GlobalInstances::setPixmapManipulator(std::unique_ptr<Interfaces::ImageManipulationDelegate>(new Interfaces::ImageManipulationDelegate()));
PersonModel::instance()->addCollection<AddressBookBackend>(LoadOptions::FORCE_ENABLED);