Qt 4.8
Functions
qdesktopservices_blackberry.cpp File Reference
#include <qurl.h>
#include <bps/navigator.h>
#include <qdir.h>

Go to the source code of this file.

Functions

static bool launchWebBrowser (const QUrl &url)
 
static bool navigatorInvoke (const QUrl &url)
 
static bool openDocument (const QUrl &file)
 

Function Documentation

◆ launchWebBrowser()

static bool launchWebBrowser ( const QUrl url)
static

Definition at line 60 of file qdesktopservices_blackberry.cpp.

Referenced by QDesktopServices::openUrl().

61 {
62  return navigatorInvoke(url);
63 }
static bool navigatorInvoke(const QUrl &url)

◆ navigatorInvoke()

static bool navigatorInvoke ( const QUrl url)
static

Definition at line 50 of file qdesktopservices_blackberry.cpp.

Referenced by launchWebBrowser(), and openDocument().

51 {
52  if (!url.isValid() || url.isRelative())
53  return false;
54 
55  int ret = navigator_invoke(url.toString().toUtf8(), 0);
56 
57  return (ret == BPS_SUCCESS);
58 }
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
Definition: qurl.cpp:4303
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
Definition: qurl.cpp:5896
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
Definition: qstring.cpp:4074
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition: qurl.cpp:5880

◆ openDocument()

static bool openDocument ( const QUrl file)
static

Definition at line 65 of file qdesktopservices_blackberry.cpp.

Referenced by QDesktopServices::openUrl(), and QPatternist::ResourceLoader::ResourceLoader().

66 {
67  return navigatorInvoke(file);
68 }
static bool navigatorInvoke(const QUrl &url)