This should do

This commit is contained in:
Albert Vaca Cintora 2019-02-13 00:29:05 +01:00
parent a424140216
commit 9d7fe401f8

View file

@ -136,6 +136,10 @@ public:
m_applications = value; m_applications = value;
} }
QSharedPointer<QIODevice> iconForIconName(const QString& iconName) const {
return NotificationsListener::iconForIconName(iconName);
}
protected: protected:
bool parseImageDataArgument(const QVariant& argument, int& width, bool parseImageDataArgument(const QVariant& argument, int& width,
int& height, int& rowStride, int& bitsPerSample, int& height, int& rowStride, int& bitsPerSample,
@ -370,7 +374,7 @@ void TestNotificationListener::testNotify()
QCOMPARE(retId, replacesId); QCOMPARE(retId, replacesId);
QCOMPARE(++proxiedNotifications, d->getSentPackets()); QCOMPARE(++proxiedNotifications, d->getSentPackets());
QVERIFY(d->getLastPacket()->hasPayload()); QVERIFY(d->getLastPacket()->hasPayload());
QCOMPARE(d->getLastPacket()->payloadSize(), QFile(fi.baseName()).size()); QCOMPARE(d->getLastPacket()->payloadSize(), listener->iconForIconName(fi.baseName())->size());
// works also with absolute paths // works also with absolute paths
retId = listener->Notify(appName, replacesId, iconName, summary, body, {}, {{}}, 0); retId = listener->Notify(appName, replacesId, iconName, summary, body, {}, {{}}, 0);
QCOMPARE(retId, replacesId); QCOMPARE(retId, replacesId);