@@ -156,16 +156,13 @@ void AddRecipients::addRecipientFromHistory()
156156
157157void AddRecipients::addRecipient (const QSslCertificate& cert, bool select)
158158{
159- CDKey key (cert);
159+ CKey key (cert);
160160 AddressItem *leftItem = itemListValue (ui->leftPane , key);
161161 if (!leftItem)
162162 {
163163 leftItem = new AddressItem (key, AddressItem::Add, ui->leftPane );
164164 ui->leftPane ->addWidget (leftItem);
165-
166- bool contains = rightList.contains (key);
167- leftItem->setDisabled (contains);
168-
165+ leftItem->setDisabled (rightList.contains (key));
169166 connect (leftItem, &AddressItem::add, this , [this ](Item *item) { addRecipientToRightPane (item); });
170167 if (auto *add = ui->leftPane ->findChild <QWidget*>(QStringLiteral (" add" )))
171168 add->setVisible (true );
@@ -177,8 +174,8 @@ void AddRecipients::addRecipient(const QSslCertificate& cert, bool select)
177174void AddRecipients::addRecipientToRightPane (Item *item, bool update)
178175{
179176 auto *address = qobject_cast<AddressItem*>(item);
180- const CDKey& key = address->getKey ();
181177 if (!address) return ;
178+ const CKey& key = address->getKey ();
182179 if (rightList.contains (key)) return ;
183180
184181 if (update)
@@ -240,7 +237,7 @@ bool AddRecipients::isUpdated() const
240237 return ui->confirm ->isEnabled ();
241238}
242239
243- AddressItem* AddRecipients::itemListValue (ItemList *list, const CDKey &key)
240+ AddressItem* AddRecipients::itemListValue (ItemList *list, const CKey &key)
244241{
245242 for (auto *item: list->items )
246243 {
@@ -250,9 +247,9 @@ AddressItem* AddRecipients::itemListValue(ItemList *list, const CDKey &key)
250247 return nullptr ;
251248}
252249
253- QList<CDKey > AddRecipients::keys () const
250+ QList<CKey > AddRecipients::keys () const
254251{
255- QList<CDKey > recipients;
252+ QList<CKey > recipients;
256253 for (auto *item: ui->rightPane ->items )
257254 {
258255 if (auto *address = qobject_cast<AddressItem *>(item))
0 commit comments