mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed bug in the default value for USE_OPEN_GL
fixed settings file path in ShortcutsManager
This commit is contained in:
parent
a64733d70b
commit
e6620a46ed
@ -67,9 +67,9 @@ shouldOpenPrevious(false)
|
|||||||
|
|
||||||
//CONFIG GOTO_FLOW--------------------------------------------------------
|
//CONFIG GOTO_FLOW--------------------------------------------------------
|
||||||
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
|
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
|
||||||
|
{
|
||||||
settings->setValue(USE_OPEN_GL,2);
|
settings->setValue(USE_OPEN_GL,2);
|
||||||
else
|
}
|
||||||
settings->setValue(USE_OPEN_GL,0);
|
|
||||||
|
|
||||||
if(QGLFormat::hasOpenGL() && (settings->value(USE_OPEN_GL).toBool() == true))
|
if(QGLFormat::hasOpenGL() && (settings->value(USE_OPEN_GL).toBool() == true))
|
||||||
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
|
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
|
||||||
|
@ -167,15 +167,7 @@ void LibraryWindow::doLayout()
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
|
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
|
||||||
{
|
{
|
||||||
OnStartFlowSelectionDialog * flowSelDialog = new OnStartFlowSelectionDialog();
|
|
||||||
|
|
||||||
flowSelDialog->exec();
|
|
||||||
if(flowSelDialog->result() == QDialog::Accepted)
|
|
||||||
settings->setValue(USE_OPEN_GL,2);
|
settings->setValue(USE_OPEN_GL,2);
|
||||||
else
|
|
||||||
settings->setValue(USE_OPEN_GL,0);
|
|
||||||
|
|
||||||
delete flowSelDialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//FOLDERS FILTER-------------------------------------------------------------
|
//FOLDERS FILTER-------------------------------------------------------------
|
||||||
|
@ -80,7 +80,12 @@ void ShortcutsManager::resetToDefaults()
|
|||||||
|
|
||||||
QString ShortcutsManager::getShortcut(const QString &name)
|
QString ShortcutsManager::getShortcut(const QString &name)
|
||||||
{
|
{
|
||||||
QSettings s(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat);
|
#ifdef YACREADER
|
||||||
|
QString filePath = "/YACReader.ini";
|
||||||
|
#else
|
||||||
|
QString filePath = "/YACReaderLibrary.ini";
|
||||||
|
#endif
|
||||||
|
QSettings s(YACReader::getSettingsPath()+filePath,QSettings::IniFormat);
|
||||||
s.beginGroup("shortcuts");
|
s.beginGroup("shortcuts");
|
||||||
|
|
||||||
return s.value(name,defaultShorcuts.value(name)).toString();
|
return s.value(name,defaultShorcuts.value(name)).toString();
|
||||||
@ -88,7 +93,12 @@ QString ShortcutsManager::getShortcut(const QString &name)
|
|||||||
|
|
||||||
void ShortcutsManager::saveShortcut(QAction *action)
|
void ShortcutsManager::saveShortcut(QAction *action)
|
||||||
{
|
{
|
||||||
QSettings s(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat);
|
#ifdef YACREADER
|
||||||
|
QString filePath = "/YACReader.ini";
|
||||||
|
#else
|
||||||
|
QString filePath = "/YACReaderLibrary.ini";
|
||||||
|
#endif
|
||||||
|
QSettings s(YACReader::getSettingsPath()+filePath,QSettings::IniFormat);
|
||||||
s.beginGroup("shortcuts");
|
s.beginGroup("shortcuts");
|
||||||
|
|
||||||
return s.setValue(action->data().toString() , action->shortcut().toString());
|
return s.setValue(action->data().toString() , action->shortcut().toString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user