I downloaded an example from the blackberry website. I noticed they have some values before the curly braces, and after a colon, seperated by commas.
What are these for, and how do they work?
Edit: Is this just another way of instantiating values? The same as setting these values inside of the curly braces?
using namespace bb::cascades;
using namespace bb::pim::contacts;
//! [0]
AddressBook::AddressBook(QObject *parent)
: QObject(parent)
, m_contactService(new ContactService(this))
, m_model(new GroupDataModel(this))
, m_contactViewer(new ContactViewer(m_contactService, this))
, m_contactEditor(new ContactEditor(m_contactService, this))
, m_currentContactId(-1)
{
// Disable grouping in data model
m_model->setGrouping(ItemGrouping::None);
// Ensure to invoke the filterContacts() method whenever a contact has been added, changed or removed
bool ok = connect(m_contactService, SIGNAL(contactsAdded(QList<int>)), SLOT(filterContacts()));
Q_ASSERT(ok);
ok = connect(m_contactService, SIGNAL(contactsChanged(QList<int>)), SLOT(filterContacts()));
Q_ASSERT(ok);
ok = connect(m_contactService, SIGNAL(contactsDeleted(QList<int>)), SLOT(filterContacts()));
Q_ASSERT(ok);
// Fill the data model with contacts initially
filterContacts();
}