[Tab Bar] Resolve tab icon only if visible
ClosedPublic

Authored by broulik on Tue, Aug 20, 3:27 PM.

Details

Summary

Calling KIO::iconNameForUrl will determine mime type of the file potentially blocking.
Don't needless do it when the tab bar isn't visible.

Test Plan

Browsed around, all was fine, opened a new tab, the icons were there just fine and updated properly

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Tue, Aug 20, 3:27 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptTue, Aug 20, 3:27 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Tue, Aug 20, 3:27 PM
broulik edited the test plan for this revision. (Show Details)
broulik retitled this revision from [Tab Bar] Resolve tab icon lazily to [Tab Bar] Resolve tab icon only if visible.Tue, Aug 20, 3:30 PM
elvisangelaccio accepted this revision.Sun, Aug 25, 2:55 PM
elvisangelaccio added a subscriber: elvisangelaccio.

I'd push to master TBH.

This revision is now accepted and ready to land.Sun, Aug 25, 2:55 PM
elvisangelaccio requested changes to this revision.Sun, Aug 25, 3:00 PM

Actually, it seems this breaks the build of dolphinmainwindowtest:

../src/tests/dolphinmainwindowtest.cpp:223:21: error: 'tabIcon' is a private member of 'DolphinTabWidget'
    if (!tabWidget->tabIcon(0).isNull() && !tabWidget->tabIcon(1).isNull()) {
This revision now requires changes to proceed.Sun, Aug 25, 3:00 PM
broulik updated this revision to Diff 64632.Mon, Aug 26, 7:29 AM
broulik edited the test plan for this revision. (Show Details)
  • Remove overload to fix test build
elvisangelaccio accepted this revision.Sun, Sep 1, 6:00 PM
This revision is now accepted and ready to land.Sun, Sep 1, 6:00 PM
This revision was automatically updated to reflect the committed changes.