summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonatan PÃ¥lsson <jonatan.palsson@pelagicore.com>2014-01-27 17:16:15 +0100
committerJonatan PÃ¥lsson <jonatan.palsson@pelagicore.com>2014-01-27 17:16:15 +0100
commit6b4c6477a8ada202acba536278e5cea07e90322e (patch)
treea894f5b11a2620765b67911c624f9f673dde6835
parent42a3f04658080715c2dfc4ef7007d8a4c6c72f6b (diff)
downloadbrowser-poc-6b4c6477a8ada202acba536278e5cea07e90322e.tar.gz
Re-generated webpageview interface from XML
-rw-r--r--browser/browserview.h2
-rw-r--r--browser/unit-tests/testbrowser.cpp218
-rw-r--r--browser/unit-tests/testbrowser.h2
-rw-r--r--browser/webpagewindow.cpp33
-rw-r--r--browser/webpagewindow.h13
-rw-r--r--common/IWebPageWindow.xml292
-rw-r--r--common/browserdbus.cpp14
7 files changed, 368 insertions, 206 deletions
diff --git a/browser/browserview.h b/browser/browserview.h
index e4cac45..d0c9d4b 100644
--- a/browser/browserview.h
+++ b/browser/browserview.h
@@ -51,7 +51,7 @@ public:
BrowserView();
bool load(const QString &a_Url);
int getProgress() { return m_currentProgress; }
- QString getURL() { return m_webview.url().toString(); }
+ QString getUrl() { return m_webview.url().toString(); }
const QString getTitle() { return m_webview.title(); }
void goBack() { m_webview.back(); }
void goForward() { m_webview.forward(); }
diff --git a/browser/unit-tests/testbrowser.cpp b/browser/unit-tests/testbrowser.cpp
index a2b98a0..7db92dc 100644
--- a/browser/unit-tests/testbrowser.cpp
+++ b/browser/unit-tests/testbrowser.cpp
@@ -11,126 +11,168 @@
void TestBrowser::testCanCreate()
{
- BrowserView *bvi = new BrowserView();
- QVERIFY (bvi);
+ BrowserView *bvi = new BrowserView();
+ QVERIFY (bvi);
}
void TestBrowser::testCanLoadWebpage()
{
- /*
- FIXME: It seems like the pageLoadStarted signal is not triggered
- correctly
- */
- BrowserView bvi;
+ /*
+ FIXME: It seems like the pageLoadStarted signal is not triggered
+ correctly
+ */
+ BrowserView bvi;
- bvi.show();
+ bvi.show();
- QSignalSpy spy (&bvi, SIGNAL(pageLoadStarted()));
- bvi.load("http://www.pelagicore.com");
- QVERIFY (spy.wait(1000));
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadStarted()));
+ bvi.load("http://www.pelagicore.com");
+ QVERIFY (spy.wait(1000));
}
void TestBrowser::testCanFinishLoadingWebpage()
{
- BrowserView bvi;
+ BrowserView bvi;
- bvi.show();
+ bvi.show();
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- bvi.load("http://www.pelagicore.com");
- QVERIFY (spy.wait(10000));
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ bvi.load("http://www.pelagicore.com");
+ QVERIFY (spy.wait(10000));
}
void TestBrowser::testProgressIncreases ()
{
- BrowserView bvi;
- QSignalSpy spy (&bvi, SIGNAL(pageLoadProgress(int)));
+ BrowserView bvi;
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadProgress(int)));
- bvi.load("http://www.pelagicore.com");
- bvi.show();
+ bvi.load("http://www.pelagicore.com");
+ bvi.show();
- spy.wait(1000);
- float prg = bvi.getProgress();
- QVERIFY(prg > 0);
+ spy.wait(1000);
+ float prg = bvi.getProgress();
+ QVERIFY(prg > 0);
}
void TestBrowser::testBack ()
{
- BrowserView bvi;
- bvi.show();
-
- bvi.load("http://www.pelagicore.com");
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(10000));
- }
-
- bvi.load("http://www.google.com");
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
-
- bvi.goBack();
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
-
- QVERIFY(bvi.getURL().contains("pelagicore"));
+ BrowserView bvi;
+ bvi.show();
+
+ bvi.load("http://www.pelagicore.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(10000));
+ }
+
+ bvi.load("http://www.google.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+
+ bvi.goBack();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+
+ QVERIFY(bvi.getUrl().contains("pelagicore"));
}
void TestBrowser::testForward ()
{
- BrowserView bvi;
- bvi.show();
-
- bvi.load("http://www.pelagicore.com");
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
- QVERIFY(bvi.getURL().contains("pelagicore"));
-
- bvi.load("http://www.google.com");
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
-
- bvi.goBack();
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
- bvi.goForward();
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
-
- QVERIFY(bvi.getURL().contains("google"));
+ BrowserView bvi;
+ bvi.show();
+
+ bvi.load("http://www.pelagicore.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+ QVERIFY(bvi.getUrl().contains("pelagicore"));
+
+ bvi.load("http://www.google.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+
+ bvi.goBack();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+ bvi.goForward();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+
+ QVERIFY(bvi.getUrl().contains("google"));
}
void TestBrowser::testReload ()
{
- BrowserView bvi;
- bvi.show();
-
- bvi.load("http://www.pelagicore.com");
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
- bvi.pageReload();
- {
- QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
- QVERIFY(spy.wait(1000));
- }
-
- QVERIFY(bvi.getURL().contains("pelagicore"));
+ BrowserView bvi;
+ bvi.show();
+
+ bvi.load("http://www.pelagicore.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+ bvi.pageReload();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ QVERIFY(spy.wait(1000));
+ }
+
+ QVERIFY(bvi.getUrl().contains("pelagicore"));
}
//void TestBrowser::testStop () {} //FIXME: How should this be tested..?
+void TestBrowser::testGetTitle()
+{
+ BrowserView bvi;
+ QString before = "";
+ QString after = "";
+ bvi.show();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ spy.wait(1000);
+ }
+
+ before = bvi.getTitle();
+ bvi.load("http://www.pelagicore.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ spy.wait(1000);
+ }
+ after = bvi.getTitle();
+ QVERIFY (before.compare(after) != 0);
+}
+
+void TestBrowser::testGetUrl()
+{
+ BrowserView bvi;
+ QString before = "";
+ QString after = "";
+ bvi.show();
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ spy.wait(1000);
+ }
+
+ before = bvi.getUrl();
+ bvi.load("http://www.pelagicore.com");
+ {
+ QSignalSpy spy (&bvi, SIGNAL(pageLoadFinished(bool)));
+ spy.wait(1000);
+ }
+ after = bvi.getUrl();
+ QVERIFY (before.compare(after) != 0);
+}
+
QTEST_MAIN (TestBrowser);
diff --git a/browser/unit-tests/testbrowser.h b/browser/unit-tests/testbrowser.h
index 271be7b..6d6cc54 100644
--- a/browser/unit-tests/testbrowser.h
+++ b/browser/unit-tests/testbrowser.h
@@ -12,4 +12,6 @@ private slots:
void testBack();
void testForward();
void testReload();
+ void testGetTitle();
+ void testGetUrl();
};
diff --git a/browser/webpagewindow.cpp b/browser/webpagewindow.cpp
index 6023ef3..417b90b 100644
--- a/browser/webpagewindow.cpp
+++ b/browser/webpagewindow.cpp
@@ -45,12 +45,20 @@ void webpagewindow::reportprogress() {
}
void webpagewindow::getUrlTitle() {
- qDebug() << webitem->getURL() << webitem->getTitle();
+ qDebug() << webitem->getUrl() << webitem->getTitle();
- localurl = webitem->getURL();
+ localurl = webitem->getUrl();
localtitle = webitem->getTitle();
}
+conn::brw::ERROR_IDS webpagewindow::activate() {
+ return conn::brw::EID_NOT_IMPLEMENTED;
+}
+
+conn::brw::ERROR_IDS webpagewindow::getPageIcon(QString iconPath, QString iconFilePath) {
+ return conn::brw::EID_NOT_IMPLEMENTED;
+}
+
conn::brw::ERROR_IDS webpagewindow::back() {
qDebug() << __PRETTY_FUNCTION__;
@@ -161,7 +169,6 @@ conn::brw::ERROR_IDS webpagewindow::scroll(conn::brw::SCROLL_DIRECTION a_eScroll
emit setOutputWebview(message().path());
-
webitem->scroll(a_eScrollDirection, a_eScrollType);
return conn::brw::EID_NO_ERROR;
}
@@ -192,12 +199,28 @@ conn::brw::ERROR_IDS webpagewindow::stop() {
return conn::brw::EID_NO_ERROR;
}
-conn::brw::ERROR_IDS webpagewindow::getCurrentUrlTitle(QString &url, QString &title) {
+// FIXME: API doesn't match XML
+QString webpagewindow::getTitle() {
qDebug() << __PRETTY_FUNCTION__;
+/* FIXME: These used to be reference parameters
url = localurl;
title = localtitle;
+*/
emit urlTitleReady();
- return conn::brw::EID_NO_ERROR;
+ return "conn::brw::EID_NO_ERROR";
}
+
+QString webpagewindow::getUrl() {
+ return "not implemented";
+}
+
+
+conn::brw::ERROR_IDS getScrollPosition(int &posX, int &posY) { }
+double webpagewindow::getZoomFactor() {}
+conn::brw::ERROR_IDS webpagewindow::getScrollPosition(uint &posX, uint &posY) {}
+conn::brw::ERROR_IDS webpagewindow::setScrollPosition(uint &posX, uint &posY) {}
+conn::brw::ERROR_IDS webpagewindow::select(){}
+conn::brw::ERROR_IDS webpagewindow::setZoomFactor(double &zoomFactor) {}
+
diff --git a/browser/webpagewindow.h b/browser/webpagewindow.h
index 2bbb83e..d222272 100644
--- a/browser/webpagewindow.h
+++ b/browser/webpagewindow.h
@@ -51,7 +51,18 @@ public Q_SLOTS:
conn::brw::ERROR_IDS setGeometry(const conn::brw::Rect & a_sRect);
conn::brw::ERROR_IDS setVisible(bool a_bVisible);
conn::brw::ERROR_IDS stop();
- conn::brw::ERROR_IDS getCurrentUrlTitle(QString &url, QString &title);
+ conn::brw::ERROR_IDS activate();
+ conn::brw::ERROR_IDS getPageIcon(QString iconPath, QString iconFilePath);
+
+ conn::brw::ERROR_IDS getScrollPosition(uint &posX, uint &posY);
+ QString getTitle();
+ QString getUrl();
+
+ double getZoomFactor();
+ conn::brw::ERROR_IDS select();
+ conn::brw::ERROR_IDS setScrollPosition(uint &posX, uint &posY);
+ conn::brw::ERROR_IDS setZoomFactor(double &zoomFactor);
+
void browserStartLoading();
void reportprogress();
diff --git a/common/IWebPageWindow.xml b/common/IWebPageWindow.xml
index fbd5fed..9f41f7f 100644
--- a/common/IWebPageWindow.xml
+++ b/common/IWebPageWindow.xml
@@ -1,105 +1,187 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-
-<node>
- <interface name="conn.brw.IWebPageWindow">
- <version>1.0.0</version>
-
- <doc>
- <line>Page view</line>
- </doc>
-
- <method name="getBrowserActionsState">
- <arg name="retval" type="(i)" direction="out"/>
- <arg name="a_browserActionsState" type="(yyyyyyy(yyyy)(yyyy)(yyyy))" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="conn::brw::BrowserActions" />
- </method>
-
- <method name="getContentSize">
- <arg name="retval" type="(i)" direction="out"/>
- <arg name="a_u32Width" type="u" direction="out"/>
- <arg name="a_u32Height" type="u" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="getGeometry">
- <arg name="retval" type="(i)" direction="out"/>
- <arg name="a_sRect" type="(iiii)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="conn::brw::Rect" />
- </method>
-
- <method name="setGeometry">
- <arg name="a_sRect" type="(iiii)" direction="in"/>
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::Rect &amp;" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="getVisible">
- <arg name="retval" type="b" direction="out"/>
- </method>
-
- <method name="setVisible">
- <arg name="a_bVisible" type="b" direction="in"/>
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="load">
- <arg name="a_Url" type="s" direction="in"/>
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="back">
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="forward">
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="reload">
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="stop">
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="scroll">
- <arg name="a_eScrollDirection" type="(i)" direction="in"/>
- <arg name="a_eScrollType" type="(i)" direction="in"/>
- <arg name="retval" type="(i)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="conn::brw::SCROLL_DIRECTION" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="conn::brw::SCROLL_TYPE" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <method name="getCurrentUrlTitle">
- <arg name="retval" type="(i)" direction="out"/>
- <arg name="strCurrentUrl" type="s" direction="out"/>
- <arg name="strCurrentTitle" type="s" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
- </method>
-
- <signal name="onLoadStarted">
- </signal>
-
- <signal name="onLoadProgress">
- <arg name="a_i32Progress" type="i"/>
- </signal>
-
- <signal name="onLoadFinished">
- <arg name="a_fState" type="b"/>
- </signal>
-
- <signal name="onClose"/>
-
- </interface>
-</node>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<node>
+ <interface name="conn.brw.IWebPageWindow">
+ <version>1.0.0</version>
+
+ <doc>
+ <line>Page view</line>
+ </doc>
+
+ <method name="getBrowserActionsState">
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_browserActionsState" type="(yyyyyyy(yyyy)(yyyy)(yyyy))" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="conn::brw::BrowserActions" />
+ </method>
+
+ <method name="getContentSize">
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_u32Width" type="u" direction="out"/>
+ <arg name="a_u32Height" type="u" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="getGeometry">
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_sRect" type="(iiii)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="conn::brw::Rect" />
+ </method>
+
+ <method name="setGeometry">
+ <arg name="a_sRect" type="(iiii)" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const conn::brw::Rect &amp;" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="getScrollPosition">
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_u32ScrollPosX" type="u" direction="out"/>
+ <arg name="a_u32ScrollPosY" type="u" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="setScrollPosition">
+ <arg name="a_u32ScrollPosX" type="u" direction="in"/>
+ <arg name="a_u32ScrollPosY" type="u" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="getPageIcon">
+ <arg name="a_strIconPath" type="s" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <arg name="a_strIconFilePath" type="s" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="activate">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="getVisible">
+ <arg name="retval" type="b" direction="out"/>
+ </method>
+
+ <method name="setVisible">
+ <arg name="a_bVisible" type="b" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="getTitle">
+ <arg name="retval" type="s" direction="out"/>
+ </method>
+
+ <method name="getUrl">
+ <arg name="retval" type="s" direction="out"/>
+ </method>
+
+ <method name="getZoomFactor">
+ <arg name="retval" type="d" direction="out"/>
+ </method>
+
+ <method name="setZoomFactor">
+ <arg name="a_fZoomFactor" type="d" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="load">
+ <arg name="a_Url" type="s" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="back">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="forward">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="reload">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="stop">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="select">
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <method name="scroll">
+ <arg name="a_eScrollDirection" type="(i)" direction="in"/>
+ <arg name="a_eScrollType" type="(i)" direction="in"/>
+ <arg name="retval" type="(i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="conn::brw::SCROLL_DIRECTION" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="conn::brw::SCROLL_TYPE" />
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="conn::brw::ERROR_IDS" />
+ </method>
+
+ <signal name="onActionStateChanged">
+ <arg name="a_u32BrowserActionsChanageMask" type="u"/>
+ </signal>
+
+ <signal name="onContentSizeChanged">
+ <arg name="a_u32Width" type="u"/>
+ <arg name="a_u32Height" type="u"ß/>
+ </signal>
+
+ <signal name="onScrollPositionChanged">
+ <arg name="a_u32ScrollPosX" type="u"/>
+ <arg name="a_u32ScrollPosY" type="u"/>
+ </signal>
+
+ <signal name="onVisibilityChanged">
+ <arg name="a_bVisibility" type="b"/>
+ </signal>
+
+ <signal name="onZoomFactorChanged">
+ <arg name="a_fZoomFactor" type="d"/>
+ </signal>
+
+ <signal name="onLinkClicked">
+ <arg name="a_strUrl" type="s"/>
+ </signal>
+
+ <signal name="onLoadStarted">
+ </signal>
+
+ <signal name="onLoadProgress">
+ <arg name="a_i32Progress" type="i"/>
+ </signal>
+
+ <signal name="onLoadFinished">
+ <arg name="a_fState" type="b"/>
+ </signal>
+
+ <signal name="onTitleChanged">
+ <arg name="a_strTitle" type="s"/>
+ </signal>
+
+ <signal name="onStatusTextChanged">
+ <arg name="a_strText" type="s"/>
+ </signal>
+
+ <signal name="onUrlChanged">
+ <arg name="a_strUrl" type="s"/>
+ </signal>
+
+ <signal name="onSelectionChanged"/>
+
+ <signal name="onClose"/>
+
+ </interface>
+</node>
diff --git a/common/browserdbus.cpp b/common/browserdbus.cpp
index 3b2d740..c0f5d80 100644
--- a/common/browserdbus.cpp
+++ b/common/browserdbus.cpp
@@ -508,12 +508,14 @@ void BrowserDbus::WindowClosed() {
void BrowserDbus::getCurrentUrlAndTitle() {
qDebug() << __PRETTY_FUNCTION__;
- QDBusPendingReply<conn::brw::ERROR_IDS, QString, QString> reply = actualtab->getCurrentUrlTitle();
- reply.waitForFinished();
- if(reply.isValid()) {
- conn::brw::ERROR_IDS ret = reply.value();
- setUrl(reply.argumentAt<1>());
- setTitle(reply.argumentAt<2>());
+ QDBusPendingReply<conn::brw::ERROR_IDS, QString> replyUrl = actualtab->getUrl();
+ QDBusPendingReply<conn::brw::ERROR_IDS, QString> replyTitle = actualtab->getTitle();
+ replyUrl.waitForFinished();
+ replyTitle.waitForFinished();
+ if(replyUrl.isValid()) {
+ conn::brw::ERROR_IDS ret = replyUrl.value();
+ setUrl(replyUrl.argumentAt<1>());
+ setTitle(replyTitle.argumentAt<1>());
qDebug() << __PRETTY_FUNCTION__ << ret << url() << title();
}