Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use override, fix interceptor class #13542

Merged
merged 2 commits into from
Feb 14, 2018
Merged

Conversation

notspiff
Copy link
Contributor

  • Trivial override usage
  • A fix in the interceptor class. Started out as a warning quell, but I cannot quell them all due to the construct in use. @jimfcarroll please look at the last commit.

@@ -120,7 +120,7 @@ namespace XBMCAddon
CGUIWindow* get() override { return this; }

// this is only called from XBMC core and we only want it to return true every time
virtual bool Update(const String &strPath) { return true; }
virtual bool Update(const String&, bool = true) { return true; }

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

now we actually catch the call from the core to window update call.
@jimfcarroll jimfcarroll removed their assignment Feb 14, 2018
@notspiff notspiff merged commit 9146d54 into xbmc:master Feb 14, 2018
@Rechi Rechi added the v18 Leia label Feb 14, 2018
@Rechi Rechi added this to the L 18.0-alpha1 milestone Feb 14, 2018
@ronie
Copy link
Member

ronie commented Mar 5, 2018

@notspiff this seems to be breaking some addon functionallity: https://forum.kodi.tv/showthread.php?tid=329208

mind having a look-see ?

@jimfcarroll
Copy link
Member

I'll try to look at it later tonight. We've been out of power since Friday so I can't promise anything. @notspiff took my advice and deleted it so I guess my comment where I was "80% sure there wouldn't be any unforeseen effects" was too optimistic. :-)

@jimfcarroll
Copy link
Member

I'm at a loss to understand how removing the Update call from the Interceptor had any effect on the behavior. Obviously I understood it when I originally wrote it. I hate to just put it back and not understand why. @notspiff can you explain what I'm missing?

@notspiff
Copy link
Contributor Author

notspiff commented Mar 7, 2018

it makes no sense to me either, unless there is explicit calls to the base class instance of the method, instance->Base::foo() which i very much doubt there is

@notspiff notspiff deleted the warnings_and_stuff branch March 7, 2018 14:14
@jimfcarroll
Copy link
Member

Explicit calls should have resulted in a compile failure once the method was removed. I remember there was a small handful (maybe 2) of methods I needed to stub out on the base Interceptor class but revisiting it now I can't figure out what problem that solved. We can just put it back in and see if that resolved it. Any other suggestions?

@notspiff
Copy link
Contributor Author

notspiff commented Mar 7, 2018

As the interceptor did nothing due to signature changes i dont see what good that would do. Any error should come from it having been reactivated no?

@jimfcarroll
Copy link
Member

Maybe we're looking at the wrong thing. This change did modify the behavior:

https://github.com/xbmc/xbmc/pull/13542/files#diff-9095b1771d51a346264eb59ffb9cd5d2L86

The intention originally (I guess) was to disable the default CGUIMediaWindow::Update functionality for Python windows. When the bool parameter was added to CGUIMediaWindow::Update the Interceptor stopped disabling this for Update on Python WindowXMLs. Maybe someone is now relying on that behavior so when the blocking of the behavior was put back by your change, his code broke.

@notspiff
Copy link
Contributor Author

notspiff commented Mar 7, 2018

That is what i tried to state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants