[rkward-cvs] SF.net SVN: rkward-code:[4514] trunk/rkward/rkward/settings

tfry at users.sf.net tfry at users.sf.net
Sun Jan 27 18:36:07 UTC 2013


Revision: 4514
          http://sourceforge.net/p/rkward/code/4514
Author:   tfry
Date:     2013-01-27 18:36:07 +0000 (Sun, 27 Jan 2013)
Log Message:
-----------
Why on earth did I make this a virtual function?

Modified Paths:
--------------
    trunk/rkward/rkward/settings/rksettingsmodule.h
    trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp
    trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h
    trunk/rkward/rkward/settings/rksettingsmoduleconsole.cpp
    trunk/rkward/rkward/settings/rksettingsmoduleconsole.h
    trunk/rkward/rkward/settings/rksettingsmoduledebug.cpp
    trunk/rkward/rkward/settings/rksettingsmoduledebug.h
    trunk/rkward/rkward/settings/rksettingsmodulegeneral.cpp
    trunk/rkward/rkward/settings/rksettingsmodulegeneral.h
    trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp
    trunk/rkward/rkward/settings/rksettingsmodulegraphics.h
    trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.cpp
    trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.h
    trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp
    trunk/rkward/rkward/settings/rksettingsmoduleoutput.h
    trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
    trunk/rkward/rkward/settings/rksettingsmoduleplugins.h
    trunk/rkward/rkward/settings/rksettingsmoduler.cpp
    trunk/rkward/rkward/settings/rksettingsmoduler.h
    trunk/rkward/rkward/settings/rksettingsmodulewatch.cpp
    trunk/rkward/rkward/settings/rksettingsmodulewatch.h

Modified: trunk/rkward/rkward/settings/rksettingsmodule.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodule.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodule.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -35,7 +35,7 @@
 
     virtual ~RKSettingsModule ();
 
-	virtual bool hasChanges () = 0;
+	bool hasChanges () { return changed; };
 	virtual void applyChanges () = 0;
 	virtual void save (KConfig *config) = 0;
 	

Modified: trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -156,11 +156,6 @@
 	return (i18n ("Script editor"));
 }
 
-bool RKSettingsModuleCommandEditor::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleCommandEditor::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -36,7 +36,6 @@
 
 	~RKSettingsModuleCommandEditor ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	

Modified: trunk/rkward/rkward/settings/rksettingsmoduleconsole.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleconsole.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleconsole.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -155,13 +155,6 @@
 	cg.sync ();
 }
 
-
-bool RKSettingsModuleConsole::hasChanges () {
-// TODO: move to RKSettingsModule -baseclass?
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleConsole::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleconsole.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleconsole.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleconsole.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -40,7 +40,6 @@
 	static void saveSettings (KConfig *config);
 	static void loadSettings (KConfig *config);
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduledebug.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduledebug.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduledebug.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -110,11 +110,6 @@
 	return (i18n ("Debug"));
 }
 
-bool RKSettingsModuleDebug::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleDebug::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduledebug.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduledebug.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduledebug.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -35,7 +35,6 @@
 
 	~RKSettingsModuleDebug ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	

Modified: trunk/rkward/rkward/settings/rksettingsmodulegeneral.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegeneral.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulegeneral.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -184,11 +184,6 @@
 	return (i18n ("General"));
 }
 
-bool RKSettingsModuleGeneral::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleGeneral::applyChanges () {
 	RK_TRACE (SETTINGS);
 	new_files_path = files_choser->getLocation ();

Modified: trunk/rkward/rkward/settings/rksettingsmodulegeneral.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegeneral.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulegeneral.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -55,7 +55,6 @@
 		RKMDIFocusFollowsMouse=1
 	};
 
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	

Modified: trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -98,11 +98,6 @@
 	return (i18n ("Onscreen Graphics"));
 }
 
