D18853: Fix sharing files with spaces or quotes in names via Telegram

2019-02-08 Thread Mikhail Rudenko
mikhailru created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
mikhailru requested review of this revision.

REVISION SUMMARY
  At present, when one tries to share files with
  certain names via Telegram using Dolphin's share menu,
  Dolphin crashes (names contain unbalanced quotes) or a wrong
  name is passed to Telegram (names with spaces). The root cause
  is KShell::splitArgs returning empty QStringList or doing
  wrong splits for the above classes of names. This patch
  postpones the substitution of "%u" with the actual filename
  until splitting is done, thus avoiding undesired behavior.

TEST PLAN
  1. Create test files:
  
  $ echo test | tee test\ .txt | tee test\'.txt > test\".txt
  
  2. Start Dolphin and share the files via Telegram.
  
  3. No errors and crashes should occur in the process.

REPOSITORY
  R495 Purpose Library

BRANCH
  telegram-sharing-fix (branched from master)

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

AFFECTED FILES
  src/plugins/telegram/telegramplugin.cpp

To: mikhailru
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D18853: Fix sharing files with spaces or quotes in names via Telegram

2019-02-08 Thread Mikhail Rudenko
mikhailru added a reviewer: apol.

REPOSITORY
  R495 Purpose Library

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

To: mikhailru, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D18853: Fix sharing files with spaces or quotes in names via Telegram

2019-02-18 Thread Mikhail Rudenko
mikhailru added a comment.


  ping

REPOSITORY
  R495 Purpose Library

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

To: mikhailru, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D18853: Fix sharing files with spaces or quotes in names via Telegram

2019-02-19 Thread Mikhail Rudenko
mikhailru updated this revision to Diff 52123.
mikhailru added a comment.


  @apol, thanks for a nice suggestion!
  I somehow missed KShell::quoteArg. :)

REPOSITORY
  R495 Purpose Library

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18853?vs=51187&id=52123

BRANCH
  telegram-sharing-fix (branched from master)

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

AFFECTED FILES
  src/plugins/telegram/telegramplugin.cpp

To: mikhailru, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D18853: Fix sharing files with spaces or quotes in names via Telegram

2019-02-20 Thread Mikhail Rudenko
mikhailru added a comment.


  In D18853#416211 , @apol wrote:
  
  > Looks much better :D
  >
  > Can you land the patch?
  
  
  I'm afraid I can't. Actually this is my first KDE patch that have made it 
this far. :)

REPOSITORY
  R495 Purpose Library

BRANCH
  telegram-sharing-fix (branched from master)

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

To: mikhailru, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns