D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread David Faure
dfaure added a comment.


  Urgh, my apologies. I must have read a v1-v2 diff then. Oh well, no big deal 
either way.

REPOSITORY
  R241 KIO

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

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread Ahmad Samir
ahmadsamir added a comment.


  In D26292#586025 , @dfaure wrote:
  
  > Now I'm completely confused. Did you just argue *against* your own change?
  >
  > You seem to say the old name was better...
  
  
  The original code, before I put my paws on it, used "noToMarchRx", I changed 
it to "badPattern", then changed it back, before you reviewed the diff at all; 
sorry about the confusion.

REPOSITORY
  R241 KIO

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

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread David Faure
dfaure added a comment.


  Now I'm completely confused. Did you just argue *against* your own change?
  
  You seem to say the old name was better...

REPOSITORY
  R241 KIO

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

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread Ahmad Samir
ahmadsamir added inline comments.

INLINE COMMENTS

> dfaure wrote in ksambashare.cpp:259
> badPattern was a bad name? ;-)

!notToMatchRx.match() -> "not notToMatchRx" double negative, slightly 
weird/heavy on the ear.

!badPattern.match() -> "not badPattern" -> valid share name; there's method to 
my madne^Wlogic, I just need to figure it out... :)

REPOSITORY
  R241 KIO

BRANCH
  l-qregularexpression-ksambashare (branched from master)

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

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread Ahmad Samir
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:4965c4f9e2a2: [KSambaShare] Port QRegExp to 
QRegularExpression (authored by ahmadsamir).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26292?vs=72543=72559

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

AFFECTED FILES
  src/core/ksambashare.cpp

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread David Faure
dfaure accepted this revision.
dfaure added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> ksambashare.cpp:259
>  // Samba forbidden chars
> -const QRegExp notToMatchRx(QStringLiteral("[%<>*\?|/\\+=;:\",]"));
> -return (notToMatchRx.indexIn(name) == -1);
> +const QRegularExpression 
> notToMatchRx(QStringLiteral("[%<>*\?|/+=;:\",]"));
> +return !notToMatchRx.match(name).hasMatch();

badPattern was a bad name? ;-)

REPOSITORY
  R241 KIO

BRANCH
  l-qregularexpression-ksambashare (branched from master)

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

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

2020-01-01 Thread Ahmad Samir
ahmadsamir updated this revision to Diff 72543.
ahmadsamir edited the summary of this revision.
ahmadsamir added a comment.


  Address comments (from other reviews)

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26292?vs=72386=72543

BRANCH
  l-qregularexpression-ksambashare (branched from master)

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

AFFECTED FILES
  src/core/ksambashare.cpp

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


D26292: [KSambaShare] Port QRegExp to QRegularExpression

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

REVISION SUMMARY
  Use QRegularExpression::anchoredPattern() to port QRegExp::exactMatch().

TEST PLAN
  make && ctest

REPOSITORY
  R241 KIO

BRANCH
  l-qregularexpression-ksambashare (branched from master)

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

AFFECTED FILES
  src/core/ksambashare.cpp

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