D24308: [DataProtocol] compile without implicit coversion from ascii

2019-10-04 Thread Ahmad Samir
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:3b98d91436f5: [DataProtocol] compile without implicit 
coversion from ascii (authored by ahmadsamir).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24308?vs=67125=67327

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

AFFECTED FILES
  src/core/dataprotocol.cpp

To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24308: [DataProtocol] compile without implicit coversion from ascii

2019-10-02 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R241 KIO

BRANCH
  ahmad/compile-without-ascii-cast (branched from master)

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

To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24308: [DataProtocol] compile without implicit coversion from ascii

2019-10-01 Thread Ahmad Samir
ahmadsamir updated this revision to Diff 67125.
ahmadsamir added a comment.


  Make it faster by comparing char's directly

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24308?vs=67062=67125

BRANCH
  ahmad/compile-without-ascii-cast (branched from master)

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

AFFECTED FILES
  src/core/dataprotocol.cpp

To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24308: [DataProtocol] compile without implicit coversion from ascii

2019-10-01 Thread David Faure
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> dataprotocol.cpp:120
>  {
> -int size = buf.length();
> -while (pos < size && buf[pos].isSpace()) {
> +const QString  = QString::fromLatin1(buf);
> +int size = str.length();

It would be faster to keep a QByteArray here and just compare to ' ' and 
possibly \t.

> dataprotocol.cpp:196
>  // jump over delimiter token and return if data reached
> -if (raw_url[header_info.data_offset++] == QLatin1Char(',')) {
> +if (QLatin1Char(raw_url[header_info.data_offset++]) == QLatin1Char(',')) 
> {
>  return header_info;

Better remove both QLatin1Char and just compare chars.

> dataprotocol.cpp:206
>  if (header_info.data_offset >= raw_url_len
> -|| raw_url[header_info.data_offset] != QLatin1Char('=')) {
> +|| QLatin1Char(raw_url[header_info.data_offset]) != 
> QLatin1Char('=')) {
>  // no assignment, must be base64 option

Same here, and more that follow

REPOSITORY
  R241 KIO

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

To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24308: [DataProtocol] compile without implicit coversion from ascii

2019-09-30 Thread Ahmad Samir
ahmadsamir created this revision.
ahmadsamir added a reviewer: dfaure.
Herald added a project: Frameworks.
ahmadsamir requested review of this revision.

TEST PLAN
  make && ctest

REPOSITORY
  R241 KIO

BRANCH
  ahmad/compile-without-ascii-cast (branched from master)

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

AFFECTED FILES
  src/core/dataprotocol.cpp

To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns