diff options
author | Petr Vanek <petr@scribus.info> | 2009-03-18 09:17:52 +0100 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2009-03-18 09:17:52 +0100 |
commit | 04003cef37595c7b6f8de37afb7f0c46a0b5ed94 (patch) | |
tree | fd7ed832050f607c208652f8bfa7fd7b6acfc65c /src | |
parent | 79ca42fb34cc8f2a4fe893fcdccb9b385f4e1ba2 (diff) | |
download | dbmodel-04003cef37595c7b6f8de37afb7f0c46a0b5ed94.tar.xz |
A few Windows-related bug/warning fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/hub.h | 2 | ||||
-rw-r--r-- | src/items/database/databaserelationship.cpp | 4 | ||||
-rw-r--r-- | src/items/database/databasetable.cpp | 6 | ||||
-rw-r--r-- | src/src.pro | 6 |
4 files changed, 13 insertions, 5 deletions
@@ -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*>(column)); static_cast<DatabaseTable *>(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*>(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 += . +} |