← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/music-app/refactor-prevent-click-build-warnings into lp:music-app/refactor

 

Victor Thompson has proposed merging lp:~vthompson/music-app/refactor-prevent-click-build-warnings into lp:music-app/refactor.

Commit message:
Prevent click build warnings for unterminated string literals

Requested reviews:
  Music App Developers (music-app-dev)

For more details, see:
https://code.launchpad.net/~vthompson/music-app/refactor-prevent-click-build-warnings/+merge/258114

Prevent click build warnings for unterminated string literals

When building a click the following warnings are produced that can be removed/prevented:

../app/components/Themes/Ambiance/PartialColorize.qml:38: warning: unterminated string literal
../app/components/Themes/Ambiance/PartialColorize.qml:50: warning: unterminated string literal
../app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml:20: warning: unterminated string literal
../app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml:35: warning: unterminated string literal
-- 
Your team Music App Developers is requested to review the proposed merge of lp:~vthompson/music-app/refactor-prevent-click-build-warnings into lp:music-app/refactor.
=== modified file 'app/components/Themes/Ambiance/PartialColorize.qml'
--- app/components/Themes/Ambiance/PartialColorize.qml	2014-11-19 01:50:29 +0000
+++ app/components/Themes/Ambiance/PartialColorize.qml	2015-05-03 00:06:13 +0000
@@ -35,17 +35,17 @@
     property bool mirror: false
     property string texCoord: mirror ? "1.0 - qt_TexCoord0.x" : "qt_TexCoord0.x"
 
-    fragmentShader: "
-            varying highp vec2 qt_TexCoord0;
-            uniform sampler2D source;
-            uniform lowp vec4 leftColor;
-            uniform lowp vec4 rightColor;
-            uniform lowp float progress;
-            uniform lowp float qt_Opacity;
+    fragmentShader: "" +
+            "varying highp vec2 qt_TexCoord0;" +
+            "uniform sampler2D source;" +
+            "uniform lowp vec4 leftColor;" +
+            "uniform lowp vec4 rightColor;" +
+            "uniform lowp float progress;" +
+            "uniform lowp float qt_Opacity;" +
 
-            void main() {
-                lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
-                lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));
-                gl_FragColor = newColor * sourceColor.a * qt_Opacity;
-            }"
+            "void main() {" +
+            "    lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);" +
+            "    lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));" +
+            "    gl_FragColor = newColor * sourceColor.a * qt_Opacity;" +
+            "}"
 }

=== modified file 'app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml'
--- app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml	2014-11-19 01:50:29 +0000
+++ app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml	2015-05-03 00:06:13 +0000
@@ -17,20 +17,19 @@
 import QtQuick 2.0
 
 PartialColorize {
-    fragmentShader: "
-        varying highp vec2 qt_TexCoord0;
-        uniform sampler2D source;
-        uniform highp vec4 leftColor;
-        uniform highp vec4 rightColor;
-        uniform lowp float progress;
-        uniform lowp float qt_Opacity;
+    fragmentShader: "" +
+        "varying highp vec2 qt_TexCoord0;" +
+        "uniform sampler2D source;" +
+        "uniform highp vec4 leftColor;" +
+        "uniform highp vec4 rightColor;" +
+        "uniform lowp float progress;" +
+        "uniform lowp float qt_Opacity;" +
 
-        void main() {
-            lowp vec4 color = texture2D(source, qt_TexCoord0);
-            lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));
-            highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a));
-            lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor;
-            gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity;
-        }
-    "
+        "void main() {" +
+        "    lowp vec4 color = texture2D(source, qt_TexCoord0);" +
+        "    lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));" +
+        "    highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a));" +
+        "    lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor;" +
+        "    gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity;" +
+        "}"
 }


Follow ups