Skip to content

Commit 5d9d070

Browse files
committed
Update for KDE Plasma 6 and Qt6
1 parent ab333ea commit 5d9d070

File tree

5 files changed

+38
-31
lines changed

5 files changed

+38
-31
lines changed

build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
# Version 4
33

4-
plasmoidName=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Name")
4+
plasmoidName=$(jq -r '.KPlugin.Id' "$PWD/package/metadata.json")
55
plasmoidName="${plasmoidName##*.}" # Strip namespace (Eg: "org.kde.plasma.")
6-
plasmoidVersion=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Version")
6+
plasmoidVersion=$(jq -r '.KPlugin.Version' "$PWD/package/metadata.json")
77
rm ${plasmoidName}-v*.plasmoid
88
cd package
99
filename=${plasmoidName}-v${plasmoidVersion}.plasmoid

install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
# Version 2
33

4-
kpackagetool5 -t Plasma/Applet -i package
4+
kpackagetool6 -t Plasma/Applet -i package

package/contents/ui/main.qml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@
1717
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
1818
***************************************************************************/
1919

20-
import QtQuick 2.0
20+
import QtQuick 2.15
2121
import QtQuick.Layouts 1.1
22-
import QtQuick.Controls 1.2
22+
import QtQuick.Controls
2323

24-
import org.kde.plasma.plasmoid 2.0
25-
import org.kde.plasma.core 2.0 as PlasmaCore
26-
import org.kde.plasma.components 2.0 as PlasmaComponents
24+
import org.kde.plasma.plasmoid
25+
import org.kde.plasma.core as PlasmaCore
26+
import org.kde.plasma.components as PlasmaComponents
27+
import org.kde.plasma.plasma5support as Plasma5Support
2728

28-
import QMLTermWidget 1.0
29+
import QMLTermWidget
2930

3031

3132
import "../code/utils.js" as Utils
3233

33-
Item{
34+
PlasmoidItem {
3435
id: main
3536

3637
width: plasmoid.configuration.width
@@ -39,10 +40,10 @@ Item{
3940
Layout.minimumWidth: units.gridUnit * 10
4041
Layout.minimumHeight: units.gridUnit * 10
4142

42-
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
43+
preferredRepresentation: fullRepresentation
4344
Plasmoid.backgroundHints: plasmoid.configuration.showBackground ? PlasmaCore.Types.DefaultBackground : PlasmaCore.Types.NoBackground
4445

45-
PlasmaCore.DataSource {
46+
Plasma5Support.DataSource {
4647
id: executeSource
4748
engine: "executable"
4849
connectedSources: []

package/metadata.desktop

Lines changed: 0 additions & 19 deletions
This file was deleted.

package/metadata.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"KPlugin": {
3+
"Authors": [
4+
{
5+
"Email": "",
6+
"Name": "Bhaskar Divya"
7+
}
8+
],
9+
"Category": "Utilities",
10+
"Dependencies": [
11+
"qtermwidget"
12+
],
13+
"Description": "Terminal in a plasmoid",
14+
"Icon": "utilities-terminal",
15+
"Id": "com.koldbyte.kde.termoid",
16+
"License": "GPL v2+",
17+
"Name": "Termoid",
18+
"ServiceTypes": [
19+
"Plasma/Applet"
20+
],
21+
"Version": "0.4",
22+
"Website": "https://github.com/koldbyte/termoid"
23+
},
24+
"X-Plasma-API-Minimum-Version": "6.0"
25+
}

0 commit comments

Comments
 (0)