Fix compatibility with Qt 6.4

Signed-off-by: Xu Zhen <xuzhen@users.noreply.github.com>
This commit is contained in:
Xu Zhen
2024-02-05 17:37:59 +08:00
committed by AT
parent ef9717dbe9
commit 0072860d24
4 changed files with 7 additions and 7 deletions

View File

@@ -964,7 +964,7 @@ void ChatLLM::saveState()
if (m_llModelType == LLModelType::CHATGPT_) {
m_state.clear();
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);
stream << chatGPT->context();
return;
@@ -985,7 +985,7 @@ void ChatLLM::restoreState()
if (m_llModelType == LLModelType::CHATGPT_) {
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);
QList<QString> context;
stream >> context;