r23702 by jghali - Remove useless init() function from UpgradeChecker and move its code to constructor

scribus-commit scribus-commit at lists.scribus.net
Tue May 5 21:53:20 UTC 2020


Author: jghali
Date: Tue May  5 21:53:20 2020
New Revision: 23702

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23702
Log:
Remove useless init() function from UpgradeChecker and move its code to constructor

Modified:
    trunk/Scribus/scribus/upgradechecker.cpp
    trunk/Scribus/scribus/upgradechecker.h

Modified: trunk/Scribus/scribus/upgradechecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23702&path=/trunk/Scribus/scribus/upgradechecker.cpp
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.cpp	(original)
+++ trunk/Scribus/scribus/upgradechecker.cpp	Tue May  5 21:53:20 2020
@@ -26,16 +26,6 @@
 
 UpgradeChecker::UpgradeChecker()
 {
-	init();
-}
-
-UpgradeChecker::~UpgradeChecker()
-{
-}
-
-void UpgradeChecker::init()
-{
-	m_errorReported = false;
 	m_version = (VERSION);
 	m_stability = "unstablesvn";
 	QString versionStripped = m_version.toLower();
@@ -46,15 +36,18 @@
 	minor = versionStripped.section('.', 1, 1).toInt();
 	m_revision1 = versionStripped.section('.', 2, 2).toInt();
 	m_revision2 = versionStripped.section('.', 3, 4).toInt();
-	#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC)
 	m_platform = "MacOSX";
-	#elif defined(Q_OS_WIN32)
+#elif defined(Q_OS_WIN32)
 	m_platform = "Win32";
-	#else
+#else
 	m_platform = "X11";
-	#endif
-}
-
+#endif
+}
+
+UpgradeChecker::~UpgradeChecker()
+{
+}
 
 void UpgradeChecker::fetch()
 {

Modified: trunk/Scribus/scribus/upgradechecker.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23702&path=/trunk/Scribus/scribus/upgradechecker.h
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.h	(original)
+++ trunk/Scribus/scribus/upgradechecker.h	Tue May  5 21:53:20 2020
@@ -36,7 +36,6 @@
 	void downloadReadyRead();
 	
 protected:
-	void init();
 	virtual void outputText(const QString& text, bool noLineFeed=false);
 	void reportError(const QString& s);
 	QFile *m_file {nullptr};




More information about the scribus-commit mailing list