D17882: Abort updateWindowTitle and activeViewChanged if not changed.

Chris Rizzitello noreply at phabricator.kde.org
Sun Jan 13 14:25:45 GMT 2019


rizzitello added inline comments.

INLINE COMMENTS

> elvisangelaccio wrote in dolphinmainwindow.cpp:968-970
> This is a symptom that something else is wrong, but ok.

This seams to be called twice when dolphin is just starting up and twice when you change tabs. 
Digging around a little it seams to come from TabWidget where its sometimes emiting the view several times . I tried to stop it there, but it the mainwindow was still getting some extra calls sent to it. I think this fix may have to come in a future patch. Please Try my "testing" code below to see whats going on. Open dolphin and then open up tabs and when you change them you should see how often this is happening and being stopped by each layer.

To Test I Used this code here.

  if (m_activeViewContainer == viewContainer) {
          static int calls = 1;
          qDebug() <<"ViewContainer Matches(" + QString::number(calls) + ")  " << sender();
          calls ++;
          return;
  }

I also added this code to DolphinTabWidget::currentTabChanged() at line 330)

  if(viewContainer->isActive()) {
      static int calls = 1;
      qDebug() <<"View Active(" + QString::number(calls) + ")  " << sender();
      calls ++;
      return;
  }

Example output
Opening dolphin:

> Trying to convert empty KLocalizedString to QString.
> "ViewContainer Matches(1)  " DolphinTabWidget(0x561f1877eb30, name = "tabWidget")

Create a new Tab:

> "View Active(1)  " DolphinTabWidget(0x561f1877eb30, name = "tabWidget")

Create a new Tab:

> "View Active(2)  " DolphinTabWidget(0x561f1877eb30, name = "tabWidget")

Switch to tab 1 (middle tab):

> "View Active(3)  " DolphinTabWidget(0x561f1877eb30, name = "tabWidget")

Switch to tab 2 (right most):

> "View Active(4)  " DolphinTabWidget(0x561f1877eb30, name = "tabWidget")

Switch to tab 0 (left most):

> "ViewContainer Matches(2)  " DolphinTabWidget(0x55c459fcec80, name = "tabWidget")
> "ViewContainer Matches(3)  " DolphinTabWidget(0x55c459fcec80, name = "tabWidget")
> "ViewContainer Matches(4)  " DolphinTabWidget(0x55c459fcec80, name = "tabWidget")

Every time you switch to the left most tab it has three of them .

Without the code in the TabWidget it got one ViewContainer Match for every tab crated and every tab i switched to.

REPOSITORY
  R318 Dolphin

BRANCH
  reduceRefreshCalls

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

To: rizzitello, #dolphin, elvisangelaccio, broulik
Cc: broulik, kfm-devel, alexde, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190113/075f5de2/attachment.htm>


More information about the kfm-devel mailing list