Discussion:
D6529: KDevelop::MainWindow: use setWindowFilePath()
René J.V. Bertin
2017-07-06 15:57:28 UTC
Permalink
rjvbb created this revision.
rjvbb added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
Most native Mac applications show the registered icon in the titlebar when a known document type is opened, and provide a path dropdown menu under that icon. Selecting one of the path components in that menu opens the corresponding folder in the Finder.

Qt exposes this feature via `QWidget::setWindowFilePath()`; this change calls the method in `MainWindow::updateCaption()`.

TEST PLAN
works as expected on Mac; has no effect on other platforms (verified on Linux).

REPOSITORY
R33 KDevPlatform

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

AFFECTED FILES
shell/mainwindow.cpp

To: rjvbb, #kdevelop
Cc: kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
René J.V. Bertin
2017-07-06 15:59:55 UTC
Permalink
rjvbb added a comment.


Screenshots. This uses pure native APIs behind the scenes so doesn't depend on widget style.

F3805391: Screen Shot 2017-07-06 at 17.47.39.png <https://phabricator.kde.org/F3805391>

F3805392: Screen Shot 2017-07-06 at 17.46.42.png <https://phabricator.kde.org/F3805392>

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop
Cc: kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
René J.V. Bertin
2017-07-06 16:05:52 UTC
Permalink
rjvbb edited the summary of this revision.

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop
Cc: kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
René J.V. Bertin
2017-07-06 16:11:54 UTC
Permalink
rjvbb edited the summary of this revision.

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop
Cc: kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
Kevin Funk
2017-07-06 16:22:20 UTC
Permalink
kfunk requested changes to this revision.
kfunk added a comment.
This revision now requires changes to proceed.


Needs a `setWindowFilePath({})` if there's no active view.

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
Sven Brauch
2017-07-06 16:24:45 UTC
Permalink
This revision was automatically updated to reflect the committed changes.
Closed by commit R33:106ddc11b4ce: KDevelop::MainWindow: use setWindowFilePath() (authored by rjvbb, committed by brauch).

REPOSITORY
R33 KDevPlatform

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D6529?vs=16244&id=16253

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

AFFECTED FILES
shell/mainwindow.cpp

To: rjvbb, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
René J.V. Bertin
2017-07-06 16:32:42 UTC
Permalink
rjvbb added a comment.
Post by Kevin Funk
Needs a `setWindowFilePath({})` if there's no active view.
Doh, indeed. And I knew that... :-/

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
Kevin Funk
2017-07-06 16:55:42 UTC
Permalink
kfunk added a comment.


Backported to 5.1 -- this patch is trivial enough.

I also fixed up your last commit. Doing `setWindowFilePath({})` in the else-branch could still leave you with an outdated windowFilePath set. I.e. in case there's an active view but no `UrlDocument*`.

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
René J.V. Bertin
2017-07-06 22:06:32 UTC
Permalink
Post by Kevin Funk
I also fixed up your last commit.
Not mine, actually; Sven committed this (in 2 commits)
Sven Brauch
2017-07-06 22:38:25 UTC
Permalink
brauch added a comment.


Yes, I felt responsible for fixing it after pushing the broken version and did that wrong, too :/ my bad. Thanks for the patch.

REPOSITORY
R33 KDevPlatform

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

To: rjvbb, #kdevelop, kfunk
Cc: brauch, kfunk, kdevelop-devel, kde-mac, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
Loading...