remove default constructor for icons

This commit is contained in:
Patrick von Reth 2015-07-07 23:01:50 +02:00
parent a8380a3484
commit 9a383e8743
4 changed files with 3 additions and 11 deletions

View File

@ -41,11 +41,6 @@ Icon Icon::defaultIcon()
return icon;
}
Icon::Icon() :
d(NULL)
{
}
Icon::Icon(const QImage &img):
d(new IconData(img))
{
@ -89,7 +84,7 @@ bool Icon::isLocalFile() 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

View File

@ -47,7 +47,6 @@ public:
static Icon defaultIcon();
Icon();
/**
* Creates an Icon from an QImage
@ -114,6 +113,7 @@ public:
Icon scaled(const QSize &s) const;
private:
Icon() = delete;
QExplicitlySharedDataPointer<IconData> d;
friend SNORE_EXPORT QDebug(::operator<<)(QDebug, const Snore::Icon &);
};

View File

@ -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 QStringList &actions, const QVariantMap &hints, int timeout)
{
Icon icon;
Icon icon = Icon::defaultIcon();
Application app;
Notification::Prioritys priotity = Notification::NORMAL;
@ -91,8 +91,6 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id,
FreedesktopImageHint image;
hints.value(QLatin1String("image_data")).value<QDBusArgument>() >> image;
icon = Icon(image.toQImage());
} else {
icon = Icon::defaultIcon();
}
if (!SnoreCore::instance().aplications().contains(app_name)) {

View File

@ -50,7 +50,6 @@ public Q_SLOTS:
private:
Snore::Alert m_alert;
Snore::Icon m_icon;
NotificationsAdaptor *m_adaptor;
};