Fix Blender 2.83 & Qt 5.15

This commit is contained in:
Luke Street 2020-06-24 11:44:00 -04:00
parent 0dd67e0662
commit af64349044
4 changed files with 35 additions and 13 deletions

View File

@ -58,8 +58,7 @@ void DownloadManager::fetchIndex() {
m_indexInProgress = m_netManager.get(QNetworkRequest(url)); m_indexInProgress = m_netManager.get(QNetworkRequest(url));
connect(m_indexInProgress, &QNetworkReply::finished, this, &DownloadManager::indexFinished); connect(m_indexInProgress, &QNetworkReply::finished, this, &DownloadManager::indexFinished);
connect(m_indexInProgress, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, connect(m_indexInProgress, &QNetworkReply::errorOccurred, this, &DownloadManager::indexError);
&DownloadManager::indexError);
connect(m_indexInProgress, &QNetworkReply::encrypted, this, &DownloadManager::indexValidateCert); connect(m_indexInProgress, &QNetworkReply::encrypted, this, &DownloadManager::indexValidateCert);
} }
@ -75,8 +74,7 @@ void DownloadManager::fetchBinary(const QString& str, const QString& outPath) {
const auto url = QUrl(QStringLiteral("%1%2/%3/%4").arg(Domain, track, CurPlatformString, str)); const auto url = QUrl(QStringLiteral("%1%2/%3/%4").arg(Domain, track, CurPlatformString, str));
m_binaryInProgress = m_netManager.get(QNetworkRequest(url)); m_binaryInProgress = m_netManager.get(QNetworkRequest(url));
connect(m_binaryInProgress, &QNetworkReply::finished, this, &DownloadManager::binaryFinished); connect(m_binaryInProgress, &QNetworkReply::finished, this, &DownloadManager::binaryFinished);
connect(m_binaryInProgress, qOverload<QNetworkReply::NetworkError>(&QNetworkReply::error), this, connect(m_binaryInProgress, &QNetworkReply::errorOccurred, this, &DownloadManager::binaryError);
&DownloadManager::binaryError);
connect(m_binaryInProgress, &QNetworkReply::encrypted, this, &DownloadManager::binaryValidateCert); connect(m_binaryInProgress, &QNetworkReply::encrypted, this, &DownloadManager::binaryValidateCert);
connect(m_binaryInProgress, &QNetworkReply::downloadProgress, this, &DownloadManager::binaryDownloadProgress); connect(m_binaryInProgress, &QNetworkReply::downloadProgress, this, &DownloadManager::binaryDownloadProgress);

View File

@ -12,7 +12,7 @@ namespace hecl::blender {
#define DEFAULT_BLENDER_BIN "blender" #define DEFAULT_BLENDER_BIN "blender"
#endif #endif
static const std::regex regBlenderVersion(R"(Blender ([0-9]+).([0-9]+) )", static const std::regex regBlenderVersion(R"(Blender (\d+)\.(\d+)(?:\.(\d+))?)",
std::regex::ECMAScript | std::regex::optimize); std::regex::ECMAScript | std::regex::optimize);
static bool RegFileExists(const hecl::SystemChar* path) { static bool RegFileExists(const hecl::SystemChar* path) {

View File

@ -503,7 +503,7 @@ void MainWindow::setPath(const QString& path) {
} }
void MainWindow::initSlots() { void MainWindow::initSlots() {
connect(&m_heclProc, &QProcess::readyRead, [=]() { connect(&m_heclProc, &QProcess::readyRead, [this]() {
const QByteArray bytes = m_heclProc.readAll(); const QByteArray bytes = m_heclProc.readAll();
setTextTermFormatting(QString::fromUtf8(bytes)); setTextTermFormatting(QString::fromUtf8(bytes));
}); });
@ -512,7 +512,7 @@ void MainWindow::initSlots() {
connect(m_ui->packageBtn, &QPushButton::clicked, this, &MainWindow::onPackage); connect(m_ui->packageBtn, &QPushButton::clicked, this, &MainWindow::onPackage);
connect(m_ui->launchBtn, &QPushButton::clicked, this, &MainWindow::onLaunch); connect(m_ui->launchBtn, &QPushButton::clicked, this, &MainWindow::onLaunch);
connect(m_ui->browseBtn, &QPushButton::clicked, [=]() { connect(m_ui->browseBtn, &QPushButton::clicked, [this]() {
FileDirDialog dialog(this); FileDirDialog dialog(this);
dialog.setDirectory(m_path); dialog.setDirectory(m_path);
dialog.setWindowTitle(tr("Select Working Directory")); dialog.setWindowTitle(tr("Select Working Directory"));
@ -690,9 +690,9 @@ void MainWindow::initNumberComboOption(QComboBox* action, hecl::CVar* cvar) {
} }
} }
action->setToolTip(QString::fromUtf8(cvar->rawHelp().data())); action->setToolTip(QString::fromUtf8(cvar->rawHelp().data()));
connect(action, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), this, connect(action, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
[this, cvar](const QString& value) { [this, action, cvar](const int i) {
cvar->fromInteger(value.toInt()); cvar->fromInteger(action->itemText(i).toInt());
m_cvarManager.serialize(); m_cvarManager.serialize();
}); });
} }

View File

@ -79,7 +79,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QTabWidget" name="heclTabs"> <widget class="QTabWidget" name="heclTabs">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="dataTab"> <widget class="QWidget" name="dataTab">
<attribute name="title"> <attribute name="title">
@ -223,7 +223,7 @@
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="graphicsOptionsGroup"> <widget class="QGroupBox" name="graphicsOptionsGroup">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -234,6 +234,12 @@
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout_6">
<item row="4" column="1"> <item row="4" column="1">
<widget class="QComboBox" name="anistropicFilteringBox"> <widget class="QComboBox" name="anistropicFilteringBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>1</string> <string>1</string>
@ -270,6 +276,12 @@
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="antialiasingBox"> <widget class="QComboBox" name="antialiasingBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>1</string> <string>1</string>
@ -457,6 +469,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>396</width>
<height>0</height>
</size>
</property>
<property name="title"> <property name="title">
<string>Launch Options</string> <string>Launch Options</string>
</property> </property>
@ -499,6 +517,12 @@
</item> </item>
<item row="4" column="1" rowspan="2"> <item row="4" column="1" rowspan="2">
<widget class="QGroupBox" name="tweaksOptionsGroup"> <widget class="QGroupBox" name="tweaksOptionsGroup">
<property name="minimumSize">
<size>
<width>396</width>
<height>0</height>
</size>
</property>
<property name="title"> <property name="title">
<string>Tweaks</string> <string>Tweaks</string>
</property> </property>
@ -1096,7 +1120,7 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:600;&quot;&gt;About HECL Frontend&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:600;&quot;&gt;About HECL Frontend&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;The HECL frontend UI is designed and built by &lt;/span&gt;&lt;a href=&quot;https://axiodl.com&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;Axiomatic Data Laboratories&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt; Copyright 2020&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:600;&quot;&gt;Authors:&lt;/span&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;Phillip &amp;quot;Antidote&amp;quot; Stephens&lt;br /&gt;Jack &amp;quot;jackoalan&amp;quot; Andersen&lt;br /&gt;Luke &amp;quot;encounter&amp;quot; Street&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;The HECL frontend UI is designed and built by &lt;/span&gt;&lt;a href=&quot;https://axiodl.com&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; text-decoration: underline; color:#007af4;&quot;&gt;Axiomatic Data Laboratories&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt; Copyright 2020&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:600;&quot;&gt;Authors:&lt;/span&gt;&lt;span style=&quot; font-family:'Noto Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;Phillip &amp;quot;Antidote&amp;quot; Stephens&lt;br /&gt;Jack &amp;quot;jackoalan&amp;quot; Andersen&lt;br /&gt;Luke &amp;quot;encounter&amp;quot; Street&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New'; font-size:10pt;&quot;&gt;The MIT License&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New'; font-size:10pt;&quot;&gt;The MIT License&lt;/span&gt;&lt;/p&gt;