[notifications] Drop no icon hack
This commit is contained in:
parent
1a9c2dbc4c
commit
b3d78d6d07
3 changed files with 0 additions and 10 deletions
|
@ -1,5 +1,4 @@
|
||||||
[Global]
|
[Global]
|
||||||
IconName=kdeconnect
|
|
||||||
Name=KDE Connect
|
Name=KDE Connect
|
||||||
Name[ar]=كدي المتّصل
|
Name[ar]=كدي المتّصل
|
||||||
Name[ast]=KDE Connect
|
Name[ast]=KDE Connect
|
||||||
|
|
|
@ -135,7 +135,6 @@ void Notification::createKNotification(const NetworkPacket& np)
|
||||||
m_hasIcon = m_hasIcon && !m_payloadHash.isEmpty();
|
m_hasIcon = m_hasIcon && !m_payloadHash.isEmpty();
|
||||||
|
|
||||||
if (!m_hasIcon) {
|
if (!m_hasIcon) {
|
||||||
applyNoIcon();
|
|
||||||
show();
|
show();
|
||||||
} else {
|
} else {
|
||||||
m_iconPath = m_imagesDir.absoluteFilePath(m_payloadHash);
|
m_iconPath = m_imagesDir.absoluteFilePath(m_payloadHash);
|
||||||
|
@ -169,7 +168,6 @@ void Notification::loadIcon(const NetworkPacket& np)
|
||||||
s_downloadsInProgress.remove(m_iconPath);
|
s_downloadsInProgress.remove(m_iconPath);
|
||||||
if (fileTransferJob->error()) {
|
if (fileTransferJob->error()) {
|
||||||
qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "Error in FileTransferJob: " << fileTransferJob->errorString();
|
qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "Error in FileTransferJob: " << fileTransferJob->errorString();
|
||||||
applyNoIcon();
|
|
||||||
} else {
|
} else {
|
||||||
applyIcon();
|
applyIcon();
|
||||||
}
|
}
|
||||||
|
@ -184,12 +182,6 @@ void Notification::applyIcon()
|
||||||
m_notification->setPixmap(icon);
|
m_notification->setPixmap(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notification::applyNoIcon()
|
|
||||||
{
|
|
||||||
//HACK The only way to display no icon at all is trying to load a non-existent icon
|
|
||||||
m_notification->setIconName(QStringLiteral("not_a_real_icon"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Notification::reply()
|
void Notification::reply()
|
||||||
{
|
{
|
||||||
Q_EMIT replyRequested();
|
Q_EMIT replyRequested();
|
||||||
|
|
|
@ -96,7 +96,6 @@ private:
|
||||||
void parseNetworkPacket(const NetworkPacket& np);
|
void parseNetworkPacket(const NetworkPacket& np);
|
||||||
void loadIcon(const NetworkPacket& np);
|
void loadIcon(const NetworkPacket& np);
|
||||||
void applyIcon();
|
void applyIcon();
|
||||||
void applyNoIcon();
|
|
||||||
|
|
||||||
static QMap<QString, FileTransferJob*> s_downloadsInProgress;
|
static QMap<QString, FileTransferJob*> s_downloadsInProgress;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue