|
|
@ -1397,8 +1397,11 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl |
|
|
|
qDebug() << "accepting mime type" << mimeType << "as PDF"; |
|
|
|
qDebug() << "accepting mime type" << mimeType << "as PDF"; |
|
|
|
qDebug() << "pdf data length: " << pData.size(); |
|
|
|
qDebug() << "pdf data length: " << pData.size(); |
|
|
|
qDebug() << "sourceurl : " + sourceUrl.toString(); |
|
|
|
qDebug() << "sourceurl : " + sourceUrl.toString(); |
|
|
|
|
|
|
|
QString sUrl = sourceUrl.toString(); |
|
|
|
|
|
|
|
|
|
|
|
int result = 0; |
|
|
|
int result = 0; |
|
|
|
if(!sourceUrl.isEmpty()){ |
|
|
|
if(!sourceUrl.isEmpty() && (sUrl.startsWith("file://") || sUrl.startsWith("/"))) |
|
|
|
|
|
|
|
{ |
|
|
|
QStringList fileNames; |
|
|
|
QStringList fileNames; |
|
|
|
fileNames << sourceUrl.toLocalFile(); |
|
|
|
fileNames << sourceUrl.toLocalFile(); |
|
|
|
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames); |
|
|
|
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames); |
|
|
@ -1411,6 +1414,7 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl |
|
|
|
QStringList fileNames; |
|
|
|
QStringList fileNames; |
|
|
|
fileNames << pdfFile.fileName(); |
|
|
|
fileNames << pdfFile.fileName(); |
|
|
|
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames); |
|
|
|
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames); |
|
|
|
|
|
|
|
emit documentThumbnailsUpdated(this); |
|
|
|
pdfFile.close(); |
|
|
|
pdfFile.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|