Skip to content
Snippets Groups Projects
Commit a6d50b6e authored by Christian Kandeler's avatar Christian Kandeler Committed by hjk
Browse files

Help: Prevent moc from running on helpviewer_qwv.cpp.


If Webkit is disabled, moc will run on the file anyway, because there is
a ".moc" included and moc does not know about #ifdefs. This results in
an ugly warning ("no output generated") being emitted in the no-Webkit
case.
Solve the problem by moving the declaration of the QObject subclass into
the header file.

Change-Id: I2abaffd85a342fa2f3dbaa7bcf3ef63a2972c73e
Reviewed-by: default avatarKarsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 61753f7e
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@
#if defined(QT_NO_WEBKIT)
#include <QTextBrowser>
#else
#include <QWebPage>
#include <QWebView>
#endif
......@@ -140,6 +141,33 @@ private:
HelpViewerPrivate *d;
};
#ifndef QT_NO_WEBKIT
class HelpPage : public QWebPage
{
Q_OBJECT
public:
HelpPage(QObject *parent);
protected:
virtual QWebPage *createWindow(QWebPage::WebWindowType);
virtual void triggerAction(WebAction action, bool checked = false);
virtual bool acceptNavigationRequest(QWebFrame *frame,
const QNetworkRequest &request, NavigationType type);
private slots:
void onHandleUnsupportedContent(QNetworkReply *reply);
private:
QUrl m_loadingUrl;
bool closeNewTabIfNeeded;
friend class Help::Internal::HelpViewer;
Qt::MouseButtons m_pressedButtons;
Qt::KeyboardModifiers m_keyboardModifiers;
};
#endif // QT_NO_WEBKIT
} // namespace Internal
} // namespace Help
......
......@@ -204,35 +204,6 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
? QLatin1String("application/octet-stream") : mimeType);
}
// -- HelpPage
class HelpPage : public QWebPage
{
Q_OBJECT
public:
HelpPage(QObject *parent);
protected:
virtual QWebPage *createWindow(QWebPage::WebWindowType);
virtual void triggerAction(WebAction action, bool checked = false);
virtual bool acceptNavigationRequest(QWebFrame *frame,
const QNetworkRequest &request, NavigationType type);
private slots:
void onHandleUnsupportedContent(QNetworkReply *reply);
private:
QUrl m_loadingUrl;
bool closeNewTabIfNeeded;
friend class Help::Internal::HelpViewer;
Qt::MouseButtons m_pressedButtons;
Qt::KeyboardModifiers m_keyboardModifiers;
};
#include "helpviewer_qwv.moc"
// - HelpPage
HelpPage::HelpPage(QObject *parent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment