r22930 by jghali - #15631: make StyleSet::getDefault() const

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 4 19:02:39 UTC 2019


Author: jghali
Date: Thu Apr  4 19:02:38 2019
New Revision: 22930

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22930
Log:
#15631: make StyleSet::getDefault() const

Modified:
    trunk/Scribus/scribus/styles/styleset.h

Modified: trunk/Scribus/scribus/styles/styleset.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22930&path=/trunk/Scribus/scribus/styles/styleset.h
==============================================================================
--- trunk/Scribus/scribus/styles/styleset.h	(original)
+++ trunk/Scribus/scribus/styles/styleset.h	Thu Apr  4 19:02:38 2019
@@ -13,19 +13,20 @@
 class StyleSet : public StyleContext
 {
 public:
+	STYLE* getDefault() { return m_default; }
+	const STYLE* getDefault() const { return m_default; }		
+	
+	const STYLE& get(const QString& name) const
+	{ 
+		return * dynamic_cast<const STYLE*>(resolve(name)); 
+	}
+	
 	STYLE& operator[] (int index)
-	{ 
-		assert(index < styles.count()); 
-		return * styles[index]; 
-	}
-	
-	STYLE* getDefault(){ return m_default; }		
-	
-	const STYLE& get(const QString& name) const
-	{ 
-		return * dynamic_cast<const STYLE*>(resolve(name)); 
-	}
-	
+	{
+		assert(index < styles.count());
+		return *styles[index];
+	}
+
 	const STYLE& operator[] (int index) const
 	{ 
 		assert(index < styles.count()); 




More information about the scribus-commit mailing list