Re: KClasses vs. Qt5Classes

2013-12-31 Thread David Faure
On Thursday 26 December 2013 16:46:59 Allen Winter wrote:
> In KDE4 we had this list of KClasses we should be using instead of these
> associated QClasses:
> 
> 
> I know that some (or all?) of these QClasses in Qt5 are now cool for
> frameworks and eventually KDE5
> 
> So my questions are:
> * which of these Qt5 classes are cool and which ones do we need to continue
> blacklisting from  frameworks+KDE5? 
> * are there any known Qt5 classes that we should avoid in frameworks+KDE5?

> QColorDialog => KColorDialog

Deprecated, QColorDialog is now cool.

> QComboBox => KComboBox

Both are OK to use, depends on the use case
(KComboBox provides KCompletion support)
So, remove the krazy check.

> QMessageBox => KMessageBox

Both are OK to use. KMessageBox has additional features.
Remove the krazy check.

> QErrorMessage => KMessageBox

QErrorMessage is still a weird beast which doesn't save the "don't show again" 
to disk. So yeah, keep this check.

> QInputDialog => KInputDialog

Deprecated, QInputDialog is now cool.

> QFileDialog => KFileDialog

Deprecated, QFileDialog is now cool.

> QProgressDialog => KProgressDialog

Same.

> QSplashScreen => KSplashScreen

Same.

> QSystemTrayIcon => KNotificationItem

No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
In fact it doesn't exist in kdelibs4 either.

I think it got replaced with KStatusNotifierItem since 4.4 ?
That one is still valid in KF5 (framework "knotifications").
I have no idea if/why it means QSystemTrayIcon is bad though.

> QDialog => KDialog

Deprecated, QDialog is now cool.

> QLineEdit => KLineEdit

Same as QComboBox: both are OK, remove check.

> QTabBar => KTabBar

Deprecated.

> QTabWidget => KTabWidget

Deprecated.

> QTextBrowser => KTextBrowser

Deprecated.

> QTextEdit => KTextEdit

Both are OK. E.g. KTextEdit provides spellchecking with its sonnet 
integration, but if you don't need that, QTextEdit is fine.

> QUrl => KUrl

Deprecated.

> QNetworkAcessManager => KIO::AccessManager

Still true, keep this check.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



Re: KClasses vs. Qt5Classes

2013-12-31 Thread Martin Graesslin
On Tuesday 31 December 2013 12:15:09 David Faure wrote: 
> > QSystemTrayIcon => KNotificationItem
> 
> No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
> In fact it doesn't exist in kdelibs4 either.
> 
> I think it got replaced with KStatusNotifierItem since 4.4 ?
> That one is still valid in KF5 (framework "knotifications").
> I have no idea if/why it means QSystemTrayIcon is bad though.
QSystemTrayIcon uses XEmbed which is bad by definition ;-)

We have discussed this in the plasma team and think that the best solution 
would be to extend QSystemTrayIcon to use the status notifier API if available. 
Might need some hooks into the QPA as we probably cannot depend on D-Bus on 
that level. But as that doesn't exist yet, at the moment the proper suggestion 
should be to use KStatusNotifierItem.

Cheers
Martin

signature.asc
Description: This is a digitally signed message part.


Re: KClasses vs. Qt5Classes

2013-12-31 Thread Allen Winter
Thanks for the detailed response. I will fix the krazy test accordingly.

Also: remember how in Qt4 there were a couple deprecated classes (QMdiArea, for 
example)?
Does Qt5 also ship any deprecated classes?  
I'm being lazy now by asking and not looking myself.


On Tuesday, December 31, 2013 12:15:09 PM David Faure wrote:
> On Thursday 26 December 2013 16:46:59 Allen Winter wrote:
> > In KDE4 we had this list of KClasses we should be using instead of these
> > associated QClasses:
> > 
> > 
> > I know that some (or all?) of these QClasses in Qt5 are now cool for
> > frameworks and eventually KDE5
> > 
> > So my questions are:
> > * which of these Qt5 classes are cool and which ones do we need to continue
> > blacklisting from  frameworks+KDE5? 
> > * are there any known Qt5 classes that we should avoid in frameworks+KDE5?
> 
> > QColorDialog => KColorDialog
> 
> Deprecated, QColorDialog is now cool.
> 
> > QComboBox => KComboBox
> 
> Both are OK to use, depends on the use case
> (KComboBox provides KCompletion support)
> So, remove the krazy check.
> 
> > QMessageBox => KMessageBox
> 
> Both are OK to use. KMessageBox has additional features.
> Remove the krazy check.
> 
> > QErrorMessage => KMessageBox
> 
> QErrorMessage is still a weird beast which doesn't save the "don't show 
> again" 
> to disk. So yeah, keep this check.
> 
> > QInputDialog => KInputDialog
> 
> Deprecated, QInputDialog is now cool.
> 
> > QFileDialog => KFileDialog
> 
> Deprecated, QFileDialog is now cool.
> 
> > QProgressDialog => KProgressDialog
> 
> Same.
> 
> > QSplashScreen => KSplashScreen
> 
> Same.
> 
> > QSystemTrayIcon => KNotificationItem
> 
> No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
> In fact it doesn't exist in kdelibs4 either.
> 
> I think it got replaced with KStatusNotifierItem since 4.4 ?
> That one is still valid in KF5 (framework "knotifications").
> I have no idea if/why it means QSystemTrayIcon is bad though.
> 
> > QDialog => KDialog
> 
> Deprecated, QDialog is now cool.
> 
> > QLineEdit => KLineEdit
> 
> Same as QComboBox: both are OK, remove check.
> 
> > QTabBar => KTabBar
> 
> Deprecated.
> 
> > QTabWidget => KTabWidget
> 
> Deprecated.
> 
> > QTextBrowser => KTextBrowser
> 
> Deprecated.
> 
> > QTextEdit => KTextEdit
> 
> Both are OK. E.g. KTextEdit provides spellchecking with its sonnet 
> integration, but if you don't need that, QTextEdit is fine.
> 
> > QUrl => KUrl
> 
> Deprecated.
> 
> > QNetworkAcessManager => KIO::AccessManager
> 
> Still true, keep this check.
> 
> 



