[qet] [4083] Fix FTBFS on x86_64-w64-mingw32 cross-compilation, thank Joshua

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4083
Author:   scorpio810
Date:     2015-08-03 07:43:44 +0200 (Mon, 03 Aug 2015)
Log Message:
-----------
Fix FTBFS on x86_64-w64-mingw32 cross-compilation, thank Joshua

Modified Paths:
--------------
    trunk/sources/diagram.cpp
    trunk/sources/qet.cpp
    trunk/sources/qet.h
    trunk/sources/qetproject.cpp
    trunk/sources/titleblockcell.cpp
    trunk/sources/titleblockcell.h
    trunk/sources/titleblocktemplate.cpp
    trunk/sources/titleblocktemplate.h

Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/diagram.cpp	2015-08-03 05:43:44 UTC (rev 4083)
@@ -817,8 +817,9 @@
 	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());
 }
 

Modified: trunk/sources/qet.cpp
===================================================================
--- trunk/sources/qet.cpp	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/qet.cpp	2015-08-03 05:43:44 UTC (rev 4083)
@@ -541,28 +541,6 @@
 }
 
 /**
-	@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<unsigned long int>::digits / 4;
-	}
-	
-	return(
-		QString("0x%1").arg(
-			reinterpret_cast<unsigned long int>(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
 */

Modified: trunk/sources/qet.h
===================================================================
--- trunk/sources/qet.h	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/qet.h	2015-08-03 05:43:44 UTC (rev 4083)
@@ -156,7 +156,6 @@
 	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 &);

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/qetproject.cpp	2015-08-03 05:43:44 UTC (rev 4083)
@@ -619,7 +619,7 @@
 		// Write the diagram to XML only if it is not of type DiagramFolioList.
 		DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(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 ++);
 		}

Modified: trunk/sources/titleblockcell.cpp
===================================================================
--- trunk/sources/titleblockcell.cpp	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/titleblockcell.cpp	2015-08-03 05:43:44 UTC (rev 4083)
@@ -24,16 +24,6 @@
 }
 
 /**
-	@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
 */
 TitleBlockCell::TemplateCellType TitleBlockCell::type() const {

Modified: trunk/sources/titleblockcell.h
===================================================================
--- trunk/sources/titleblockcell.h	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/titleblockcell.h	2015-08-03 05:43:44 UTC (rev 4083)
@@ -43,7 +43,6 @@
 	
 	// methods
 	public:
-	QString toString() const;
 	TemplateCellType type() const;
 	int horizontalAlign() const;
 	int verticalAlign() const;

Modified: trunk/sources/titleblocktemplate.cpp
===================================================================
--- trunk/sources/titleblocktemplate.cpp	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/titleblocktemplate.cpp	2015-08-03 05:43:44 UTC (rev 4083)
@@ -584,21 +584,6 @@
 }
 
 /**
-	@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
 */
 QString TitleBlockTemplate::name() const {

Modified: trunk/sources/titleblocktemplate.h
===================================================================
--- trunk/sources/titleblocktemplate.h	2015-07-31 14:20:56 UTC (rev 4082)
+++ trunk/sources/titleblocktemplate.h	2015-08-03 05:43:44 UTC (rev 4083)
@@ -99,7 +99,6 @@
 	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);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/