commit 4f4383cac59f52decba400f2c78e267f7bb162e3
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Sep 8 16:56:13 2017 +0200

    remove LyXRC::use_qimage
    
    This is not needed anymore now that we do not need a backup pixmap.
    
    Update LyXRC format to 23 and add conversion.
---
 lib/configure.py                 |    2 +-
 lib/scripts/prefs2prefs_prefs.py |   20 +++++++++++++++++++-
 src/LyXRC.cpp                    |   17 +----------------
 src/LyXRC.h                      |    3 ---
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index a9f161e..bb8f927 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1764,7 +1764,7 @@ if __name__ == '__main__':
     lyx_check_config = True
     lyx_kpsewhich = True
     outfile = 'lyxrc.defaults'
-    lyxrc_fileformat = 22
+    lyxrc_fileformat = 23
     rc_entries = ''
     lyx_keep_temps = False
     version_suffix = ''
diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py
index 68b4d83..ff24273 100644
--- a/lib/scripts/prefs2prefs_prefs.py
+++ b/lib/scripts/prefs2prefs_prefs.py
@@ -94,6 +94,9 @@
 #   Add pygmentize_command for the python pygments syntax highlighter
 #   No conversion necessary.
 
+# Incremented to format 23, by lasgouttes
+#   Remove use_qimage preference
+
 # NOTE: The format should also be updated in LYXRC.cpp and
 # in configure.py.
 
@@ -364,6 +367,20 @@ def remove_print_support(line):
 # End conversions for LyX 2.1 to 2.2
 ####################################
 
+
+#################################
+# Conversions from LyX 2.3 to 2.4
+
+def remove_use_qimage(line):
+       if not line.lower().startswith("\\use_qimage "):
+               return no_match
+       return (True, "")
+
+# End conversions for LyX 2.3 to 2.4
+####################################
+
+
+
 conversions = [
        [  1, [ # there were several conversions for format 1
                export_menu,
@@ -392,5 +409,6 @@ conversions = [
        [ 19, [remove_print_support]],
        [ 20, []],
        [ 21, []],
-       [ 22, []]
+       [ 22, []],
+        [ 23, [remove_use_qimage]]
 ]
diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 315495f..ada4358 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -59,7 +59,7 @@ namespace {
 
 // The format should also be updated in configure.py, and conversion code
 // should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 22; // ef: pygmentize_command
+static unsigned int const LYXRC_FILEFORMAT = 23; // lasgouttes: remove qimage
 
 // when adding something to this array keep it sorted!
 LexerKeyword lyxrcTags[] = {
@@ -195,7 +195,6 @@ LexerKeyword lyxrcTags[] = {
        { "\\use_converter_needauth_forbidden", 
LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN },
        { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
        { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
-       { "\\use_qimage", LyXRC::RC_USE_QIMAGE },
        // compatibility with versions older than 1.4.0 only
        { "\\use_system_colors", LyXRC::RC_USE_SYSTEM_COLORS },
        { "\\use_system_theme_icons", LyXRC::RC_USE_SYSTEM_THEME_ICONS },
@@ -327,7 +326,6 @@ void LyXRC::setDefaults()
        use_system_colors = false;
        use_tooltip = true;
        use_pixmap_cache = false;
-       use_qimage = true;
        converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
        user_name = to_utf8(support::user_name());
        user_email = to_utf8(support::user_email());
@@ -880,9 +878,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool 
check_format)
                case RC_USE_PIXMAP_CACHE:
                        lexrc >> use_pixmap_cache;
                        break;
-               case RC_USE_QIMAGE:
-                       lexrc >> use_qimage;
-                       break;
                case RC_SPELLCHECKER:
                        lexrc >> spellchecker;
                        break;
@@ -2434,15 +2429,6 @@ void LyXRC::write(ostream & os, bool 
ignore_system_lyxrc, string const & name) c
                if (tag != RC_LAST)
                        break;
                // fall through
-       case RC_USE_QIMAGE:
-               if (ignore_system_lyxrc ||
-                   use_qimage != system_lyxrc.use_qimage) {
-                       os << "\\use_qimage "
-                          << convert<string>(use_qimage)
-                          << '\n';
-               }
-               if (tag != RC_LAST)
-                       break;
 
                os << "\n#\n"
                   << "# LANGUAGE SUPPORT SECTION ##########################\n"
@@ -3016,7 +3002,6 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC 
const & lyxrc_new)
        case LyXRC::RC_USE_SYSTEM_COLORS:
        case LyXRC::RC_USE_TOOLTIP:
        case LyXRC::RC_USE_PIXMAP_CACHE:
-       case LyXRC::RC_USE_QIMAGE:
        case LyXRC::RC_USE_SYSTEM_THEME_ICONS:
        case LyXRC::RC_VIEWDVI_PAPEROPTION:
        case LyXRC::RC_SINGLE_CLOSE_TAB_BUTTON:
diff --git a/src/LyXRC.h b/src/LyXRC.h
index 38fcd37..9b4b09f 100644
--- a/src/LyXRC.h
+++ b/src/LyXRC.h
@@ -174,7 +174,6 @@ public:
                RC_USE_SYSTEM_COLORS,
                RC_USE_TOOLTIP,
                RC_USE_PIXMAP_CACHE,
-               RC_USE_QIMAGE,
                RC_USE_SYSTEM_THEME_ICONS,
                RC_VIEWDVI_PAPEROPTION,
                RC_VIEWER,
@@ -333,8 +332,6 @@ public:
        bool use_system_colors;
        /// Use pixmap cache?
        bool use_pixmap_cache;
-       /// Use QImage backend?
-       bool use_qimage;
        /// Spellchecker engine: aspell, hunspell, etc
        std::string spellchecker;
        /// Alternate language for spellchecker

Reply via email to