-bool RKSettingsModuleGraphics::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleGraphics::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmodulegraphics.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegraphics.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulegraphics.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -35,7 +35,6 @@
 	RKSettingsModuleGraphics (RKSettings *gui, QWidget *parent);
 	~RKSettingsModuleGraphics ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -104,11 +104,6 @@
 	(*string_list).append (new_string);
 }
 
-bool RKSettingsModuleObjectBrowser::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleObjectBrowser::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleobjectbrowser.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -36,8 +36,6 @@
 
 	~RKSettingsModuleObjectBrowser ();
 
-/** @returns whether changes have been made in this RKSettingsModule */
-	bool hasChanges ();
 /** applies current settings in this RKSettingsModule. This will only be called, if hasChanges () is true */
 	void applyChanges ();
 /** saves current changes to the given KConfig

Modified: trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -220,11 +220,6 @@
 	return (i18n ("Output"));
 }
 
-bool RKSettingsModuleOutput::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleOutput::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleoutput.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleoutput.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleoutput.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -76,7 +76,6 @@
 	RKSettingsModuleOutput (RKSettings *gui, QWidget *parent);
 	~RKSettingsModuleOutput ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -132,11 +132,6 @@
 	return (i18n ("Plugins"));
 }
 
-bool RKSettingsModulePlugins::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModulePlugins::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -39,7 +39,6 @@
 	RKSettingsModulePlugins (RKSettings *gui, QWidget *parent);
 	~RKSettingsModulePlugins ();
 
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -213,11 +213,6 @@
 	return (i18n ("R-Backend"));
 }
 
-bool RKSettingsModuleR::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleR::applyChanges () {
 	RK_TRACE (SETTINGS);
 
@@ -436,11 +431,6 @@
 	return (i18n ("R-Packages"));
 }
 
-bool RKSettingsModuleRPackages::hasChanges () {
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 #define SELECT_CRAN_MIRROR_COMMAND 123
 void RKSettingsModuleRPackages::selectCRANMirror () {
 	RK_TRACE (SETTINGS);

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -37,11 +37,9 @@
 class RKSettingsModuleR : public RKSettingsModule {
 	Q_OBJECT
 public:
-    RKSettingsModuleR (RKSettings *gui, QWidget *parent);
-
-    ~RKSettingsModuleR ();
+	RKSettingsModuleR (RKSettings *gui, QWidget *parent);
+	~RKSettingsModuleR ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	
@@ -108,11 +106,9 @@
 class RKSettingsModuleRPackages : public RKSettingsModule, public RCommandReceiver {
 	Q_OBJECT
 public:
-    RKSettingsModuleRPackages (RKSettings *gui, QWidget *parent);
-
-    ~RKSettingsModuleRPackages ();
+	RKSettingsModuleRPackages (RKSettings *gui, QWidget *parent);
+	~RKSettingsModuleRPackages ();
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	

Modified: trunk/rkward/rkward/settings/rksettingsmodulewatch.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulewatch.cpp	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulewatch.cpp	2013-01-27 18:36:07 UTC (rev 4514)
@@ -252,12 +252,6 @@
 	max_log_lines = cg.readEntry ("max log lines", 1000);
 }
 
-bool RKSettingsModuleWatch::hasChanges () {
-// TODO: move to RKSettingsModule -baseclass?
-	RK_TRACE (SETTINGS);
-	return changed;
-}
-
 void RKSettingsModuleWatch::applyChanges () {
 	RK_TRACE (SETTINGS);
 

Modified: trunk/rkward/rkward/settings/rksettingsmodulewatch.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulewatch.h	2013-01-27 17:51:02 UTC (rev 4513)
+++ trunk/rkward/rkward/settings/rksettingsmodulewatch.h	2013-01-27 18:36:07 UTC (rev 4514)
@@ -40,7 +40,6 @@
 	static void saveSettings (KConfig *config);
 	static void loadSettings (KConfig *config);
 	
-	bool hasChanges ();
 	void applyChanges ();
 	void save (KConfig *config);
 	void validateGUI ();





More information about the rkward-tracker mailing list