File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 111111DocumentHandler::DocumentHandler (QObject *parent)
112112 : QObject(parent)
113113 , m_document(nullptr )
114- , m_autoReload(true )
115114 , m_cursorPosition(-1 )
116115 , m_selectionStart(0 )
117116 , m_selectionEnd(0 )
118117 , _markersModel(nullptr )
119118
120119{
120+ #if (defined(Q_OS_MACOS))
121+ QSettings settings (QCoreApplication::organizationDomain (), QCoreApplication::applicationName ());
122+ #else
123+ QSettings settings (QCoreApplication::organizationName (), QCoreApplication::applicationName ().toLower ());
124+ #endif
125+ m_autoReload = settings.value (" editor/autoReload" , " true" ).toBool ();
126+
121127 _markersModel = new MarkersModel ();
122128 _fileSystemWatcher = new QFileSystemWatcher ();
123129 pdf_importer = QString::fromUtf8 (" TextExtraction" );
@@ -582,6 +588,13 @@ bool DocumentHandler::autoReload() const
582588
583589void DocumentHandler::setAutoReload (bool enable)
584590{
591+ #if (defined(Q_OS_MACOS))
592+ QSettings settings (QCoreApplication::organizationDomain (), QCoreApplication::applicationName ());
593+ #else
594+ QSettings settings (QCoreApplication::organizationName (), QCoreApplication::applicationName ().toLower ());
595+ #endif
596+ settings.setValue (" editor/autoReload" , enable);
597+
585598 m_autoReload = enable;
586599}
587600
Original file line number Diff line number Diff line change @@ -188,10 +188,6 @@ Flickable {
188188 else
189189 __tikTok = 0
190190 }
191- Settings {
192- category: " editor"
193- property alias autoReload: document .autoReload
194- }
195191 Settings {
196192 id: keys
197193 category: " keys"
You can’t perform that action at this time.
0 commit comments