mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-05 03:27:09 +00:00
Fix compatibility with Qt 6.4
Signed-off-by: Xu Zhen <xuzhen@users.noreply.github.com>
This commit is contained in:
parent
ef9717dbe9
commit
0072860d24
@ -40,9 +40,9 @@ configure_file(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(LINUX)
|
if(LINUX)
|
||||||
find_package(Qt6 6.5 COMPONENTS Core Quick WaylandCompositor QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED)
|
find_package(Qt6 6.4 COMPONENTS Core Quick WaylandCompositor QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(Qt6 6.5 COMPONENTS Core Quick QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED)
|
find_package(Qt6 6.4 COMPONENTS Core Quick QuickDialogs2 Svg HttpServer Sql Pdf REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Get the Qt6Core target properties
|
# Get the Qt6Core target properties
|
||||||
|
@ -211,7 +211,7 @@ void ChatGPTWorker::handleFinished()
|
|||||||
int code = response.toInt(&ok);
|
int code = response.toInt(&ok);
|
||||||
if (!ok || code != 200) {
|
if (!ok || code != 200) {
|
||||||
qWarning() << QString("ERROR: ChatGPT responded with error code \"%1-%2\"")
|
qWarning() << QString("ERROR: ChatGPT responded with error code \"%1-%2\"")
|
||||||
.arg(code).arg(reply->errorString()).toStdString();
|
.arg(code).arg(reply->errorString());
|
||||||
}
|
}
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
emit finished();
|
emit finished();
|
||||||
@ -280,6 +280,6 @@ void ChatGPTWorker::handleErrorOccurred(QNetworkReply::NetworkError code)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qWarning() << QString("ERROR: ChatGPT responded with error code \"%1-%2\"")
|
qWarning() << QString("ERROR: ChatGPT responded with error code \"%1-%2\"")
|
||||||
.arg(code).arg(reply->errorString()).toStdString();
|
.arg(code).arg(reply->errorString());
|
||||||
emit finished();
|
emit finished();
|
||||||
}
|
}
|
||||||
|
@ -964,7 +964,7 @@ void ChatLLM::saveState()
|
|||||||
if (m_llModelType == LLModelType::CHATGPT_) {
|
if (m_llModelType == LLModelType::CHATGPT_) {
|
||||||
m_state.clear();
|
m_state.clear();
|
||||||
QDataStream stream(&m_state, QIODeviceBase::WriteOnly);
|
QDataStream stream(&m_state, QIODeviceBase::WriteOnly);
|
||||||
stream.setVersion(QDataStream::Qt_6_5);
|
stream.setVersion(QDataStream::Qt_6_4);
|
||||||
ChatGPT *chatGPT = static_cast<ChatGPT*>(m_llModelInfo.model);
|
ChatGPT *chatGPT = static_cast<ChatGPT*>(m_llModelInfo.model);
|
||||||
stream << chatGPT->context();
|
stream << chatGPT->context();
|
||||||
return;
|
return;
|
||||||
@ -985,7 +985,7 @@ void ChatLLM::restoreState()
|
|||||||
|
|
||||||
if (m_llModelType == LLModelType::CHATGPT_) {
|
if (m_llModelType == LLModelType::CHATGPT_) {
|
||||||
QDataStream stream(&m_state, QIODeviceBase::ReadOnly);
|
QDataStream stream(&m_state, QIODeviceBase::ReadOnly);
|
||||||
stream.setVersion(QDataStream::Qt_6_5);
|
stream.setVersion(QDataStream::Qt_6_4);
|
||||||
ChatGPT *chatGPT = static_cast<ChatGPT*>(m_llModelInfo.model);
|
ChatGPT *chatGPT = static_cast<ChatGPT*>(m_llModelInfo.model);
|
||||||
QList<QString> context;
|
QList<QString> context;
|
||||||
stream >> context;
|
stream >> context;
|
||||||
|
@ -1299,7 +1299,7 @@ void ModelList::handleModelsJsonDownloadErrorOccurred(QNetworkReply::NetworkErro
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
qWarning() << QString("ERROR: Modellist download failed with error code \"%1-%2\"")
|
qWarning() << QString("ERROR: Modellist download failed with error code \"%1-%2\"")
|
||||||
.arg(code).arg(reply->errorString()).toStdString();
|
.arg(code).arg(reply->errorString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelList::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
void ModelList::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
|
Loading…
Reference in New Issue
Block a user