Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-02-02 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/
---

(Updated Feb. 2, 2015, 10:46 p.m.)


Status
--

This change has been marked as submitted.


Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.


Bugs: 343380
https://bugs.kde.org/show_bug.cgi?id=343380


Repository: kcoreaddons


Description
---

We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
(U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace to 
decide when a new argument starts, without the quoting, one argument will get 
turned into two


Diffs
-

  autotests/kshelltest.cpp 451bbe9 
  src/lib/util/kshell_unix.cpp e0e884f 

Diff: https://git.reviewboard.kde.org/r/122300/diff/


Testing
---

New test passes, bug 343380 is fixed


Thanks,

Albert Astals Cid

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-29 Thread Albert Astals Cid


 On gen. 29, 2015, 7:46 a.m., David Faure wrote:
  Shouldn't splitArgs be fixed instead? After all a real shell would not 
  split on that character, would it?

That is indeed a good question. Bash doesn't seem to need the quotes, but i 
don't know about other shells, and i figured out adding some extra quotes for 
safety isn't really a problem and it's actually easier to fix and will have 
less regressions (since i want this backported to kdelibs too). But if you 
really prefer change in splitArgs I can have a look.


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/#review74967
---


On gen. 28, 2015, 11:24 p.m., Albert Astals Cid wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/122300/
 ---
 
 (Updated gen. 28, 2015, 11:24 p.m.)
 
 
 Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.
 
 
 Bugs: 343380
 https://bugs.kde.org/show_bug.cgi?id=343380
 
 
 Repository: kcoreaddons
 
 
 Description
 ---
 
 We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
 (U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace 
 to decide when a new argument starts, without the quoting, one argument will 
 get turned into two
 
 
 Diffs
 -
 
   autotests/kshelltest.cpp 451bbe9 
   src/lib/util/kshell_unix.cpp e0e884f 
 
 Diff: https://git.reviewboard.kde.org/r/122300/diff/
 
 
 Testing
 ---
 
 New test passes, bug 343380 is fixed
 
 
 Thanks,
 
 Albert Astals Cid
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-29 Thread David Faure


 On Jan. 29, 2015, 7:46 a.m., David Faure wrote:
  Shouldn't splitArgs be fixed instead? After all a real shell would not 
  split on that character, would it?
 
 Albert Astals Cid wrote:
 That is indeed a good question. Bash doesn't seem to need the quotes, but 
 i don't know about other shells, and i figured out adding some extra quotes 
 for safety isn't really a problem and it's actually easier to fix and will 
 have less regressions (since i want this backported to kdelibs too). But if 
 you really prefer change in splitArgs I can have a look.

Hmm ok, yeah, I guess extra quoting doesn't hurt. This code exists to avoid 
quoting everything single argument since that would look awful, but in corner 
cases like this, no harm done indeed.

I don't object to this patch, but I still think splitArgs has a corner case 
bug, if it's splitting where it shouldn't.


- David


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/#review74967
---


On Jan. 28, 2015, 11:24 p.m., Albert Astals Cid wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/122300/
 ---
 
 (Updated Jan. 28, 2015, 11:24 p.m.)
 
 
 Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.
 
 
 Bugs: 343380
 https://bugs.kde.org/show_bug.cgi?id=343380
 
 
 Repository: kcoreaddons
 
 
 Description
 ---
 
 We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
 (U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace 
 to decide when a new argument starts, without the quoting, one argument will 
 get turned into two
 
 
 Diffs
 -
 
   autotests/kshelltest.cpp 451bbe9 
   src/lib/util/kshell_unix.cpp e0e884f 
 
 Diff: https://git.reviewboard.kde.org/r/122300/diff/
 
 
 Testing
 ---
 
 New test passes, bug 343380 is fixed
 
 
 Thanks,
 
 Albert Astals Cid
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-28 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/
---

Review request for KDE Frameworks, David Faure and Michael Pyne.


Bugs: 343380
https://bugs.kde.org/show_bug.cgi?id=343380


Repository: kcoreaddons


Description
---

We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
(U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace to 
decide when a new argument starts, without the quoting, one argument will get 
turned into two


Diffs
-

  autotests/kshelltest.cpp 451bbe9 
  src/lib/util/kshell_unix.cpp e0e884f 

Diff: https://git.reviewboard.kde.org/r/122300/diff/


Testing
---

New test passes, bug 343380 is fixed


Thanks,

Albert Astals Cid

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-28 Thread Michael Pyne

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/#review74959
---

Ship it!


I would prefer to either comment the predicates used to determine is 
whitespace? in quoteArg and splitArgs to refer to each other, or to extract 
the test into a static bool, so that we don't get out of sync on these again. 
But I like the fix either way, so +1 whether you decide to make those 
additional changes or not.

- Michael Pyne


On Jan. 28, 2015, 11:24 p.m., Albert Astals Cid wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/122300/
 ---
 
 (Updated Jan. 28, 2015, 11:24 p.m.)
 
 
 Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.
 
 
 Bugs: 343380
 https://bugs.kde.org/show_bug.cgi?id=343380
 
 
 Repository: kcoreaddons
 
 
 Description
 ---
 
 We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
 (U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace 
 to decide when a new argument starts, without the quoting, one argument will 
 get turned into two
 
 
 Diffs
 -
 
   autotests/kshelltest.cpp 451bbe9 
   src/lib/util/kshell_unix.cpp e0e884f 
 
 Diff: https://git.reviewboard.kde.org/r/122300/diff/
 
 
 Testing
 ---
 
 New test passes, bug 343380 is fixed
 
 
 Thanks,
 
 Albert Astals Cid
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-28 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/
---

(Updated gen. 28, 2015, 11:24 p.m.)


Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.


Bugs: 343380
https://bugs.kde.org/show_bug.cgi?id=343380


Repository: kcoreaddons


Description
---

We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
(U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace to 
decide when a new argument starts, without the quoting, one argument will get 
turned into two


Diffs
-

  autotests/kshelltest.cpp 451bbe9 
  src/lib/util/kshell_unix.cpp e0e884f 

Diff: https://git.reviewboard.kde.org/r/122300/diff/


Testing
---

New test passes, bug 343380 is fixed


Thanks,

Albert Astals Cid

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 122300: Fix quoteArgs for spaces that are not the regular space

2015-01-28 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122300/#review74967
---


Shouldn't splitArgs be fixed instead? After all a real shell would not split on 
that character, would it?

- David Faure


On Jan. 28, 2015, 11:24 p.m., Albert Astals Cid wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/122300/
 ---
 
 (Updated Jan. 28, 2015, 11:24 p.m.)
 
 
 Review request for KDE Frameworks, David Faure, Eike Hein, and Michael Pyne.
 
 
 Bugs: 343380
 https://bugs.kde.org/show_bug.cgi?id=343380
 
 
 Repository: kcoreaddons
 
 
 Description
 ---
 
 We need to also quote spaces like the Unicode character 'IDEOGRAPHIC SPACE' 
 (U+3000) in KShell::quoteArg since KShell::splitArgs is using QChar::isSpace 
 to decide when a new argument starts, without the quoting, one argument will 
 get turned into two
 
 
 Diffs
 -
 
   autotests/kshelltest.cpp 451bbe9 
   src/lib/util/kshell_unix.cpp e0e884f 
 
 Diff: https://git.reviewboard.kde.org/r/122300/diff/
 
 
 Testing
 ---
 
 New test passes, bug 343380 is fixed
 
 
 Thanks,
 
 Albert Astals Cid
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel