- Replace #include <QtGui> by #include <QtWidgets>.

- Replace #include <QtWebKit> by #include <QtWebKitWidgets>.

- Replace uniboardTool by openboardTool.
- Replace UBMimeType::UniboardTool by UBMimeType::OpenboardTool.
preferencesAboutTextFull
agriche 9 years ago
parent f7df53b063
commit 6a941e256c
  1. 22
      src/board/UBBoardController.cpp

@ -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)
{ {

Loading…
Cancel
Save