naraesk / plasma-docker

Plasmoid for KDE Plasma to control docker containers
https://store.kde.org/p/1198473/
GNU General Public License v3.0
43 stars 4 forks source link

It can not open file after clicking edit file #13

Open Zesko opened 3 years ago

Zesko commented 3 years ago

But the Edit file icon is invisible in the widget. If you click this icon of Edit file, then it shows the error-dialog:

Malformed URL
/home/zesko/Documents/test.yml

Operating System: Manjaro Linux KDE Plasma Version: 5.22.3 KDE Frameworks Version: 5.84.0 Qt Version: 5.15.2 Kernel Version: 5.4.131-1-MANJARO (64-bit) Graphics Platform: X11

Zesko commented 3 years ago

The file StackDelegate.qml:

        ToolButton {
            id: editButton;
            icon.name: "edit";  // ----> It is not available in KDE icons list.
            icon.width: units.iconSizes.small;
            icon.height: units.iconSizes.small;
            ToolTip.text: qsTr("Edit file");
            ToolTip.visible: hovered;
            onClicked: stackProcess.editFile(composeFile); // ---> It does not work for me.
        }

You can change icon.name: "edit"; to icon.name: "edittext";. And Can you fix the codeline onClicked: stackProcess.editFile(composeFile); ?

Zesko commented 3 years ago

The file process.cpp

void Process::editFile(const QString &file) {
    KRun::runUrl(file, "application/x-yaml", 0, KRun::RunFlags()); // It does not work for me
}

Can you change it to start("xdg-open", file)? xdg-utilsis already installed in many Linux distros.