From 6885d1414b28d3887c95a33f473b01755dd6a6fd Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 4 Mar 2020 15:29:51 +0100 Subject: [PATCH] Windows: conversion of prefs from registry to .ini --- src/qtgui/guiutils.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 5d605292..af01a058 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -70,6 +70,8 @@ PrefsPack prefs; * the qt/recoll settings to defaults) */ static bool havereadsettings; +static void maybeCopyFromRegistry(); + void rwSettings(bool writing) { #ifdef _WIN32 @@ -78,10 +80,12 @@ void rwSettings(bool writing) // Once conversion registry -> file. Only happens once ever, and // also we only call the function at program startup (the once // above). - maybeCopyFromRegistry(); - once = 0; + if (once) { + maybeCopyFromRegistry(); + once = 0; + } } -#endif _WIN32 +#endif /*_WIN32*/ // Keep this AFTER maybecopy...() QSettings::setDefaultFormat(QSettings::IniFormat);