Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqnxabstractnavigator.cpp
Go to the documentation of this file.
1// Copyright (C) 2012 Research In Motion
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QDebug>
7#include <QUrl>
8
10
11Q_LOGGING_CATEGORY(lcQpaQnxNavigator, "qt.qpa.qnx.navigator");
12
17
21
23{
24 if (!url.isValid() || url.isRelative())
25 return false;
26
27 // not using QUrl::toEncoded() because for e.g. camera:// it creates camera:
28 // which is not recognized by the navigator anymore
29 const bool result = requestInvokeUrl(url.toString().toUtf8());
30
31 qCDebug(lcQpaQnxNavigator) << Q_FUNC_INFO << "url =" << url << "result =" << result;
32
33 return result;
34}
35
\inmodule QtCore
Definition qobject.h:103
bool invokeUrl(const QUrl &url)
QQnxAbstractNavigator(QObject *parent=nullptr)
virtual bool requestInvokeUrl(const QByteArray &encodedUrl)=0
QByteArray toUtf8() const &
Definition qstring.h:634
\inmodule QtCore
Definition qurl.h:94
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition qurl.cpp:2800
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
Definition qurl.cpp:1882
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
Definition qurl.cpp:2831
Combined button and popup list for selecting options.
#define Q_FUNC_INFO
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
GLuint64EXT * result
[6]
QUrl url("example.com")
[constructor-url-reference]