forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
|
|
||||||
class HelpNetworkReply : public QNetworkReply
|
class HelpNetworkReply : public QNetworkReply
|
||||||
{
|
{
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include <QtGui/QTextBrowser>
|
#include <QtGui/QTextBrowser>
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
|
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
#include <QWebView>
|
#include <QWebView>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ class QKeyEvent;
|
|||||||
class QMouseEvent;
|
class QMouseEvent;
|
||||||
class QContextMenuEvent;
|
class QContextMenuEvent;
|
||||||
|
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
|
|
||||||
class HelpViewer : public QWebView
|
class HelpViewer : public QWebView
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
#include "fileiconprovider.h"
|
#include "fileiconprovider.h"
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
#ifdef QT_WEBKIT
|
#if !defined(QT_NO_WEBKIT)
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtWebKit/QWebSettings>
|
#include <QtWebKit/QWebSettings>
|
||||||
#endif
|
#endif
|
||||||
@@ -74,7 +74,7 @@ bool CorePlugin::initialize(const QStringList & /*arguments*/, QString *error_me
|
|||||||
m_pm = ExtensionSystem::PluginManager::instance();
|
m_pm = ExtensionSystem::PluginManager::instance();
|
||||||
const bool success = m_mainWindow->init(m_pm, error_message);
|
const bool success = m_mainWindow->init(m_pm, error_message);
|
||||||
if (success) {
|
if (success) {
|
||||||
#ifdef QT_WEBKIT
|
#if !defined(QT_NO_WEBKIT)
|
||||||
QWebSettings *webSettings = QWebSettings::globalSettings();
|
QWebSettings *webSettings = QWebSettings::globalSettings();
|
||||||
const QFont applicationFont = QApplication::font();
|
const QFont applicationFont = QApplication::font();
|
||||||
webSettings->setFontFamily(QWebSettings::StandardFont, applicationFont.family());
|
webSettings->setFontFamily(QWebSettings::StandardFont, applicationFont.family());
|
||||||
|
@@ -163,7 +163,6 @@ FORMS += dialogs/newdialog.ui \
|
|||||||
RESOURCES += core.qrc \
|
RESOURCES += core.qrc \
|
||||||
fancyactionbar.qrc
|
fancyactionbar.qrc
|
||||||
|
|
||||||
contains(QT_CONFIG, webkit): {
|
contains(QT_CONFIG, webkit) {
|
||||||
QT += webkit
|
QT += webkit
|
||||||
DEFINES += QT_WEBKIT
|
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include "coreimpl.h"
|
#include "coreimpl.h"
|
||||||
#include "modemanager.h"
|
#include "modemanager.h"
|
||||||
|
|
||||||
#ifdef QT_WEBKIT
|
#if !defined(QT_NO_WEBKIT)
|
||||||
#include <QtWebKit/QWebView>
|
#include <QtWebKit/QWebView>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
@@ -69,7 +69,7 @@ struct WelcomeModePrivate {
|
|||||||
WelcomeModePrivate();
|
WelcomeModePrivate();
|
||||||
|
|
||||||
QWidget *m_widget;
|
QWidget *m_widget;
|
||||||
#ifdef QT_WEBKIT
|
#if !defined(QT_NO_WEBKIT)
|
||||||
QWebView *m_webview;
|
QWebView *m_webview;
|
||||||
#else
|
#else
|
||||||
QLabel *m_label;
|
QLabel *m_label;
|
||||||
@@ -85,7 +85,7 @@ struct WelcomeModePrivate {
|
|||||||
|
|
||||||
WelcomeModePrivate::WelcomeModePrivate() :
|
WelcomeModePrivate::WelcomeModePrivate() :
|
||||||
m_widget(new QWidget),
|
m_widget(new QWidget),
|
||||||
#ifdef QT_WEBKIT
|
#if !defined(QT_NO_WEBKIT)
|
||||||
m_webview(new QWebView),
|
m_webview(new QWebView),
|
||||||
#else
|
#else
|
||||||
m_label(new QLabel),
|
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>"
|
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 "
|
"<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->setMargin(0);
|
||||||
l->setSpacing(0);
|
l->setSpacing(0);
|
||||||
l->addWidget(new QToolBar(m_d->m_widget));
|
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)));
|
connect(m_d->m_webview, SIGNAL(linkClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
|
||||||
|
|
||||||
WelcomePageData welcomePageData;
|
WelcomePageData welcomePageData;
|
||||||
@@ -199,7 +199,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
|
|||||||
{
|
{
|
||||||
// should really only modify the DOM tree
|
// should really only modify the DOM tree
|
||||||
|
|
||||||
#ifndef QT_WEBKIT
|
#if defined(QT_NO_WEBKIT)
|
||||||
Q_UNUSED(welcomePageData);
|
Q_UNUSED(welcomePageData);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@@ -296,7 +296,7 @@ void CentralWidget::print()
|
|||||||
initPrinter();
|
initPrinter();
|
||||||
|
|
||||||
QPrintDialog *dlg = new QPrintDialog(printer, this);
|
QPrintDialog *dlg = new QPrintDialog(printer, this);
|
||||||
#if !defined(USE_WEBKIT)
|
#if defined(QT_NO_WEBKIT)
|
||||||
if (viewer->textCursor().hasSelection())
|
if (viewer->textCursor().hasSelection())
|
||||||
dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
|
dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
|
||||||
#endif
|
#endif
|
||||||
@@ -414,7 +414,7 @@ HelpViewer *CentralWidget::newEmptyTab()
|
|||||||
HelpViewer* viewer = new HelpViewer(helpEngine, this);
|
HelpViewer* viewer = new HelpViewer(helpEngine, this);
|
||||||
viewer->installEventFilter(this);
|
viewer->installEventFilter(this);
|
||||||
viewer->setFocus(Qt::OtherFocusReason);
|
viewer->setFocus(Qt::OtherFocusReason);
|
||||||
#if !defined(USE_WEBKIT)
|
#if defined(QT_NO_WEBKIT)
|
||||||
viewer->setDocumentTitle(tr("unknown"));
|
viewer->setDocumentTitle(tr("unknown"));
|
||||||
#endif
|
#endif
|
||||||
tabWidget->setCurrentIndex(tabWidget->addTab(viewer, tr("unknown")));
|
tabWidget->setCurrentIndex(tabWidget->addTab(viewer, tr("unknown")));
|
||||||
@@ -465,7 +465,7 @@ void CentralWidget::setTabTitle(const QUrl& url)
|
|||||||
int tab = lastTabPage;
|
int tab = lastTabPage;
|
||||||
HelpViewer* viewer = currentHelpViewer();
|
HelpViewer* viewer = currentHelpViewer();
|
||||||
|
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
if (!viewer || viewer->source() != url) {
|
if (!viewer || viewer->source() != url) {
|
||||||
QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
|
QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget);
|
||||||
for (tab = 0; tab < tabBar->count(); ++tab) {
|
for (tab = 0; tab < tabBar->count(); ++tab) {
|
||||||
@@ -611,7 +611,7 @@ bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
|
|||||||
{
|
{
|
||||||
HelpViewer* viewer = currentHelpViewer();
|
HelpViewer* viewer = currentHelpViewer();
|
||||||
|
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
Q_UNUSED(incremental);
|
Q_UNUSED(incremental);
|
||||||
if (viewer) {
|
if (viewer) {
|
||||||
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
|
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
|
||||||
|
@@ -30,7 +30,7 @@ FORMS += docsettingspage.ui \
|
|||||||
filtersettingspage.ui
|
filtersettingspage.ui
|
||||||
RESOURCES += help.qrc
|
RESOURCES += help.qrc
|
||||||
include(../../../shared/help/help.pri)
|
include(../../../shared/help/help.pri)
|
||||||
|
|
||||||
contains(QT_CONFIG, webkit) {
|
contains(QT_CONFIG, webkit) {
|
||||||
DEFINES += USE_WEBKIT
|
|
||||||
QT += webkit
|
QT += webkit
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,7 @@ QString HelpFindSupport::currentFindString() const
|
|||||||
HelpViewer* viewer = m_centralWidget->currentHelpViewer();
|
HelpViewer* viewer = m_centralWidget->currentHelpViewer();
|
||||||
if (!viewer)
|
if (!viewer)
|
||||||
return QString();
|
return QString();
|
||||||
#if defined(USE_WEBKIT)
|
#if !defined(QT_NO_WEBKIT)
|
||||||
return viewer->selectedText();
|
return viewer->selectedText();
|
||||||
#else
|
#else
|
||||||
return viewer->textCursor().selectedText();
|
return viewer->textCursor().selectedText();
|
||||||
|
Reference in New Issue
Block a user