1
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:
nowrep 2012-01-12 21:38:38 +01:00
parent d8ec1b8675
commit 9f1e864f9a
4 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@ void DesktopNotificationsFactory::loadSettings()
settings.endGroup(); 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) { if (!m_enabled) {
return; return;

View File

@ -27,6 +27,7 @@
#include <QTimer> #include <QTimer>
#include <QWeakPointer> #include <QWeakPointer>
#include <QDir> #include <QDir>
#include <QPixmap>
class DesktopNotification; class DesktopNotification;
class DesktopNotificationsFactory : public QObject class DesktopNotificationsFactory : public QObject
@ -35,7 +36,7 @@ class DesktopNotificationsFactory : public QObject
public: public:
enum Type { DesktopNative, PopupWidget }; enum Type { DesktopNative, PopupWidget };
explicit DesktopNotificationsFactory(QObject* parent = 0); 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(); void nativeNotificationPreview();

View File

@ -221,7 +221,7 @@ void DownloadManager::downloadFinished(bool success)
if (downloadingAllFilesFinished) { if (downloadingAllFilesFinished) {
if (success && qApp->activeWindow() != this) { 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) { if (!m_closeOnFinish) {
raise(); raise();
activateWindow(); activateWindow();

View File

@ -107,7 +107,7 @@ void Updater::downCompleted(QNetworkReply* reply)
Version current = parseVersionFromString(QupZilla::VERSION); Version current = parseVersionFromString(QupZilla::VERSION);
Version updated = parseVersionFromString(html); Version updated = parseVersionFromString(html);
if (current < updated) { 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); // QAction* action = new QAction(QIcon(":icons/qupzillaupdate.png"), "Update", this);
// connect(action, SIGNAL(triggered()), this, SLOT(downloadNewVersion())); // connect(action, SIGNAL(triggered()), this, SLOT(downloadNewVersion()));
// p_QupZilla->menuBar()->addAction(action); // p_QupZilla->menuBar()->addAction(action);