birdtray
birdtray copied to clipboard
Add Qt 5.15.1 compatibility
This pull request adds support for Qt 5.15.1
.
There is still a big problem that we need to discuss:
QProcess::startDetached(command)
has become deprecated and might be removed in future Qt versions. We need to use QProcess::startDetached(executable, arguments[])
. This prevents us from passing in the whole shell command as a whole, we are required to at least split the executable path from the arguments. This is especially problematic for the new unread counter change hook, because we allow entering the full shell command: https://github.com/gyunaev/birdtray/blob/9ff57bb54c8e09c0a4300d4906e1b09ccd184b8c/src/trayicon.cpp#L136-L144
We need to be able to differentiate between the executable and the arguments. I propose adding a custom widget like this:
A click on the configure button opens a dialog that allows to configure arguments and environment variables. I based the dialog on UI elements from the JetBrains Products, which I find very intuitive to use. This would also allow us to implement #313. We could use the same widget in the Advanced
settings tab for the Thunderbird command.
@gyunaev What are your thoughts on this? I know you want to keep things as simple as possible and I think I can implement this without to much complexity. The alternative would be to just use Utils::splitCommandLine
and hope the user doesn't input anything crazy.
No, not worth changing anything simply because it is deprecated. When/if it gets removed, then we can see. They could add another replacement.
What I do to get rid of annoying deprecated warnings, -W-no-deprecated
I know this is an old PR, but I'm wondering if any of the changes it introduces would fix #500 ...
@nicolamori can you try compiling this outdated PR and see if works?
I'm going to close this for now, we can always revive it if we decide that we need a newer Qt combability.
Regarding the deprecated startDetached
, this function is removed in Qt6 and the only alternatives are to pass the program and arguments separately. So if we ever want to have Qt6, we'll have to tackle that problem, but we'll figure it out when we get there.