Commit 7d6f2bb4 authored by Patrick Star's avatar Patrick Star

Fixes: - use QT_NO_WEBKIT instead of QT_WEBKIT, USE_WEBKIT

Task:     - none
AutoTest: - compile test
Details:  - use QT_NO_WEBKIT instead of QT_WEBKIT, USE_WEBKIT
parent 03b3f5b3
......@@ -56,7 +56,7 @@
QT_BEGIN_NAMESPACE
#if defined(USE_WEBKIT)
#if !defined(QT_NO_WEBKIT)
class HelpNetworkReply : public QNetworkReply
{
......
......@@ -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
{
......
......@@ -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());
......
......@@ -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
}
......@@ -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
......
......@@ -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;
......
......@@ -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
}
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment