append $SWISSSURFER_USERAGENT to user agent; refs #88
This commit is contained in:
@@ -19,8 +19,9 @@ class WebPage: public QWebPage {
|
||||
protected:
|
||||
virtual QWebPage* createWindow(WebWindowType type);
|
||||
virtual QString userAgentForUrl(const QUrl& url) const {
|
||||
return QProcessEnvironment::systemEnvironment()
|
||||
.value("SWISSSURFER_USERAGENT", QWebPage::userAgentForUrl(url));
|
||||
QString add(QProcessEnvironment::systemEnvironment()
|
||||
.value("SWISSSURFER_USERAGENT"));
|
||||
return QWebPage::userAgentForUrl(url)+(add.size()?" "+add:QString());
|
||||
}
|
||||
private:
|
||||
Browser* _browser;
|
||||
|
Reference in New Issue
Block a user