From 04003cef37595c7b6f8de37afb7f0c46a0b5ed94 Mon Sep 17 00:00:00 2001 From: Petr Vanek Date: Wed, 18 Mar 2009 09:17:52 +0100 Subject: A few Windows-related bug/warning fixes --- src/hub.h | 2 ++ src/items/database/databaserelationship.cpp | 4 ++-- src/items/database/databasetable.cpp | 6 +++--- src/src.pro | 6 ++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/hub.h b/src/hub.h index 1e593e5..a109c8b 100644 --- a/src/hub.h +++ b/src/hub.h @@ -26,6 +26,8 @@ class Hub { public: Hub(DiagramObject *owner); + // Virtual destructor provided to reduce compiler warnings + virtual ~Hub() {}; DiagramObject *owner() const; void addConnector(Connector *connector); diff --git a/src/items/database/databaserelationship.cpp b/src/items/database/databaserelationship.cpp index c1cddce..751bb90 100644 --- a/src/items/database/databaserelationship.cpp +++ b/src/items/database/databaserelationship.cpp @@ -178,7 +178,7 @@ DatabaseRelationship::setChildColumn(Column *column) { if (d->childColumn != column) { d->childColumn = column; - emit propertyChanged("childColumn", column); + emit propertyChanged("childColumn", qVariantFromValue(column)); static_cast(connector(0)->hub()->owner())->updateLayout(); updateLayout(); update(); @@ -196,7 +196,7 @@ DatabaseRelationship::setParentColumn(Column *column) { if (d->parentColumn != column) { d->parentColumn = column; - emit propertyChanged("parentColumn", column); + emit propertyChanged("parentColumn", qVariantFromValue(column)); updateLayout(); update(); } diff --git a/src/items/database/databasetable.cpp b/src/items/database/databasetable.cpp index a987984..8f36308 100644 --- a/src/items/database/databasetable.cpp +++ b/src/items/database/databasetable.cpp @@ -68,7 +68,7 @@ DatabaseTable::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QPen pen(QPen(QColor(0, 0, 0))); pen.setJoinStyle(Qt::MiterJoin); QPen borderPen(pen); - borderPen.setWidth(1.5); + borderPen.setWidthF(1.5); if (!document()->isPrinting() && isSelected()) { borderPen.setColor(QColor(0, 96, 255)); } @@ -84,8 +84,8 @@ DatabaseTable::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->drawText(m_namePos, m_name); painter->drawLine( - m_leftSideWidth, m_nameBgRect.bottom(), - m_leftSideWidth, m_outerRect.bottom()); + QPointF(m_leftSideWidth, m_nameBgRect.bottom()), + QPointF(m_leftSideWidth, m_outerRect.bottom())); // Draw the table name QPointF colPos = m_firstColPos; diff --git a/src/src.pro b/src/src.pro index 8e470e9..63935ab 100644 --- a/src/src.pro +++ b/src/src.pro @@ -30,3 +30,9 @@ unix { INSTALLS += target target.path = $$BINDIR } + +# It's required for windows correct include path. +# Dunno why... +win32 { + INCLUDEPATH += . +} -- cgit v1.2.3-54-g00ecf