X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftitlesetter.cpp;h=a7429e0e27abc9357b365c67376a18b454d6cb07;hp=31385a0ea56e0438a998997223aaf2779683f880;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=4a5065255e652dd0c301bac0db41b7afb777ef49 diff --git a/src/qtui/titlesetter.cpp b/src/qtui/titlesetter.cpp index 31385a0e..a7429e0e 100644 --- a/src/qtui/titlesetter.cpp +++ b/src/qtui/titlesetter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -24,29 +24,26 @@ #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); if (changedArea.contains(currentTopicIndex)) changeWindowTitle(currentTopicIndex); -}; +} -void TitleSetter::changeWindowTitle(const QModelIndex &index) +void TitleSetter::changeWindowTitle(const QModelIndex& index) { BufferId id = index.data(NetworkModel::BufferIdRole).value(); if (!id.isValid())