You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
614 B
31 lines
614 B
14 years ago
|
|
||
|
#ifndef UBWEBPAGE_H_
|
||
|
#define UBWEBPAGE_H_
|
||
|
|
||
|
/*
|
||
|
* Use UBWebPage instead of QWebPage to log JavaScript console messages with qDebug
|
||
|
*/
|
||
|
|
||
|
#include <QtCore>
|
||
|
#include <QWebPage>
|
||
|
|
||
|
class UBWebPage : public QWebPage
|
||
|
{
|
||
|
Q_OBJECT;
|
||
|
|
||
|
public:
|
||
|
UBWebPage(QObject *parent = 0);
|
||
|
virtual ~UBWebPage();
|
||
|
|
||
|
virtual void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID);
|
||
|
|
||
|
virtual QString userAgentForUrl(const QUrl& url) const;
|
||
|
|
||
|
private:
|
||
|
QString mCachedUserAgentString;
|
||
|
QWebPluginFactory *mPluginFactory;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif /* UBWEBPAGE_H_ */
|