Changeset View
Changeset View
Standalone View
Standalone View
kpeople/uiplugins/imdetailswidget.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | QWidget* ImDetailsWidget::createDetailsWidget(const KPeople::PersonData &person, QWidget *parent) const | 50 | QWidget* ImDetailsWidget::createDetailsWidget(const KPeople::PersonData &person, QWidget *parent) const | ||
51 | { | 51 | { | ||
52 | QWidget *root = new QWidget(parent); | 52 | QWidget *root = new QWidget(parent); | ||
53 | QGridLayout *layout = new QGridLayout(root); | 53 | QGridLayout *layout = new QGridLayout(root); | ||
54 | root->setLayout(layout); | 54 | root->setLayout(layout); | ||
55 | 55 | | |||
56 | int row = 0; | 56 | int row = 0; | ||
57 | for(const QString &contactId: person.contactUris()) { | 57 | for(const QString &contactId: person.contactUris()) { | ||
58 | if (!contactId.startsWith("ktp://")) { | ||||
59 | continue; | ||||
60 | } | ||||
58 | PersonData contact(contactId); | 61 | PersonData contact(contactId); | ||
59 | const QString tpcontactId = contact.contactCustomProperty(QStringLiteral("telepathy-contactId")).toString(); | 62 | const QString tpcontactId = contact.contactCustomProperty(QStringLiteral("telepathy-contactId")).toString(); | ||
60 | const QString accountPath = contact.contactCustomProperty(QStringLiteral("telepathy-accountPath")).toString(); //probably unused till we fix everything properly | 63 | const QString accountPath = contact.contactCustomProperty(QStringLiteral("telepathy-accountPath")).toString(); //probably unused till we fix everything properly | ||
61 | 64 | | |||
62 | Tp::AccountPtr account = KTp::accountManager()->accountForObjectPath(accountPath); | 65 | Tp::AccountPtr account = KTp::accountManager()->accountForObjectPath(accountPath); | ||
63 | if (!account) { | 66 | if (!account) { | ||
64 | continue; | 67 | continue; | ||
65 | } | 68 | } | ||
Show All 21 Lines |