diff --git a/sources/editor/graphicspart/parttext.cpp b/sources/editor/graphicspart/parttext.cpp index e99086488..2f10570dd 100644 --- a/sources/editor/graphicspart/parttext.cpp +++ b/sources/editor/graphicspart/parttext.cpp @@ -102,17 +102,11 @@ const QDomElement PartText::toXml(QDomDocument &xml_document) const { /** @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 diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 148919c85..79c5ef0dd 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -69,10 +69,7 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : //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 *))); diff --git a/sources/qetgraphicsitem/customelement.cpp b/sources/qetgraphicsitem/customelement.cpp index d0ae63453..352753a8d 100644 --- a/sources/qetgraphicsitem/customelement.cpp +++ b/sources/qetgraphicsitem/customelement.cpp @@ -674,14 +674,8 @@ bool CustomElement::parseText(QDomElement &e, QPainter &qp) { */ 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); diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 6b46eed81..b8e393f21 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -506,12 +506,9 @@ void QETProject::setDefaultXRefProperties(const QString type, const XRefProperti emit XRefPropertiesChanged(); } -void QETProject::setDefaultXRefProperties(QHash hash) { -#if QT_VERSION >= 0x040800 +void QETProject::setDefaultXRefProperties(QHash hash) +{ m_default_xref_properties.swap(hash); -#else - m_default_xref_properties = hash; -#endif emit XRefPropertiesChanged(); }