From 6e21f5868c763caf684689067677f4e60f20f372 Mon Sep 17 00:00:00 2001 From: dockes Date: Thu, 15 Jan 2009 09:45:38 +0000 Subject: [PATCH] ensure reslist parformat is refreshed after edit (1.11 bug) --- src/qtgui/guiutils.cpp | 1 + src/qtgui/guiutils.h | 1 + src/qtgui/reslist.cpp | 5 +---- src/qtgui/uiprefs_w.cpp | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 04ff6914..7bd7fb73 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -193,6 +193,7 @@ void rwSettings(bool writing) QString::fromAscii(prefs.getV18DfltResListFormat()) || prefs.reslistformat.stripWhiteSpace().isEmpty()) prefs.reslistformat = rlfDflt; + prefs.creslistformat = (const char*)prefs.reslistformat.utf8(); SETTING_RW(prefs.queryStemLang, "/Recoll/prefs/query/stemLang", , "english"); diff --git a/src/qtgui/guiutils.h b/src/qtgui/guiutils.h index 9f213773..0506052e 100644 --- a/src/qtgui/guiutils.h +++ b/src/qtgui/guiutils.h @@ -67,6 +67,7 @@ class PrefsPack { int reslistfontsize; // Result list format string QString reslistformat; + string creslistformat; QString queryStemLang; int mainwidth; int mainheight; diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp index e34aaebd..f7636817 100644 --- a/src/qtgui/reslist.cpp +++ b/src/qtgui/reslist.cpp @@ -380,10 +380,7 @@ string QtGuiResListPager::detailsLink() } const string& QtGuiResListPager::parFormat() { - static string parformat; - if (parformat.empty()) - parformat = (const char*)prefs.reslistformat.utf8(); - return parformat; + return prefs.creslistformat; } string QtGuiResListPager::nextUrl() { diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp index 69d1aba4..d54daf2b 100644 --- a/src/qtgui/uiprefs_w.cpp +++ b/src/qtgui/uiprefs_w.cpp @@ -192,6 +192,7 @@ void UIPrefsDialog::accept() prefs.reslistformat = prefs.getDfltResListFormat(); rlfTE->setText(prefs.reslistformat); } + prefs.creslistformat = (const char*)prefs.reslistformat.utf8(); prefs.htmlBrowser = helpBrowserLE->text();