diff --git a/abstract_client.cpp b/abstract_client.cpp index bd6262b42f..1116b469a6 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1766,4 +1766,17 @@ AbstractClient *AbstractClient::findClientWithSameCaption() const return workspace()->findAbstractClient(fetchNameInternalPredicate); } +QString AbstractClient::caption(bool full) const +{ + QString cap = captionNormal(); + if (full) { + cap += captionSuffix(); + if (unresponsive()) { + cap += QLatin1String(" "); + cap += i18nc("Application is not responding, appended to window title", "(Not Responding)"); + } + } + return cap; +} + } diff --git a/abstract_client.h b/abstract_client.h index d92c531bac..833cc456b0 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -348,7 +348,7 @@ public: * @see captionNormal * @see captionSuffix **/ - virtual QString caption(bool full = true) const = 0; + QString caption(bool full = true) const; /** * @returns The caption as set by the AbstractClient without any suffix. * @see caption diff --git a/client.cpp b/client.cpp index ad8d48aeef..7cb3480e8d 100644 --- a/client.cpp +++ b/client.cpp @@ -1513,22 +1513,6 @@ void Client::fetchIconicName() } } -/** - * \reimp - */ -QString Client::caption(bool full) const -{ - QString cap = cap_normal; - if (full) { - cap += cap_suffix; - if (unresponsive()) { - cap += QLatin1String(" "); - cap += i18nc("Application is not responding, appended to window title", "(Not Responding)"); - } - } - return cap; -} - bool Client::tabTo(Client *other, bool behind, bool activate) { Q_ASSERT(other && other != this); diff --git a/client.h b/client.h index 0e90a1be43..656536ceee 100644 --- a/client.h +++ b/client.h @@ -219,7 +219,6 @@ public: void setBlockingCompositing(bool block); inline bool isBlockingCompositing() { return blocks_compositing; } - QString caption(bool full = true) const override; QString captionNormal() const override { return cap_normal; } diff --git a/shell_client.cpp b/shell_client.cpp index 381a11b85a..e4b169e677 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -566,15 +566,6 @@ void ShellClient::blockActivityUpdates(bool b) Q_UNUSED(b) } -QString ShellClient::caption(bool full) const -{ - QString caption = m_caption; - if (full) { - caption += m_captionSuffix; - } - return caption; -} - void ShellClient::updateCaption() { const QString oldSuffix = m_captionSuffix; diff --git a/shell_client.h b/shell_client.h index a5ad7544e5..0b15b7a4a8 100644 --- a/shell_client.h +++ b/shell_client.h @@ -63,7 +63,6 @@ public: } void blockActivityUpdates(bool b = true) override; - QString caption(bool full = true) const override; QString captionNormal() const override { return m_caption; }