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

Merge pull request #1264 from K0r5hun/master

Fix some issues for msvc compile
This commit is contained in:
David Rosca 2014-03-19 14:36:09 +01:00
commit 86c9c845c6
6 changed files with 33 additions and 24 deletions

View File

@ -445,11 +445,11 @@ void BrowserWindow::loadSettings()
m_privateBrowsing->setVisible(mApp->isPrivate());
#ifdef Q_OS_WIN
if (m_usingTransparentBackground && !makeTransparent) {
if (m_useTransparentBackground && !makeTransparent) {
QtWin::extendFrameIntoClientArea(this, 0, 0, 0, 0);
QtWin::enableBlurBehindWindow(this, false);
m_tabWidget->getTabBar()->enableBluredBackground(false);
m_usingTransparentBackground = false;
m_useTransparentBackground = false;
}
#endif
@ -474,7 +474,7 @@ void BrowserWindow::loadSettings()
if (QtWin::isCompositionEnabled()) {
setContentsMargins(0, 0, 0, 0);
m_usingTransparentBackground = true;
m_useTransparentBackground = true;
if (!isFullScreen()) {
m_tabWidget->getTabBar()->enableBluredBackground(true);
@ -484,7 +484,7 @@ void BrowserWindow::loadSettings()
// Install event filters
menuBar()->installEventFilter(this);
m_tabWidget->getTabBar()->installEventFilter(this);
m_navigationBar->installEventFilter(this);
m_navigationToolbar->installEventFilter(this);
m_bookmarksToolbar->installEventFilter(this);
statusBar()->installEventFilter(this);
m_navigationContainer->installEventFilter(this);
@ -1122,7 +1122,7 @@ bool BrowserWindow::event(QEvent* event)
m_hideNavigationTimer->stop();
m_navigationToolbar->buttonExitFullscreen()->setVisible(true);
#ifdef Q_OS_WIN
if (m_usingTransparentBackground) {
if (m_useTransparentBackground) {
m_tabWidget->getTabBar()->enableBluredBackground(false);
QtWin::extendFrameIntoClientArea(this, 0, 0, 0 , 0);
QtWin::enableBlurBehindWindow(this, false);
@ -1142,7 +1142,7 @@ bool BrowserWindow::event(QEvent* event)
m_hideNavigationTimer->stop();
m_navigationToolbar->buttonExitFullscreen()->setVisible(false);
#ifdef Q_OS_WIN
if (m_usingTransparentBackground) {
if (m_useTransparentBackground) {
m_tabWidget->getTabBar()->enableBluredBackground(true);
applyBlurToMainWindow(true);
}
@ -1587,7 +1587,7 @@ void BrowserWindow::applyBlurToMainWindow(bool force)
}
topMargin += menuBar()->isVisible() ? menuBar()->height() : 0;
topMargin += m_navigationBar->isVisible() ? m_navigationBar->height() : 0;
topMargin += m_navigationToolbar->isVisible() ? m_navigationToolbar->height() : 0;
topMargin += m_bookmarksToolbar->isVisible() ? m_bookmarksToolbar->height() : 0;
topMargin += m_tabWidget->getTabBar()->height();
@ -1620,9 +1620,9 @@ bool BrowserWindow::nativeEvent(const QByteArray &eventType, void* _message, lon
if (message && message->message == WM_DWMCOMPOSITIONCHANGED) {
Settings settings;
settings.beginGroup("Browser-View-Settings");
m_usingTransparentBackground = settings.value("useTransparentBackground", false).toBool();
m_useTransparentBackground = settings.value("useTransparentBackground", false).toBool();
settings.endGroup();
if (m_usingTransparentBackground && QtWin::isCompositionEnabled()) {
if (m_useTransparentBackground && QtWin::isCompositionEnabled()) {
setUpdatesEnabled(false);
QtWin::extendFrameIntoClientArea(this, 0, 0, 0, 0);
@ -1630,7 +1630,7 @@ bool BrowserWindow::nativeEvent(const QByteArray &eventType, void* _message, lon
//install event filter
menuBar()->installEventFilter(this);
m_navigationBar->installEventFilter(this);
m_navigationToolbar->installEventFilter(this);
m_bookmarksToolbar->installEventFilter(this);
statusBar()->installEventFilter(this);
@ -1654,7 +1654,7 @@ bool BrowserWindow::nativeEvent(const QByteArray &eventType, void* _message, lon
setUpdatesEnabled(true);
}
else {
m_usingTransparentBackground = false;
m_useTransparentBackground = false;
}
}
#if (QT_VERSION < 0x050000)
@ -1680,13 +1680,13 @@ bool BrowserWindow::eventFilter(QObject* object, QEvent* event)
switch (event->type()) {
case QEvent::Hide:
if (object == m_navigationContainer) {
m_navigationBar->removeEventFilter(this);
m_navigationToolbar->removeEventFilter(this);
m_bookmarksToolbar->removeEventFilter(this);
break;
}
case QEvent::Show:
if (object == m_navigationContainer) {
m_navigationBar->installEventFilter(this);
m_navigationToolbar->installEventFilter(this);
m_bookmarksToolbar->installEventFilter(this);
break;
}

View File

@ -21,6 +21,12 @@
#include <QApplication>
#include <QDir>
#if QT_VERSION < 0x050000
#include <QDesktopServices>
#else
#include <QStandardPaths>
#endif
Q_GLOBAL_STATIC(DataPaths, qz_data_paths)
DataPaths::DataPaths()

View File

@ -67,6 +67,10 @@
#include <QStandardPaths>
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
#include "registerqappassociation.h"
#endif
MainApplication::MainApplication(int &argc, char** argv)
: QtSingleApplication(argc, argv)
, m_isPrivate(false)
@ -1055,8 +1059,6 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
}
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
#include "registerqappassociation.h"
RegisterQAppAssociation* MainApplication::associationManager()
{
if (!m_registerQAppAssociation) {

View File

@ -206,26 +206,26 @@ void Plugins::loadAvailablePlugins()
}
}
PluginInterface* Plugins::initPlugin(PluginInterface::InitState state, PluginInterface* interface, QPluginLoader* loader)
PluginInterface* Plugins::initPlugin(PluginInterface::InitState state, PluginInterface* pluginInterface, QPluginLoader* loader)
{
if (!interface) {
if (!pluginInterface) {
return 0;
}
interface->init(state, DataPaths::currentProfilePath() + "/extensions/");
pluginInterface->init(state, DataPaths::currentProfilePath() + "/extensions/");
if (!interface->testPlugin()) {
interface->unload();
if (!pluginInterface->testPlugin()) {
pluginInterface->unload();
loader->unload();
emit pluginUnloaded(interface);
emit pluginUnloaded(pluginInterface);
return 0;
}
qApp->installTranslator(interface->getTranslator(mApp->currentLanguageFile()));
qApp->installTranslator(pluginInterface->getTranslator(mApp->currentLanguageFile()));
return interface;
return pluginInterface;
}
void Plugins::refreshLoadedPlugins()

View File

@ -91,7 +91,7 @@ signals:
private:
bool alreadySpecInAvailable(const PluginSpec &spec);
PluginInterface* initPlugin(PluginInterface::InitState state , PluginInterface* interface, QPluginLoader* loader);
PluginInterface* initPlugin(PluginInterface::InitState state , PluginInterface* pluginInterface, QPluginLoader* loader);
void refreshLoadedPlugins();
void loadAvailablePlugins();

View File

@ -31,6 +31,7 @@
#include "qzsettings.h"
#include "qztools.h"
#include "tabicon.h"
#include "qtwin.h"
#include <QFile>
#include <QTimer>