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

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

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

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

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

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

Loading…
Cancel
Save