Verified Commit e5373b7b authored by ivan tkachenko's avatar ivan tkachenko
Browse files

applets/taskmanager: Use real multi-line strings in JavaScript expressions

Double quoted multi-line strings are custom Qt extension, and thus
should be avoided, as they are problematic for syntax support in
various text editors.

GIT_SILENT
parent b1523435
Pipeline #129815 passed with stage
in 2 minutes and 51 seconds
......@@ -73,17 +73,19 @@ PlasmaComponents.ContextMenu {
}
function newMenuItem(parent) {
return Qt.createQmlObject(
"import org.kde.plasma.components 2.0 as PlasmaComponents;" +
"PlasmaComponents.MenuItem {}",
parent);
return Qt.createQmlObject(`
import org.kde.plasma.components 2.0 as PlasmaComponents
PlasmaComponents.MenuItem {}
`, parent);
}
function newSeparator(parent) {
return Qt.createQmlObject(
"import org.kde.plasma.components 2.0 as PlasmaComponents;" +
"PlasmaComponents.MenuItem { separator: true }",
parent);
return Qt.createQmlObject(`
import org.kde.plasma.components 2.0 as PlasmaComponents
PlasmaComponents.MenuItem { separator: true }
`, parent);
}
function loadDynamicLaunchActions(launcherUrl) {
......
......@@ -203,9 +203,11 @@ MouseArea {
onSmartLauncherEnabledChanged: {
if (smartLauncherEnabled && !smartLauncherItem) {
var smartLauncher = Qt.createQmlObject("
import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet;
TaskManagerApplet.SmartLauncherItem { }", task);
const smartLauncher = Qt.createQmlObject(`
import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet;
TaskManagerApplet.SmartLauncherItem { }
`, task);
smartLauncher.launcherUrl = Qt.binding(() => model.LauncherUrlWithoutIcon);
......
......@@ -62,7 +62,7 @@ Item {
supportsAtlasTextures: true
fragmentShader: "
fragmentShader: `
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
uniform lowp sampler2D source;
......@@ -70,7 +70,7 @@ Item {
void main() {
gl_FragColor = texture2D(source, qt_TexCoord0.st) * (1.0 - (texture2D(mask, qt_TexCoord0.st).a)) * qt_Opacity;
}
"
`
}
Badge {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment