NOISSUE Comment and bugfix the Resource system

This commit is contained in:
Jan Dalheimer
2015-06-06 12:30:49 +02:00
committed by Petr Mrázek
parent 24db645167
commit 1e51b62c88
12 changed files with 180 additions and 86 deletions

View File

@ -9,14 +9,17 @@ class IconResourceHandler : public ResourceHandler
public:
explicit IconResourceHandler(const QString &key);
/// Sets the current theme and notifies all IconResourceHandlers of the change
static void setTheme(const QString &theme);
private:
// we need to keep track of all IconResourceHandlers so that we can update them if the theme changes
void init(std::shared_ptr<ResourceHandler> &ptr) override;
static QList<std::weak_ptr<IconResourceHandler>> m_iconHandlers;
QString m_key;
static QString m_theme;
static QList<std::weak_ptr<IconResourceHandler>> m_iconHandlers;
// the workhorse, returns QVariantMap (filename => size) for m_key/m_theme
QVariant get() const;
};