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

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 856
Merged at revision: 856
Proposed branch: lp:~vthompson/music-app/refactor-prevent-click-build-warnings
Merge into: lp:music-app
Diff against target: 72 lines (+26/-27)
2 files modified
app/components/Themes/Ambiance/PartialColorize.qml (+12/-12)
app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml (+14/-15)
To merge this branch: bzr merge lp:~vthompson/music-app/refactor-prevent-click-build-warnings
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+258114@code.launchpad.net

Commit message

Prevent click build warnings for unterminated string literals

Description of the change

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

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM, fixes the console warnings and doesn't break anything :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/Themes/Ambiance/PartialColorize.qml'
2--- app/components/Themes/Ambiance/PartialColorize.qml 2014-11-19 01:50:29 +0000
3+++ app/components/Themes/Ambiance/PartialColorize.qml 2015-05-03 00:06:13 +0000
4@@ -35,17 +35,17 @@
5 property bool mirror: false
6 property string texCoord: mirror ? "1.0 - qt_TexCoord0.x" : "qt_TexCoord0.x"
7
8- fragmentShader: "
9- varying highp vec2 qt_TexCoord0;
10- uniform sampler2D source;
11- uniform lowp vec4 leftColor;
12- uniform lowp vec4 rightColor;
13- uniform lowp float progress;
14- uniform lowp float qt_Opacity;
15+ fragmentShader: "" +
16+ "varying highp vec2 qt_TexCoord0;" +
17+ "uniform sampler2D source;" +
18+ "uniform lowp vec4 leftColor;" +
19+ "uniform lowp vec4 rightColor;" +
20+ "uniform lowp float progress;" +
21+ "uniform lowp float qt_Opacity;" +
22
23- void main() {
24- lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
25- lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));
26- gl_FragColor = newColor * sourceColor.a * qt_Opacity;
27- }"
28+ "void main() {" +
29+ " lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);" +
30+ " lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));" +
31+ " gl_FragColor = newColor * sourceColor.a * qt_Opacity;" +
32+ "}"
33 }
34
35=== modified file 'app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml'
36--- app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml 2014-11-19 01:50:29 +0000
37+++ app/components/Themes/Ambiance/PartialColorizeUbuntuShape.qml 2015-05-03 00:06:13 +0000
38@@ -17,20 +17,19 @@
39 import QtQuick 2.0
40
41 PartialColorize {
42- fragmentShader: "
43- varying highp vec2 qt_TexCoord0;
44- uniform sampler2D source;
45- uniform highp vec4 leftColor;
46- uniform highp vec4 rightColor;
47- uniform lowp float progress;
48- uniform lowp float qt_Opacity;
49+ fragmentShader: "" +
50+ "varying highp vec2 qt_TexCoord0;" +
51+ "uniform sampler2D source;" +
52+ "uniform highp vec4 leftColor;" +
53+ "uniform highp vec4 rightColor;" +
54+ "uniform lowp float progress;" +
55+ "uniform lowp float qt_Opacity;" +
56
57- void main() {
58- lowp vec4 color = texture2D(source, qt_TexCoord0);
59- lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));
60- highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a));
61- lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor;
62- gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity;
63- }
64- "
65+ "void main() {" +
66+ " lowp vec4 color = texture2D(source, qt_TexCoord0);" +
67+ " lowp vec4 newColor = mix(leftColor, rightColor, step(progress, " + texCoord + "));" +
68+ " highp float opacity = (1.0 - color.r / max(1.0/256.0, color.a));" +
69+ " lowp vec4 result = opacity * vec4(0.0, 0.0, 0.0, 1.0) + vec4(1.0 - opacity) * newColor;" +
70+ " gl_FragColor = vec4(result.rgb * result.a, result.a) * color.a * qt_Opacity;" +
71+ "}"
72 }

Subscribers

People subscribed via source and target branches