r23804 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Wed May 13 16:47:29 UTC 2020


Author: jghali
Date: Wed May 13 16:47:29 2020
New Revision: 23804

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23804
Log:
Code cleanup

Modified:
    trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
    trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h

Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23804&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp	Wed May 13 16:47:29 2020
@@ -69,63 +69,63 @@
 bool PictureBrowserPlugin::run(ScribusDoc* doc, const QString& target)
 {
 	//picturebrowser isn't running yet, so create it
-	if (!pictureBrowser)
+	if (!m_pictureBrowser)
 	{
-		pictureBrowser = new PictureBrowser(doc, nullptr);
-		if (!pictureBrowser)
+		m_pictureBrowser = new PictureBrowser(doc, nullptr);
+		if (!m_pictureBrowser)
 			return false;
 
-		connect(pictureBrowser, SIGNAL (destroyed()), this, SLOT (pictureBrowserClosed()));
+		connect(m_pictureBrowser, SIGNAL (destroyed()), this, SLOT (pictureBrowserClosed()));
 	}
 	//picturebrowser exists, just bring it to the top
 	else
 	{
-		pictureBrowser->hide();
+		m_pictureBrowser->hide();
 	}
 
-	Q_CHECK_PTR (pictureBrowser);
+	Q_CHECK_PTR (m_pictureBrowser);
 
-	pictureBrowser->setAttribute ( Qt::WA_DeleteOnClose );
+	m_pictureBrowser->setAttribute ( Qt::WA_DeleteOnClose );
 	//show, get on top and activate window
-	pictureBrowser->show();
-	pictureBrowser->raise();
-	pictureBrowser->activateWindow();
+	m_pictureBrowser->show();
+	m_pictureBrowser->raise();
+	m_pictureBrowser->activateWindow();
 
 	return true;
 }
 
 void PictureBrowserPlugin::setDoc(ScribusDoc* doc)
 {
-	if (pictureBrowser)
-		pictureBrowser->changedDocument(doc);
+	if (m_pictureBrowser)
+		m_pictureBrowser->changedDocument(doc);
 }
 
 void PictureBrowserPlugin::unsetDoc()
 {
-	if (pictureBrowser)
-		pictureBrowser->closedDocument();
+	if (m_pictureBrowser)
+		m_pictureBrowser->closedDocument();
 }
 
 void PictureBrowserPlugin::changedDoc(ScribusDoc* doc)
 {
-//	if (pictureBrowser)
-//		pictureBrowser->changedDocument (doc);
+//	if (m_pictureBrowser)
+//		m_pictureBrowser->changedDocument (doc);
 }
 
 void PictureBrowserPlugin::closePictureBrowser()
 {
-	if (pictureBrowser)
+	if (m_pictureBrowser)
 	{
-		if (pictureBrowser->isVisible())
-			pictureBrowser->close();
-		delete pictureBrowser;
-		pictureBrowser = nullptr;
+		if (m_pictureBrowser->isVisible())
+			m_pictureBrowser->close();
+		delete m_pictureBrowser;
+		m_pictureBrowser = nullptr;
 	}
 }
 
 void PictureBrowserPlugin::pictureBrowserClosed()
 {
-	pictureBrowser = nullptr;
+	m_pictureBrowser = nullptr;
 }
 
 // Low level plugin API

Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23804&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h	Wed May 13 16:47:29 2020
@@ -39,7 +39,7 @@
 		void closePictureBrowser();
 
 	private:
-		PictureBrowser *pictureBrowser { nullptr };
+		PictureBrowser *m_pictureBrowser { nullptr };
 
 	private slots:
 		//only called on auto delete on close, resets ptr




More information about the scribus-commit mailing list