From 6a941e256c6d6fe5d4497ab0d4935eb3d4373a34 Mon Sep 17 00:00:00 2001 From: agriche Date: Thu, 19 Nov 2015 14:41:59 +0100 Subject: [PATCH] - Replace #include by #include . - Replace #include by #include . - Replace uniboardTool by openboardTool. - Replace UBMimeType::UniboardTool by UBMimeType::OpenboardTool. --- src/board/UBBoardController.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index ccf9b692..ceb85256 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -27,8 +27,11 @@ #include "UBBoardController.h" -#include -#include +//#include +#include + +//#include +#include #include "frameworks/UBFileSystemUtils.h" #include "frameworks/UBPlatformUtils.h" @@ -1019,9 +1022,12 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c if (isBackground) 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("/")) { @@ -1118,7 +1124,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl 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")); if (UBMimeType::RasterImage == itemMimeType) @@ -1398,9 +1405,10 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl 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) {