X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Ftitlesetter.cpp;h=068a09219ac21ea4455172f6906515c14ffbd207;hb=673ded0d543cbdc2cf6e746b6bee7c1d21af8f90;hp=731b9131f3baf582e74637abd2d1c00de249cd05;hpb=00e1a9c29e792ba4d65dba21b7ba04131bcb13bc;p=quassel.git diff --git a/src/qtui/titlesetter.cpp b/src/qtui/titlesetter.cpp index 731b9131..068a0921 100644 --- a/src/qtui/titlesetter.cpp +++ b/src/qtui/titlesetter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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())