QTfrontend/databrowser.cpp
changeset 5758 9af54df78b8a
parent 5755 a079b4dea081
child 5759 082a068c078d
equal deleted inserted replaced
5757:5bf89dbf3547 5758:9af54df78b8a
    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()