183 return UI.PixmapCache.getIcon("network-server.png") |
183 return UI.PixmapCache.getIcon("network-server.png") |
184 |
184 |
185 self.load() |
185 self.load() |
186 |
186 |
187 urlStr = self.__urlToString(url) |
187 urlStr = self.__urlToString(url) |
188 if urlStr in self.__iconsDB: |
188 for iconUrlStr in self.__iconsDB: |
189 return self.__iconsDB[urlStr] |
189 if iconUrlStr.startswith(urlStr): |
190 elif scheme == "https": |
190 return self.__iconsDB[iconUrlStr] |
|
191 |
|
192 # try replacing http scheme with https scheme |
|
193 url = QUrl(url) |
|
194 if url.scheme() == "http": |
|
195 url.setScheme("https") |
|
196 urlStr = self.__urlToString(url) |
|
197 for iconUrlStr in self.__iconsDB: |
|
198 if iconUrlStr.startswith(urlStr): |
|
199 return self.__iconsDB[iconUrlStr] |
|
200 |
|
201 if scheme == "https": |
191 return UI.PixmapCache.getIcon("securityHigh32.png") |
202 return UI.PixmapCache.getIcon("securityHigh32.png") |
192 else: |
203 else: |
193 return UI.PixmapCache.getIcon("defaultIcon.png") |
204 return UI.PixmapCache.getIcon("defaultIcon.png") |
194 |
205 |
195 def clear(self): |
206 def clear(self): |