Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
27daa542
Commit
27daa542
authored
Jun 14, 2010
by
kh1
Browse files
We need to check for http only.
parent
6875a50d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/help/helpviewer_qtb.cpp
View file @
27daa542
...
...
@@ -144,20 +144,20 @@ QUrl HelpViewer::source() const
void
HelpViewer
::
setSource
(
const
QUrl
&
url
)
{
const
QString
&
scheme
=
url
.
scheme
();
if
(
scheme
!=
QLatin1String
(
"qthelp"
)
&&
scheme
!=
QLatin1String
(
"about"
))
{
QTextBrowser
::
setSource
(
resolvedUrl
);
emit
loadFinished
(
true
);
return
;
}
const
QString
&
string
=
url
.
toString
();
if
(
url
.
isValid
()
&&
string
!=
QLatin1String
(
"help"
))
{
if
(
launchWithExternalApp
(
url
))
return
;
const
QHelpEngineCore
&
engine
=
HelpManager
::
instance
().
helpEngineCore
();
const
QUrl
&
resolvedUrl
=
engine
.
findFile
(
url
);
QUrl
resolvedUrl
;
if
(
url
.
scheme
()
==
QLatin1String
(
"http"
))
resolvedUrl
=
url
;
if
(
!
resolvedUrl
.
isValid
())
{
const
QHelpEngineCore
&
engine
=
LocalHelpManager
::
helpEngine
();
resolvedUrl
=
engine
.
findFile
(
url
);
}
if
(
resolvedUrl
.
isValid
())
{
QTextBrowser
::
setSource
(
resolvedUrl
);
emit
loadFinished
(
true
);
...
...
src/plugins/help/helpviewer_qwv.cpp
View file @
27daa542
...
...
@@ -124,9 +124,10 @@ HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
QNetworkReply
*
HelpNetworkAccessManager
::
createRequest
(
Operation
op
,
const
QNetworkRequest
&
request
,
QIODevice
*
outgoingData
)
{
const
QString
&
scheme
=
request
.
url
()
.
scheme
();
if
(
scheme
!=
QLatin1String
(
"qthelp"
)
&&
scheme
!
=
QLatin1String
(
"
about
"
))
if
(
!
HelpViewer
::
isLocalUrl
(
request
.
url
()
)
&&
request
.
url
().
scheme
()
=
=
QLatin1String
(
"
http
"
))
{
return
QNetworkAccessManager
::
createRequest
(
op
,
request
,
outgoingData
);
}
QString
url
=
request
.
url
().
toString
();
const
QHelpEngineCore
&
engine
=
LocalHelpManager
::
helpEngine
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment