> On Aug. 28, 2014, 5:02 p.m., Albert Astals Cid wrote:
> > Errr, what do you mean it doesn't do anything?
> > 
> > It's used 
> > http://lxr.kde.org/source/frameworks/kxmlgui/src/kaboutapplicationdialog.cpp?v=kf5-qt5
> > http://lxr.kde.org/source/frameworks/kjobwidgets/src/kuiserverjobtracker.cpp?v=kf5-qt5
> > http://lxr.kde.org/source/frameworks/kconfigwidgets/src/kstandardaction.cpp?v=kf5-qt5
> 
> Jonathan Riddell wrote:
>     Ug, so all these classes expect a property to be set in QApplication 
> which may be set by KAboutData if you remember to call setProgramIconName(), 
> but not used by any part of Qt?  Should these should be ported to 
> QApplication::windowIcon?
> 
> Albert Astals Cid wrote:
>     Which QApplication property are you talking about?
>     
>     QString KAboutData::programIconName() const
>     {
>         return d->programIconName.isEmpty() ? componentName() : 
> d->programIconName;
>     }
>     
>     KAboutData &KAboutData::setProgramIconName(const QString &iconName)
>     {
>         d->programIconName = iconName;
>         return *this;
>     }
> 
> Jonathan Riddell wrote:
>     yes that's the one, it sets a variable in KAboutData and sets a property 
> in QCoreApplication.  But not the same property as is actually used by Qt to 
> set the icon.  most app authors won't expect to have to call a second method 
> to set the icon especially one that doesn't actually set the icon.
> 
> Albert Astals Cid wrote:
>     I think it's a much better idea to have a Q_COREAPP_STARTUP_FUNCTION in 
> kguiaddons to set the icon based on that property and document that 
> setProgramIconName will set the icon if linking to kguiaddons it than 
> deprecating something that we use.
>     
>     Or even better implement support for applicationIconName in Qt itself.
> 
> Jonathan Riddell wrote:
>     Those both seems excessive.  This property adds no value to Qt, it should 
> just be scrapped.
> 
> Albert Astals Cid wrote:
>     Adds value to ourselves, there's lots of places where we pass the 
> application icon by name, not by QIcon as QApplication has, how are you going 
> to change the use of 
>     
> http://lxr.kde.org/source/frameworks/kjobwidgets/src/kuiserverjobtracker.cpp?v=kf5-qt5
>     
>     To use a QIcon there?
> 
> Alexander Volkov wrote:
>     -QString programIconName = 
> QCoreApplication::instance()->property("applicationIconName").toString();
>     +QString programIconName = QGuiApplication::windowIcon().name();
> 
> Albert Astals Cid wrote:
>     Problem is that nothing guarantees QIcon will have a name().

Nothing guarantees there is a applicationIconName property, especially since 
setting it doesn't actually set the icon so most app developers will not use it


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119977/#review65445
-----------------------------------------------------------


On Aug. 28, 2014, 4:39 p.m., Jonathan Riddell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119977/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2014, 4:39 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> Mark setProgramIconName() as deprecated, it did not do anything since
> kcoreaddons no longer uses QtGui so it can not set the icon.
> 
> BUG: 337938
> 
> 
> Diffs
> -----
> 
>   src/lib/kaboutdata.h 2d8bd5645150a57739e94f9f71b112b20ec0e01f 
>   src/lib/kaboutdata.cpp 5ad81de814c123f50b17bb542331459e15649f4b 
> 
> Diff: https://git.reviewboard.kde.org/r/119977/diff/
> 
> 
> Testing
> -------
> 
> compiled a program made with kapptemplate 4.14.1 which uses this function, 
> successfully gives a warning during compile
> 
> 
> Thanks,
> 
> Jonathan Riddell
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to