fix: Compatibility problem with nvenc on windows

* change default chat render to software on windows
This commit is contained in:
Petr Mironychev
2025-09-17 10:20:19 +02:00
parent 76309be0a6
commit 561661b476
4 changed files with 23 additions and 4 deletions

View File

@ -206,6 +206,17 @@ ChatAssistantSettings::ChatAssistantSettings()
textFormat.addOption("HTML");
textFormat.addOption("Plain Text");
chatRenderer.setSettingsKey(Constants::CA_CHAT_RENDERER);
chatRenderer.setLabelText(Tr::tr("Chat Renderer:"));
chatRenderer.addOption("rhi");
chatRenderer.addOption("software");
chatRenderer.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
#ifdef Q_OS_WIN
chatRenderer.setDefaultValue("software");
#else
chatRenderer.setDefaultValue("rhi");
#endif
resetToDefaults.m_buttonText = TrConstants::RESET_TO_DEFAULTS;
readSettings();
@ -233,6 +244,7 @@ ChatAssistantSettings::ChatAssistantSettings()
chatViewSettingsGrid.addRow({textFontFamily, textFontSize});
chatViewSettingsGrid.addRow({codeFontFamily, codeFontSize});
chatViewSettingsGrid.addRow({textFormat});
chatViewSettingsGrid.addRow({chatRenderer});
return Column{Row{Stretch{1}, resetToDefaults},
Space{8},

View File

@ -72,6 +72,8 @@ public:
Utils::IntegerAspect codeFontSize{this};
Utils::SelectionAspect textFormat{this};
Utils::SelectionAspect chatRenderer{this};
private:
void setupConnections();
void resetSettingsToDefaults();

View File

@ -167,5 +167,6 @@ const char CA_TEXT_FONT_SIZE[] = "QodeAssist.caTextFontSize";
const char CA_CODE_FONT_FAMILY[] = "QodeAssist.caCodeFontFamily";
const char CA_CODE_FONT_SIZE[] = "QodeAssist.caCodeFontSize";
const char CA_TEXT_FORMAT[] = "QodeAssist.caTextFormat";
const char CA_CHAT_RENDERER[] = "QodeAssist.caChatRenderer";
} // namespace QodeAssist::Constants