chatgui: double-click member edit, fix delegate backgrounds; transport: invite_sync/member_sync robustness
This commit is contained in:
1 parent
cd3c3ad07d
commit
77d89b841a
6 files changed
+35
-9
No files matched your search
@@ -73,6 +73,7 @@ AccountList::AccountList(DbManager* db, QWidget *parent)
|
||||
layout->addWidget(m_detailText, 2);
|
||||
|
||||
connect(m_listView, &QListView::clicked, this, &AccountList::onMemberClicked);
|
||||
connect(m_listView, &QListView::doubleClicked, this, &AccountList::onMemberDoubleClicked);
|
||||
|
||||
m_refreshTimer = new QTimer(this);
|
||||
m_refreshTimer->start(2000);
|
||||
@@ -165,6 +166,15 @@ void AccountList::showMemberDetail(quint64 nodeId) {
|
||||
m_detailText->setPlainText(text);
|
||||
}
|
||||
|
||||
void AccountList::onMemberDoubleClicked(const QModelIndex& index) {
|
||||
if (!index.isValid()) return;
|
||||
quint64 nodeId = m_model->nodeIdAt(index.row());
|
||||
if (!nodeId) return;
|
||||
QString name = m_model->data(index, Qt::DisplayRole).toString();
|
||||
MemberPropsDialog dlg(m_db, m_channelId, nodeId, name, this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void AccountList::onMemberContextMenu(const QPoint& pos) {
|
||||
QModelIndex index = m_listView->indexAt(pos);
|
||||
if (!index.isValid()) return;
|
||||
|
||||
Reference in new issue
Block a user