Re: KClasses vs. Qt5Classes

2013-12-31 Thread David Faure
On Tuesday 31 December 2013 09:47:59 Allen Winter wrote:
> Thanks for the detailed response. I will fix the krazy test accordingly.
> 
> Also: remember how in Qt4 there were a couple deprecated classes (QMdiArea,
> for example)? 

I guess you mean QWorkspace; QMdiArea is not deprecated.

> Does Qt5 also ship any deprecated classes?

Not that I can see.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



Re: KClasses vs. Qt5Classes

2014-01-02 Thread Kevin Krammer
On Tuesday, 2013-12-31, 12:42:22, Martin Graesslin wrote:
> On Tuesday 31 December 2013 12:15:09 David Faure wrote:
> > > QSystemTrayIcon => KNotificationItem
> > 
> > No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
> > In fact it doesn't exist in kdelibs4 either.
> > 
> > I think it got replaced with KStatusNotifierItem since 4.4 ?
> > That one is still valid in KF5 (framework "knotifications").
> > I have no idea if/why it means QSystemTrayIcon is bad though.
> 
> QSystemTrayIcon uses XEmbed which is bad by definition ;-)
> 
> We have discussed this in the plasma team and think that the best solution
> would be to extend QSystemTrayIcon to use the status notifier API if
> available. Might need some hooks into the QPA as we probably cannot depend
> on D-Bus on that level. But as that doesn't exist yet, at the moment the
> proper suggestion should be to use KStatusNotifierItem.

I faintly remember a discussion where it was deemed acceptable for QtWidgets 
to depend on QtDBus on Linux.
But it makes more sense to do it in the QPA in any case,  because this is 
where lots of the other plaform UI integration bits already went (native 
dialogs, menus, etc).

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


Re: KClasses vs. Qt5Classes

2014-01-02 Thread Aleix Pol
On Tue, Dec 31, 2013 at 12:42 PM, Martin Graesslin wrote:

> On Tuesday 31 December 2013 12:15:09 David Faure wrote:
> > > QSystemTrayIcon => KNotificationItem
> >
> > No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
> > In fact it doesn't exist in kdelibs4 either.
> >
> > I think it got replaced with KStatusNotifierItem since 4.4 ?
> > That one is still valid in KF5 (framework "knotifications").
> > I have no idea if/why it means QSystemTrayIcon is bad though.
> QSystemTrayIcon uses XEmbed which is bad by definition ;-)
>
> We have discussed this in the plasma team and think that the best solution
> would be to extend QSystemTrayIcon to use the status notifier API if
> available.
> Might need some hooks into the QPA as we probably cannot depend on D-Bus on
> that level. But as that doesn't exist yet, at the moment the proper
> suggestion
> should be to use KStatusNotifierItem.
>
> Cheers
> Martin


FWIW, our QPA (or QPT, actually) already depends on QtDBus.

Aleix


Re: KClasses vs. Qt5Classes

2014-01-06 Thread Aurélien Gâteau
Le mardi 31 décembre 2013 12:42:22 Martin Graesslin a écrit :
> On Tuesday 31 December 2013 12:15:09 David Faure wrote:
> > > QSystemTrayIcon => KNotificationItem
> > 
> > No clue. I can't even find KNotificationItem in KF5 anywhere !?!?
> > In fact it doesn't exist in kdelibs4 either.
> > 
> > I think it got replaced with KStatusNotifierItem since 4.4 ?
> > That one is still valid in KF5 (framework "knotifications").
> > I have no idea if/why it means QSystemTrayIcon is bad though.
> 
> QSystemTrayIcon uses XEmbed which is bad by definition ;-)
> 
> We have discussed this in the plasma team and think that the best solution
> would be to extend QSystemTrayIcon to use the status notifier API if
> available. Might need some hooks into the QPA as we probably cannot depend
> on D-Bus on that level. But as that doesn't exist yet, at the moment the
> proper suggestion should be to use KStatusNotifierItem.

For what it's worth, I created something like that for Qt4 while I was at 
Canonical: sni-qt [1].

It requires a Qt patch though. The patch is in the sni-qt tarball (and here 
[2])

Aurélien

[1]: https://launchpad.net/sni-qt
[2]: 
http://bazaar.launchpad.net/~indicator-applet-developers/sni-qt/trunk.13.04/view/head:/patches/qsystemtrayicon-plugin-system-4.7.4.diff