154 Private method to load the requested QtHelp page. |
154 Private method to load the requested QtHelp page. |
155 |
155 |
156 @param url URL of the requested page |
156 @param url URL of the requested page |
157 @type QUrl |
157 @type QUrl |
158 """ |
158 """ |
159 |
|
160 if self.__engine.findFile(url).isValid(): |
159 if self.__engine.findFile(url).isValid(): |
161 data = self.__engine.fileData(url) |
160 data = self.__engine.fileData(url) |
162 else: |
161 else: |
163 data = QByteArray(self.tr( |
162 data = QByteArray(self.tr( |
164 """<html>""" |
163 """<html>""" |
170 .encode("utf-8")) |
169 .encode("utf-8")) |
171 |
170 |
172 lock = QMutexLocker(self.__mutex) |
171 lock = QMutexLocker(self.__mutex) |
173 self.__buffer.setData(data) |
172 self.__buffer.setData(data) |
174 self.__buffer.open(QIODevice.ReadOnly) |
173 self.__buffer.open(QIODevice.ReadOnly) |
|
174 self.open(QIODevice.ReadOnly) |
175 lock.unlock() |
175 lock.unlock() |
176 |
176 |
177 self.open(QIODevice.ReadOnly) |
|
178 self.readyRead.emit() |
177 self.readyRead.emit() |
179 |
178 |
180 def bytesAvailable(self): |
179 def bytesAvailable(self): |
181 """ |
180 """ |
182 Public method to get the number of available bytes. |
181 Public method to get the number of available bytes. |