jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

Use Qt 6.5 setBadgeNumber on Server

Open ann0see opened this issue 2 years ago • 7 comments

What is the current behaviour and why should it be changed? Currently we're not using the Qt 6.5 but the native Objective C code to set the Badge on macOS. Once we've moved to Qt6.5 we should add a conditional compilation step to use setBadgeNumber: https://doc-snapshots.qt.io/qt6-dev/qguiapplication.html#setBadgeNumber

Describe possible approaches

  • Remove the objective C code fully (breaks compatibility; I think that's too early)
  • Keep the old logic

Has this feature been discussed and generally agreed? No

ann0see avatar May 10 '23 11:05 ann0see

I think this issue needs further clarification: "Once we've moved to Qt6.5" implies there's a roadmap to move to Qt6.5. Is there an issue for that? If so, it should be referenced here.

The choices offered sound like "do it" and "don't do it", where "do it" would be part of the move to Qt6.5 anyway. So I'm not sure how this is a separate issue. Maybe more context is needed?

pljones avatar May 21 '23 09:05 pljones

Qt 6.5 fails at the moment so we can't move forward. The current macOS only code for the badges is a bit like a workaround and as far as I understand just a macOS only feature. If we use the Qt native function we'd have more support on other OS.

ann0see avatar May 21 '23 12:05 ann0see

Could you also please point out where in Jamulus the issue is, so it's easier to find. Thanks.

pljones avatar May 21 '23 13:05 pljones

Sure. It's this file: https://github.com/jamulussoftware/jamulus/blob/main/src/mac/badgelabel.mm

As far as I understand it's basically injecting Objective C into Jamulus on macOS.

ann0see avatar May 21 '23 19:05 ann0see

OK, so as a minimum we'd want something like https://github.com/jamulussoftware/jamulus/blob/main/src/mac/badgelabel.h not just for macOS, implemented as appropriate, if it's not supported in Qt directly. (There's a Qt Windows one - https://doc.qt.io/qt-5/qwintaskbarbutton.html - for Qt 5.15. My googling didn't find much on the topic...)

pljones avatar May 22 '23 17:05 pljones

I think the Windows version displays another icon if people are connected. So I'm not sure if that's needed on Windows too. I don't run a Windows server so I'm not qualified.

ann0see avatar May 22 '23 20:05 ann0see

I've removed the "MacOS" from the title as if we use Qt natively, I'd hope the feature would be cross-platform.

pljones avatar Jun 29 '24 16:06 pljones