diff --git a/dust3d.pro b/dust3d.pro index c0be1869..3591b0b3 100644 --- a/dust3d.pro +++ b/dust3d.pro @@ -11,11 +11,11 @@ QMAKE_TARGET_PRODUCT = Dust3D QMAKE_TARGET_DESCRIPTION = "Aim to be a quick modeling tool for game development" QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2018 Dust3D Project. All Rights Reserved." -DEFINES += "APP_NAME=\"\\\"$$QMAKE_TARGET_PRODUCT\\\"\"" -DEFINES += "APP_VER=\"\\\"$$VERSION\\\"\"" -DEFINES += "APP_HUMAN_VER=\"\\\"$$HUMAN_VERSION\\\"\"" -DEFINES += "APP_REPOSITORY_URL=\"\\\"$$REPOSITORY_URL\\\"\"" -DEFINES += "APP_ISSUES_URL=\"\\\"$$ISSUES_URL\\\"\"" +DEFINES += "PROJECT_DEFINED_APP_NAME=\"\\\"$$QMAKE_TARGET_PRODUCT\\\"\"" +DEFINES += "PROJECT_DEFINED_APP_VER=\"\\\"$$VERSION\\\"\"" +DEFINES += "PROJECT_DEFINED_APP_HUMAN_VER=\"\\\"$$HUMAN_VERSION\\\"\"" +DEFINES += "PROJECT_DEFINED_APP_REPOSITORY_URL=\"\\\"$$REPOSITORY_URL\\\"\"" +DEFINES += "PROJECT_DEFINED_APP_ISSUES_URL=\"\\\"$$ISSUES_URL\\\"\"" include(thirdparty/QtAwesome/QtAwesome/QtAwesome.pri) @@ -83,6 +83,8 @@ HEADERS += src/logbrowserdialog.h SOURCES += src/main.cpp +HEADERS += src/version.h + INCLUDEPATH += ../meshlite/include LIBS += -L../meshlite/target/debug -lmeshlite @@ -98,4 +100,4 @@ INCLUDEPATH += /usr/local/opt/cgal/include LIBS += -L/usr/local/opt/cgal/lib -lCGAL target.path = ./ -INSTALLS += target \ No newline at end of file +INSTALLS += target diff --git a/src/aboutwidget.cpp b/src/aboutwidget.cpp index d6138e44..46305836 100644 --- a/src/aboutwidget.cpp +++ b/src/aboutwidget.cpp @@ -1,6 +1,7 @@ #include #include #include "aboutwidget.h" +#include "version.h" AboutWidget::AboutWidget() { diff --git a/src/meshgenerator.cpp b/src/meshgenerator.cpp index ee12b944..72c9cd0c 100644 --- a/src/meshgenerator.cpp +++ b/src/meshgenerator.cpp @@ -119,8 +119,11 @@ void MeshGenerator::resolveBoundingBox(QRectF *mainProfile, QRectF *sideProfile) zRightFirstTime = false; } } - *mainProfile = QRectF(left, top, right - left, bottom - top); - *sideProfile = QRectF(zLeft, top, zRight - zLeft, bottom - top); + *mainProfile = QRectF(QPointF(left, top), QPointF(right, bottom)); + *sideProfile = QRectF(QPointF(zLeft, top), QPointF(zRight, bottom)); + qDebug() << "resolveBoundingBox left:" << left << "top:" << top << "right:" << right << "bottom:" << bottom << " zLeft:" << zLeft << "zRight:" << zRight; + qDebug() << "mainHeight:" << mainProfile->height() << "mainWidth:" << mainProfile->width(); + qDebug() << "sideHeight:" << sideProfile->height() << "sideWidth:" << sideProfile->width(); } void MeshGenerator::process() diff --git a/src/skeletondocumentwindow.cpp b/src/skeletondocumentwindow.cpp index 0022208e..268edba3 100644 --- a/src/skeletondocumentwindow.cpp +++ b/src/skeletondocumentwindow.cpp @@ -24,6 +24,7 @@ #include "logbrowser.h" #include "util.h" #include "aboutwidget.h" +#include "version.h" QPointer g_logBrowser; std::set g_documentWindows;