From 3c327009a5c276092659d6e78c5ab13511063a6c Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Mon, 3 Aug 2015 05:43:44 +0000 Subject: [PATCH] Fix FTBFS on x86_64-w64-mingw32 cross-compilation, thank Joshua git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4083 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagram.cpp | 5 +++-- sources/qet.cpp | 22 ---------------------- sources/qet.h | 1 - sources/qetproject.cpp | 2 +- sources/titleblockcell.cpp | 10 ---------- sources/titleblockcell.h | 1 - sources/titleblocktemplate.cpp | 15 --------------- sources/titleblocktemplate.h | 1 - 8 files changed, 4 insertions(+), 53 deletions(-) diff --git a/sources/diagram.cpp b/sources/diagram.cpp index 42230295f..918a9bd73 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -817,8 +817,9 @@ bool Diagram::fromXml(QDomElement &document, QPointF position, bool consider_inf Enregistre le schema XML dans son document XML interne et emet le signal written(). */ -void Diagram::write() { - qDebug() << qPrintable(QString("Diagram::write() : saving changes from diagram \"%1\" [%2]").arg(title()).arg(QET::pointerString(this))); +void Diagram::write() +{ + qDebug() << qPrintable(QString("Diagram::write() : saving changes from diagram \"%1\"").arg(title())) << "[" << this << "]"; write(toXml().documentElement()); } diff --git a/sources/qet.cpp b/sources/qet.cpp index b31791695..3eba76a23 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -540,28 +540,6 @@ QET::DiagramArea QET::diagramAreaFromString(const QString &string) { else return(QET::ElementsArea); } -/** - @param ptr pointeur quelconque - @return une representation hexadecimale de l'adresse du pointeur -*/ -QString QET::pointerString(void *ptr) { - static int hexa_digits = -1; - - if (hexa_digits == -1) { - // determine le nombre de bits dans un unsigned long int - hexa_digits = std::numeric_limits::digits / 4; - } - - return( - QString("0x%1").arg( - reinterpret_cast(ptr), - hexa_digits, - 16, - QChar('0') - ) - ); -} - /** Round \a x to the nearest multiple of the invert of \a epsilon. For instance, epsilon = 10 will round to 1/10 = 0.1 diff --git a/sources/qet.h b/sources/qet.h index 8c1839bd9..32ea06ab7 100644 --- a/sources/qet.h +++ b/sources/qet.h @@ -156,7 +156,6 @@ namespace QET { QStringList splitWithSpaces(const QString &); QString diagramAreaToString(const QET::DiagramArea &); QET::DiagramArea diagramAreaFromString(const QString &); - QString pointerString(void *); qreal round(qreal, qreal); QPointF roundPoint(const QPointF &, qreal); qreal correctAngle(const qreal &); diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 64a61d9e3..6b46eed81 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -619,7 +619,7 @@ QDomDocument QETProject::toXml() { // Write the diagram to XML only if it is not of type DiagramFolioList. DiagramFolioList *ptr = dynamic_cast(diagram); if ( !ptr ) { - qDebug() << qPrintable(QString("QETProject::toXml() : exporting diagram \"%1\" [%2]").arg(diagram -> title()).arg(QET::pointerString(diagram))); + qDebug() << qPrintable(QString("QETProject::toXml() : exporting diagram \"%1\"").arg(diagram -> title())) << "[" << diagram << "]"; QDomNode appended_diagram = project_root.appendChild(diagram -> writeXml(xml_doc)); appended_diagram.toElement().setAttribute("order", order_num ++); } diff --git a/sources/titleblockcell.cpp b/sources/titleblockcell.cpp index 2c8679d3e..4f77fbadb 100644 --- a/sources/titleblockcell.cpp +++ b/sources/titleblockcell.cpp @@ -23,16 +23,6 @@ TitleBlockCell::TitleBlockCell() { TitleBlockCell::~TitleBlockCell() { } -/** - @return A string representing the titleblock cell -*/ -QString TitleBlockCell::toString() const { - if (cell_type == TitleBlockCell::EmptyCell) return("TitleBlockCell{null}"); - QString span_desc = (row_span > 0 || col_span > 0) ? QString("+%1,%2").arg(row_span).arg(col_span) : QET::pointerString(spanner_cell); - QString base_desc = QString("TitleBlockCell{ [%1, %2] %3 }").arg(num_row).arg(num_col).arg(span_desc); - return(base_desc); -} - /** @return the type of this cell */ diff --git a/sources/titleblockcell.h b/sources/titleblockcell.h index 6a5e9bdec..344b99870 100644 --- a/sources/titleblockcell.h +++ b/sources/titleblockcell.h @@ -43,7 +43,6 @@ class TitleBlockCell { // methods public: - QString toString() const; TemplateCellType type() const; int horizontalAlign() const; int verticalAlign() const; diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp index 3fe40e929..b3827cbf8 100644 --- a/sources/titleblocktemplate.cpp +++ b/sources/titleblocktemplate.cpp @@ -583,21 +583,6 @@ void TitleBlockTemplate::initCells() { #endif } -/** - @return A string representing the titleblock template - @see TitleBlockCell::toString() -*/ -QString TitleBlockTemplate::toString() const { - QString str = "\n"; - for (int j = 0 ; j < rows_heights_.count() ; ++ j) { - for (int i = 0 ; i < columns_width_.count() ; ++ i) { - str += cells_[i][j] -> toString() + " "; - } - str += "\n"; - } - return(str); -} - /** @return the name of this template */ diff --git a/sources/titleblocktemplate.h b/sources/titleblocktemplate.h index 867c1896a..b8bef17b8 100644 --- a/sources/titleblocktemplate.h +++ b/sources/titleblocktemplate.h @@ -99,7 +99,6 @@ class TitleBlockTemplate : public QObject { void render(QPainter &, const DiagramContext &, int) const; void renderDxf(QRectF &, const DiagramContext &, int, QString &, int) const; void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const; - QString toString() const; void applyCellSpans(); void forgetSpanning(); void forgetSpanning(TitleBlockCell *, bool = true);