Commit f0652970 authored by Martin Flöser's avatar Martin Flöser

Drop boolean parameter from AbstractClient::caption

Summary:
With the latest refactoring AbstractClient::captionNormal is the same as
AbstractClient::caption(false) used to be. As there were only two usages
of the false parameter, let's remove this boolean trap and use proper
API calls.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7427
parent a7b29e09
......@@ -1766,16 +1766,13 @@ AbstractClient *AbstractClient::findClientWithSameCaption() const
return workspace()->findAbstractClient(fetchNameInternalPredicate);
}
QString AbstractClient::caption(bool full) const
QString AbstractClient::caption() const
{
QString cap = captionNormal();
if (full) {
cap += captionSuffix();
QString cap = captionNormal() + captionSuffix();
if (unresponsive()) {
cap += QLatin1String(" ");
cap += i18nc("Application is not responding, appended to window title", "(Not Responding)");
}
}
return cap;
}
......
......@@ -348,7 +348,7 @@ public:
* @see captionNormal
* @see captionSuffix
**/
QString caption(bool full = true) const;
QString caption() const;
/**
* @returns The caption as set by the AbstractClient without any suffix.
* @see caption
......
......@@ -1180,7 +1180,7 @@ void Client::killProcess(bool ask, xcb_timestamp_t timestamp)
QString hostname = clientMachine()->isLocal() ? QStringLiteral("localhost") : QString::fromUtf8(clientMachine()->hostName());
QProcess::startDetached(QStringLiteral(KWIN_KILLER_BIN),
QStringList() << QStringLiteral("--pid") << QString::number(unsigned(pid)) << QStringLiteral("--hostname") << hostname
<< QStringLiteral("--windowname") << caption(false /*full*/)
<< QStringLiteral("--windowname") << captionNormal()
<< QStringLiteral("--applicationname") << QString::fromUtf8(resourceClass())
<< QStringLiteral("--wid") << QString::number(window())
<< QStringLiteral("--timestamp") << QString::number(timestamp),
......
......@@ -460,7 +460,7 @@ bool Rules::match(const Client* c) const
// QueuedConnection, because title may change before
// the client is ready (could segfault!)
static_cast<Qt::ConnectionType>(Qt::QueuedConnection|Qt::UniqueConnection));
if (!matchTitle(c->caption(false)))
if (!matchTitle(c->captionNormal()))
return false;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment