D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-16 Thread Phabricator
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:591cc2a16e3e: Treat 
application/x-ms-dos-executable as executable on all platforms 
(authored by Guo Yunhe i...@guoyunhe.me).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24463?vs=67761=68027

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

AFFECTED FILES
  src/widgets/executablefileopendialog.cpp
  src/widgets/executablefileopendialog_p.h
  src/widgets/krun.cpp
  src/widgets/krun_p.h

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

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

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-12 Thread Yunhe Guo
guoyunhe marked an inline comment as done.
guoyunhe added inline comments.

INLINE COMMENTS

> dfaure wrote in krun.cpp:1101
> should this be in ifdef Q_OS_WIN?
> 
> On windows, *.exe is executed, not opened (with e.g. wine)

Yes, I updated this part.

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-12 Thread Yunhe Guo
guoyunhe updated this revision to Diff 67761.
guoyunhe added a comment.


  *.exe should be normal executable in Windows

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24463?vs=67458=67761

BRANCH
  master

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

AFFECTED FILES
  src/widgets/executablefileopendialog.cpp
  src/widgets/executablefileopendialog_p.h
  src/widgets/krun.cpp
  src/widgets/krun_p.h

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

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

INLINE COMMENTS

> krun.cpp:1101
> +return ExecutableFileOpenDialog::OpenOrExecute;
> +} else if 
> (mime.inherits(QStringLiteral("application/x-ms-dos-executable"))) {
> +return ExecutableFileOpenDialog::OpenAsExecute;

should this be in ifdef Q_OS_WIN?

On windows, *.exe is executed, not opened (with e.g. wine)

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-08 Thread Björn Feber
GB_2 added inline comments.

INLINE COMMENTS

> ppeter wrote in executablefileopendialog.cpp:58
>   if (mode == OnlyExecute)
> connect(executeButton, ...)
>   else if (mode == OpenAsExecute)
> ...
> 
> looks better :)

That would be against the common KDE coding style: 
https://community.kde.org/Policies/Kdelibs_Coding_Style#Braces

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: GB_2, ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-08 Thread Yi-Jyun Pan
ppeter added inline comments.

INLINE COMMENTS

> executablefileopendialog.cpp:58
> +
> +if (mode == OnlyExecute) {
> +connect(executeButton, ::clicked, 
> [=]{done(ExecuteFile);});

if (mode == OnlyExecute)
connect(executeButton, ...)
  else if (mode == OpenAsExecute)
...

looks better :)

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: guoyunhe, #frameworks, ngraham, dfaure
Cc: ppeter, dfaure, ngraham, broulik, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe edited the summary of this revision.

REPOSITORY
  R241 KIO

BRANCH
  master

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe retitled this revision from "WIP: Treat 
"application/x-ms-dos-executable" as executable on all platforms" to "Treat 
"application/x-ms-dos-executable" as executable on all platforms".
guoyunhe edited the summary of this revision.

REPOSITORY
  R241 KIO

BRANCH
  master

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe updated this revision to Diff 67444.
guoyunhe added a comment.


  "openAsExecute" parameter for ExecutableFileOpenDialog

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24463?vs=67424=67444

BRANCH
  master

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

AFFECTED FILES
  src/widgets/executablefileopendialog.cpp
  src/widgets/executablefileopendialog_p.h
  src/widgets/krun.cpp
  src/widgets/krun_p.h

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Ahmad Samir
ahmadsamir added a reviewer: dfaure.

REPOSITORY
  R241 KIO

BRANCH
  master

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe added a comment.


  I just realized that this patch might be unfinished. In the pop up, you 
usually have "Open", "Execute" and "Cancel". But for *.exe, "Open" is actually 
to be executed by Wine? "Execute" will do nothing because it isn't a native 
executable for Linux/BSD.

REPOSITORY
  R241 KIO

BRANCH
  master

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a subscriber: dfaure.
ngraham added a comment.
This revision is now accepted and ready to land.


  I suppose that's true. Would be nice to also do that as a follow-up patch.
  
  Shipit!
  
  @dfaure given the security implications here, maybe we should get this into 
5.63. What do you think?

REPOSITORY
  R241 KIO

BRANCH
  master

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe added a comment.


  In D24463#543070 , @ngraham wrote:
  
  > Maybe can we check to see if WINE is installed or if there's a handler for 
`application/x-ms-dos-executable`? Otherwise if you don't have WINE installed, 
won't you see a dialog that gives you the option to execute it when that 
doesn't work?
  
  
  It is another feature. We also need to check if PHP/Python/Perl/Ruby/Node.js 
is installed for other script types. It is not Wine specific problem but a 
general issue for all executable that requires an interpreter.

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks
Cc: ngraham, broulik, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Nathaniel Graham
ngraham added a comment.


  Maybe can we check to see if WINE is installed or if there's a handler for 
`application/x-ms-dos-executable`? Otherwise if you don't have WINE installed, 
won't you see a dialog that gives you the option to execute it when that 
doesn't work?

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks
Cc: ngraham, broulik, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Nathaniel Graham
ngraham edited the summary of this revision.

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks
Cc: broulik, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Kai Uwe Broulik
broulik added a comment.


  +1

REPOSITORY
  R241 KIO

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

To: guoyunhe, #frameworks
Cc: broulik, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe added a reviewer: Frameworks.

REPOSITORY
  R241 KIO

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

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


D24463: Treat "application/x-ms-dos-executable" as executable on all platforms

2019-10-07 Thread Yunhe Guo
guoyunhe created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
guoyunhe requested review of this revision.

REVISION SUMMARY
  Because of Wine, *.exe can be executed in almost all desktop platforms. BUG: 
412694

REPOSITORY
  R241 KIO

BRANCH
  master

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

AFFECTED FILES
  src/widgets/krun.cpp

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