Apply clang-format

This commit is contained in:
Tobias Fella
2020-11-17 20:25:18 +01:00
parent 92569a8869
commit de183caefb
3 changed files with 9 additions and 7 deletions

View File

@@ -184,7 +184,9 @@ void Controller::logout(Connection *conn, bool serverSideLogout)
return;
}
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)

View File

@@ -356,9 +356,9 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
},
[](const StateEventBase &e) {
// A small hack for state events from TWIM bot
return e.stateKey() == "twim"
? tr("updated the database", "TWIM bot updated the database")
: 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());
return e.stateKey() == "twim" ? tr("updated the database", "TWIM bot updated the database")
: 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("Unknown event"));
}

View File

@@ -53,9 +53,9 @@ QString SortFilterRoomListModel::filterText() const
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);
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";
}