Do not use libcurl for reading local files
We originally used libcurl for both downloading images from Internet and reading local files to have the same code path for both. It doesn't work that well in practice, as Qt and libcurl are not on the same page how special characters such as Chinese characters are represented in a local file URL. So create a new class to handle local files. Closes #76
This commit is contained in:
@@ -382,12 +382,12 @@ int DownloadExtractThread::_on_close(struct archive *)
|
||||
// static callback functions that call object oriented equivalents
|
||||
ssize_t DownloadExtractThread::_archive_read(struct archive *a, void *client_data, const void **buff)
|
||||
{
|
||||
return static_cast<DownloadExtractThread *>(client_data)->_on_read(a, buff);
|
||||
return qobject_cast<DownloadExtractThread *>((QObject *) client_data)->_on_read(a, buff);
|
||||
}
|
||||
|
||||
int DownloadExtractThread::_archive_close(struct archive *a, void *client_data)
|
||||
{
|
||||
return static_cast<DownloadExtractThread *>(client_data)->_on_close(a);
|
||||
return qobject_cast<DownloadExtractThread *>((QObject *) client_data)->_on_close(a);
|
||||
}
|
||||
|
||||
bool DownloadExtractThread::isImage()
|
||||
|
Reference in New Issue
Block a user