D25440: Set a proper agent string for Attica requests

David Edmundson noreply at phabricator.kde.org
Tue Nov 26 12:49:38 GMT 2019


davidedmundson added inline comments.

INLINE COMMENTS

> provider.cpp:1632
> +    if (QCoreApplication::instance()) {
> +        agentHeader = QString::fromLocal8Bit("%1/%2").arg(QCoreApplication::instance()->applicationName()).arg(QCoreApplication::instance()->applicationVersion());
> +    } else {

string.arg(foo, bar)

not

string.arg(foo).arg(bar)

otherwise we explode if foo contains the string "%1"

> provider.cpp:1634
> +    } else {
> +        agentHeader = QString::fromLocal8Bit("Attica/%1");
> +    }

where does %1 get set?

(same for the %2 below)

REPOSITORY
  R235 Attica

REVISION DETAIL
  https://phabricator.kde.org/D25440

To: leinir, #frameworks, #knewstuff, #plasma, starbuck, ronaldv
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191126/978462e3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list