qnli question: What was Nanjing called during the Qing dynasty? sentence: Nanjing was invaded by British troops during the close of the First Opium War, which was ended by the Treaty of Nanjing in 1842.