Hi Sue
I noticed that on the 1851, John's 2 children were born in Birkenhead (which is on the Wirral). I don't know if you have seen the marriage of John McDevitt in March quarter 1846 in Wirral district. There are 2 listed. If you click possible spouses on the 2nd one there is a Catherine McCarter.
In 1841 Glasgow there is a Mary Campbell, 45, with James Mc Divet, 45 Labourer and John McDivet,15, plus other names. The address is 92 Bridgegate This is in the centre of Glasgow. This could be your family. If so, it looks like the mother has died. James must have died after 1841 unless he moved with his son.
He may have died in England.
Not sure whether you are aware, on the 1841 census ages were rounded up or down to the nearest 5 years. John was 29 in 1851 so would have been around 19 in 1841. I would have thought he would be listed as 20 but they may have rounded down to 15.
Sandgrounder