mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-08 03:49:10 +00:00
Enable the force metal setting.
This commit is contained in:
31
gpt4all-chat/mysettings.cpp
Normal file
31
gpt4all-chat/mysettings.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "mysettings.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
class MyPrivateSettings: public MySettings { };
|
||||
Q_GLOBAL_STATIC(MyPrivateSettings, settingsInstance)
|
||||
MySettings *MySettings::globalInstance()
|
||||
{
|
||||
return settingsInstance();
|
||||
}
|
||||
|
||||
MySettings::MySettings()
|
||||
: QObject{nullptr}
|
||||
{
|
||||
QSettings settings;
|
||||
settings.sync();
|
||||
m_forceMetal = settings.value("forceMetal", false).toBool();
|
||||
}
|
||||
|
||||
bool MySettings::forceMetal() const
|
||||
{
|
||||
return m_forceMetal;
|
||||
}
|
||||
|
||||
void MySettings::setForceMetal(bool enabled)
|
||||
{
|
||||
if (m_forceMetal == enabled)
|
||||
return;
|
||||
m_forceMetal = enabled;
|
||||
emit forceMetalChanged(enabled);
|
||||
}
|
Reference in New Issue
Block a user