Commit 060150ae authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use QVariant::toUrl() over QVariant::value<QUrl>()

parent 8a94fff8
......@@ -1277,7 +1277,7 @@ QVariant FolderModel::data(const QModelIndex& index, int role) const
} else if (role == SelectedRole) {
return m_selectionModel->isSelected(index);
} else if (role == IsDirRole) {
const QUrl &url = data(index, UrlRole).value<QUrl>();
const QUrl &url = data(index, UrlRole).toUrl();
if (m_isDirCache.contains(url)) {
return m_isDirCache[url];
......@@ -1360,7 +1360,7 @@ void FolderModel::statResult(KJob *job)
{
KIO::StatJob *statJob = static_cast<KIO::StatJob*>(job);
const QUrl &url = statJob->property("org.kde.plasma.folder_url").value<QUrl>();
const QUrl &url = statJob->property("org.kde.plasma.folder_url").toUrl();
const QModelIndex &idx = index(indexForUrl(url), 0);
if (idx.isValid()) {
......
Supports Markdown
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