Move 'connect' call before openUrl

Authored by tguzairov on Dec 29 2019, 11:29 PM.



Parts::ReadOnlyPart::completed signal is connected after openUrl has been called.
And it won't be emited, if openUrl was fast enough.
In this case openUrlFinished won't be emited which could, for example, cause the text not receiving a focus.

Diff Detail

R167 Krusader
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
tguzairov requested review of this revision.Dec 29 2019, 11:29 PM
tguzairov created this revision.
nmel added a comment.Dec 30 2019, 8:45 AM

This is a right thing to do (connect before calling the emitting method). I just have a request to simplify the comment - something like "don't rely on return value of openUrl as the call is async in general". Thanks!

tguzairov updated this revision to Diff 72425.Dec 30 2019, 10:29 PM

Changed comment

have changed the comment

asensi accepted this revision.Jan 15 2020, 10:21 PM
asensi added a subscriber: asensi.

Thanks, the proposal worked under Kubuntu 18.04 LTS and Kubuntu 19.10, other people can do their checks.

This revision is now accepted and ready to land.Jan 15 2020, 10:21 PM

Dear developers,

As code reviews in Phabricator are not going to be migrated to Gitlab ( and this review is accepted since a long time ago, I'm going to do the git push if there is no objection. Thanks for all the developing and testing!

This revision was automatically updated to reflect the committed changes.

Taking into account the latest messages here, and after several months of using this helpful commit, I've published the commit before the Phabricator to Gitlab migration started. Please, feel free to suggest or improve whatever you consider.