mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +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
|
||||
|
||||
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()) {
|
||||
return QByteArray("application/octet-stream");
|
||||
return QString::fromLatin1("application/octet-stream");
|
||||
}
|
||||
return splitcontenttype.at(0);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ void HttpProtocol::slotMIME()
|
|||
char *curlcontenttype = nullptr;
|
||||
CURLcode curlresult = curl_easy_getinfo(m_curl, CURLINFO_CONTENT_TYPE, &curlcontenttype);
|
||||
if (curlresult == CURLE_OK) {
|
||||
const QByteArray httpmimetype = HTTPMIMEType(QByteArray(curlcontenttype));
|
||||
const QString httpmimetype = HTTPMIMEType(QString::fromAscii(curlcontenttype));
|
||||
kDebug(7103) << "MIME type" << httpmimetype;
|
||||
emit mimeType(httpmimetype);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue