The world is shifting very rapidly and it is impossible to say what will happen in a few more decades. But certainly by 2050 it very well could be that China with its huge population as well as its technological expertise could very well be the most powerful nation in the world.
I personally think that shifting demographics of the world does not mean that China will be the world's most powerful nation by 2050 because China could be the state that is powerful in a year or two from now it just depends on the state and how willingly they work together to get things accomplished.
Shifting demographics of the world do not mean that China will be the world's most powerful nation by 2050. People tend to forget that although China is the most populated country in the world, it also suffers from great poverty. While there is an emerging middle and upper class, there is still a hunger and shelter problem with homeless and near-homeless Chinese citizens.
China might be the most powerful nation by 2050 but it cannot be deduced through demographics alone. China will most likely still continue an upward trend of the majority of it's citizens entering the middle/upper middle class social demographic. To say that they will be the most powerful though is still not a guarantee. Most likely, China will share the stop with other countries as the most powerful by 2050.
The fact that China already has about four times the population of the United States leads me to believe that there is a lot more to being powerful than just demographics and population. One could argue for this case based on declining education in the United States, but not purely on demographics alone.