mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kioslave: the argument of SlaveBase::mimeType() is of QString type
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
432062e14f
commit
26b5f5f341
1 changed files with 4 additions and 4 deletions
|
@ -27,11 +27,11 @@
|
||||||
|
|
||||||
// TODO: PropagateHttpHeader, charset, modified, accept and maybe caching
|
// TODO: PropagateHttpHeader, charset, modified, accept and maybe caching
|
||||||
|
|
||||||
static inline QByteArray HTTPMIMEType(const QByteArray &contenttype)
|
static inline QString HTTPMIMEType(const QString &contenttype)
|
||||||
{
|
{
|
||||||
const QList<QByteArray> splitcontenttype = contenttype.split(';');
|
const QList<QString> splitcontenttype = contenttype.split(QLatin1Char(';'));
|
||||||
if (splitcontenttype.isEmpty()) {
|
if (splitcontenttype.isEmpty()) {
|
||||||
return QByteArray("application/octet-stream");
|
return QString::fromLatin1("application/octet-stream");
|
||||||
}
|
}
|
||||||
return splitcontenttype.at(0);
|
return splitcontenttype.at(0);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ void HttpProtocol::slotMIME()
|
||||||
char *curlcontenttype = nullptr;
|
char *curlcontenttype = nullptr;
|
||||||
CURLcode curlresult = curl_easy_getinfo(m_curl, CURLINFO_CONTENT_TYPE, &curlcontenttype);
|
CURLcode curlresult = curl_easy_getinfo(m_curl, CURLINFO_CONTENT_TYPE, &curlcontenttype);
|
||||||
if (curlresult == CURLE_OK) {
|
if (curlresult == CURLE_OK) {
|
||||||
const QByteArray httpmimetype = HTTPMIMEType(QByteArray(curlcontenttype));
|
const QString httpmimetype = HTTPMIMEType(QString::fromAscii(curlcontenttype));
|
||||||
kDebug(7103) << "MIME type" << httpmimetype;
|
kDebug(7103) << "MIME type" << httpmimetype;
|
||||||
emit mimeType(httpmimetype);
|
emit mimeType(httpmimetype);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue