A Qt replacement for KGlobal::ref and deref

Stephen Kelly steveire at gmail.com
Thu Feb 10 20:26:34 GMT 2011

Thiago Macieira wrote:

> Well, first of all, Thiago is not the highest authority in Qt. You just
> had my opinion, not of all people.

Sure. I'd call a 'no' from any troll a veto. The only repsonse I got was a 
no on #qt-labs. That's the only way I have of reaching 'all people' until 
open governance gives us a Qt development mailing list.

>> It works in KDE of course because all KDE libraries and
>> applications use KGlobal::ref and deref, which perpetuates our walled
>> garden.
> They already do. The KGlobal::ref()/deref() function is already separate
> and all libraries need to use it.

All KDE libraries which are part of the feature, yes, like KJob, KRun, 
kuiserver (?). Currently, all non-KDE libraries have to become KDE libraries 
to use it, and KJob can't become a non-KDE library with the same feature 

>> I can tell you, users definitely expect their download to finish, their 
>> to be sent [this has hit my wife a few times in kmail!]. And if a systray
>I don't dispute that. I'm simply asking that there is some kind of 
>while that is happening.

Presumably that should be through kuiserver/plasma then (just guessing, I 
don't know anything about kuiserver).

> So you can't use the window as a "don't quit now
>> refcounting", you need the job for that.
> Right, but there's no API for doing that from Qt. So today any Qt
> application requires a window to display its progress. Therefore, the API
> for refcounting isn't needed.

I might be missing something, but isn't this snake-tail logic? There's no 
way in Qt to implement a refcounting quit, therefore today you need a 
window, therefore Qt doesn't need the API and the application needs a 
window. Isn't this thread about changing that?

> If the user can't get any kind of feedback, the application shouldn't be
> running anymore.
> System tray icons are a kind of feedback.

Again, I might be missing something here.

Does a systray icon already count as a window? If I set 
quitOnLastWindowClosed to true and the application creates a systray icon, 
and then I close the application window, does the application quit?

More information about the kde-core-devel mailing list