diff --git a/src/cellink/widgets/3d.pri b/src/cellink/widgets/3d.pri index d524334..07414d9 100644 --- a/src/cellink/widgets/3d.pri +++ b/src/cellink/widgets/3d.pri @@ -4,10 +4,10 @@ QT += core-private gui-private CONFIG += no_private_qt_headers_warning HEADERS += \ - $$PWD/qt3dwindow.h + $$PWD/qt3dwindow_ci.h SOURCES += \ - $$PWD/qt3dwindow.cpp + $$PWD/qt3dwindow_ci.cpp include($$PWD/../core/global.pri) INCLUDEPATH += \ diff --git a/src/cellink/widgets/codeeditor.cpp b/src/cellink/widgets/codeeditor_ci.cpp similarity index 99% rename from src/cellink/widgets/codeeditor.cpp rename to src/cellink/widgets/codeeditor_ci.cpp index 7d94bf3..41e2f06 100644 --- a/src/cellink/widgets/codeeditor.cpp +++ b/src/cellink/widgets/codeeditor_ci.cpp @@ -35,7 +35,7 @@ ** ****************************************************************************/ -#include "codeeditor.h" +#include "codeeditor_ci.h" #include #include diff --git a/src/cellink/widgets/codeeditor.h b/src/cellink/widgets/codeeditor_ci.h similarity index 85% rename from src/cellink/widgets/codeeditor.h rename to src/cellink/widgets/codeeditor_ci.h index b3feb8a..73f80c9 100644 --- a/src/cellink/widgets/codeeditor.h +++ b/src/cellink/widgets/codeeditor_ci.h @@ -35,14 +35,14 @@ ** ****************************************************************************/ -#ifndef CODEEDITOR_H -#define CODEEDITOR_H +#ifndef CODEEDITOR_CI_H +#define CODEEDITOR_CI_H #include "qtcellink/src/cellink/core/cellink.h" #include -#include "highlightlines.h" +#include "highlightlines_ci.h" class QCompleter; @@ -56,13 +56,13 @@ class Q_CELLINK_EXPORT LineNumberBar : public QWidget Q_PROPERTY(int hzMargin READ hzMargin WRITE setHzMargin NOTIFY hzMarginChanged) public: explicit LineNumberBar(CodeEditor* editor); + LineNumberBar(const LineNumberBar&) = delete; ~LineNumberBar() override; void setHzMargin(int margin); + [[nodiscard]] int hzMargin() const { return m_hzMargin; } - int hzMargin() const { return m_hzMargin; } - - QSize sizeHint() const override { return m_size; } + [[nodiscard]] QSize sizeHint() const override { return m_size; } protected: void paintEvent(QPaintEvent* event) override; @@ -86,17 +86,18 @@ class Q_CELLINK_EXPORT CodeEditor : public QPlainTextEdit Q_PROPERTY(HighlightLines highlightLines READ highlightLines NOTIFY highlightLinesChanged) public: explicit CodeEditor(QWidget* parent = nullptr); + CodeEditor(const CodeEditor&) = delete; ~CodeEditor() override; - QCompleter* completer() const { return m_completer; } + [[nodiscard]] QCompleter* completer() const { return m_completer; } void setCompleter(QCompleter* completer); - qreal highlightLineColorAlpha() const { return m_highlightLineColorAlpha; } + [[nodiscard]] qreal highlightLineColorAlpha() const { return m_highlightLineColorAlpha; } void setHighlightLineColorAlpha(qreal alpha); - LineNumberBar& lineNumberBar() { return m_lineNumberBar; } + [[nodiscard]] LineNumberBar& lineNumberBar() { return m_lineNumberBar; } - HighlightLines highlightLines() const { return m_highlightLines; } + [[nodiscard]] HighlightLines highlightLines() const { return m_highlightLines; } protected: void focusInEvent(QFocusEvent* event) override; @@ -119,7 +120,7 @@ private slots: void insertCompletion(const QString& completion); private: - QString textUnderCursor() const; + [[nodiscard]] QString textUnderCursor() const; void paintLineNumbers(QPainter* painter, const QRect& rect); void updateHighlightLines(bool cursorChanged); @@ -134,4 +135,4 @@ private slots: } // namespace cellink -#endif // CODEEDITOR_H +#endif // CODEEDITOR_CI_H diff --git a/src/cellink/widgets/doublespinbox.cpp b/src/cellink/widgets/doublespinbox_ci.cpp similarity index 95% rename from src/cellink/widgets/doublespinbox.cpp rename to src/cellink/widgets/doublespinbox_ci.cpp index 30575d1..1fe5cf8 100644 --- a/src/cellink/widgets/doublespinbox.cpp +++ b/src/cellink/widgets/doublespinbox_ci.cpp @@ -1,4 +1,4 @@ -#include "doublespinbox.h" +#include "doublespinbox_ci.h" namespace cellink { diff --git a/src/cellink/widgets/doublespinbox.h b/src/cellink/widgets/doublespinbox_ci.h similarity index 87% rename from src/cellink/widgets/doublespinbox.h rename to src/cellink/widgets/doublespinbox_ci.h index a019366..076f08d 100644 --- a/src/cellink/widgets/doublespinbox.h +++ b/src/cellink/widgets/doublespinbox_ci.h @@ -1,5 +1,5 @@ -#ifndef DOUBLESPINBOX_H -#define DOUBLESPINBOX_H +#ifndef DOUBLESPINBOX_CI_H +#define DOUBLESPINBOX_CI_H #include "qtcellink/src/cellink/core/cellink.h" @@ -30,4 +30,4 @@ class Q_CELLINK_EXPORT DoubleSpinBox : public QDoubleSpinBox } // namespace cellink -#endif // DOUBLESPINBOX_H +#endif // DOUBLESPINBOX_CI_H diff --git a/src/cellink/widgets/highlightlines.h b/src/cellink/widgets/highlightlines_ci.h similarity index 100% rename from src/cellink/widgets/highlightlines.h rename to src/cellink/widgets/highlightlines_ci.h diff --git a/src/cellink/widgets/progressindicator.cpp b/src/cellink/widgets/progressindicator_ci.cpp similarity index 99% rename from src/cellink/widgets/progressindicator.cpp rename to src/cellink/widgets/progressindicator_ci.cpp index 7d933f1..394eac6 100644 --- a/src/cellink/widgets/progressindicator.cpp +++ b/src/cellink/widgets/progressindicator_ci.cpp @@ -23,7 +23,7 @@ * SOFTWARE. */ -#include "progressindicator.h" +#include "progressindicator_ci.h" #include diff --git a/src/cellink/widgets/progressindicator.h b/src/cellink/widgets/progressindicator_ci.h similarity index 97% rename from src/cellink/widgets/progressindicator.h rename to src/cellink/widgets/progressindicator_ci.h index e5a819f..e576124 100644 --- a/src/cellink/widgets/progressindicator.h +++ b/src/cellink/widgets/progressindicator_ci.h @@ -23,8 +23,8 @@ * SOFTWARE. */ -#ifndef PROGRESSINDICATOR_H -#define PROGRESSINDICATOR_H +#ifndef PROGRESSINDICATOR_CI_H +#define PROGRESSINDICATOR_CI_H #include "qtcellink/src/cellink/core/cellink.h" @@ -124,4 +124,4 @@ public slots: } // namespace cellink -#endif // PROGRESSINDICATOR_H +#endif // PROGRESSINDICATOR_CI_H diff --git a/src/cellink/widgets/qt3dwindow.cpp b/src/cellink/widgets/qt3dwindow_ci.cpp similarity index 99% rename from src/cellink/widgets/qt3dwindow.cpp rename to src/cellink/widgets/qt3dwindow_ci.cpp index c3079a0..d24e55b 100644 --- a/src/cellink/widgets/qt3dwindow.cpp +++ b/src/cellink/widgets/qt3dwindow_ci.cpp @@ -48,7 +48,7 @@ ** ****************************************************************************/ -#include "qt3dwindow.h" +#include "qt3dwindow_ci.h" #include #include @@ -105,7 +105,7 @@ class Qt3DWindowPrivate : public QWindowPrivate bool m_initialized; - Q_DECLARE_PUBLIC(Qt3DWindow) + Q_DECLARE_PUBLIC(QtCellink::Qt3DWindow) }; Qt3DWindowPrivate::Qt3DWindowPrivate() diff --git a/src/cellink/widgets/qt3dwindow.h b/src/cellink/widgets/qt3dwindow_ci.h similarity index 99% rename from src/cellink/widgets/qt3dwindow.h rename to src/cellink/widgets/qt3dwindow_ci.h index b861388..00e1778 100644 --- a/src/cellink/widgets/qt3dwindow.h +++ b/src/cellink/widgets/qt3dwindow_ci.h @@ -51,7 +51,7 @@ #ifndef QTCELLINK3DWINDOW_H #define QTCELLINK3DWINDOW_H -#include "qtcellink/src/cellink/core/cellink.h" +#include "../core/cellink.h" #include #include diff --git a/src/cellink/widgets/rangeslider.cpp b/src/cellink/widgets/rangeslider_ci.cpp similarity index 99% rename from src/cellink/widgets/rangeslider.cpp rename to src/cellink/widgets/rangeslider_ci.cpp index d12048b..c6de904 100644 --- a/src/cellink/widgets/rangeslider.cpp +++ b/src/cellink/widgets/rangeslider_ci.cpp @@ -23,7 +23,7 @@ ** ** ****************************************************************************/ -#include "rangeslider.h" +#include "rangeslider_ci.h" #include #include diff --git a/src/cellink/widgets/rangeslider.h b/src/cellink/widgets/rangeslider_ci.h similarity index 97% rename from src/cellink/widgets/rangeslider.h rename to src/cellink/widgets/rangeslider_ci.h index a0ac53f..334ebe1 100644 --- a/src/cellink/widgets/rangeslider.h +++ b/src/cellink/widgets/rangeslider_ci.h @@ -23,8 +23,8 @@ ** ** ****************************************************************************/ -#ifndef RANGESLIDER_H -#define RANGESLIDER_H +#ifndef RANGESLIDER_CI_H +#define RANGESLIDER_CI_H #include "qtcellink/src/cellink/core/cellink.h" @@ -107,4 +107,4 @@ public Q_SLOTS: } // namespace cellink -#endif // RANGESLIDER_H +#endif // RANGESLIDER_CI_H diff --git a/src/cellink/widgets/spinbox.cpp b/src/cellink/widgets/spinbox_ci.cpp similarity index 96% rename from src/cellink/widgets/spinbox.cpp rename to src/cellink/widgets/spinbox_ci.cpp index 7083c2f..21da772 100644 --- a/src/cellink/widgets/spinbox.cpp +++ b/src/cellink/widgets/spinbox_ci.cpp @@ -1,4 +1,4 @@ -#include "spinbox.h" +#include "spinbox_ci.h" namespace cellink { diff --git a/src/cellink/widgets/spinbox.h b/src/cellink/widgets/spinbox_ci.h similarity index 91% rename from src/cellink/widgets/spinbox.h rename to src/cellink/widgets/spinbox_ci.h index 80a103d..78c7458 100644 --- a/src/cellink/widgets/spinbox.h +++ b/src/cellink/widgets/spinbox_ci.h @@ -1,5 +1,5 @@ -#ifndef SPINBOX_H -#define SPINBOX_H +#ifndef SPINBOX_CI_H +#define SPINBOX_CI_H #include "qtcellink/src/cellink/core/cellink.h" @@ -32,4 +32,4 @@ class Q_CELLINK_EXPORT SpinBox : public QSpinBox } // namespace cellink -#endif // SPINBOX_H +#endif // SPINBOX_CI_H diff --git a/src/cellink/widgets/widgets.pri b/src/cellink/widgets/widgets.pri index b7bec93..968a9f4 100644 --- a/src/cellink/widgets/widgets.pri +++ b/src/cellink/widgets/widgets.pri @@ -3,19 +3,20 @@ DEPENDPATH += $$PWD QT += widgets HEADERS += \ - $$PWD/codeeditor.h \ - $$PWD/doublespinbox.h \ - $$PWD/highlightlines.h \ - $$PWD/progressindicator.h \ - $$PWD/rangeslider.h \ - $$PWD/spinbox.h + $$PWD/codeeditor_ci.h \ + $$PWD/doublespinbox_ci.h \ + $$PWD/highlightlines_ci.h \ + $$PWD/progressindicator_ci.h \ + $$PWD/rangeslider_ci.h \ + $$PWD/spinbox_ci.h +# _ci suffix to avoid .obj clash with qtcellinkinternal/widgets/ .cpp files with same name SOURCES += \ - $$PWD/codeeditor.cpp \ - $$PWD/doublespinbox.cpp \ - $$PWD/progressindicator.cpp \ - $$PWD/rangeslider.cpp \ - $$PWD/spinbox.cpp + $$PWD/codeeditor_ci.cpp \ + $$PWD/doublespinbox_ci.cpp \ + $$PWD/progressindicator_ci.cpp \ + $$PWD/rangeslider_ci.cpp \ + $$PWD/spinbox_ci.cpp include($$PWD/../core/global.pri) INCLUDEPATH += \ diff --git a/src/plugins/geometryloaders/amf/amf.pro b/src/plugins/geometryloaders/amf/amf.pro index f2abacb..2b98867 100644 --- a/src/plugins/geometryloaders/amf/amf.pro +++ b/src/plugins/geometryloaders/amf/amf.pro @@ -1,6 +1,5 @@ TARGET = amfgeometryloader QT += core-private 3dcore 3dcore-private 3drender 3drender-private -CONFIG += assimp INCLUDEPATH += \ $$MOC_DIR @@ -20,11 +19,14 @@ DISTFILES += \ PLUGIN_TYPE = geometryloaders PLUGIN_CLASS_NAME = AmfGeometryLoaderPlugin -load(assimp) load(qt_build_config) load(qt_plugin) exists($$BUILD_TREE/conanbuildinfo.pri) { CONFIG += conan_basic_setup include($$BUILD_TREE/conanbuildinfo.pri) +} else { + CONFIG += assimp + warning("Need assimp included via conan in the top level project, attempting to sideload") + load(assimp) } diff --git a/src/plugins/geometryloaders/amf/amfgeometryloader.h b/src/plugins/geometryloaders/amf/amfgeometryloader.h index a05c465..e1a1aef 100644 --- a/src/plugins/geometryloaders/amf/amfgeometryloader.h +++ b/src/plugins/geometryloaders/amf/amfgeometryloader.h @@ -26,6 +26,7 @@ class AmfGeometryLoader : public Qt3DRender::BaseGeometryLoader { + Q_OBJECT protected: bool doLoad(QIODevice* ioDev, const QString& subMesh) final; };