diff --git a/model/foldermodel.cpp b/model/foldermodel.cpp index 895ca4c..94486b2 100644 --- a/model/foldermodel.cpp +++ b/model/foldermodel.cpp @@ -716,6 +716,24 @@ void FolderModel::openSelected() for (const QUrl &url : urls) { KFileItem item(url); + QString mimeType = item.mimetype(); + + // runnable + if (mimeType == "application/x-executable" || + mimeType == "application/x-sharedlib" || + mimeType == "application/x-iso9660-appimage" || + mimeType == "application/vnd.appimage") { + QFileInfo fileInfo(url.toLocalFile()); + if (!fileInfo.isExecutable()) { + QFile file(url.toLocalFile()); + file.setPermissions(file.permissions() | QFile::ExeOwner | QFile::ExeUser | QFile::ExeGroup | QFile::ExeOther); + } + + FileLauncher::self()->launchExecutable(url.toLocalFile()); + + continue; + } + QString defaultAppDesktopFile = m_mimeAppManager->getDefaultAppByMimeType(item.currentMimeType()); // If no default application is found, diff --git a/qml/FolderPage.qml b/qml/FolderPage.qml index 3e1382d..c6da573 100644 --- a/qml/FolderPage.qml +++ b/qml/FolderPage.qml @@ -179,7 +179,7 @@ Item { } Item { - visible: settings.viewMethod === 0 + visible: true height: statusBarHeight } }