From 8e0d849e01dcdc1b761af3d6f89fb9fb5c5b7aa1 Mon Sep 17 00:00:00 2001 From: K0r5hun Date: Wed, 19 Mar 2014 14:38:16 +0400 Subject: [PATCH 1/6] Fix compile issue with plugins on msvc. --- src/lib/plugins/plugins.cpp | 16 ++++++++-------- src/lib/plugins/plugins.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/plugins/plugins.cpp b/src/lib/plugins/plugins.cpp index 9df6512fc..166f16a38 100644 --- a/src/lib/plugins/plugins.cpp +++ b/src/lib/plugins/plugins.cpp @@ -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() diff --git a/src/lib/plugins/plugins.h b/src/lib/plugins/plugins.h index c048e74b2..2d767cfbb 100644 --- a/src/lib/plugins/plugins.h +++ b/src/lib/plugins/plugins.h @@ -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(); From a4588a0c28cc26e7b8d54bb35e3e5db51e189322 Mon Sep 17 00:00:00 2001 From: korwru Date: Wed, 19 Mar 2014 15:01:53 +0400 Subject: [PATCH 2/6] Fix msvc compile issue in tabwidget. --- src/lib/webview/tabwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/webview/tabwidget.cpp b/src/lib/webview/tabwidget.cpp index 53fc9a473..913dd57a8 100644 --- a/src/lib/webview/tabwidget.cpp +++ b/src/lib/webview/tabwidget.cpp @@ -31,6 +31,7 @@ #include "qzsettings.h" #include "qztools.h" #include "tabicon.h" +#include "qtwin.h" #include #include From 75040eace230be590b048d4e5ddc9769b685c5fb Mon Sep 17 00:00:00 2001 From: korwru Date: Wed, 19 Mar 2014 15:14:01 +0400 Subject: [PATCH 3/6] Fix msvc compile issue in mainapplication use of undefined type RegisterQAppAssociation --- src/lib/app/mainapplication.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 04ca6eb0a..6634c653f 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -67,6 +67,10 @@ #include #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) { From 2097ce08d3f3d9d682a08e6984ef556a6e3c3d35 Mon Sep 17 00:00:00 2001 From: korwru Date: Wed, 19 Mar 2014 15:22:16 +0400 Subject: [PATCH 4/6] Fix msvc compile issue with datapaths --- src/lib/app/datapaths.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/app/datapaths.cpp b/src/lib/app/datapaths.cpp index 762415001..c26152344 100644 --- a/src/lib/app/datapaths.cpp +++ b/src/lib/app/datapaths.cpp @@ -21,6 +21,12 @@ #include #include +#if QT_VERSION < 0x050000 +#include +#else +#include +#endif + Q_GLOBAL_STATIC(DataPaths, qz_data_paths) DataPaths::DataPaths() From a1e849fd9a353902e783b3b18a9e2527c3a8d040 Mon Sep 17 00:00:00 2001 From: korwru Date: Wed, 19 Mar 2014 15:32:30 +0400 Subject: [PATCH 5/6] Fix msvc compile error m_usingTransparentBackground undeclared identifier --- src/lib/app/browserwindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/app/browserwindow.cpp b/src/lib/app/browserwindow.cpp index 80d8d7d53..2b03a6852 100644 --- a/src/lib/app/browserwindow.cpp +++ b/src/lib/app/browserwindow.cpp @@ -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); @@ -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); } @@ -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); @@ -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) From d247fd9f741f200eaf880a8773b1b868ef2b1966 Mon Sep 17 00:00:00 2001 From: korwru Date: Wed, 19 Mar 2014 15:38:14 +0400 Subject: [PATCH 6/6] Fix msvc compile issue m_navigationBar undeclared identifier --- src/lib/app/browserwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/app/browserwindow.cpp b/src/lib/app/browserwindow.cpp index 2b03a6852..6b8715379 100644 --- a/src/lib/app/browserwindow.cpp +++ b/src/lib/app/browserwindow.cpp @@ -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); @@ -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(); @@ -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); @@ -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; }