Commit b94b8629 authored by Yimgo's avatar Yimgo

Shutted down warnings.

parent cae2caec
...@@ -654,29 +654,25 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parseSvgPageSection(const QDomElemen ...@@ -654,29 +654,25 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parseSvgPageSection(const QDomElemen
void UBCFFAdaptor::UBToCFFConverter::writeQDomElementToXML(const QDomNode &node) void UBCFFAdaptor::UBToCFFConverter::writeQDomElementToXML(const QDomNode &node)
{ {
if (!node.isNull()) if (!node.isNull()) {
if (node.isText()) if (node.isText())
{ mIWBContentWriter->writeCharacters(node.nodeValue());
mIWBContentWriter->writeCharacters(node.nodeValue()); else {
} mIWBContentWriter->writeStartElement(node.namespaceURI(), node.toElement().tagName());
else
{ for (int i = 0; i < node.toElement().attributes().count(); i++) {
mIWBContentWriter->writeStartElement(node.namespaceURI(), node.toElement().tagName()); QDomAttr attr = node.toElement().attributes().item(i).toAttr();
mIWBContentWriter->writeAttribute(attr.name(), attr.value());
}
QDomNode child = node.firstChild();
while(!child.isNull()) {
writeQDomElementToXML(child);
child = child.nextSibling();
}
for (int i = 0; i < node.toElement().attributes().count(); i++) mIWBContentWriter->writeEndElement();
{
QDomAttr attr = node.toElement().attributes().item(i).toAttr();
mIWBContentWriter->writeAttribute(attr.name(), attr.value());
} }
QDomNode child = node.firstChild(); }
while(!child.isNull())
{
writeQDomElementToXML(child);
child = child.nextSibling();
}
mIWBContentWriter->writeEndElement();
}
} }
bool UBCFFAdaptor::UBToCFFConverter::writeExtendedIwbSection() bool UBCFFAdaptor::UBToCFFConverter::writeExtendedIwbSection()
......
...@@ -74,31 +74,32 @@ QString UBImportImage::importFileFilter() ...@@ -74,31 +74,32 @@ QString UBImportImage::importFileFilter()
return filter; return filter;
} }
QList<UBGraphicsItem*> UBImportImage::import(const QUuid& uuid, const QString& filePath) QList<UBGraphicsItem*> UBImportImage::import(const QUuid& uuid, const QString& filePath)
{ {
QList<UBGraphicsItem*> result; Q_UNUSED(uuid);
QList<UBGraphicsItem*> result;
QPixmap pix(filePath);
if (pix.isNull()) QPixmap pix(filePath);
return result; if (pix.isNull())
return result;
UBGraphicsPixmapItem* pixmapItem = new UBGraphicsPixmapItem(); UBGraphicsPixmapItem* pixmapItem = new UBGraphicsPixmapItem();
pixmapItem->setPixmap(pix); pixmapItem->setPixmap(pix);
result << pixmapItem; result << pixmapItem;
return result; return result;
} }
void UBImportImage::placeImportedItemToScene(UBGraphicsScene* scene, UBGraphicsItem* item) void UBImportImage::placeImportedItemToScene(UBGraphicsScene* scene, UBGraphicsItem* item)
{ {
UBGraphicsPixmapItem* pixmapItem = (UBGraphicsPixmapItem*)item; UBGraphicsPixmapItem* pixmapItem = (UBGraphicsPixmapItem*)item;
UBGraphicsPixmapItem* sceneItem = scene->addPixmap(pixmapItem->pixmap(), NULL, QPointF(0, 0)); UBGraphicsPixmapItem* sceneItem = scene->addPixmap(pixmapItem->pixmap(), NULL, QPointF(0, 0));
scene->setAsBackgroundObject(sceneItem, true); scene->setAsBackgroundObject(sceneItem, true);
// Only stored pixmap, should be deleted now // Only stored pixmap, should be deleted now
delete pixmapItem; delete pixmapItem;
} }
const QString& UBImportImage::folderToCopy() const QString& UBImportImage::folderToCopy()
{ {
static QString f(""); static QString f("");
......
...@@ -34,4 +34,4 @@ private: ...@@ -34,4 +34,4 @@ private:
int mMessagesFontSize; int mMessagesFontSize;
}; };
#endif UB_MESSAGES_DIALOG_H_ #endif /* UB_MESSAGES_DIALOG_H_ */
\ No newline at end of file \ No newline at end of file
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
UBRubberBand::UBRubberBand(Shape s, QWidget * p) UBRubberBand::UBRubberBand(Shape s, QWidget * p)
: QRubberBand(s, p) : QRubberBand(s, p)
, mResizingMode(None) , mResizingMode(None)
, mMouseIsPressed(false)
, mResizingBorderHeight(20) , mResizingBorderHeight(20)
, mMouseIsPressed(false)
, mLastPressedPoint(QPoint()) , mLastPressedPoint(QPoint())
{ {
customStyle = NULL; customStyle = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment