mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Finally fixes build issue on non X11 systems. Closes #154
This commit is contained in:
parent
d8ec1b8675
commit
9f1e864f9a
@ -42,7 +42,7 @@ void DesktopNotificationsFactory::loadSettings()
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
void DesktopNotificationsFactory::notify(const QPixmap &icon, const QString &heading, const QString &text)
|
||||
void DesktopNotificationsFactory::showNotifications(const QPixmap &icon, const QString &heading, const QString &text)
|
||||
{
|
||||
if (!m_enabled) {
|
||||
return;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <QTimer>
|
||||
#include <QWeakPointer>
|
||||
#include <QDir>
|
||||
#include <QPixmap>
|
||||
|
||||
class DesktopNotification;
|
||||
class DesktopNotificationsFactory : public QObject
|
||||
@ -35,7 +36,7 @@ class DesktopNotificationsFactory : public QObject
|
||||
public:
|
||||
enum Type { DesktopNative, PopupWidget };
|
||||
explicit DesktopNotificationsFactory(QObject* parent = 0);
|
||||
void notify(const QPixmap &icon, const QString &heading, const QString &text);
|
||||
void showNotifications(const QPixmap &icon, const QString &heading, const QString &text);
|
||||
|
||||
void nativeNotificationPreview();
|
||||
|
||||
|
@ -221,7 +221,7 @@ void DownloadManager::downloadFinished(bool success)
|
||||
|
||||
if (downloadingAllFilesFinished) {
|
||||
if (success && qApp->activeWindow() != this) {
|
||||
mApp->desktopNotifications()->notify(QIcon::fromTheme("mail-inbox", QIcon(":icons/notifications/download.png")).pixmap(48), tr("Download Finished"), tr("All files have been successfully downloaded."));
|
||||
mApp->desktopNotifications()->showNotifications(QIcon::fromTheme("mail-inbox", QIcon(":icons/notifications/download.png")).pixmap(48), tr("Download Finished"), tr("All files have been successfully downloaded."));
|
||||
if (!m_closeOnFinish) {
|
||||
raise();
|
||||
activateWindow();
|
||||
|
@ -107,7 +107,7 @@ void Updater::downCompleted(QNetworkReply* reply)
|
||||
Version current = parseVersionFromString(QupZilla::VERSION);
|
||||
Version updated = parseVersionFromString(html);
|
||||
if (current < updated) {
|
||||
mApp->desktopNotifications()->notify(QPixmap(":icons/qupzillaupdate.png"), tr("Update available"), tr("New version of QupZilla is ready to download."));
|
||||
mApp->desktopNotifications()->showNotifications(QPixmap(":icons/qupzillaupdate.png"), tr("Update available"), tr("New version of QupZilla is ready to download."));
|
||||
// QAction* action = new QAction(QIcon(":icons/qupzillaupdate.png"), "Update", this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(downloadNewVersion()));
|
||||
// p_QupZilla->menuBar()->addAction(action);
|
||||
|
Loading…
Reference in New Issue
Block a user