Fix ios compile errors.

This commit is contained in:
Leonardo Zide
2026-06-11 20:07:56 -07:00
parent 60c4a674c6
commit 357301b3f1
6 changed files with 42 additions and 24 deletions
+6 -2
View File
@@ -1,5 +1,4 @@
#include <zlib.h> #include "lc_global.h"
#include "lc_blenderpreferences.h" #include "lc_blenderpreferences.h"
#include "lc_application.h" #include "lc_application.h"
#include "lc_mainwindow.h" #include "lc_mainwindow.h"
@@ -12,6 +11,9 @@
#include "lc_file.h" #include "lc_file.h"
#include "lc_qutils.h" #include "lc_qutils.h"
#include "project.h" #include "project.h"
#include <zlib.h>
#ifndef LC_DISABLE_BLENDER
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
using Qt::SkipEmptyParts; using Qt::SkipEmptyParts;
@@ -3861,3 +3863,5 @@ bool lcBlenderPreferences::ExtractAddon(const QString FileName, QString& Result)
return Ok; return Ok;
} }
#endif // !LC_DISABLE_BLENDER
+4
View File
@@ -1,5 +1,7 @@
#pragma once #pragma once
#ifndef LC_DISABLE_BLENDER
#define LC_UNIX_SHELL "/bin/sh" #define LC_UNIX_SHELL "/bin/sh"
#define LC_WINDOWS_SHELL "cmd.exe" #define LC_WINDOWS_SHELL "cmd.exe"
#define LC_BLENDER_ADDON_BLEND_FILE "leocad.blend" #define LC_BLENDER_ADDON_BLEND_FILE "leocad.blend"
@@ -438,3 +440,5 @@ private:
}; };
extern class lcBlenderPreferences* gAddonPreferences; extern class lcBlenderPreferences* gAddonPreferences;
#endif // !LC_DISABLE_BLENDER
-4
View File
@@ -43,10 +43,6 @@ class QPrinter;
#define QT_STRINGIFY(x) QT_STRINGIFY2(x) #define QT_STRINGIFY(x) QT_STRINGIFY2(x)
#endif #endif
#ifdef QT_NO_PROCESS
#define LC_DISABLE_RENDER_DIALOG
#endif
#define LC_ARRAY_COUNT(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) #define LC_ARRAY_COUNT(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
#define LC_ARRAY_SIZE_CHECK(a,s) static_assert(LC_ARRAY_COUNT(a) == static_cast<int>(s), QT_STRINGIFY(a) " size mismatch.") #define LC_ARRAY_SIZE_CHECK(a,s) static_assert(LC_ARRAY_COUNT(a) == static_cast<int>(s), QT_STRINGIFY(a) " size mismatch.")
+5
View File
@@ -164,6 +164,11 @@ macx {
DEFINES += LC_DISABLE_UPDATE_CHECK=1 DEFINES += LC_DISABLE_UPDATE_CHECK=1
} }
ios {
DEFINES += LC_DISABLE_RENDER_DIALOG=1
DEFINES += LC_DISABLE_BLENDER=1
}
SOURCES += \ SOURCES += \
common/camera.cpp \ common/camera.cpp \
common/group.cpp \ common/group.cpp \
+2 -4
View File
@@ -426,6 +426,7 @@ void lcPreferencesDialog::PartsArchiveBrowseClicked()
void lcPreferencesDialog::BlenderAddonSettingsButtonClicked() void lcPreferencesDialog::BlenderAddonSettingsButtonClicked()
{ {
#ifndef LC_DISABLE_BLENDER
int Width = 1280; int Width = 1280;
int Height = 720; int Height = 720;
double Scale = 1.0f; double Scale = 1.0f;
@@ -435,10 +436,7 @@ void lcPreferencesDialog::BlenderAddonSettingsButtonClicked()
Height, Height,
Scale, Scale,
this); this);
#endif // !LC_BLENDER_DISABLED
Q_UNUSED(Width)
Q_UNUSED(Height)
Q_UNUSED(Scale)
} }
void lcPreferencesDialog::ColorConfigBrowseButtonClicked() void lcPreferencesDialog::ColorConfigBrowseButtonClicked()
+25 -14
View File
@@ -1,5 +1,19 @@
#pragma once #pragma once
enum class lcPOVRayRenderQuality
{
Low,
Medium,
High
};
enum class lcRenderDialogMode
{
RenderPOVRay,
RenderBlender,
OpenInBlender
};
#ifndef LC_DISABLE_RENDER_DIALOG #ifndef LC_DISABLE_RENDER_DIALOG
namespace Ui { namespace Ui {
@@ -43,20 +57,6 @@ protected:
QImage mScaledImage; QImage mScaledImage;
}; };
enum class lcRenderDialogMode
{
RenderPOVRay,
RenderBlender,
OpenInBlender
};
enum class lcPOVRayRenderQuality
{
Low,
Medium,
High
};
class lcRenderDialog : public QDialog class lcRenderDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@@ -116,4 +116,15 @@ protected:
Ui::lcRenderDialog* ui; Ui::lcRenderDialog* ui;
}; };
#else
class lcRenderPreviewWidget : public QWidget
{
public:
explicit lcRenderPreviewWidget(QWidget* Parent)
: QWidget(Parent)
{
}
};
#endif // LC_DISABLE_RENDER_DIALOG #endif // LC_DISABLE_RENDER_DIALOG