[Tab Bar] Resolve tab icon only if visible
ClosedPublic

Authored by broulik on Aug 20 2019, 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
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Aug 20 2019, 3:27 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptAug 20 2019, 3:27 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Aug 20 2019, 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.Aug 20 2019, 3:30 PM
elvisangelaccio accepted this revision.Aug 25 2019, 2:55 PM
elvisangelaccio added a subscriber: elvisangelaccio.

I'd push to master TBH.

This revision is now accepted and ready to land.Aug 25 2019, 2:55 PM
elvisangelaccio requested changes to this revision.Aug 25 2019, 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.Aug 25 2019, 3:00 PM
broulik updated this revision to Diff 64632.Aug 26 2019, 7:29 AM
broulik edited the test plan for this revision. (Show Details)
  • Remove overload to fix test build
elvisangelaccio accepted this revision.Sep 1 2019, 6:00 PM
This revision is now accepted and ready to land.Sep 1 2019, 6:00 PM
This revision was automatically updated to reflect the committed changes.