1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Building: Option to build without QtDBUS module.

- more info in BUILDING
- desktop notifications will be disabled with this option
This commit is contained in:
nowrep 2012-07-10 11:56:24 +02:00
parent e4e87b02a5
commit 2d5c9bcc2b
9 changed files with 35 additions and 12 deletions

View File

@ -8,7 +8,7 @@ General
from git to specific directory by your system you compiled for. from git to specific directory by your system you compiled for.
On Linux, you can easily do it by running make install. On Linux, you can easily do it by running make install.
If you are unsure where is the right place, you can check it directly from If you are unsure where is the right place, you can check it directly from
QupZilla by clicking from Help Menu to Informations about program, then in QupZilla by clicking from Help Menu on Configuration Information, then in
Path section. Path section.
You may want to build QupZilla with debugging symbols (for generating You may want to build QupZilla with debugging symbols (for generating
@ -161,3 +161,8 @@ Available Defines
example: example:
$ export QUPZILLA_PREFIX="/usr/" $ export QUPZILLA_PREFIX="/usr/"
DISABLE_DBUS Build without QtDBUS module. Native desktop notifications will be disabled.
example:
$ export DISABLE_DBUS="true"

View File

@ -1,6 +1,8 @@
Version 1.3.0 Version 1.3.0
* not released yet * not released yet
* new Ukrainian translation * new Ukrainian translation
* new plugins: GreaseMonkey and PIM (Personal Information Manager)
* new command line option to open new window with url
* can now open .xhtml files from open file dialog * can now open .xhtml files from open file dialog
* added animated tab previews with option to turn animations off * added animated tab previews with option to turn animations off
* possibility to change icon of bookmarks * possibility to change icon of bookmarks
@ -21,6 +23,7 @@ Version 1.3.0
* better support for Content-Disposition header (downloads) * better support for Content-Disposition header (downloads)
* Linux: middle clicking on add tab button will open new tab with global mouse selection's contents * Linux: middle clicking on add tab button will open new tab with global mouse selection's contents
* Linux: generating backtrace and saving it into file upon application crash * Linux: generating backtrace and saving it into file upon application crash
* Windows: fixed theme loading delay (showing ugly interface for a second when starting app)
* fixed saving passwords on some sites (parsing WebKit's data format) * fixed saving passwords on some sites (parsing WebKit's data format)
* fixed "go to web address" action when newlines were in string * fixed "go to web address" action when newlines were in string
* fixed excessive ssl warnings when rejecting untrusted certificate * fixed excessive ssl warnings when rejecting untrusted certificate

View File

@ -28,6 +28,7 @@ d_portable = $$(PORTABLE_BUILD)
d_nonblock_dialogs = $$(NONBLOCK_JS_DIALOGS) d_nonblock_dialogs = $$(NONBLOCK_JS_DIALOGS)
d_use_qtwebkit_2_2 = $$(USE_QTWEBKIT_2_2) d_use_qtwebkit_2_2 = $$(USE_QTWEBKIT_2_2)
d_use_lib_path = $$(USE_LIBPATH) d_use_lib_path = $$(USE_LIBPATH)
d_disable_dbus = $$(DISABLE_DBUS)
equals(d_no_system_datapath, "true") { DEFINES *= NO_SYSTEM_DATAPATH } equals(d_no_system_datapath, "true") { DEFINES *= NO_SYSTEM_DATAPATH }
equals(d_use_webgl, "true") { DEFINES *= USE_WEBGL } equals(d_use_webgl, "true") { DEFINES *= USE_WEBGL }
@ -36,6 +37,7 @@ equals(d_kde, "true") { DEFINES *= KDE }
equals(d_portable, "true") { DEFINES *= PORTABLE_BUILD } equals(d_portable, "true") { DEFINES *= PORTABLE_BUILD }
equals(d_nonblock_dialogs, "true") { DEFINES *= NONBLOCK_JS_DIALOGS } equals(d_nonblock_dialogs, "true") { DEFINES *= NONBLOCK_JS_DIALOGS }
equals(d_use_qtwebkit_2_2, "true") { DEFINES *= USE_QTWEBKIT_2_2 } equals(d_use_qtwebkit_2_2, "true") { DEFINES *= USE_QTWEBKIT_2_2 }
equals(d_disable_dbus, "true") { DEFINES *= DISABLE_DBUS }
!mac:unix { !mac:unix {
d_prefix = $$(QUPZILLA_PREFIX) d_prefix = $$(QUPZILLA_PREFIX)

View File

@ -108,11 +108,12 @@ void CommandLineOptions::parseActions()
if (arg.startsWith("-p=") || arg.startsWith("--profile=")) { if (arg.startsWith("-p=") || arg.startsWith("--profile=")) {
int index = arg.indexOf('='); int index = arg.indexOf('=');
if (index != -1) { if (index != -1) {
cout << "QupZilla: Starting with profile " << arg.toUtf8().data() << endl; const QString profileName = arg.mid(index + 1);
cout << "QupZilla: Starting with profile '" << profileName.toUtf8().data() << "'" << endl;
ActionPair pair; ActionPair pair;
pair.action = Qz::CL_StartWithProfile; pair.action = Qz::CL_StartWithProfile;
pair.text = arg.mid(index + 1); pair.text = profileName;
m_actions.append(pair); m_actions.append(pair);
} }
} }

View File

@ -23,7 +23,7 @@
#include <QFile> #include <QFile>
#include <QDir> #include <QDir>
#ifdef Q_WS_X11 #if defined(Q_WS_X11) && !defined(DISABLE_DBUS)
#include <QDBusInterface> #include <QDBusInterface>
#endif #endif
@ -49,6 +49,15 @@ void DesktopNotificationsFactory::loadSettings()
settings.endGroup(); settings.endGroup();
} }
bool DesktopNotificationsFactory::supportsNativeNotifications() const
{
#if defined(Q_WS_X11) && !defined(DISABLE_DBUS)
return true;
#else
return false;
#endif
}
void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QString &heading, const QString &text) void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QString &heading, const QString &text)
{ {
if (!m_enabled) { if (!m_enabled) {
@ -68,7 +77,7 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS
m_desktopNotif.data()->show(); m_desktopNotif.data()->show();
break; break;
case DesktopNative: case DesktopNative:
#ifdef Q_WS_X11 #if defined(Q_WS_X11) && !defined(DISABLE_DBUS)
QFile tmp(QDir::tempPath() + "/qupzilla_notif.png"); QFile tmp(QDir::tempPath() + "/qupzilla_notif.png");
tmp.open(QFile::WriteOnly); tmp.open(QFile::WriteOnly);
icon.save(tmp.fileName()); icon.save(tmp.fileName());
@ -95,7 +104,7 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS
void DesktopNotificationsFactory::nativeNotificationPreview() void DesktopNotificationsFactory::nativeNotificationPreview()
{ {
#ifdef Q_WS_X11 #if defined(Q_WS_X11) && !defined(DISABLE_DBUS)
QFile tmp(QDir::tempPath() + "/qupzilla_notif.png"); QFile tmp(QDir::tempPath() + "/qupzilla_notif.png");
tmp.open(QFile::WriteOnly); tmp.open(QFile::WriteOnly);
QPixmap(":icons/preferences/stock_dialog-question.png").save(tmp.fileName()); QPixmap(":icons/preferences/stock_dialog-question.png").save(tmp.fileName());

View File

@ -37,6 +37,8 @@ public:
void loadSettings(); void loadSettings();
bool supportsNativeNotifications() const;
void showNotification(const QPixmap &icon, const QString &heading, const QString &text); void showNotification(const QPixmap &icon, const QString &heading, const QString &text);
void nativeNotificationPreview(); void nativeNotificationPreview();

View File

@ -1,5 +1,4 @@
QT += core gui webkit sql network script QT += core gui webkit sql network script
unix:QT += dbus
TARGET = QupZilla TARGET = QupZilla
TEMPLATE = lib TEMPLATE = lib
@ -10,6 +9,8 @@ include(../defines.pri)
include(../../translations/translations.pri) include(../../translations/translations.pri)
#include(../../tests/modeltest/modeltest.pri) #include(../../tests/modeltest/modeltest.pri)
unix:!contains(DEFINES, "DISABLE_DBUS") QT += dbus
INCLUDEPATH += 3rdparty\ INCLUDEPATH += 3rdparty\
app\ app\
autofill\ autofill\

View File

@ -320,9 +320,8 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
ui->pluginsFrame->addWidget(m_pluginsList); ui->pluginsFrame->addWidget(m_pluginsList);
//NOTIFICATIONS //NOTIFICATIONS
#ifdef Q_WS_X11 ui->useNativeSystemNotifications->setEnabled(mApp->desktopNotifications()->supportsNativeNotifications());
ui->useNativeSystemNotifications->setEnabled(true);
#endif
DesktopNotificationsFactory::Type notifyType; DesktopNotificationsFactory::Type notifyType;
settings.beginGroup("Notifications"); settings.beginGroup("Notifications");
ui->notificationTimeout->setValue(settings.value("Timeout", 6000).toInt() / 1000); ui->notificationTimeout->setValue(settings.value("Timeout", 6000).toInt() / 1000);
@ -331,7 +330,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
#else #else
notifyType = DesktopNotificationsFactory::PopupWidget; notifyType = DesktopNotificationsFactory::PopupWidget;
#endif #endif
if (notifyType == DesktopNotificationsFactory::DesktopNative) { if (ui->useNativeSystemNotifications->isChecked() && notifyType == DesktopNotificationsFactory::DesktopNative) {
ui->useNativeSystemNotifications->setChecked(true); ui->useNativeSystemNotifications->setChecked(true);
} }
else { else {

View File

@ -1,5 +1,4 @@
QT += core gui webkit sql network script QT += core gui webkit sql network script
unix: QT += dbus
TARGET = qupzilla TARGET = qupzilla
mac: TARGET = QupZilla mac: TARGET = QupZilla
@ -12,6 +11,8 @@ TEMPLATE = app
include(../defines.pri) include(../defines.pri)
include(../install.pri) include(../install.pri)
unix:!contains(DEFINES, "DISABLE_DBUS") QT += dbus
INCLUDEPATH += ../lib/app\ INCLUDEPATH += ../lib/app\
../lib/3rdparty ../lib/3rdparty