Standard GDP Formula is
Y = C + I + G + (X - M) where Y = GDP, C = Private Consumption, G = Government Expenditure, X = Export and M = Import.
Private consumption, such as consuming food produced by farmers themselves absolutely count towards GDP.
This formula of GDP applies all types of economies - whether market based, agarian, industrial or otherwise. This is macro economics 101 stuff.
On the other hand, Qing Dynasty GDP has been estimated by economists for a very long time and many results have been published by peer reviewed journals. The classical text by Contours of World Economies by Angus Maddison estimated, that based on PPP, Qing Dynasty GDP to be 1/3 of the World GDP in 1820's, but had since fallen to 1/5 of the World GDP by 1870s. Despite its drop, Qing Dynasty was still by far the largest economy in the World, surpassing Japanese economy by at least 10 times.
I do agree that had the Qing Court (and 李鸿章) had fortitude and foresight, they should not have lost the war to Japan in 1894. However, if it were the case, we might still be living under a constitutional monarchy in China today.