diff options
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 19 | ||||
| -rw-r--r-- | src/kitemviews/kfileitemmodelrolesupdater.cpp | 2 | ||||
| -rw-r--r-- | src/kitemviews/private/kbaloorolesprovider.cpp | 2 |
3 files changed, 5 insertions, 18 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index bbe725dfd..b71a4325b 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -17,7 +17,6 @@ #include <KIO/Job> #include <KLocalizedString> #include <KUrlMimeData> -#include <kio_version.h> #include <QElapsedTimer> #include <QIcon> @@ -263,11 +262,7 @@ void KFileItemModel::setShowTrashMime(bool show) void KFileItemModel::setShowHiddenFiles(bool show) { -#if KIO_VERSION < QT_VERSION_CHECK(5, 100, 0) - m_dirLister->setShowingDotFiles(show); -#else m_dirLister->setShowHiddenFiles(show); -#endif setShowTrashMime(show); m_dirLister->emitChanges(); if (show) { @@ -277,11 +272,7 @@ void KFileItemModel::setShowHiddenFiles(bool show) bool KFileItemModel::showHiddenFiles() const { -#if KIO_VERSION < QT_VERSION_CHECK(5, 100, 0) - return m_dirLister->showingDotFiles(); -#else return m_dirLister->showHiddenFiles(); -#endif } void KFileItemModel::setShowDirectoriesOnly(bool enabled) @@ -624,9 +615,7 @@ bool KFileItemModel::setExpanded(int index, bool expanded) m_expandedDirs.remove(targetUrl); m_dirLister->stop(url); -#if KIO_VERSION >= QT_VERSION_CHECK(5, 92, 0) m_dirLister->forgetDirs(url); -#endif const int parentLevel = expandedParentsCount(index); const int itemCount = m_itemData.count(); @@ -642,9 +631,7 @@ bool KFileItemModel::setExpanded(int index, bool expanded) const QUrl url = itemData->item.url(); m_expandedDirs.remove(targetUrl); m_dirLister->stop(url); // TODO: try to unit-test this, see https://bugs.kde.org/show_bug.cgi?id=332102#c11 -#if KIO_VERSION >= QT_VERSION_CHECK(5, 92, 0) m_dirLister->forgetDirs(url); -#endif expandedChildren.append(targetUrl); } ++childIndex; @@ -2606,7 +2593,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeUser)) { user += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.count() - 2); + user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.length() - 2); // Set group string QString group; @@ -2619,7 +2606,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeGroup)) { group += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.count() - 2); + group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.length() - 2); // Set others string QString others; @@ -2632,7 +2619,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeOther)) { others += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.count() - 2); + others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.length() - 2); const QString newGroupValue = i18nc("@title:group Files and folders by permissions", "User: %1 | Group: %2 | Others: %3", user, group, others); if (newGroupValue != groupValue) { diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index bd4bd7e51..6c660e952 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -119,7 +119,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel *model, QO m_directoryContentsCounter = new KDirectoryContentsCounter(m_model, this); connect(m_directoryContentsCounter, &KDirectoryContentsCounter::result, this, &KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived); - const QString pluginNamespace = QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/overlayicon"); + const QString pluginNamespace = QStringLiteral("kf" QT_STRINGIFY(QT_MAJOR_VERSION)) + QStringLiteral("/overlayicon"); const auto plugins = KPluginMetaData::findPlugins(pluginNamespace, {}, KPluginMetaData::AllowEmptyMetaData); for (const KPluginMetaData &data : plugins) { auto instance = QPluginLoader(data.fileName()).instance(); diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp index 4cf36eb2d..d0632e2c5 100644 --- a/src/kitemviews/private/kbaloorolesprovider.cpp +++ b/src/kitemviews/private/kbaloorolesprovider.cpp @@ -112,7 +112,7 @@ QHash<QByteArray, QVariant> KBalooRolesProvider::roleValues(const Baloo::File &f }); values.insert(role, propertyInfo.formatAsDisplayString(list)); } else { - if (propertyInfo.valueType() == QVariant::DateTime) { + if (propertyInfo.valueType() == QMetaType::Type::QDateTime) { // Let dolphin format later Dates values.insert(role, (*rangeBegin).second); } else { |
