1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01: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.
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
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.
You may want to build QupZilla with debugging symbols (for generating
@ -161,3 +161,8 @@ Available Defines
example:
$ 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
* not released yet
* 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
* added animated tab previews with option to turn animations off
* possibility to change icon of bookmarks
@ -21,6 +23,7 @@ Version 1.3.0
* 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: 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 "go to web address" action when newlines were in string
* 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_use_qtwebkit_2_2 = $$(USE_QTWEBKIT_2_2)
d_use_lib_path = $$(USE_LIBPATH)
d_disable_dbus = $$(DISABLE_DBUS)
equals(d_no_system_datapath, "true") { DEFINES *= NO_SYSTEM_DATAPATH }
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_nonblock_dialogs, "true") { DEFINES *= NONBLOCK_JS_DIALOGS }
equals(d_use_qtwebkit_2_2, "true") { DEFINES *= USE_QTWEBKIT_2_2 }
equals(d_disable_dbus, "true") { DEFINES *= DISABLE_DBUS }
!mac:unix {
d_prefix = $$(QUPZILLA_PREFIX)

View File

@ -108,11 +108,12 @@ void CommandLineOptions::parseActions()
if (arg.startsWith("-p=") || arg.startsWith("--profile=")) {
int index = arg.indexOf('=');
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;
pair.action = Qz::CL_StartWithProfile;
pair.text = arg.mid(index + 1);
pair.text = profileName;
m_actions.append(pair);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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