D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread David Faure
dfaure closed this revision.

REPOSITORY
  R241 KIO

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

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread Ahmad Samir
ahmadsamir accepted this revision.
ahmadsamir added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> dfaure wrote in krun.h:216
> I did, but Friedrich had a less confusing suggestion:
> 
> @deprecated since 5.6. Since 5.71 use ApplicationLauncherJob, otherwise 
> runApplication instead.

Yeah, makes sense; the point is keeping the users of the class informed/aware 
anyway.

REPOSITORY
  R241 KIO

BRANCH
  2020_05_deprecate_KRun_run_methods

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

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread David Faure
dfaure updated this revision to Diff 82453.
dfaure marked 2 inline comments as done.
dfaure added a comment.


  take review into account

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29547?vs=82325=82453

BRANCH
  2020_05_deprecate_KRun_run_methods

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

AFFECTED FILES
  src/widgets/CMakeLists.txt
  src/widgets/krun.h

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread David Faure
dfaure marked 2 inline comments as done.
dfaure added inline comments.

INLINE COMMENTS

> ahmadsamir wrote in krun.h:216
> I don't think you want both @deprecated?

I did, but Friedrich had a less confusing suggestion:

@deprecated since 5.6. Since 5.71 use ApplicationLauncherJob, otherwise 
runApplication instead.

> ahmadsamir wrote in krun.h:229
> You meant "5, 71"

No, we want this method to be deprecated since 5.6.

> ahmadsamir wrote in krun.h:369
> But OpenUrlJob is in 5.71 not 5.31? people will be reading that on 
> api.kde.org not only in 5.71 header files, right?
> maybe:
> @deprecated since 5.31
> Since 5.71, use OpenUrlJob instead.

Right, same A->B->C problem here.

I'll use the same solution.

> ahmadsamir wrote in krun.h:380
> The same issue 5.31 vs 5.71.

Same thing. Whatever the text is, the important bit is that this warns when 
asking for deprecation warnings ">= 5.31"

> ahmadsamir wrote in krun.h:452
> Missing @deprecated.

Well spotted.

> ahmadsamir wrote in krun.h:599
> So, you're keeping the name slotTimout? I guess after 5-10 years, no point 
> changing it :)

I'm going to deprecate the whole KRun class, so this TODO is irrelevant.

REPOSITORY
  R241 KIO

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

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread Ahmad Samir
ahmadsamir added inline comments.

INLINE COMMENTS

> krun.h:216
> + * @deprecated since 5.6, use runApplication instead.
> + * @deprecated since 5.71, use ApplicationLauncherJob instead.
> + * @code

I don't think you want both @deprecated?

> krun.h:229
>   */
> -KIOWIDGETS_DEPRECATED_VERSION(5, 6, "Use KRun::runApplication(const 
> KService &, const QList &, QWidget *, RunFlags, const QString &, const 
> QByteArray &")
> +KIOWIDGETS_DEPRECATED_VERSION(5, 6, "Use KIO::ApplicationLauncherJob, 
> see API docs for a code sample")
>  static bool run(const KService , const QList , 
> QWidget *window,

You meant "5, 71"

> krun.h:369
>   * @return @c true on success, @c false on error
> - * @deprecated since 5.31, use runUrl() with RunFlags instead.
> + * @deprecated since 5.31, use OpenUrlJob instead.
> + * @code

But OpenUrlJob is in 5.71 not 5.31? people will be reading that on api.kde.org 
not only in 5.71 header files, right?
maybe:
@deprecated since 5.31
Since 5.71, use OpenUrlJob instead.

> krun.h:380
>   */
> -KIOWIDGETS_DEPRECATED_VERSION(5, 31, "Use KRun::const QUrl &, const 
> QString &, QWidget *, RunFlags, const QString &, const QByteArray &")
> +KIOWIDGETS_DEPRECATED_VERSION(5, 31, "Use KIO::OpenUrlJob, see API docs 
> for a code sample")
>  static bool runUrl(const QUrl , const QString , QWidget 
> *window,

The same issue 5.31 vs 5.71.

> krun.h:452
>   * @param asn Application startup notification id, if any (otherwise "").
>   * @return @c true on success, @c false on error
> + * @code

Missing @deprecated.

> krun.h:599
>   */
> -void slotTimeout(); // KDE5: rename to slotNextStep() or something like 
> that
> +void slotTimeout();
>  

So, you're keeping the name slotTimout? I guess after 5-10 years, no point 
changing it :)

REPOSITORY
  R241 KIO

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

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-10 Thread David Faure
dfaure added a reviewer: svuorela.

REPOSITORY
  R241 KIO

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

To: dfaure, ahmadsamir, broulik, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-09 Thread David Faure
dfaure added a dependent revision: D29557: Add 
KIO::OpenUrlJob::setShowOpenWithDialog as replacement for 
KRun::displayOpenWithDialog.

REPOSITORY
  R241 KIO

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

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


D29547: KRun: deprecate all static 'run*' methods, with full porting instructions

2020-05-08 Thread David Faure
dfaure created this revision.
dfaure added reviewers: ahmadsamir, broulik.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
dfaure requested review of this revision.

REVISION SUMMARY
  [Next up, KRun::displayOpenWithDialog]

REPOSITORY
  R241 KIO

BRANCH
  master

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

AFFECTED FILES
  src/widgets/CMakeLists.txt
  src/widgets/krun.h

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