From 977552ea0792b2f56b7a4c1a6f585446c25617c2 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 18 Aug 2025 13:08:45 +0200 Subject: Use KFileItem::isExecutable() instead of creating a QFileInfo KFileItem can give us this information since 6.0, no need to create a QFileInfo and stat'ing the file again. --- src/dolphinviewcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 1b8791167..b60a15445 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -784,7 +784,7 @@ void DolphinViewContainer::slotfileMiddleClickActivated(const KFileItem &item) // executable scripts auto mimeType = item.currentMimeType(); if (item.isLocalFile() && mimeType.inherits(QStringLiteral("application/x-executable")) && mimeType.inherits(QStringLiteral("text/plain")) - && QFileInfo(item.localPath()).isExecutable()) { + && item.isExecutable()) { KConfigGroup cfgGroup(KSharedConfig::openConfig(QStringLiteral("kiorc")), QStringLiteral("Executable scripts")); const QString value = cfgGroup.readEntry("behaviourOnLaunch", "alwaysAsk"); -- cgit v1.3