Commit f654da8b authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Explicitly construct QUrl

There's no automatic construction of QUrl
parent 84ec8019
......@@ -50,20 +50,20 @@ void KateAppAdaptor::activate ()
bool KateAppAdaptor::openUrl (QString url, QString encoding)
{
return m_app->openUrl (url, encoding, false);
return m_app->openUrl (QUrl(url), encoding, false);
}
bool KateAppAdaptor::openUrl (QString url, QString encoding, bool isTempFile)
{
qCDebug(LOG_KATE) << "openURL";
return m_app->openUrl (url, encoding, isTempFile);
return m_app->openUrl (QUrl(url), encoding, isTempFile);
}
//-----------
QString KateAppAdaptor::tokenOpenUrl (QString url, QString encoding)
{
KTextEditor::Document *doc=m_app->openDocUrl (url, encoding, false);
KTextEditor::Document *doc=m_app->openDocUrl (QUrl(url), encoding, false);
if (!doc) return QString("ERROR");
return QString("%1").arg((qptrdiff)doc);
}
......@@ -71,7 +71,7 @@ QString KateAppAdaptor::tokenOpenUrl (QString url, QString encoding)
QString KateAppAdaptor::tokenOpenUrl (QString url, QString encoding, bool isTempFile)
{
qCDebug(LOG_KATE) << "openURL";
KTextEditor::Document *doc=m_app->openDocUrl (url, encoding, isTempFile);
KTextEditor::Document *doc=m_app->openDocUrl (QUrl(url), encoding, isTempFile);
if (!doc) return QString("ERROR");
return QString("%1").arg((qptrdiff)doc);
}
......
......@@ -655,7 +655,7 @@ void KateMainWindow::slotListRecursiveEntries(KIO::Job *job, const KIO::UDSEntry
const QUrl dir = static_cast<KIO::SimpleJob*>( job )->url();
foreach( const KIO::UDSEntry &entry, list )
{
QUrl currentUrl = dir.resolved( entry.stringValue( KIO::UDSEntry::UDS_NAME ) );
QUrl currentUrl = dir.resolved( QUrl(entry.stringValue( KIO::UDSEntry::UDS_NAME )) );
if( !entry.isDir() )
{
......
......@@ -1269,7 +1269,7 @@ void KateFileTreeModel::setupIcon(ProxyItem *item)
icon_name = "document-save";
}
else {
QUrl url = item->path();
QUrl url(item->path());
icon_name = QMimeDatabase().mimeTypeForFile(url.path(), QMimeDatabase::MatchExtension).iconName();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment