summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/help/helpviewer.cpp2
-rw-r--r--shared/help/helpviewer.h4
-rw-r--r--src/plugins/coreplugin/coreplugin.cpp4
-rw-r--r--src/plugins/coreplugin/coreplugin.pro3
-rw-r--r--src/plugins/coreplugin/welcomemode.cpp12
-rw-r--r--src/plugins/help/centralwidget.cpp8
-rw-r--r--src/plugins/help/help.pro4
-rw-r--r--src/plugins/help/helpfindsupport.cpp2
8 files changed, 19 insertions, 20 deletions
diff --git a/shared/help/helpviewer.cpp b/shared/help/helpviewer.cpp
index 0434fee4ca..ff84273f72 100644
--- a/shared/help/helpviewer.cpp
+++ b/shared/help/helpviewer.cpp
@@ -56,7 +56,7 @@
QT_BEGIN_NAMESPACE
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
class HelpNetworkReply : public QNetworkReply
{
diff --git a/shared/help/helpviewer.h b/shared/help/helpviewer.h
index 3156f196d0..ce11994625 100644
--- a/shared/help/helpviewer.h
+++ b/shared/help/helpviewer.h
@@ -39,7 +39,7 @@
#include <QtGui/QTextBrowser>
#include <QtGui/QAction>
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
#include <QWebView>
#endif
@@ -54,7 +54,7 @@ class QKeyEvent;
class QMouseEvent;
class QContextMenuEvent;
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
class HelpViewer : public QWebView
{
diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp
index 070edd9a6a..724285c4c4 100644
--- a/src/plugins/coreplugin/coreplugin.cpp
+++ b/src/plugins/coreplugin/coreplugin.cpp
@@ -40,7 +40,7 @@
#include "fileiconprovider.h"
#include <QtCore/qplugin.h>
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
#include <QtGui/QApplication>
#include <QtWebKit/QWebSettings>
#endif
@@ -74,7 +74,7 @@ bool CorePlugin::initialize(const QStringList & /*arguments*/, QString *error_me
m_pm = ExtensionSystem::PluginManager::instance();
const bool success = m_mainWindow->init(m_pm, error_message);
if (success) {
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
QWebSettings *webSettings = QWebSettings::globalSettings();
const QFont applicationFont = QApplication::font();
webSettings->setFontFamily(QWebSettings::StandardFont, applicationFont.family());
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro
index f0c474d4f8..80056b3b2e 100644
--- a/src/plugins/coreplugin/coreplugin.pro
+++ b/src/plugins/coreplugin/coreplugin.pro
@@ -163,7 +163,6 @@ FORMS += dialogs/newdialog.ui \
RESOURCES += core.qrc \
fancyactionbar.qrc
-contains(QT_CONFIG, webkit): {
+contains(QT_CONFIG, webkit) {
QT += webkit
- DEFINES += QT_WEBKIT
}
diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp
index e6c69c0001..42b67d7a8b 100644
--- a/src/plugins/coreplugin/welcomemode.cpp
+++ b/src/plugins/coreplugin/welcomemode.cpp
@@ -36,7 +36,7 @@
#include "coreimpl.h"
#include "modemanager.h"
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
#include <QtWebKit/QWebView>
#include <QtGui/QApplication>
#include <QtCore/QFileInfo>
@@ -69,7 +69,7 @@ struct WelcomeModePrivate {
WelcomeModePrivate();
QWidget *m_widget;
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
QWebView *m_webview;
#else
QLabel *m_label;
@@ -85,7 +85,7 @@ struct WelcomeModePrivate {
WelcomeModePrivate::WelcomeModePrivate() :
m_widget(new QWidget),
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
m_webview(new QWebView),
#else
m_label(new QLabel),
@@ -97,7 +97,7 @@ WelcomeModePrivate::WelcomeModePrivate() :
{
}
-#ifndef QT_WEBKIT
+#if defined(QT_NO_WEBKIT)
const char *LABEL = "<center><table><tr><td><img src=\":/qworkbench/html/images/product_logo.png\"/></td><td width=300>"
"<h2><br/><br/>Welcome</h2><p> Qt Creator is an intuitive, modern cross platform IDE that enables "
@@ -142,7 +142,7 @@ WelcomeMode::WelcomeMode() :
l->setMargin(0);
l->setSpacing(0);
l->addWidget(new QToolBar(m_d->m_widget));
-#ifdef QT_WEBKIT
+#if !defined(QT_NO_WEBKIT)
connect(m_d->m_webview, SIGNAL(linkClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
WelcomePageData welcomePageData;
@@ -199,7 +199,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
{
// should really only modify the DOM tree
-#ifndef QT_WEBKIT
+#if defined(QT_NO_WEBKIT)
Q_UNUSED(welcomePageData);
#else
diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp
index 6c63c28b1e..2e3aa2bc61 100644
--- a/src/plugins/help/centralwidget.cpp
+++ b/src/plugins/help/centralwidget.cpp
@@ -296,7 +296,7 @@ void CentralWidget::print()
initPrinter();
QPrintDialog *dlg = new QPrintDialog(printer, this);
-#if !defined(USE_WEBKIT)
+#if defined(QT_NO_WEBKIT)
if (viewer->textCursor().hasSelection())
dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
#endif
@@ -414,7 +414,7 @@ HelpViewer *CentralWidget::newEmptyTab()
HelpViewer* viewer = new HelpViewer(helpEngine, this);
viewer->installEventFilter(this);
viewer->setFocus(Qt::OtherFocusReason);
-#if !defined(USE_WEBKIT)
+#if defined(QT_NO_WEBKIT)
viewer->setDocumentTitle(tr("unknown"));
#endif
tabWidget->setCurrentIndex(tabWidget->addTab(viewer, tr("unknown")));
@@ -465,7 +465,7 @@ void CentralWidget::setTabTitle(const QUrl& url)
int tab = lastTabPage;
HelpViewer* viewer = currentHelpViewer();
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
if (!viewer || viewer->source() != url) {
QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
for (tab = 0; tab < tabBar->count(); ++tab) {
@@ -611,7 +611,7 @@ bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
{
HelpViewer* viewer = currentHelpViewer();
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
Q_UNUSED(incremental);
if (viewer) {
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
diff --git a/src/plugins/help/help.pro b/src/plugins/help/help.pro
index a7de200f74..1148606cab 100644
--- a/src/plugins/help/help.pro
+++ b/src/plugins/help/help.pro
@@ -30,7 +30,7 @@ FORMS += docsettingspage.ui \
filtersettingspage.ui
RESOURCES += help.qrc
include(../../../shared/help/help.pri)
-contains(QT_CONFIG, webkit) {
- DEFINES += USE_WEBKIT
+
+contains(QT_CONFIG, webkit) {
QT += webkit
}
diff --git a/src/plugins/help/helpfindsupport.cpp b/src/plugins/help/helpfindsupport.cpp
index 306a1d5f40..2f8da0e459 100644
--- a/src/plugins/help/helpfindsupport.cpp
+++ b/src/plugins/help/helpfindsupport.cpp
@@ -54,7 +54,7 @@ QString HelpFindSupport::currentFindString() const
HelpViewer* viewer = m_centralWidget->currentHelpViewer();
if (!viewer)
return QString();
-#if defined(USE_WEBKIT)
+#if !defined(QT_NO_WEBKIT)
return viewer->selectedText();
#else
return viewer->textCursor().selectedText();