summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxservices.cpp
diff options
context:
space:
mode:
authorKevin Krammer <kevin.krammer.qnx@kdab.com>2012-04-11 13:25:28 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-26 15:21:46 +0200
commit8c59e22538b54c9170376bf22e2e6be054b38454 (patch)
tree2c3bea3ea20d1bbe2ebbd2f84b3dd268c1d7bc7f /src/plugins/platforms/qnx/qqnxservices.cpp
parent99a620d2e2d5225f2b5e29d52617a8a5328081fd (diff)
Create interface for navigator calls and implement for BPS and PPS
Makes QQnxServices available on non-BPS systems by delegating to an interface which is implemented on systems with BPS using the currenly used navigator API and on systems without BPS by sending an appropriate message to the navigator's PPS service interface. Change-Id: I0e32fb11e6debb7b7b4693c0bc02af4f75ee2162 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxservices.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxservices.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/plugins/platforms/qnx/qqnxservices.cpp b/src/plugins/platforms/qnx/qqnxservices.cpp
index a1a27906ae..b02dd25527 100644
--- a/src/plugins/platforms/qnx/qqnxservices.cpp
+++ b/src/plugins/platforms/qnx/qqnxservices.cpp
@@ -41,21 +41,17 @@
#include "qqnxservices.h"
-#include <bps/navigator.h>
-#include <stdbool.h>
-#include <sys/platform.h>
-#include <QUrl>
+#include "qqnxabstractnavigator.h"
QT_BEGIN_NAMESPACE
-QQnxServices::QQnxServices()
+QQnxServices::QQnxServices(QQnxAbstractNavigator *navigator)
+ : m_navigator(navigator)
{
- bps_initialize();
}
QQnxServices::~QQnxServices()
{
- bps_shutdown();
}
bool QQnxServices::openUrl(const QUrl &url)
@@ -70,12 +66,7 @@ bool QQnxServices::openDocument(const QUrl &url)
bool QQnxServices::navigatorInvoke(const QUrl &url)
{
- if (!url.isValid() || url.isRelative())
- return false;
-
- int ret = navigator_invoke(url.toString().toUtf8(), 0);
-
- return (ret == BPS_SUCCESS);
+ return m_navigator->invokeUrl(url);
}
QT_END_NAMESPACE