remove remaining hashes
hashes were still displayed due to the use
of incorrect role in roledata polling.
(Person::Role instead of Ring::Role)
Change-Id: I94a57d0e199f8a27d15efa8fb0a42481d639037f
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
diff --git a/callwidget.cpp b/callwidget.cpp
index 929088d..c9a4ddb 100644
--- a/callwidget.cpp
+++ b/callwidget.cpp
@@ -781,9 +781,10 @@
{
ui->contactMethodComboBox->clear();
configureSendCRPageButton(nodeIdx);
- ui->imNameLabel->setText(QString(tr("%1\n%2", "%1 is the contact username, %2 is the contact registered name"))
- .arg(nodeIdx.data(static_cast<int>(Ring::Role::Name)).toString())
- .arg(nodeIdx.data(static_cast<int>(Person::Role::IdOfLastCMUsed)).value<QString>()));
+ ui->imNameLabel->setText(QString(tr("%1", "%1 is the contact username"))
+ .arg(nodeIdx.data(static_cast<int>(Ring::Role::Name)).toString()));
+ ui->imIdLabel->setText(QString(tr("%1", "%1 is the contact unique identifier"))
+ .arg(nodeIdx.data(static_cast<int>(Ring::Role::Number)).toString()));
auto cmVector = RecentModel::instance().getContactMethods(nodeIdx);
ui->contactMethodComboBox->setVisible(cmVector.size() > 1);
foreach (const ContactMethod* cm, cmVector) {
diff --git a/callwidget.ui b/callwidget.ui
index 9721e51..88a07fb 100644
--- a/callwidget.ui
+++ b/callwidget.ui
@@ -1075,43 +1075,79 @@
</widget>
</item>
<item>
- <spacer name="horizontalSpacer_7">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <layout class="QVBoxLayout" name="verticalLayout_14">
+ <property name="spacing">
+ <number>0</number>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <property name="leftMargin">
+ <number>0</number>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="imNameLabel">
- <property name="minimumSize">
- <size>
- <width>400</width>
- <height>0</height>
- </size>
- </property>
- <property name="font">
- <font>
- <pointsize>12</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
+ <item>
+ <widget class="QLabel" name="imNameLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(63,63,63);</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="imIdLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: rgb(192,192,192);</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<spacer name="horizontalSpacer_6">
diff --git a/smartlistdelegate.cpp b/smartlistdelegate.cpp
index aea864f..ac38147 100644
--- a/smartlistdelegate.cpp
+++ b/smartlistdelegate.cpp
@@ -148,7 +148,7 @@
}
// Display the ID under the name
- QString idStr = index.data(static_cast<int>(Person::Role::IdOfLastCMUsed)).value<QString>();
+ QString idStr = index.data(static_cast<int>(Ring::Role::Number)).value<QString>();
pen.setColor(RingTheme::grey_);
painter->setPen(pen);
font.setItalic(true);