r22981 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun May 19 21:58:24 UTC 2019


Author: jghali
Date: Sun May 19 21:58:24 2019
New Revision: 22981

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22981
Log:
Fix incorrect iconset version comparison

Modified:
    trunk/Scribus/scribus/iconmanager.cpp

Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22981&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp	(original)
+++ trunk/Scribus/scribus/iconmanager.cpp	Sun May 19 21:58:24 2019
@@ -150,25 +150,21 @@
 				continue;
 
 			int av_major, av_minor, av_patch, curr_major, curr_minor, curr_patch, ver_major, ver_minor, ver_patch;
+			int av_fullver, curr_fullver, ver_fullver;
 			av_major = isd.activeversion.section(".", 0, 0).toInt();
 			av_minor = isd.activeversion.section(".", 1, 1).toInt();
 			av_patch = isd.activeversion.section(".", 2, 2).toInt();
+			av_fullver = av_major * 10000 + av_minor * 100 + av_patch;
 			curr_major = m_activeSetVersion.section(".", 0, 0).toInt();
 			curr_minor = m_activeSetVersion.section(".", 1, 1).toInt();
 			curr_patch = m_activeSetVersion.section(".", 2, 2).toInt();
+			curr_fullver = curr_major * 10000 + curr_minor * 100 + curr_patch;
 			ver_major = QString(VERSION).section(".", 0, 0).toInt();
 			ver_minor = QString(VERSION).section(".", 1, 1).toInt();
 			ver_patch = QString(VERSION).section(".", 2, 2).toInt();
+			ver_fullver = ver_major * 10000 + ver_minor * 100 + ver_patch;
 			//If iconset version <= app version, and iconset version >= current active iconset version
-			if (av_major <= ver_major &&
-				av_minor <= ver_minor &&
-				av_patch <= ver_patch &&
-				(
-				av_major >= curr_major ||
-				(av_major == curr_major && av_minor >= curr_minor) ||
-				(av_major == curr_major && av_minor == curr_minor && av_patch>= curr_patch)
-				)
-				)
+			if ((av_fullver <= ver_fullver) && (av_fullver >= curr_fullver))
 			{
 				m_backupSetBasename = m_activeSetBasename;
 				m_backupSetVersion = m_backupSetVersion;




More information about the scribus-commit mailing list