|
|
@ -27,8 +27,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "UBBoardController.h" |
|
|
|
#include "UBBoardController.h" |
|
|
|
|
|
|
|
|
|
|
|
#include <QtGui> |
|
|
|
//#include <QtGui>
|
|
|
|
#include <QtWebKit> |
|
|
|
#include <QtWidgets> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#include <QtWebKit>
|
|
|
|
|
|
|
|
#include <QtWebKitWidgets> |
|
|
|
|
|
|
|
|
|
|
|
#include "frameworks/UBFileSystemUtils.h" |
|
|
|
#include "frameworks/UBFileSystemUtils.h" |
|
|
|
#include "frameworks/UBPlatformUtils.h" |
|
|
|
#include "frameworks/UBPlatformUtils.h" |
|
|
@ -1019,9 +1022,12 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c |
|
|
|
if (isBackground) |
|
|
|
if (isBackground) |
|
|
|
oldBackgroundObject = mActiveScene->backgroundObject(); |
|
|
|
oldBackgroundObject = mActiveScene->backgroundObject(); |
|
|
|
|
|
|
|
|
|
|
|
if(sUrl.startsWith("uniboardTool://")) |
|
|
|
//if(sUrl.startsWith("uniboardTool://"))
|
|
|
|
|
|
|
|
//if(sUrl.startsWith("openboardTool://",Qt::CaseInsensitive))
|
|
|
|
|
|
|
|
if(sUrl.startsWith("openboardtool://")) |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
downloadFinished(true, url, QUrl(), "application/vnd.mnemis-uniboard-tool", QByteArray(), pPos, pSize, isBackground); |
|
|
|
downloadFinished(true, url, QUrl(), "application/openboard-tool", QByteArray(), pPos, pSize, isBackground); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (sUrl.startsWith("file://") || sUrl.startsWith("/")) |
|
|
|
else if (sUrl.startsWith("file://") || sUrl.startsWith("/")) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1118,7 +1124,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl |
|
|
|
|
|
|
|
|
|
|
|
mActiveScene->deselectAllItems(); |
|
|
|
mActiveScene->deselectAllItems(); |
|
|
|
|
|
|
|
|
|
|
|
if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("uniboardTool://")) |
|
|
|
//if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("uniboardTool://"))
|
|
|
|
|
|
|
|
if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("openboardtool://")) |
|
|
|
showMessage(tr("Download finished")); |
|
|
|
showMessage(tr("Download finished")); |
|
|
|
|
|
|
|
|
|
|
|
if (UBMimeType::RasterImage == itemMimeType) |
|
|
|
if (UBMimeType::RasterImage == itemMimeType) |
|
|
@ -1398,9 +1405,10 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl |
|
|
|
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); |
|
|
|
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (UBMimeType::UniboardTool == itemMimeType) |
|
|
|
//else if (UBMimeType::UniboardTool == itemMimeType)
|
|
|
|
|
|
|
|
else if (UBMimeType::OpenboardTool == itemMimeType) |
|
|
|
{ |
|
|
|
{ |
|
|
|
qDebug() << "accepting mime type" << mimeType << "as Uniboard Tool"; |
|
|
|
qDebug() << "accepting mime type" << mimeType << "OpenBoard Tool"; |
|
|
|
|
|
|
|
|
|
|
|
if (sourceUrl.toString() == UBToolsManager::manager()->compass.id) |
|
|
|
if (sourceUrl.toString() == UBToolsManager::manager()->compass.id) |
|
|
|
{ |
|
|
|
{ |
|
|
|