Tue, 26 Jan 2021 18:02:17 +0200
fix build
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
locale/fi.ts | file | annotate | diff | comparison | revisions | |
src/gl/common.h | file | annotate | diff | comparison | revisions | |
src/gl/partrenderer.cpp | file | annotate | diff | comparison | revisions | |
src/libraries.cpp | file | annotate | diff | comparison | revisions | |
src/tools/basetool.h | file | annotate | diff | comparison | revisions | |
src/ui/canvas.cpp | file | annotate | diff | comparison | revisions | |
src/ui/polygonobjecteditor.cpp | file | annotate | diff | comparison | revisions | |
src/ui/polygonobjecteditor.h | file | annotate | diff | comparison | revisions |
--- a/CMakeLists.txt Tue Jan 26 12:21:35 2021 +0200 +++ b/CMakeLists.txt Tue Jan 26 18:02:17 2021 +0200 @@ -196,7 +196,7 @@ set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) set_target_properties(ldforge PROPERTIES AUTOMOC 1) target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) -add_dependencies(ldforge resources translations) +add_dependencies(ldforge resources) #cotire(ldforge) add_custom_target (config_collection ALL
--- a/locale/fi.ts Tue Jan 26 12:21:35 2021 +0200 +++ b/locale/fi.ts Tue Jan 26 18:02:17 2021 +0200 @@ -309,17 +309,17 @@ <context> <name>QObject</name> <message> - <location filename="../src/gl/partrenderer.cpp" line="249"/> + <location filename="../src/gl/partrenderer.cpp" line="250"/> <source>OpenGL error: %1</source> <translation>OpenGL-virhe: %1</translation> </message> <message> - <location filename="../src/gl/partrenderer.cpp" line="250"/> + <location filename="../src/gl/partrenderer.cpp" line="251"/> <source>OpenGL error</source> <translation>OpenGL-virhe</translation> </message> <message> - <location filename="../src/gl/partrenderer.cpp" line="252"/> + <location filename="../src/gl/partrenderer.cpp" line="253"/> <source>Damn it</source> <translation>Hemmetti</translation> </message>
--- a/src/gl/common.h Tue Jan 26 12:21:35 2021 +0200 +++ b/src/gl/common.h Tue Jan 26 18:02:17 2021 +0200 @@ -17,6 +17,7 @@ */ #pragma once +#include <QWidget> #include <QColor> #include <QOpenGLBuffer> #include <QOpenGLFunctions>
--- a/src/gl/partrenderer.cpp Tue Jan 26 12:21:35 2021 +0200 +++ b/src/gl/partrenderer.cpp Tue Jan 26 18:02:17 2021 +0200 @@ -18,6 +18,7 @@ #include <glm/ext/matrix_transform.hpp> #include <glm/ext/matrix_clip_space.hpp> +#include <GL/glu.h> #include <QMouseEvent> #include <QMessageBox> #include <QAbstractButton> @@ -239,7 +240,7 @@ QStringList errors; while ((glError = glGetError()) != GL_NO_ERROR) { - const QString glErrorString = QString::fromLatin1(reinterpret_cast<const char*>(::gluErrorString(glError))); + const QString glErrorString = QString::fromLatin1(reinterpret_cast<const char*>(gluErrorString(glError))); errors.append(glErrorString); } if (not errors.isEmpty())
--- a/src/libraries.cpp Tue Jan 26 12:21:35 2021 +0200 +++ b/src/libraries.cpp Tue Jan 26 18:02:17 2021 +0200 @@ -376,7 +376,7 @@ QString path; int role; QDataStream& result = stream >> path >> role; - library.path = path; + library.path.setPath(path); library.role = static_cast<Library::Role>(role); return result; }
--- a/src/tools/basetool.h Tue Jan 26 12:21:35 2021 +0200 +++ b/src/tools/basetool.h Tue Jan 26 18:02:17 2021 +0200 @@ -1,4 +1,5 @@ #pragma once +#include <QMouseEvent> #include "../main.h" class BaseTool : public QObject
--- a/src/ui/canvas.cpp Tue Jan 26 12:21:35 2021 +0200 +++ b/src/ui/canvas.cpp Tue Jan 26 18:02:17 2021 +0200 @@ -203,7 +203,7 @@ position += QPointF{0, static_cast<qreal>(-fontMetrics.descent())}; break; case geom::RectangleSide::Right: - position += QPointF{static_cast<qreal>(-fontMetrics.width(text)), 0}; + position += QPointF{static_cast<qreal>(-fontMetrics.horizontalAdvance(text)), 0}; break; } painter.drawText(position, text);
--- a/src/ui/polygonobjecteditor.cpp Tue Jan 26 12:21:35 2021 +0200 +++ b/src/ui/polygonobjecteditor.cpp Tue Jan 26 18:02:17 2021 +0200 @@ -6,8 +6,6 @@ #include "ui/polygonobjecteditor.h" static constexpr char INDEX_NAME[] = "_ldforge_index"; -static constexpr char PROPERTY_NAME[] = "_ldforge_property"; -static constexpr char OBJECT_ID_NAME[] = "_ldforge_id"; static constexpr char LABEL_NAME[] = "_ldforge_label"; PolygonObjectEditor::PolygonObjectEditor(Model* model, ldraw::id_t id, QWidget* parent) :
--- a/src/ui/polygonobjecteditor.h Tue Jan 26 12:21:35 2021 +0200 +++ b/src/ui/polygonobjecteditor.h Tue Jan 26 18:02:17 2021 +0200 @@ -1,5 +1,6 @@ #pragma once #include <QWidget> +#include <QSplitter> #include "main.h" #include "../widgets/vec3editor.h" @@ -19,5 +20,5 @@ Model* model; ldraw::id_t storedObjectId; std::vector<std::unique_ptr<QWidget>> widgets; - std::optional<class QSplitter> splitter; + std::optional<QSplitter> splitter; };