Merge lp:~elementary-apps/pantheon-photos/soup-deprecations into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Felipe Escoto
Approved revision: 3071
Merged at revision: 3111
Proposed branch: lp:~elementary-apps/pantheon-photos/soup-deprecations
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 56 lines (+12/-12)
2 files modified
plugins/pantheon-photos-publishing-extras/RESTSupport.vala (+6/-6)
plugins/pantheon-photos-publishing/RESTSupport.vala (+6/-6)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-photos/soup-deprecations
Reviewer Review Type Date Requested Status
Felipe Escoto (community) Approve
Review via email: mp+311526@code.launchpad.net

Commit message

Fix deprecation warnings with Soup Status

Description of the change

-

To post a comment you must log in.
3071. By Danielle Foré

resolve soup deprecation warnings

Revision history for this message
Felipe Escoto (philip.scott) wrote :

There are some more warnings on the plugins:

/video-thumbnail/plugins/pantheon-photos-publishing/FacebookPublishing, REST, Picasa and Youtube :)

Not sure if you also want to kill them all on this run

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

Naw I wasn't able to really figure other the other warnings. This branch is just for the KnownStatusCode deprecation

Revision history for this message
Felipe Escoto (philip.scott) wrote :

LGTM and it still works!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/pantheon-photos-publishing-extras/RESTSupport.vala'
2--- plugins/pantheon-photos-publishing-extras/RESTSupport.vala 2016-11-22 01:49:40 +0000
3+++ plugins/pantheon-photos-publishing-extras/RESTSupport.vala 2016-12-04 23:06:54 +0000
4@@ -169,18 +169,18 @@
5
6 protected void check_response (Soup.Message message) throws Spit.Publishing.PublishingError {
7 switch (message.status_code) {
8- case Soup.KnownStatusCode.OK:
9- case Soup.KnownStatusCode.CREATED: // HTTP code 201 (CREATED) signals that a new
10+ case Soup.Status.OK:
11+ case Soup.Status.CREATED: // HTTP code 201 (CREATED) signals that a new
12 // resource was created in response to a PUT or POST
13 break;
14
15- case Soup.KnownStatusCode.CANT_RESOLVE:
16- case Soup.KnownStatusCode.CANT_RESOLVE_PROXY:
17+ case Soup.Status.CANT_RESOLVE:
18+ case Soup.Status.CANT_RESOLVE_PROXY:
19 throw new Spit.Publishing.PublishingError.NO_ANSWER ("Unable to resolve %s (error code %u)",
20 get_endpoint_url (), message.status_code);
21
22- case Soup.KnownStatusCode.CANT_CONNECT:
23- case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
24+ case Soup.Status.CANT_CONNECT:
25+ case Soup.Status.CANT_CONNECT_PROXY:
26 throw new Spit.Publishing.PublishingError.NO_ANSWER ("Unable to connect to %s (error code %u)",
27 get_endpoint_url (), message.status_code);
28
29
30=== modified file 'plugins/pantheon-photos-publishing/RESTSupport.vala'
31--- plugins/pantheon-photos-publishing/RESTSupport.vala 2016-11-22 01:49:40 +0000
32+++ plugins/pantheon-photos-publishing/RESTSupport.vala 2016-12-04 23:06:54 +0000
33@@ -169,18 +169,18 @@
34
35 protected void check_response (Soup.Message message) throws Spit.Publishing.PublishingError {
36 switch (message.status_code) {
37- case Soup.KnownStatusCode.OK:
38- case Soup.KnownStatusCode.CREATED: // HTTP code 201 (CREATED) signals that a new
39+ case Soup.Status.OK:
40+ case Soup.Status.CREATED: // HTTP code 201 (CREATED) signals that a new
41 // resource was created in response to a PUT or POST
42 break;
43
44- case Soup.KnownStatusCode.CANT_RESOLVE:
45- case Soup.KnownStatusCode.CANT_RESOLVE_PROXY:
46+ case Soup.Status.CANT_RESOLVE:
47+ case Soup.Status.CANT_RESOLVE_PROXY:
48 throw new Spit.Publishing.PublishingError.NO_ANSWER ("Unable to resolve %s (error code %u)",
49 get_endpoint_url (), message.status_code);
50
51- case Soup.KnownStatusCode.CANT_CONNECT:
52- case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
53+ case Soup.Status.CANT_CONNECT:
54+ case Soup.Status.CANT_CONNECT_PROXY:
55 throw new Spit.Publishing.PublishingError.NO_ANSWER ("Unable to connect to %s (error code %u)",
56 get_endpoint_url (), message.status_code);
57

Subscribers

People subscribed via source and target branches