Merge lp:~d.filoni/telegram-app/fix_build_warnings into lp:telegram-app

Proposed by Devid Antonio Filoni
Status: Merged
Approved by: Jin
Approved revision: 242
Merged at revision: 239
Proposed branch: lp:~d.filoni/telegram-app/fix_build_warnings
Merge into: lp:telegram-app
Diff against target: 118 lines (+32/-31)
4 files modified
telegram/app/qml/components/ColoredImage.qml (+28/-28)
telegram/app/qml/js/ba-linkify.js (+1/-1)
telegram/app/upgradev2.cpp (+1/-1)
telegram/push/pushclient.h (+2/-1)
To merge this branch: bzr merge lp:~d.filoni/telegram-app/fix_build_warnings
Reviewer Review Type Date Requested Status
Jin (community) Approve
Review via email: mp+308185@code.launchpad.net

Description of the change

Proposed branch fixes following build warnings (xenial desktop).

Commit #239:
telegram/app/qml/js/ba-linkify.js:101: warning: unterminated character constant
(bug #1376153)

Commit #240:
telegram/app/qml/components/ColoredImage.qml:57: warning: unterminated string literal
telegram/app/qml/components/ColoredImage.qml:65: warning: unterminated string literal
telegram/app/qml/components/ColoredImage.qml:67: warning: unterminated string literal
telegram/app/qml/components/ColoredImage.qml:75: warning: unterminated string literal
telegram/app/qml/components/ColoredImage.qml:79: warning: unterminated string literal
telegram/app/qml/components/ColoredImage.qml:91: warning: unterminated string literal

Commit #241:
../../app/upgradev2.cpp:116:58: warning: unused parameter ‘out’ [-Wunused-parameter]
 inline void UpgradeV2::copySecretPhoto(qint64 peer, bool out, qint64 mediaId, QSqlDatabase &newDb) {

Commit #242:
../../push/pushclient.h:44: Warning: Property declaration notifications has no READ accessor function or associated MEMBER variable. The property will be invalid.

To post a comment you must log in.
Revision history for this message
Jin (jindallo) wrote :

Thanks for providing this patch,
symptoms: 4 warning traces are confirmed,
and the codes look good.

I will approve after verified pass.

Revision history for this message
Jin (jindallo) wrote :

Verified pass,
I approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/components/ColoredImage.qml'
2--- telegram/app/qml/components/ColoredImage.qml 2015-09-22 09:57:07 +0000
3+++ telegram/app/qml/components/ColoredImage.qml 2016-10-11 19:31:28 +0000
4@@ -54,40 +54,40 @@
5 property color keyColorIn: "#ffffff"
6 property real threshold: 0.1
7
8- readonly property string mirroredShader: "
9- uniform highp mat4 qt_Matrix;
10- attribute highp vec4 qt_Vertex;
11- attribute highp vec2 qt_MultiTexCoord0;
12- varying highp vec2 qt_TexCoord0;
13- void main() {
14- qt_TexCoord0 = vec2(1.0 - qt_MultiTexCoord0.s, qt_MultiTexCoord0.t);
15- gl_Position = qt_Matrix * qt_Vertex;
16+ readonly property string mirroredShader: " \
17+ uniform highp mat4 qt_Matrix; \
18+ attribute highp vec4 qt_Vertex; \
19+ attribute highp vec2 qt_MultiTexCoord0; \
20+ varying highp vec2 qt_TexCoord0; \
21+ void main() { \
22+ qt_TexCoord0 = vec2(1.0 - qt_MultiTexCoord0.s, qt_MultiTexCoord0.t); \
23+ gl_Position = qt_Matrix * qt_Vertex; \
24 }"
25
26- readonly property string originalShader: "
27- uniform highp mat4 qt_Matrix;
28- attribute highp vec4 qt_Vertex;
29- attribute highp vec2 qt_MultiTexCoord0;
30- varying highp vec2 qt_TexCoord0;
31- void main() {
32- qt_TexCoord0 = qt_MultiTexCoord0;
33- gl_Position = qt_Matrix * qt_Vertex;
34+ readonly property string originalShader: " \
35+ uniform highp mat4 qt_Matrix; \
36+ attribute highp vec4 qt_Vertex; \
37+ attribute highp vec2 qt_MultiTexCoord0; \
38+ varying highp vec2 qt_TexCoord0; \
39+ void main() { \
40+ qt_TexCoord0 = qt_MultiTexCoord0; \
41+ gl_Position = qt_Matrix * qt_Vertex; \
42 }"
43
44 vertexShader: root.mirror ? mirroredShader : originalShader
45
46- fragmentShader: "
47- varying highp vec2 qt_TexCoord0;
48- uniform sampler2D source;
49- uniform highp vec4 keyColorOut;
50- uniform highp vec4 keyColorIn;
51- uniform lowp float threshold;
52- uniform lowp float qt_Opacity;
53- void main() {
54- lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
55- gl_FragColor = mix(vec4(keyColorOut.rgb, 1.0) * sourceColor.a,
56- sourceColor,
57- step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity;
58+ fragmentShader: " \
59+ varying highp vec2 qt_TexCoord0; \
60+ uniform sampler2D source; \
61+ uniform highp vec4 keyColorOut; \
62+ uniform highp vec4 keyColorIn; \
63+ uniform lowp float threshold; \
64+ uniform lowp float qt_Opacity; \
65+ void main() { \
66+ lowp vec4 sourceColor = texture2D(source, qt_TexCoord0); \
67+ gl_FragColor = mix(vec4(keyColorOut.rgb, 1.0) * sourceColor.a, \
68+ sourceColor, \
69+ step(threshold, distance(sourceColor.rgb / sourceColor.a, keyColorIn.rgb))) * qt_Opacity; \
70 }"
71 }
72 }
73
74=== modified file 'telegram/app/qml/js/ba-linkify.js'
75--- telegram/app/qml/js/ba-linkify.js 2016-03-30 16:11:57 +0000
76+++ telegram/app/qml/js/ba-linkify.js 2016-10-11 19:31:28 +0000
77@@ -98,7 +98,7 @@
78 callback: function( text, href ) {
79 return href ? '<a href="' + href + '" title="' + href + '">' + text + '</a>' : text;
80 },
81- punct_regexp: /(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/
82+ punct_regexp: new RegExp("(?:[!?.,:;'\"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$")
83 };
84
85 function linkify( txt, options ) {
86
87=== modified file 'telegram/app/upgradev2.cpp'
88--- telegram/app/upgradev2.cpp 2016-01-19 14:21:34 +0000
89+++ telegram/app/upgradev2.cpp 2016-10-11 19:31:28 +0000
90@@ -113,7 +113,7 @@
91 */
92 }
93
94-inline void UpgradeV2::copySecretPhoto(qint64 peer, bool out, qint64 mediaId, QSqlDatabase &newDb) {
95+inline void UpgradeV2::copySecretPhoto(qint64 peer, bool /*out*/, qint64 mediaId, QSqlDatabase &newDb) {
96 QSqlQuery photo(db);
97 photo.prepare("SELECT caption, date, accessHash, userId FROM mediaPhotos WHERE id = :id");
98 photo.bindValue(":id", mediaId);
99
100=== modified file 'telegram/push/pushclient.h'
101--- telegram/push/pushclient.h 2015-09-22 09:57:07 +0000
102+++ telegram/push/pushclient.h 2016-10-11 19:31:28 +0000
103@@ -34,6 +34,7 @@
104 void setAppId(const QString &appId);
105 QString getToken();
106 QString getStatus() { return this->status; }
107+ QStringList getNotifications() { return this->notifications; }
108 int getCount();
109 void setCount(int count);
110
111@@ -41,7 +42,7 @@
112
113 Q_PROPERTY(QString appId WRITE setAppId READ getAppId NOTIFY appIdChanged);
114 Q_PROPERTY(QString token READ getToken NOTIFY tokenChanged);
115- Q_PROPERTY(QStringList notifications NOTIFY notificationsChanged);
116+ Q_PROPERTY(QStringList notifications READ getNotifications NOTIFY notificationsChanged);
117 Q_PROPERTY(QString status READ getStatus NOTIFY statusChanged);
118 Q_PROPERTY(int count READ getCount WRITE setCount NOTIFY countChanged)
119

Subscribers

People subscribed via source and target branches

to status/vote changes: