Perspective Warp for buildings in Paint by Zaweba
Perspective Warp in Paint by Zaweba: lay quads over the planes in a photo, then move the corners or straighten verticals to square up buildings.

Photographs of buildings often lean. Point a camera up at a tall front and the vertical lines tilt in towards the top. Shoot a room from a corner and you might want the walls to recede differently. Paint by Zaweba has Edit > Perspective Warp for exactly this: you tell it where the flat surfaces in the picture are, then you change their perspective.
Two stages
Perspective Warp works in two stages, and understanding that is most of the battle.
First you lay out quads, four sided shapes, over the planes in the picture. A plane is any flat surface: the front of a house, the side of a box, a wall, a road. Draw a quad so its edges follow the edges of that surface. Where two surfaces meet, such as two walls at a corner, put the quads so their corners touch and they join, sharing that edge.
Then you warp. Now you move the corners of the quads, and the picture bends with them. Because joined quads share an edge, moving one changes the other, so the corner of the building stays together.
Laying out planes well
Take your time on the first stage. Line the quad edges up with real straight lines in the picture: window frames, roof lines, door edges, the bottom of a wall. The better they match, the more natural the result. For a single flat front, one quad is enough. For a building seen at a corner, use two joined quads.
Zoom in to place corners accurately, then zoom out to check the whole layout.
Straightening verticals and horizontals
In the warp stage, Shift+click an edge to straighten it. That is the quickest way to make a leaning wall stand upright. There is also Straighten verticals and horizontals, which squares the lines up for you. For architecture shots this is often all you need: lay the quads over the front, straighten, and the building no longer leans backwards.
Changing the viewpoint
Perspective Warp can do more than fix leaning lines. With two joined quads on a corner building, you can move the corners to make one side show more and the other less, as if you had stood a little to one side. Keep changes modest; big moves stretch detail on the side that grows.
After the warp
Squaring a building usually leaves empty or stretched areas near the edges of the frame. Crop them away with the Crop tool, or fill small gaps. Keeping a little extra sky and ground round a building when you take the photo makes this easier.
For simple leaning verticals across a whole frame, Lens Correction's vertical and horizontal perspective sliders are another route. For wide angle bending of straight lines, Wide Angle Correction is the tool. Free Transform's perspective handles suit flat artwork you are placing on a surface. Perspective Warp is best when a photo has distinct planes you want to treat as surfaces, and when you need the control of moving each corner.
Typical slips
Placing quads loosely, so the warp bends parts of the picture that should stay straight. Forgetting that touching corners join, and getting two planes stuck together when you did not want them to be. Pushing too far and making people or cars near the edges look stretched. Not cropping after the warp, leaving odd edges.
Done carefully, Perspective Warp makes a hurried phone snap of a building look like it was taken with a proper architectural lens, all inside Paint by Zaweba.