Minor compatibility updates (strings etc; missing includes)

preferencesAboutTextFull
Craig Watson 9 years ago
parent d97feb57ef
commit 26f6de7851
  1. 7
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 2
      src/adaptors/publishing/UBDocumentPublisher.cpp
  3. 2
      src/api/UBW3CWidgetAPI.cpp
  4. 8
      src/api/UBWidgetUniboardAPI.cpp
  5. 3
      src/board/UBBoardView.h
  6. 4
      src/core/UBPersistenceManager.cpp

@ -30,6 +30,7 @@
#include <QtCore> #include <QtCore>
#include <QtXml> #include <QtXml>
#include <QGraphicsTextItem> #include <QGraphicsTextItem>
#include <QDomElement>
#include "domain/UBGraphicsSvgItem.h" #include "domain/UBGraphicsSvgItem.h"
#include "domain/UBGraphicsPixmapItem.h" #include "domain/UBGraphicsPixmapItem.h"
@ -329,7 +330,7 @@ QUuid UBSvgSubsetAdaptor::sceneUuid(UBDocumentProxy* proxy, const int pageIndex)
UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const QByteArray& pArray) UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const QByteArray& pArray)
{ {
UBSvgSubsetReader reader(proxy, UBTextTools::cleanHtmlCData(QString(pArray)).toAscii()); UBSvgSubsetReader reader(proxy, UBTextTools::cleanHtmlCData(QString(pArray)).toLatin1());
return reader.loadScene(); return reader.loadScene();
} }
@ -1335,7 +1336,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro
QUuid uuid = UBGraphicsScene::getPersonalUuid(groupItem); QUuid uuid = UBGraphicsScene::getPersonalUuid(groupItem);
if (!uuid.isNull()) { if (!uuid.isNull()) {
QDomElement curGroupElement = groupDomDocument->createElement(tGroup); QDomElement curGroupElement = groupDomDocument->createElement(tGroup);
curGroupElement.setAttribute(aId, uuid); curGroupElement.setAttribute(aId, uuid.toString());
UBGraphicsGroupContainerItem* group = dynamic_cast<UBGraphicsGroupContainerItem*>(groupItem); UBGraphicsGroupContainerItem* group = dynamic_cast<UBGraphicsGroupContainerItem*>(groupItem);
if(group && group->Delegate()){ if(group && group->Delegate()){
if(group->Delegate()->isLocked()) if(group->Delegate()->isLocked())
@ -1351,7 +1352,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro
persistGroupToDom(item, curParent, groupDomDocument); persistGroupToDom(item, curParent, groupDomDocument);
else { else {
QDomElement curSubElement = groupDomDocument->createElement(tElement); QDomElement curSubElement = groupDomDocument->createElement(tElement);
curSubElement.setAttribute(aId, tmpUuid); curSubElement.setAttribute(aId, tmpUuid.toString());
curGroupElement.appendChild(curSubElement); curGroupElement.appendChild(curSubElement);
} }
} }

@ -24,7 +24,7 @@
#include <QPushButton>
#include "UBDocumentPublisher.h" #include "UBDocumentPublisher.h"

@ -59,7 +59,7 @@ UBW3CWidgetAPI::~UBW3CWidgetAPI()
QString UBW3CWidgetAPI::uuid() QString UBW3CWidgetAPI::uuid()
{ {
if (mGraphicsW3CWidget) if (mGraphicsW3CWidget)
return mGraphicsW3CWidget->uuid(); return mGraphicsW3CWidget->uuid().toString();
else else
return ""; return "";
} }

@ -514,7 +514,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QGraphicsSceneDragDropEvent *event)
QString str = "test string"; QString str = "test string";
QMimeData mimeData; QMimeData mimeData;
mimeData.setData(tMimeText, str.toAscii()); mimeData.setData(tMimeText, str.toLatin1());
sDownloadFileDesc desc; sDownloadFileDesc desc;
desc.dest = sDownloadFileDesc::graphicsWidget; desc.dest = sDownloadFileDesc::graphicsWidget;
@ -556,7 +556,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QGraphicsSceneDragDropEvent *event)
} }
qDebug() << destFileName; qDebug() << destFileName;
QString mimeText = createMimeText(downloaded, contentType, destFileName); QString mimeText = createMimeText(downloaded, contentType, destFileName);
dropMimeData->setData(tMimeText, mimeText.toAscii()); dropMimeData->setData(tMimeText, mimeText.toLatin1());
event->setMimeData(dropMimeData); event->setMimeData(dropMimeData);
} }
@ -588,7 +588,7 @@ void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc de
} }
} }
QString destFileName = objDir + QUuid::createUuid() + "." + extention; QString destFileName = objDir + QUuid::createUuid().toString() + "." + extention;
QFile destFile(destFileName); QFile destFile(destFileName);
if (!destFile.open(QIODevice::WriteOnly)) { if (!destFile.open(QIODevice::WriteOnly)) {
@ -606,7 +606,7 @@ void UBWidgetUniboardAPI::onDownloadFinished(bool pSuccess, sDownloadFileDesc de
QMimeData dropMimeData; QMimeData dropMimeData;
QString mimeText = createMimeText(true, contentType, destFileName); QString mimeText = createMimeText(true, contentType, destFileName);
dropMimeData.setData(tMimeText, mimeText.toAscii()); dropMimeData.setData(tMimeText, mimeText.toLatin1());
destFile.close(); destFile.close();

@ -30,6 +30,9 @@
#define CONTROLVIEW_OBJ_NAME "ControlView" #define CONTROLVIEW_OBJ_NAME "ControlView"
#include <QtGui> #include <QtGui>
#include <QGraphicsView>
#include <QRubberBand>
#include "core/UB.h" #include "core/UB.h"
#include "domain/UBGraphicsDelegateFrame.h" #include "domain/UBGraphicsDelegateFrame.h"

@ -596,7 +596,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
UBGraphicsPixmapItem* pixmapItem = qgraphicsitem_cast<UBGraphicsPixmapItem*>(item); UBGraphicsPixmapItem* pixmapItem = qgraphicsitem_cast<UBGraphicsPixmapItem*>(item);
if(pixmapItem){ if(pixmapItem){
QString source = proxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid() + ".png"; QString source = proxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png";
QString destination = source; QString destination = source;
QUuid newUuid = QUuid::createUuid(); QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName(); QString fileName = QFileInfo(source).completeBaseName();
@ -608,7 +608,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
UBGraphicsSvgItem* svgItem = qgraphicsitem_cast<UBGraphicsSvgItem*>(item); UBGraphicsSvgItem* svgItem = qgraphicsitem_cast<UBGraphicsSvgItem*>(item);
if(svgItem){ if(svgItem){
QString source = proxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory + "/" + svgItem->uuid() + ".svg"; QString source = proxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory + "/" + svgItem->uuid().toString() + ".svg";
QString destination = source; QString destination = source;
QUuid newUuid = QUuid::createUuid(); QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName(); QString fileName = QFileInfo(source).completeBaseName();

Loading…
Cancel
Save