上午公司断电了,静心看了看本书的1.1节。然后感觉下面3处有些别扭,和大家探讨一下
page 5
我们已经简单、直接地调用了requestXml(),但考虑到编程风格,还是建议尽量少用在各个构造函数中构造一个对象的“create”方法,也尽量少用单触发器来调用哪些构造后初始化方法(post-construction initializing method)。
We could have simply called requestXml() directly, but as a matter of style we prefer to restrict ourselves to calling “create” methods that contribute to the construction of an object in constructors, and to call any post-construction initializing method using a single shot timer.
注:原文意思 * 1. 本可以直接用 requestXml() (但是没有用,而是用的后面的提到的 post-construction..)。 * 2. 鼓励使用 单触发的 定时器 (来调用构造后初始化方法)
page 8
QDomDocument 类是 Qt 的 QtXml 模块的一部分,因此可以使用它,但必须在应用程序的.pro文件里面加上 QT += xml 这一行。
The QDomDocument class is part of Qt’s QtXml module, so to be able to use it we must add the line QT += xml to the application’s .pro file.
注:因此可以... 但... (感觉比较别扭),似乎该改成,“要能够使用它,我们必须..."
page 10
首先,要检查已接收到一个某种类型的重定向,看它是否是我们期望的反馈结果。
We begin by checking to see if instead of the reply we are expecting we have received a redirect of some kind.
注:检查的是,接收到的是否是某种重定向而不是我们期待的reply |