Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
c7c89a98
Commit
c7c89a98
authored
Jun 05, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url must be decode before sending the get request
parent
9f2e033d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
21 deletions
+4
-21
UBDownloadManager.cpp
src/core/UBDownloadManager.cpp
+4
-1
UBHttpGet.cpp
src/network/UBHttpGet.cpp
+0
-20
No files found.
src/core/UBDownloadManager.cpp
View file @
c7c89a98
...
...
@@ -306,8 +306,11 @@ void UBDownloadManager::startFileDownload(sDownloadFileDesc desc)
connect
(
http
,
SIGNAL
(
downloadProgress
(
int
,
qint64
,
qint64
)),
this
,
SLOT
(
onDownloadProgress
(
int
,
qint64
,
qint64
)));
connect
(
http
,
SIGNAL
(
downloadFinished
(
int
,
bool
,
QUrl
,
QString
,
QByteArray
,
QPointF
,
QSize
,
bool
)),
this
,
SLOT
(
onDownloadFinished
(
int
,
bool
,
QUrl
,
QString
,
QByteArray
,
QPointF
,
QSize
,
bool
)));
//the desc.url is encoded. So we have to decode it before.
QUrl
url
;
url
.
setEncodedUrl
(
desc
.
url
.
toUtf8
());
// We send here the request and store its reply in order to be able to cancel it if needed
mReplies
[
desc
.
id
]
=
http
->
get
(
QUrl
(
desc
.
url
)
,
desc
.
pos
,
desc
.
size
,
desc
.
isBackground
);
mReplies
[
desc
.
id
]
=
http
->
get
(
url
,
desc
.
pos
,
desc
.
size
,
desc
.
isBackground
);
}
/**
...
...
src/network/UBHttpGet.cpp
View file @
c7c89a98
...
...
@@ -65,26 +65,6 @@ QNetworkReply* UBHttpGet::get(QUrl pUrl, QPointF pPos, QSize pSize, bool isBackg
return
mReply
;
}
//QNetworkReply* UBHttpGet::get(const sDownloadFileDesc &downlinfo)
//{
// mDownloadInfo.size = downlinfo.size;
// mDownloadInfo.isBackground = downlinfo.isBackground;
// mDownloadInfo.pos = downlinfo.pos;
// if (mReply)
// delete mReply;
// UBNetworkAccessManager * nam = UBNetworkAccessManager::defaultAccessManager();
// mReply = nam->get(QNetworkRequest(QUrl(downlinfo.url))); //mReply deleted by this destructor
// mDownloadedBytes.clear();
// connect(mReply, SIGNAL(finished()), this, SLOT(requestFinished()));
// connect(mReply, SIGNAL(readyRead()), this, SLOT(readyRead()));
// connect(mReply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadProgressed(qint64, qint64)));
// return mReply;
//}
void
UBHttpGet
::
readyRead
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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