Part Revert "[Units] Make iconSizes property constant"

Summary:
Though we can make the property constant, some applications still use the
signal (for example FolderView.qml) to know that one of the icons has
changed sizes and do some processing.

Whilst it would be possible to fix folderview, we should avoid public
API changes.

Reviewers: #plasma, #frameworks

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4092
This commit is contained in:
David Edmundson 2017-01-12 00:05:10 +00:00
parent 31cd81ca53
commit 66ebf2c84f
2 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,8 @@ void Units::iconLoaderSettingsChanged()
m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge));
m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge));
m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous));
emit iconSizesChanged();
}
QQmlPropertyMap *Units::iconSizes() const

View File

@ -73,7 +73,10 @@ class Units : public QObject
*
* Not devicePixelRation-adjusted::
* * desktop
*
*/
//note the iconSizeChanges signal indicates that one (or more) of these icons have changed
//but the property map itself remains constant
Q_PROPERTY(QQmlPropertyMap *iconSizes READ iconSizes CONSTANT)
// layout hints
@ -176,6 +179,7 @@ public:
Q_SIGNALS:
void devicePixelRatioChanged();
void gridUnitChanged();
void iconSizesChanged();
void spacingChanged();
void durationChanged();