minor fixes, form to join MUC

This commit is contained in:
Blue 2019-09-04 19:38:52 +03:00
parent 5f8d38bd9a
commit c295fa1c1d
23 changed files with 385 additions and 34 deletions

View file

@ -90,15 +90,17 @@ void Models::Accounts::addAccount(Account* account)
void Models::Accounts::onAccountChanged(Item* item, int row, int col)
{
Account* acc = getAccount(row);
if (item != acc) {
return; //it means the signal is emitted by one of accounts' children, not exactly him, this model has no interest in that
if (row < accs.size()) {
Account* acc = getAccount(row);
if (item != acc) {
return; //it means the signal is emitted by one of accounts' children, not exactly him, this model has no interest in that
}
if (col < columnCount(QModelIndex())) {
emit dataChanged(createIndex(row, col, this), createIndex(row, col, this));
}
emit changed();
}
if (col < columnCount(QModelIndex())) {
emit dataChanged(createIndex(row, col, this), createIndex(row, col, this));
}
emit changed();
}
Models::Account * Models::Accounts::getAccount(int index)

View file

@ -153,7 +153,7 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
if (mc > 0) {
str += QString("New messages: ") + std::to_string(mc).c_str() + "\n";
}
str += "Jabber ID: " + contact->getJid();
str += "Jabber ID: " + contact->getJid() + "\n";
Shared::SubscriptionState ss = contact->getState();
if (ss == Shared::both) {
Shared::Availability av = contact->getAvailability();