Changed the old code to work as a daemon
[googlelatitude] / src / daemon / customuseragentpage.h
diff --git a/src/daemon/customuseragentpage.h b/src/daemon/customuseragentpage.h
new file mode 100644 (file)
index 0000000..6dddd1d
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef CUSTOMUSERAGENTPAGE_H
+#define CUSTOMUSERAGENTPAGE_H
+
+#include <QWebPage>
+
+class customUAPage : public QWebPage
+{
+    Q_OBJECT
+
+public:
+    customUAPage(QObject* parent = 0) : QWebPage(parent) {}
+
+protected:
+    QString userAgentForUrl(const QUrl &url ) const
+        {return QString("Mozilla/5.0 (%Platform%; %Security%; %Subplatform%; %Locale%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Mobile");}
+
+};
+
+#endif // CUSTOMUSERAGENTPAGE_H