X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftitlesetter.cpp;h=a7429e0e27abc9357b365c67376a18b454d6cb07;hp=731b9131f3baf582e74637abd2d1c00de249cd05;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=00e1a9c29e792ba4d65dba21b7ba04131bcb13bc diff --git a/src/qtui/titlesetter.cpp b/src/qtui/titlesetter.cpp index 731b9131..a7429e0e 100644 --- a/src/qtui/titlesetter.cpp +++ b/src/qtui/titlesetter.cpp @@ -24,21 +24,18 @@ #include "client.h" #include "mainwin.h" -TitleSetter::TitleSetter(MainWin *parent) - : AbstractItemView(parent), - _mainWin(parent) -{ -} - +TitleSetter::TitleSetter(MainWin* parent) + : AbstractItemView(parent) + , _mainWin(parent) +{} -void TitleSetter::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) +void TitleSetter::currentChanged(const QModelIndex& current, const QModelIndex& previous) { Q_UNUSED(previous); changeWindowTitle(current.sibling(current.row(), 0)); } - -void TitleSetter::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) +void TitleSetter::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) { QItemSelectionRange changedArea(topLeft, bottomRight); QModelIndex currentTopicIndex = selectionModel()->currentIndex().sibling(selectionModel()->currentIndex().row(), 0); @@ -46,8 +43,7 @@ void TitleSetter::dataChanged(const QModelIndex &topLeft, const QModelIndex &bot changeWindowTitle(currentTopicIndex); } - -void TitleSetter::changeWindowTitle(const QModelIndex &index) +void TitleSetter::changeWindowTitle(const QModelIndex& index) { BufferId id = index.data(NetworkModel::BufferIdRole).value(); if (!id.isValid())