blob: 05389d3ea6a18be4e91817531b5fcaa4a438cb9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (C) 2012 Research In Motion
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qqnxabstractnavigator.h"
#include <QDebug>
#include <QUrl>
#if defined(QQNXNAVIGATOR_DEBUG)
#define qNavigatorDebug qDebug
#else
#define qNavigatorDebug QT_NO_QDEBUG_MACRO
#endif
QT_BEGIN_NAMESPACE
QQnxAbstractNavigator::QQnxAbstractNavigator(QObject *parent)
: QObject(parent)
{
}
QQnxAbstractNavigator::~QQnxAbstractNavigator()
{
}
bool QQnxAbstractNavigator::invokeUrl(const QUrl &url)
{
if (!url.isValid() || url.isRelative())
return false;
// not using QUrl::toEncoded() because for e.g. camera:// it creates camera:
// which is not recognized by the navigator anymore
const bool result = requestInvokeUrl(url.toString().toUtf8());
qNavigatorDebug() << "url=" << url << "result=" << result;
return result;
}
QT_END_NAMESPACE
|