Commit d6e32255 authored by Alexandre Lision's avatar Alexandre Lision

contacts: ensure basic categories exist

Issue: #80834
Change-Id: I61679f4859f79bdea1f4ac7a6c7a01d2b83f0bfc
parent 34e738ec
......@@ -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 @@ int main(int argc, const char *argv[]) {
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);
......
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