dfaure added inline comments.

INLINE COMMENTS

> kio_help.cpp:136
>  
>  void HelpProtocol::unicodeError(const QString &t)
>  {

While at it: this change makes the method name quite strange. Rename to 
sendError ?

> kio_help.cpp:138
>  {
> -#ifdef Q_OS_WIN
> -    QString encoding = "UTF-8";
> -#else
> -    QString encoding = QTextCodec::codecForLocale()->name();
> -#endif
> -    data(fromUnicode(QStringLiteral(
> -                         "<html><head><meta http-equiv=\"Content-Type\" 
> content=\"text/html; charset=%1\"></head>\n%2</html>").arg(encoding, 
> t.toHtmlEscaped())));
> +    data(QStringLiteral(
> +         "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; 
> charset=UTF-8\"></head>\n%1</html>").arg(t.toHtmlEscaped()).toUtf8());

Here the call to data() is not followed by a data(QByteArray()) ....

> kio_help.cpp:344
> +        data(result);
> +        data(QByteArray());
>      }

... while here the call to data() is followed by data(empty bytearray), as per 
the kio SlaveBase docu.

I suggest making it consistent (the best solution depends on what the other 
calls to unicodeError() look like)

REPOSITORY
  R241 KIO

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: ltoscano, dfaure
Cc: #documentation, #frameworks

Reply via email to