mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-24 15:29:18 +00:00
remove default constructor for icons
This commit is contained in:
parent
a8380a3484
commit
9a383e8743
@ -41,11 +41,6 @@ Icon Icon::defaultIcon()
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon::Icon() :
|
|
||||||
d(NULL)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Icon::Icon(const QImage &img):
|
Icon::Icon(const QImage &img):
|
||||||
d(new IconData(img))
|
d(new IconData(img))
|
||||||
{
|
{
|
||||||
@ -89,7 +84,7 @@ bool Icon::isLocalFile() const
|
|||||||
|
|
||||||
bool Icon::isValid() const
|
bool Icon::isValid() const
|
||||||
{
|
{
|
||||||
return d && !(d->m_img.isNull() && d->m_url.isEmpty());
|
return !(d->m_img.isNull() && d->m_url.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon Icon::scaled(const QSize &s) const
|
Icon Icon::scaled(const QSize &s) const
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
|
|
||||||
static Icon defaultIcon();
|
static Icon defaultIcon();
|
||||||
|
|
||||||
Icon();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an Icon from an QImage
|
* Creates an Icon from an QImage
|
||||||
@ -114,6 +113,7 @@ public:
|
|||||||
Icon scaled(const QSize &s) const;
|
Icon scaled(const QSize &s) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Icon() = delete;
|
||||||
QExplicitlySharedDataPointer<IconData> d;
|
QExplicitlySharedDataPointer<IconData> d;
|
||||||
friend SNORE_EXPORT QDebug(::operator<<)(QDebug, const Snore::Icon &);
|
friend SNORE_EXPORT QDebug(::operator<<)(QDebug, const Snore::Icon &);
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,7 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id,
|
|||||||
const QString &app_icon, const QString &summary, const QString &body,
|
const QString &app_icon, const QString &summary, const QString &body,
|
||||||
const QStringList &actions, const QVariantMap &hints, int timeout)
|
const QStringList &actions, const QVariantMap &hints, int timeout)
|
||||||
{
|
{
|
||||||
Icon icon;
|
Icon icon = Icon::defaultIcon();
|
||||||
Application app;
|
Application app;
|
||||||
Notification::Prioritys priotity = Notification::NORMAL;
|
Notification::Prioritys priotity = Notification::NORMAL;
|
||||||
|
|
||||||
@ -91,8 +91,6 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id,
|
|||||||
FreedesktopImageHint image;
|
FreedesktopImageHint image;
|
||||||
hints.value(QLatin1String("image_data")).value<QDBusArgument>() >> image;
|
hints.value(QLatin1String("image_data")).value<QDBusArgument>() >> image;
|
||||||
icon = Icon(image.toQImage());
|
icon = Icon(image.toQImage());
|
||||||
} else {
|
|
||||||
icon = Icon::defaultIcon();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SnoreCore::instance().aplications().contains(app_name)) {
|
if (!SnoreCore::instance().aplications().contains(app_name)) {
|
||||||
|
@ -50,7 +50,6 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Snore::Alert m_alert;
|
Snore::Alert m_alert;
|
||||||
Snore::Icon m_icon;
|
|
||||||
NotificationsAdaptor *m_adaptor;
|
NotificationsAdaptor *m_adaptor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user