Apply clang-format
This commit is contained in:
@@ -184,7 +184,9 @@ void Controller::logout(Connection *conn, bool serverSideLogout)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto logoutJob = conn->callApi<LogoutJob>();
|
auto logoutJob = conn->callApi<LogoutJob>();
|
||||||
connect(logoutJob, &LogoutJob::failure, this, [=] { Q_EMIT errorOccured("Server-side Logout Failed", logoutJob->errorString()); });
|
connect(logoutJob, &LogoutJob::failure, this, [=] {
|
||||||
|
Q_EMIT errorOccured("Server-side Logout Failed", logoutJob->errorString());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::addConnection(Connection *c)
|
void Controller::addConnection(Connection *c)
|
||||||
|
|||||||
@@ -356,9 +356,9 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
|
|||||||
},
|
},
|
||||||
[](const StateEventBase &e) {
|
[](const StateEventBase &e) {
|
||||||
// A small hack for state events from TWIM bot
|
// A small hack for state events from TWIM bot
|
||||||
return e.stateKey() == "twim"
|
return e.stateKey() == "twim" ? tr("updated the database", "TWIM bot updated the database")
|
||||||
? tr("updated the database", "TWIM bot updated the database")
|
: e.stateKey().isEmpty() ? tr("updated %1 state", "%1 - Matrix event type").arg(e.matrixType())
|
||||||
: e.stateKey().isEmpty() ? tr("updated %1 state", "%1 - Matrix event type").arg(e.matrixType()) : tr("updated %1 state for %2", "%1 - Matrix event type, %2 - state key").arg(e.matrixType(), e.stateKey().toHtmlEscaped());
|
: tr("updated %1 state for %2", "%1 - Matrix event type, %2 - state key").arg(e.matrixType(), e.stateKey().toHtmlEscaped());
|
||||||
},
|
},
|
||||||
tr("Unknown event"));
|
tr("Unknown event"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ QString SortFilterRoomListModel::filterText() const
|
|||||||
return m_filterText;
|
return m_filterText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SortFilterRoomListModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
||||||
bool SortFilterRoomListModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
|
|
||||||
{
|
{
|
||||||
Q_UNUSED(source_parent);
|
Q_UNUSED(source_parent);
|
||||||
return sourceModel()->data(sourceModel()->index(source_row, 0), RoomListModel::NameRole).toString().contains(m_filterText, Qt::CaseInsensitive) && sourceModel()->data(sourceModel()->index(source_row, 0), RoomListModel::JoinStateRole).toString() != "upgraded";
|
return sourceModel()->data(sourceModel()->index(source_row, 0), RoomListModel::NameRole).toString().contains(m_filterText, Qt::CaseInsensitive) &&
|
||||||
|
sourceModel()->data(sourceModel()->index(source_row, 0), RoomListModel::JoinStateRole).toString() != "upgraded";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user