equal
deleted
inserted
replaced
16 } |
16 } |
17 |
17 |
18 QVariant DataBrowser::loadResource(int type, const QUrl & name) |
18 QVariant DataBrowser::loadResource(int type, const QUrl & name) |
19 { |
19 { |
20 if(type == QTextDocument::ImageResource || type == QTextDocument::StyleSheetResource) |
20 if(type == QTextDocument::ImageResource || type == QTextDocument::StyleSheetResource) |
|
21 { |
21 if(resources.contains(name)) |
22 if(resources.contains(name)) |
22 { |
23 { |
23 return resources.take(name); |
24 return resources.take(name); |
24 } |
25 } |
25 else |
26 else |
32 newRequest.setAttribute(urlAttribute, name); |
33 newRequest.setAttribute(urlAttribute, name); |
33 |
34 |
34 QNetworkReply *reply = manager->get(newRequest); |
35 QNetworkReply *reply = manager->get(newRequest); |
35 connect(reply, SIGNAL(finished()), this, SLOT(resourceDownloaded())); |
36 connect(reply, SIGNAL(finished()), this, SLOT(resourceDownloaded())); |
36 } |
37 } |
|
38 } |
37 |
39 |
38 return QVariant(); |
40 return QVariant(); |
39 } |
41 } |
40 |
42 |
41 void DataBrowser::resourceDownloaded() |
43 void DataBrowser::resourceDownloaded() |