mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
29 lines
507 B
C++
29 lines
507 B
C++
|
#include "mysettings.h"
|
||
|
|
||
|
#include <QSettings>
|
||
|
|
||
|
class MyPrivateSettings: public MySettings { };
|
||
|
Q_GLOBAL_STATIC(MyPrivateSettings, settingsInstance)
|
||
|
MySettings *MySettings::globalInstance()
|
||
|
{
|
||
|
return settingsInstance();
|
||
|
}
|
||
|
|
||
|
MySettings::MySettings()
|
||
|
: QObject{nullptr}
|
||
|
{
|
||
|
}
|
||
|
|
||
|
bool MySettings::forceMetal() const
|
||
|
{
|
||
|
return m_forceMetal;
|
||
|
}
|
||
|
|
||
|
void MySettings::setForceMetal(bool enabled)
|
||
|
{
|
||
|
if (m_forceMetal == enabled)
|
||
|
return;
|
||
|
m_forceMetal = enabled;
|
||
|
emit forceMetalChanged(enabled);
|
||
|
}
|