[qet] [4100] Remove all #if QT_VERSION who compare Qt version smaller than 5

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


Revision: 4100
Author:   blacksun
Date:     2015-08-11 10:46:49 +0200 (Tue, 11 Aug 2015)
Log Message:
-----------
Remove all #if QT_VERSION who compare Qt version smaller than 5

Modified Paths:
--------------
    trunk/sources/editor/graphicspart/parttext.cpp
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetgraphicsitem/customelement.cpp
    trunk/sources/qetproject.cpp

Modified: trunk/sources/editor/graphicspart/parttext.cpp
===================================================================
--- trunk/sources/editor/graphicspart/parttext.cpp	2015-08-11 02:46:21 UTC (rev 4099)
+++ trunk/sources/editor/graphicspart/parttext.cpp	2015-08-11 08:46:49 UTC (rev 4100)
@@ -102,17 +102,11 @@
 /**
 	@return Les coordonnees du point situe en bas a gauche du texte.
 */
-QPointF PartText::margin() const {
+QPointF PartText::margin() const
+{
 	QFont used_font = font();
 	QFontMetrics qfm(used_font);
-	
-	// marge du texte
-#if QT_VERSION >= 0x040500
 	qreal document_margin = document() -> documentMargin();
-#else
-	// il semblerait qu'avant Qt 4.5, ceci vaille non pas 4.0 mais 2.0
-	qreal document_margin = 2.0;
-#endif
 	
 	QPointF margin(
 		// marge autour du texte

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2015-08-11 02:46:21 UTC (rev 4099)
+++ trunk/sources/qetdiagrameditor.cpp	2015-08-11 08:46:49 UTC (rev 4100)
@@ -69,10 +69,7 @@
 		//Set object name to be retrieved by the stylesheets
 	workspace.setBackground(QBrush(Qt::NoBrush));
 	workspace.setObjectName("mdiarea");
-	
-#if QT_VERSION >= 0x040800
 	workspace.setTabsClosable(true);
-#endif
 	
 		//Set the signal mapper
 	connect(&windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(activateWidget(QWidget *)));

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2015-08-11 02:46:21 UTC (rev 4099)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2015-08-11 08:46:49 UTC (rev 4100)
@@ -674,14 +674,8 @@
 	*/
 	QPointF qpainter_offset(0.0, -qfm.ascent());
 	
-	// ajuste le decalage selon la marge du document texte
-#if QT_VERSION >= 0x040500
+		//adjusts the offset by the margin of the text document
 	text_document.setDocumentMargin(0.0);
-#else
-	// il semblerait qu'avant Qt 4.5, le documentMargin vaille 2.0 (et pas 4.0)
-	qpainter_offset.rx() -= 2.0;
-	qpainter_offset.ry() -= 2.0;
-#endif
 	
 	qp.translate(qpainter_offset);
 	

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2015-08-11 02:46:21 UTC (rev 4099)
+++ trunk/sources/qetproject.cpp	2015-08-11 08:46:49 UTC (rev 4100)
@@ -506,12 +506,9 @@
 	emit XRefPropertiesChanged();
 }
 
-void QETProject::setDefaultXRefProperties(QHash<QString, XRefProperties> hash) {
-#if QT_VERSION >= 0x040800
+void QETProject::setDefaultXRefProperties(QHash<QString, XRefProperties> hash)
+{
 	m_default_xref_properties.swap(hash);
-#else
-	m_default_xref_properties = hash;
-#endif
 	emit XRefPropertiesChanged();
 }
 


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