r23060 by craig - Reimplement PrefsManager with better singleton approach

scribus-commit scribus-commit at lists.scribus.net
Mon Jul 1 19:04:12 UTC 2019


Author: craig
Date: Mon Jul  1 19:04:12 2019
New Revision: 23060

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23060
Log:
Reimplement PrefsManager with better singleton approach

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvasmode.cpp
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/collapsedtablepainter.cpp
    trunk/Scribus/scribus/collect4output.cpp
    trunk/Scribus/scribus/colorsetmanager.cpp
    trunk/Scribus/scribus/fileloader.cpp
    trunk/Scribus/scribus/fileloader.h
    trunk/Scribus/scribus/fontlistmodel.cpp
    trunk/Scribus/scribus/gtaction.cpp
    trunk/Scribus/scribus/gtaction.h
    trunk/Scribus/scribus/hyphenator.cpp
    trunk/Scribus/scribus/iconmanager.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
    trunk/Scribus/scribus/latexhelpers.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem_group.cpp
    trunk/Scribus/scribus/pageitem_imageframe.cpp
    trunk/Scribus/scribus/pageitem_latexframe.cpp
    trunk/Scribus/scribus/pageitem_symbol.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/pagesize.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/pluginmanager.cpp
    trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
    trunk/Scribus/scribus/plugins/export/pixmapexport/dialog.cpp
    trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
    trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
    trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
    trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
    trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
    trunk/Scribus/scribus/plugins/import/ai/importai.cpp
    trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
    trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
    trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
    trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
    trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
    trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
    trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
    trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
    trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
    trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
    trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
    trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
    trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
    trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
    trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
    trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
    trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
    trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
    trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
    trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
    trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
    trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
    trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
    trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
    trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
    trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
    trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
    trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
    trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
    trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
    trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
    trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
    trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
    trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
    trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
    trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
    trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
    trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
    trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
    trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
    trunk/Scribus/scribus/plugins/short-words/configuration.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/prefsmanager.h
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/sampleitem.cpp
    trunk/Scribus/scribus/scfonts.cpp
    trunk/Scribus/scribus/scpaths.cpp
    trunk/Scribus/scribus/scpreview.cpp
    trunk/Scribus/scribus/scpreview.h
    trunk/Scribus/scribus/scprintengine_ps.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusXml.cpp
    trunk/Scribus/scribus/scribusapp.cpp
    trunk/Scribus/scribus/scribuscore.cpp
    trunk/Scribus/scribus/scribuscore.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/styles/charstyle.cpp
    trunk/Scribus/scribus/text/screenpainter.cpp
    trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
    trunk/Scribus/scribus/ui/annot.cpp
    trunk/Scribus/scribus/ui/annota.cpp
    trunk/Scribus/scribus/ui/charselect.cpp
    trunk/Scribus/scribus/ui/charselectenhanced.cpp
    trunk/Scribus/scribus/ui/checkDocument.cpp
    trunk/Scribus/scribus/ui/colorsandfills.cpp
    trunk/Scribus/scribus/ui/cupsoptions.cpp
    trunk/Scribus/scribus/ui/curvewidget.cpp
    trunk/Scribus/scribus/ui/customfdialog.cpp
    trunk/Scribus/scribus/ui/dcolor.cpp
    trunk/Scribus/scribus/ui/editor.cpp
    trunk/Scribus/scribus/ui/fontcombo.cpp
    trunk/Scribus/scribus/ui/fontcombo.h
    trunk/Scribus/scribus/ui/gtdialogs.cpp
    trunk/Scribus/scribus/ui/gtfiledialog.cpp
    trunk/Scribus/scribus/ui/helpbrowser.cpp
    trunk/Scribus/scribus/ui/hruler.cpp
    trunk/Scribus/scribus/ui/hruler.h
    trunk/Scribus/scribus/ui/insertaframe.cpp
    trunk/Scribus/scribus/ui/latexeditor.cpp
    trunk/Scribus/scribus/ui/loremipsum.cpp
    trunk/Scribus/scribus/ui/marksmanager.cpp
    trunk/Scribus/scribus/ui/mergedoc.cpp
    trunk/Scribus/scribus/ui/missing.cpp
    trunk/Scribus/scribus/ui/newfile.cpp
    trunk/Scribus/scribus/ui/newfile.h
    trunk/Scribus/scribus/ui/notesstyleseditor.cpp
    trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
    trunk/Scribus/scribus/ui/pdfexportdialog.cpp
    trunk/Scribus/scribus/ui/preferencesdialog.cpp
    trunk/Scribus/scribus/ui/preferencesdialog.h
    trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
    trunk/Scribus/scribus/ui/prefs_fonts.cpp
    trunk/Scribus/scribus/ui/prefs_itemtools.cpp
    trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
    trunk/Scribus/scribus/ui/prefs_printer.cpp
    trunk/Scribus/scribus/ui/preview.cpp
    trunk/Scribus/scribus/ui/preview.h
    trunk/Scribus/scribus/ui/printdialog.cpp
    trunk/Scribus/scribus/ui/scdockpalette.cpp
    trunk/Scribus/scribus/ui/scrapbookpalette.cpp
    trunk/Scribus/scribus/ui/scrpalettebase.cpp
    trunk/Scribus/scribus/ui/sctoolbar.cpp
    trunk/Scribus/scribus/ui/search.cpp
    trunk/Scribus/scribus/ui/smcellstyle.cpp
    trunk/Scribus/scribus/ui/smcstylewidget.cpp
    trunk/Scribus/scribus/ui/smtablestyle.cpp
    trunk/Scribus/scribus/ui/smtextstyles.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp
    trunk/Scribus/scribus/ui/storyeditor.h
    trunk/Scribus/scribus/ui/stylemanager.cpp
    trunk/Scribus/scribus/ui/vruler.cpp
    trunk/Scribus/scribus/ui/vruler.h
    trunk/Scribus/scribus/undogui.cpp
    trunk/Scribus/scribus/undomanager.cpp
    trunk/Scribus/scribus/urllauncher.cpp
    trunk/Scribus/scribus/util_file.cpp
    trunk/Scribus/scribus/util_ghostscript.cpp

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp	(original)
+++ trunk/Scribus/scribus/appmodehelper.cpp	Mon Jul  1 19:04:12 2019
@@ -246,7 +246,7 @@
 		case modeDrawBezierLine:
 			{
 				setSpecialEditMode(true);
-				if ((doc->m_Selection->count() != 0) && (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools))
+				if ((doc->m_Selection->count() != 0) && (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools))
 					doc->view()->Deselect(true);
 			}
 			break;

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Mon Jul  1 19:04:12 2019
@@ -1543,7 +1543,7 @@
 	double ph = currentPage->height() + pageBleeds.bottom() + pageBleeds.top();
 	painter->setAntialiasing(false);
 	painter->setPen(Qt::black, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-	if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
+	if (PrefsManager::instance().appPrefs.displayPrefs.showPageShadow)
 		painter->drawRect(px + 5, py + 5, pw, ph);
 	painter->setBrush(m_doc->paperColor());
 	painter->drawRect(px, py, pw, ph);
@@ -1558,7 +1558,7 @@
 void Canvas::drawBackgroundPageOutlines(ScPainter* painter, int clipx, int clipy, int clipw, int cliph)
 {
 	int docPagesCount=m_doc->Pages->count();
-	if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
+	if (PrefsManager::instance().appPrefs.displayPrefs.showPageShadow)
 	{
 		painter->setBrush(QColor(128,128,128));
 		painter->setAntialiasing(false);
@@ -2073,7 +2073,7 @@
 	p->setFillMode(ScPainter::None);
 	p->setStrokeMode(ScPainter::Solid);
 	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-	p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.pageBorderColor, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(PrefsManager::instance().appPrefs.displayPrefs.pageBorderColor, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	p->drawRect(0, 0, pageWidth, pageHeight);
 	p->setAntialiasing(true);
 	p->setFillMode(fm);
@@ -2406,7 +2406,7 @@
 
 void Canvas::displayXYHUD(QPoint m)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	double gx, gy, gh, gw, r;
 	if (m_doc->m_Selection->isMultipleSelection())
@@ -2452,7 +2452,7 @@
 
 void Canvas::displayCorrectedXYHUD(QPoint m, double x, double y)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	double gx = x;
 	double gy = y;
@@ -2468,7 +2468,7 @@
 
 void Canvas::displayCorrectedSingleHUD(QPoint m, double val, bool isX)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	double gx = val;
 	if (isX)
@@ -2489,14 +2489,14 @@
 
 void Canvas::displayXYHUD(QPoint m, double x, double y)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
 }
 
 void Canvas::displaySizeHUD(QPoint m, double x, double y, bool isLine)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	if (isLine)
 		QToolTip::showText(m + QPoint(5, 5), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, SC_DEGREES, true, true)), this);
@@ -2506,7 +2506,7 @@
 
 void Canvas::displayRotHUD(QPoint m, double rot)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	double r;
 	if (rot < 0.0)
@@ -2518,14 +2518,14 @@
 
 void Canvas::displayRealRotHUD(QPoint m, double rot)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(rot, SC_DEGREES, true, true)), this);
 }
 
 void Canvas::displayDoubleHUD(QPoint point, const QString& label, double value)
 {
-	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
 	QToolTip::showText(point + QPoint(5, 5), QString("%1: %2").arg(label, value2String(value, m_doc->unitIndex(), true, true)), this);
 }

Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode.cpp	Mon Jul  1 19:04:12 2019
@@ -85,20 +85,20 @@
 {
 	m_pen["outline"]	= QPen(Qt::gray, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["outline"].setCosmetic(true);
-	m_pen["selection"]	= QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["selection"]	= QPen(PrefsManager::instance().appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection"].setCosmetic(true);
 	m_pen["selection-group"] = QPen(Qt::red, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group"].setCosmetic(true);
-	m_pen["selection-group-inside"] = QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["selection-group-inside"] = QPen(PrefsManager::instance().appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group-inside"].setCosmetic(true);
-	m_pen["handle"]		= QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["handle"]		= QPen(PrefsManager::instance().appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["handle"].setCosmetic(true);
 	
 	m_brush["outline"]	= Qt::NoBrush;
 	m_brush["selection"]	= Qt::NoBrush;
 	m_brush["selection-group"] = QColor(255,0,0,10);
 	m_brush["selection-group-inside"] = Qt::NoBrush;
-	m_brush["handle"]	= PrefsManager::instance()->appPrefs.displayPrefs.frameColor;
+	m_brush["handle"]	= PrefsManager::instance().appPrefs.displayPrefs.frameColor;
 
 	m_keyRepeat = false;
 	m_arrowKeyDown = false;
@@ -225,9 +225,9 @@
 
 void CanvasMode::drawSelectionHandles(QPainter *psx, QRectF selectionRect, bool background, bool insideGroup, double sx, double sy)
 {
-	m_pen["handle"]		= QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["handle"]		= QPen(PrefsManager::instance().appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["handle"].setCosmetic(true);
-	m_pen["selection-group-inside"] = QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["selection-group-inside"] = QPen(PrefsManager::instance().appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group-inside"].setCosmetic(true);
 	QPen ba = QPen(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	ba.setCosmetic(true);
@@ -269,9 +269,9 @@
 
 void CanvasMode::drawSelection(QPainter* psx, bool drawHandles)
 {
-	m_pen["selection"]	= QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["selection"]	= QPen(PrefsManager::instance().appPrefs.displayPrefs.frameColor, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection"].setCosmetic(true);
-	m_pen["selection-group-inside"] = QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	m_pen["selection-group-inside"] = QPen(PrefsManager::instance().appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group-inside"].setCosmetic(true);
 	QPen ba = QPen(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	ba.setCosmetic(true);
@@ -1058,8 +1058,8 @@
 	
 	QMdiArea* mdiArea = mainWindow->mdiArea;
 	QMdiSubWindow* w  = nullptr;
-	PrefsManager*   prefsManager      = PrefsManager::instance();
-	OutlinePalette* outlinePalette    = mainWindow->outlinePalette;
+	PrefsManager& prefsManager = PrefsManager::instance();
+	OutlinePalette* outlinePalette = mainWindow->outlinePalette;
 	CheckDocument*  docCheckerPalette = mainWindow->docCheckerPalette;
 	QMap<QString, QPointer<ScrAction> >& scrActions(mainWindow->scrActions);
 
@@ -1099,7 +1099,7 @@
 		mainWindow->slotSelect();
 		if (m_doc->m_Selection->count() == 0)
 			mainWindow->HaveNewSel();
-		prefsManager->appPrefs.uiPrefs.stickyTools = false;
+		prefsManager.appPrefs.uiPrefs.stickyTools = false;
 		scrActions["stickyTools"]->setChecked(false);
 		return;
 	}
@@ -1143,7 +1143,7 @@
 
 		if (m_doc->m_Selection->count() == 0)
 		{
-			int wheelVal = prefsManager->mouseWheelJump();
+			int wheelVal = prefsManager.mouseWheelJump();
 			if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
 				wheelVal = qMax(qRound(wheelVal / 10.0), 1);
 			switch (kk)
@@ -1210,7 +1210,7 @@
 		{
 			case Qt::Key_PageUp:
 				if (m_doc->masterPageMode() || m_doc->symbolEditMode())
-					m_view->scrollBy(0, -prefsManager->mouseWheelJump());
+					m_view->scrollBy(0, -prefsManager.mouseWheelJump());
 				else
 				{
 					int pg = m_doc->currentPageNumber();
@@ -1226,7 +1226,7 @@
 				break;
 			case Qt::Key_PageDown:
 				if (m_doc->masterPageMode() || m_doc->symbolEditMode())
-					m_view->scrollBy(0, prefsManager->mouseWheelJump());
+					m_view->scrollBy(0, prefsManager.mouseWheelJump());
 				else
 				{
 					int pg = m_doc->currentPageNumber();

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Mon Jul  1 19:04:12 2019
@@ -428,7 +428,7 @@
 		m_createTransaction.cancel();
 		m_createTransaction.reset();
 	}
-	if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+	if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 	{
 		m_view->requestMode(modeNormal);
 	}
@@ -855,7 +855,7 @@
 	if (QApplication::keyboardModifiers() & Qt::ControlModifier)
 		return true;
 
-	PrefsContext* sizes = PrefsManager::instance()->prefsFile->getContext("ObjectSize");
+	PrefsContext* sizes = PrefsManager::instance().prefsFile->getContext("ObjectSize");
 	bool doRemember     = sizes->getBool("Remember", true);
 
 	int lmode = (createObjectMode == modeDrawLine) ? 1 : 0;

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Mon Jul  1 19:04:12 2019
@@ -191,7 +191,7 @@
 		currItem = m_doc->m_Selection->itemAt(0);
 		if (currItem != nullptr)
 			finalizeItem(currItem);
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 			m_view->requestMode(modeNormal);
 		else
 			m_view->requestMode(m_doc->appMode);
@@ -448,7 +448,7 @@
 			finalizeItem(currItem);
 		}
 		
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 		{
 //			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 			m_view->requestMode(modeNormal);

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Mon Jul  1 19:04:12 2019
@@ -289,7 +289,7 @@
 			m_canvas->m_viewMode.operItemResizing = false;
 			m_doc->changed();
 		}
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 		{
 			m_view->requestMode(modeNormal);
 		}

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Mon Jul  1 19:04:12 2019
@@ -278,7 +278,7 @@
 			m_canvas->m_viewMode.operItemResizing = false;
 			m_doc->changed();
 		}
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 		{
 			m_view->requestMode(modeNormal);
 		}

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp	Mon Jul  1 19:04:12 2019
@@ -329,7 +329,7 @@
 	if ((m_doc->appMode == modeLinkFrames) || (m_doc->appMode == modeUnlinkFrames))
 	{
 		m_view->updateContents();
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools || m_doc->ElemToLink == nullptr)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools || m_doc->ElemToLink == nullptr)
 			m_view->requestMode(submodePaintingDone);
 		return;
 	}

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Mon Jul  1 19:04:12 2019
@@ -1205,7 +1205,7 @@
 	}
 	if (m_doc->appMode != modeEdit)
 	{
-		if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 			m_view->requestMode(modeNormal);
 		else
 		{
@@ -1810,7 +1810,7 @@
 	formats.append("Scribus Objects (*.sce *.SCE)");
 	qSort(formats);
 	allFormats += formats.join(";;");
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("pastefile", ".");
 	FPoint pastePoint = m_mouseCurrentPoint;
 	CustomFDialog dia(m_view, wdir, tr("Open"), allFormats, fdExistingFiles | fdShowImportOptions | fdDisableOk);
@@ -1820,7 +1820,7 @@
 		return;
 	if (!fileName.isEmpty())
 	{
-		PrefsManager::instance()->prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
+		PrefsManager::instance().prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
 		m_doc->setLoading(true);
 		QFileInfo fi(fileName);
 		bool savedAlignGrid = m_doc->SnapGrid;

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Mon Jul  1 19:04:12 2019
@@ -344,7 +344,7 @@
 	}
 	m_doc->setRotationMode( m_oldRotMode );
 	m_view->RCenter = m_oldRotCenter;
-	if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+	if (!PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 		m_view->requestMode(modeNormal);
 	else
 	{

Modified: trunk/Scribus/scribus/collapsedtablepainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/collapsedtablepainter.cpp
==============================================================================
--- trunk/Scribus/scribus/collapsedtablepainter.cpp	(original)
+++ trunk/Scribus/scribus/collapsedtablepainter.cpp	Mon Jul  1 19:04:12 2019
@@ -510,7 +510,7 @@
 void CollapsedTablePainter::paintGridLine(const QPointF& start, const QPointF& end, ScPainter *p) const
 {
 	p->save();
-	p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor,
+	p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor,
 		0.2 / qMax(p->zoomFactor(), 1.0), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	p->setStrokeMode(ScPainter::Solid);
 	p->drawLine(start, end);

Modified: trunk/Scribus/scribus/collect4output.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/collect4output.cpp
==============================================================================
--- trunk/Scribus/scribus/collect4output.cpp	(original)
+++ trunk/Scribus/scribus/collect4output.cpp	Mon Jul  1 19:04:12 2019
@@ -46,7 +46,7 @@
 	m_compressDoc = compressDoc;
 	m_withFonts = withFonts;
 	m_withProfiles = withProfiles;
-	dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	collectedFiles.clear();
 
 	if (m_withFonts)
@@ -64,7 +64,7 @@
 	if (ScCore->usingGUI())
 	{
 		QString wdir = ".";
-		QString prefsDocDir = PrefsManager::instance()->documentDir();
+		QString prefsDocDir = PrefsManager::instance().documentDir();
 		if (!prefsDocDir.isEmpty())
 			wdir = dirs->get("collect", prefsDocDir);
 		else
@@ -279,7 +279,7 @@
 			QFileInfo itf = QFileInfo(ofName);
 			if (!itf.exists())
 			{
-				ofName = QDir::toNativeSeparators(PrefsManager::instance()->documentDir() + "/" + ofName);
+				ofName = QDir::toNativeSeparators(PrefsManager::instance().documentDir() + "/" + ofName);
 				itf.setFile(ofName);
 			}
 		// end of hack
@@ -300,7 +300,7 @@
 		QFileInfo itf = QFileInfo(ofName);
 		if (!itf.exists())
 		{
-			ofName = QDir::toNativeSeparators(PrefsManager::instance()->documentDir() + "/" + ofName);
+			ofName = QDir::toNativeSeparators(PrefsManager::instance().documentDir() + "/" + ofName);
 			itf.setFile(ofName);
 		}
 		if (itf.exists())
@@ -347,14 +347,14 @@
 
 bool CollectForOutput::collectFonts()
 {
-	PrefsManager *prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	QMap<QString,int>::Iterator it3;
 	QMap<QString,int>::Iterator it3end = m_Doc->UsedFonts.end();
 	int c=0;
 	for (it3 = m_Doc->UsedFonts.begin(); it3 != it3end; ++it3)
 	{
-		QFileInfo itf(prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath());
-		QString oldFileITF(prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath());
+		QFileInfo itf(prefsManager.appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath());
+		QString oldFileITF(prefsManager.appPrefs.fontPrefs.AvailFonts[it3.key()].fontFilePath());
 		QString outFileITF(m_outputDirectory + "fonts/" + itf.fileName());
 		bool success = copyFileAtomic(oldFileITF, outFileITF);
 		if (!success)
@@ -373,7 +373,7 @@
 				qDebug()<<"Unable to set permissions successfully while collecting for output on"<<outFileITF<<"as the file does not exist";
 		}
 #endif
-		if (prefsManager->appPrefs.fontPrefs.AvailFonts[it3.key()].type() == ScFace::TYPE1)
+		if (prefsManager.appPrefs.fontPrefs.AvailFonts[it3.key()].type() == ScFace::TYPE1)
 		{
 			QStringList metrics;
 			QString fontDir  = itf.absolutePath();

Modified: trunk/Scribus/scribus/colorsetmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/colorsetmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/colorsetmanager.cpp	(original)
+++ trunk/Scribus/scribus/colorsetmanager.cpp	Mon Jul  1 19:04:12 2019
@@ -323,7 +323,7 @@
 		const FileFormat *fmt = LoadSavePlugin::getFormatById(FORMATID_SLA150IMPORT);
 		if (fmt)
 		{
-			fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+			fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 			fmt->loadPalette(paletteFileName);
 		}
 		else

Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp	(original)
+++ trunk/Scribus/scribus/fileloader.cpp	Mon Jul  1 19:04:12 2019
@@ -184,14 +184,14 @@
 	{
 		if (m_fileType == FORMATID_SLA12XIMPORT)
 		{
-			it->plug->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+			it->plug->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 			ret = it->plug->loadPage(m_fileName, PageToLoad, Mpage, renamedPageName);
 // 			if (ret)
 // 				it->plug->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
 		}
 		if (m_fileType == FORMATID_SLA13XIMPORT || m_fileType == FORMATID_SLA134IMPORT || m_fileType == FORMATID_SLA150IMPORT)
 		{
-			it->plug->setupTargets(currDoc, nullptr, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+			it->plug->setupTargets(currDoc, nullptr, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 			ret = it->plug->loadPage(m_fileName, PageToLoad, Mpage, renamedPageName);
 // 			if (ret)
 // 				it->plug->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
@@ -214,27 +214,27 @@
 bool FileLoader::loadFile(ScribusDoc* currDoc)
 {
 	m_newReplacement = false;
-	currDoc->guidesPrefs().marginsShown = m_prefsManager->appPrefs.guidesPrefs.marginsShown;
-	currDoc->guidesPrefs().framesShown = m_prefsManager->appPrefs.guidesPrefs.framesShown;
-	currDoc->guidesPrefs().layerMarkersShown = m_prefsManager->appPrefs.guidesPrefs.layerMarkersShown;
-	currDoc->guidesPrefs().gridShown = m_prefsManager->appPrefs.guidesPrefs.gridShown;
-	currDoc->guidesPrefs().guidesShown = m_prefsManager->appPrefs.guidesPrefs.guidesShown;
-	currDoc->guidesPrefs().colBordersShown = m_prefsManager->appPrefs.guidesPrefs.colBordersShown;
-	currDoc->guidesPrefs().baselineGridShown = m_prefsManager->appPrefs.guidesPrefs.baselineGridShown;
-	currDoc->guidesPrefs().linkShown = m_prefsManager->appPrefs.guidesPrefs.linkShown;
-	currDoc->itemToolPrefs().polyCorners = m_prefsManager->appPrefs.itemToolPrefs.polyCorners;
-	currDoc->itemToolPrefs().polyFactor = m_prefsManager->appPrefs.itemToolPrefs.polyFactor;
-	currDoc->itemToolPrefs().polyRotation = m_prefsManager->appPrefs.itemToolPrefs.polyRotation;
-	currDoc->itemToolPrefs().polyCurvature = m_prefsManager->appPrefs.itemToolPrefs.polyCurvature;
-	currDoc->itemToolPrefs().polyOuterCurvature = m_prefsManager->appPrefs.itemToolPrefs.polyOuterCurvature;
-	currDoc->itemToolPrefs().polyInnerRot = m_prefsManager->appPrefs.itemToolPrefs.polyInnerRot;
-	currDoc->itemToolPrefs().polyUseFactor = m_prefsManager->appPrefs.itemToolPrefs.polyUseFactor;
-	currDoc->setAutoSave(m_prefsManager->appPrefs.docSetupPrefs.AutoSave);
-	currDoc->setAutoSaveTime(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveTime);
-	currDoc->setAutoSaveCount(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveCount);
-	currDoc->setAutoSaveKeep(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveKeep);
-	currDoc->setAutoSaveInDocDir(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveLocation);
-	currDoc->setAutoSaveDir(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveDir);
+	currDoc->guidesPrefs().marginsShown = m_prefsManager.appPrefs.guidesPrefs.marginsShown;
+	currDoc->guidesPrefs().framesShown = m_prefsManager.appPrefs.guidesPrefs.framesShown;
+	currDoc->guidesPrefs().layerMarkersShown = m_prefsManager.appPrefs.guidesPrefs.layerMarkersShown;
+	currDoc->guidesPrefs().gridShown = m_prefsManager.appPrefs.guidesPrefs.gridShown;
+	currDoc->guidesPrefs().guidesShown = m_prefsManager.appPrefs.guidesPrefs.guidesShown;
+	currDoc->guidesPrefs().colBordersShown = m_prefsManager.appPrefs.guidesPrefs.colBordersShown;
+	currDoc->guidesPrefs().baselineGridShown = m_prefsManager.appPrefs.guidesPrefs.baselineGridShown;
+	currDoc->guidesPrefs().linkShown = m_prefsManager.appPrefs.guidesPrefs.linkShown;
+	currDoc->itemToolPrefs().polyCorners = m_prefsManager.appPrefs.itemToolPrefs.polyCorners;
+	currDoc->itemToolPrefs().polyFactor = m_prefsManager.appPrefs.itemToolPrefs.polyFactor;
+	currDoc->itemToolPrefs().polyRotation = m_prefsManager.appPrefs.itemToolPrefs.polyRotation;
+	currDoc->itemToolPrefs().polyCurvature = m_prefsManager.appPrefs.itemToolPrefs.polyCurvature;
+	currDoc->itemToolPrefs().polyOuterCurvature = m_prefsManager.appPrefs.itemToolPrefs.polyOuterCurvature;
+	currDoc->itemToolPrefs().polyInnerRot = m_prefsManager.appPrefs.itemToolPrefs.polyInnerRot;
+	currDoc->itemToolPrefs().polyUseFactor = m_prefsManager.appPrefs.itemToolPrefs.polyUseFactor;
+	currDoc->setAutoSave(m_prefsManager.appPrefs.docSetupPrefs.AutoSave);
+	currDoc->setAutoSaveTime(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveTime);
+	currDoc->setAutoSaveCount(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveCount);
+	currDoc->setAutoSaveKeep(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveKeep);
+	currDoc->setAutoSaveInDocDir(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveLocation);
+	currDoc->setAutoSaveDir(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveDir);
 	m_ReplacedFonts = currDoc->AllFonts->getSubstitutions();
 	//dummyScFaces.clear();
 	bool ret = false;
@@ -246,7 +246,7 @@
 		{
 			case FORMATID_SLA12XIMPORT:
 				{
-					it->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+					it->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 					ret=it->loadFile(m_fileName, LoadSavePlugin::lfCreateDoc);
 // 					if (ret)
 // 						it->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
@@ -256,14 +256,14 @@
 			case FORMATID_SLA134IMPORT:
 			case FORMATID_SLA150IMPORT:
 				{
-					it->setupTargets(currDoc, nullptr, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+					it->setupTargets(currDoc, nullptr, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 					ret=it->loadFile(m_fileName, LoadSavePlugin::lfCreateDoc);
 // 					if (ret)
 // 						it->getReplacedFontData(newReplacement, ReplacedFonts, dummyScFaces);
 				}
 				break;
 			default:
-				it->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+				it->setupTargets(currDoc, currDoc->view(), currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 				ret = it->loadFile(m_fileName, LoadSavePlugin::lfCreateDoc);
 				break;
 		}
@@ -277,7 +277,7 @@
 	QList<FileFormat>::const_iterator it;
 	if (findFormat(FORMATID_SLA150EXPORT, it))
 	{
-		it->setupTargets(doc, doc->view(), doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+		it->setupTargets(doc, doc->view(), doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 		ret = it->saveFile(fileName);
 		if (savedFile)
 			*savedFile = it->lastSavedFile();
@@ -290,7 +290,7 @@
 	QList<FileFormat>::const_iterator it;
 	if (findFormat(m_fileType, it))
 	{
-		it->plug->setupTargets(doc, nullptr, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+		it->plug->setupTargets(doc, nullptr, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 		return it->readStyles(m_fileName, doc, docParagraphStyles);
 	}
 	return false;
@@ -301,7 +301,7 @@
 	QList<FileFormat>::const_iterator it;
 	if (findFormat(m_fileType, it))
 	{
-		it->plug->setupTargets(doc, nullptr, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
+		it->plug->setupTargets(doc, nullptr, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager.appPrefs.fontPrefs.AvailFonts));
 		return it->readCharStyles(m_fileName, doc, docCharStyles);
 	}
 	return false;
@@ -432,7 +432,7 @@
 	if (m_ReplacedFonts.isEmpty())
 		return true;
 
-	if (!(m_prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
+	if (!(m_prefsManager.appPrefs.fontPrefs.askBeforeSubstitute))
 		return true;
 
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
@@ -444,7 +444,7 @@
 	for (itfsu = m_ReplacedFonts.begin(); itfsu != m_ReplacedFonts.end(); ++itfsu)
 	{
 		if (dia.stickyReplacements->isChecked())
-			m_prefsManager->appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
+			m_prefsManager.appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
 	}
 	currDoc->AllFonts->setSubstitutions(m_ReplacedFonts, currDoc);
 	ResourceCollection repl;

Modified: trunk/Scribus/scribus/fileloader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/fileloader.h
==============================================================================
--- trunk/Scribus/scribus/fileloader.h	(original)
+++ trunk/Scribus/scribus/fileloader.h	Mon Jul  1 19:04:12 2019
@@ -60,7 +60,7 @@
 	bool m_newReplacement;
 	void readParagraphStyle(ParagraphStyle& vg, const QDomElement& pg, SCFonts &avail, ScribusDoc *doc);
 	bool findFormat(uint formatId, QList<FileFormat>::const_iterator &it);
-	PrefsManager* m_prefsManager;
+	PrefsManager& m_prefsManager;
 
 	QString m_fileName;
 	int m_fileType;

Modified: trunk/Scribus/scribus/fontlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/fontlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.cpp	(original)
+++ trunk/Scribus/scribus/fontlistmodel.cpp	Mon Jul  1 19:04:12 2019
@@ -16,7 +16,7 @@
 FontListModel::FontListModel(QObject * parent, ScribusDoc * doc, bool includeDisabled)
 	: QAbstractTableModel(parent),
 	m_doc(doc),
-	m_fonts(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts),
+	m_fonts(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts),
 	m_includeDisabled(includeDisabled)
 {
 	ttfFont = IconManager::instance().loadPixmap("font_truetype16.png");

Modified: trunk/Scribus/scribus/gtaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/gtaction.cpp
==============================================================================
--- trunk/Scribus/scribus/gtaction.cpp	(original)
+++ trunk/Scribus/scribus/gtaction.cpp	Mon Jul  1 19:04:12 2019
@@ -54,10 +54,9 @@
 #include "ui/propertiespalette_text.h"
 #include "ui/missing.h"
 
-gtAction::gtAction(bool append, PageItem* pageitem)
-{
-	m_prefsManager=PrefsManager::instance();
-	m_textFrame = pageitem;
+gtAction::gtAction(bool append, PageItem* pageitem) :
+	m_prefsManager(PrefsManager::instance())
+{	m_textFrame = pageitem;
 	m_ScMW=m_textFrame->doc()->scMW();
 	m_it = m_textFrame;
 	m_lastParagraphStyle = -1;
@@ -683,7 +682,7 @@
 	QString useFont = font->getName();
 	if ((useFont.isNull()) || (useFont.isEmpty()))
 		useFont = m_textFrame->itemText.defaultStyle().charStyle().font().scName();
-	else if (m_prefsManager->appPrefs.fontPrefs.AvailFonts[font->getName()].isNone())
+	else if (m_prefsManager.appPrefs.fontPrefs.AvailFonts[font->getName()].isNone())
 	{
 		bool found = false;
 		// Do not empty otherwise user may be asked to replace an empty font 
@@ -723,23 +722,23 @@
 			}
 			if (!found)
 			{
-				if (!m_prefsManager->appPrefs.fontPrefs.GFontSub.contains(font->getName()))
+				if (!m_prefsManager.appPrefs.fontPrefs.GFontSub.contains(font->getName()))
 				{
 					MissingFont *dia = new MissingFont(nullptr, useFont, m_textFrame->doc());
 					dia->exec();
 					useFont = dia->getReplacementFont();
-					m_prefsManager->appPrefs.fontPrefs.GFontSub[font->getName()] = useFont;
+					m_prefsManager.appPrefs.fontPrefs.GFontSub[font->getName()] = useFont;
 					delete dia;
 				}
 				else
-					useFont = m_prefsManager->appPrefs.fontPrefs.GFontSub[font->getName()];
+					useFont = m_prefsManager.appPrefs.fontPrefs.GFontSub[font->getName()];
 			}
 		}
 	}
 
 	if(!m_textFrame->doc()->UsedFonts.contains(useFont))
 		m_textFrame->doc()->AddFont(useFont);
-	return m_prefsManager->appPrefs.fontPrefs.AvailFonts[useFont];
+	return m_prefsManager.appPrefs.fontPrefs.AvailFonts[useFont];
 }
 
 QString gtAction::findFontName(gtFont* font)
@@ -748,7 +747,7 @@
 	for (uint i = 0; i < static_cast<uint>(gtFont::NAMECOUNT); ++i)
 	{
 		QString nname = font->getName(i);
-		if (! m_prefsManager->appPrefs.fontPrefs.AvailFonts[nname].isNone())
+		if (! m_prefsManager.appPrefs.fontPrefs.AvailFonts[nname].isNone())
 		{
 			ret = nname;
 			break;

Modified: trunk/Scribus/scribus/gtaction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/gtaction.h
==============================================================================
--- trunk/Scribus/scribus/gtaction.h	(original)
+++ trunk/Scribus/scribus/gtaction.h	Mon Jul  1 19:04:12 2019
@@ -111,7 +111,7 @@
 	QString parseColor(const QString &s);
 	QColor  parseColorN(const QString &rgbColor);
 	void finalize();
-	PrefsManager *m_prefsManager;
+	PrefsManager& m_prefsManager;
 	StoryText* m_noteStory;
 	TextNote* m_note;
 };

Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp	(original)
+++ trunk/Scribus/scribus/hyphenator.cpp	Mon Jul  1 19:04:12 2019
@@ -266,7 +266,7 @@
 						else
 						{
 							qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-							PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("hyhpen_options");
+							PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("hyhpen_options");
 							int xpos = prefs->getInt("Xposition", -9999);
 							int ypos = prefs->getInt("Yposition", -9999);
 							HyAsk *dia = new HyAsk((QWidget*)parent(), outs);

Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp	(original)
+++ trunk/Scribus/scribus/iconmanager.cpp	Mon Jul  1 19:04:12 2019
@@ -33,8 +33,8 @@
 
 IconManager& IconManager::instance()
 {
-	static IconManager _instance;
-	return _instance;
+	static IconManager m_instance;
+	return m_instance;
 }
 
 bool IconManager::setup()
@@ -193,7 +193,7 @@
 		qWarning("Unable to load icon %s: Got null pixmap", iconFilePath.toLatin1().constData());
 //	else
 //		qDebug()<<"Successful icon load from"<<iconFilePath;
-	if (PrefsManager::instance()->appPrefs.uiPrefs.grayscaleIcons && !forceUseColor)
+	if (PrefsManager::instance().appPrefs.uiPrefs.grayscaleIcons && !forceUseColor)
 		iconToGrayscale(pm);
 	if (rtlFlip)
 	{
@@ -251,7 +251,7 @@
 
 QString IconManager::pathForIcon(const QString& nam)
 {
-	//QString iconset(PrefsManager::instance()->appPrefs.uiPrefs.iconSet);
+	//QString iconset(PrefsManager::instance().appPrefs.uiPrefs.iconSet);
 	QString iconSubdir(m_iconSets[m_activeSetBasename].path+"/");
 	QString primaryIconSubdir(m_iconSets[m_backupSetBasename].path+"/");
 

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp	Mon Jul  1 19:04:12 2019
@@ -1030,7 +1030,7 @@
 	ts.readRawData(fontRawName.data(), nameLen);
 	QString fontName = fontRawName;
 	fontName = fontName.simplified();
-	SCFonts fonts = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts;
+	SCFonts fonts = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts;
 	SCFontsIterator it(fonts);
 	for ( ; it.hasNext() ; it.next())
 	{

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp	Mon Jul  1 19:04:12 2019
@@ -517,7 +517,7 @@
 			QString missingF = "";
 			for (int fo = 0; fo < m_FontListe.count(); fo++)
 			{
-				if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(m_FontListe[fo]))
+				if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(m_FontListe[fo]))
 				{
 					missing = true;
 					missingF += m_FontListe[fo]+"\n";

Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp	(original)
+++ trunk/Scribus/scribus/latexhelpers.cpp	Mon Jul  1 19:04:12 2019
@@ -302,7 +302,7 @@
 {
 	QFileInfo f(m_filename);
 	QString fileName=f.fileName();
-	QString command = PrefsManager::instance()->latexCommands()[fileName];
+	QString command = PrefsManager::instance().latexCommands()[fileName];
 	if (command.isEmpty())
 		return m_executable;
 	return command;
@@ -310,7 +310,7 @@
 
 QString I18nXmlStreamReader::readI18nText(bool unindent)
 {
-	QString language = PrefsManager::instance()->uiLanguage();
+	QString language = PrefsManager::instance().uiLanguage();
 	QString result;
 	int matchquality = 0;
 	bool i18n = false;
@@ -476,7 +476,7 @@
 {
 	QMap<QString, QString> configCmds;
 
-	const QStringList configFiles = PrefsManager::instance()->latexConfigs();
+	const QStringList configFiles = PrefsManager::instance().latexConfigs();
 	for (const QString& configFile : configFiles)
 	{
 		LatexConfigParser *config = LatexConfigCache::instance()->parser(configFile);

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Mon Jul  1 19:04:12 2019
@@ -1255,13 +1255,13 @@
 	qreal top = m_height - sideLength-offset;// * 1.5;
 	qreal bottom = top + sideLength;
 
-	QColor color(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor);
+	QColor color(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor);
 	if ((isBookmark) || (m_isAnnotation))
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor;
 	if ((BackBox != nullptr) || (NextBox != nullptr))
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor;
 	if (m_Locked)
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameLockColor;
 	if (m_Doc->m_Selection->containsItem(this))
 		color = Qt::red;
 
@@ -2153,13 +2153,13 @@
 		{
 			if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == OSGFrame) || (itemType() == PathText)) && (no_stroke))
 			{
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				if ((isBookmark) || (m_isAnnotation))
-					p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				if ((BackBox != nullptr) || (NextBox != nullptr))
-					p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				if (m_Locked)
-					p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				p->setFillMode(0);
 				if (itemType()==PathText)
 				{
@@ -2200,7 +2200,7 @@
 				|| ((72.0 / imageYScale()) < minres) 
 				|| ((72.0 / imageXScale()) > maxres) 
 				|| ((72.0 / imageYScale()) > maxres)) 
-				&& (isRaster) && (checkres) && (!m_Doc->drawAsPreview) && (PrefsManager::instance()->appPrefs.displayPrefs.showVerifierWarningsOnCanvas))
+				&& (isRaster) && (checkres) && (!m_Doc->drawAsPreview) && (PrefsManager::instance().appPrefs.displayPrefs.showVerifierWarningsOnCanvas))
 			{
 				double ofx = m_width - 22.0;
 				double ofy = m_height - 22.0;
@@ -2232,9 +2232,9 @@
 		}
 		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
 		{
-			p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if (m_Locked)
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setFillMode(ScPainter::None);
 			p->drawSharpRect(0, 0, m_width, m_height);
 			no_fill = false;
@@ -2315,7 +2315,7 @@
 		if (style.baselineOffset() != 0)
 			p->translate(0, -cembedded->m_height * (style.baselineOffset() / 1000.0));
 		p->scale(style.scaleH() / 1000.0, style.scaleV() / 1000.0);
-		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, 0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+		p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, 0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
 		p->setFillMode(ScPainter::None);
 		p->drawSharpRect(0, 0, cembedded->m_width, cembedded->m_height);
 		p->restore();
@@ -9614,7 +9614,7 @@
 	int lowResTypeBack = pixm.imgInfo.lowResType;
 	int gsRes=gsResolution;
 	if (gsResolution==-1) //If it wasn't supplied, get it from PrefsManager.
-		gsRes=PrefsManager::instance()->gsResolution();
+		gsRes=PrefsManager::instance().gsResolution();
 	bool dummy;
 
 	CMSettings cms(m_Doc, IProfile, IRender);

Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_group.cpp	Mon Jul  1 19:04:12 2019
@@ -165,7 +165,7 @@
 			p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
 			p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 			const QFont &font = QApplication::font();
-			p->setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
+			p->setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
 			p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 			p->drawLine(FPoint(m_width, 0), FPoint(m_width, m_height));
 			p->drawLine(FPoint(m_width, m_height), FPoint(0, m_height));

Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp	Mon Jul  1 19:04:12 2019
@@ -136,7 +136,7 @@
 				p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
 				p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 				const QFont &font = QApplication::font();
-				p->setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
+				p->setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
 				p->drawText(QRectF(0.0, 0.0, m_width, m_height), htmlText);
 			}
 		}

Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp	Mon Jul  1 19:04:12 2019
@@ -54,8 +54,8 @@
 	m_killed = false;
 	
 	config = nullptr;
-	if (PrefsManager::instance()->latexConfigs().count() > 0)
-		setConfigFile(PrefsManager::instance()->latexConfigs()[0]);
+	if (PrefsManager::instance().latexConfigs().count() > 0)
+		setConfigFile(PrefsManager::instance().latexConfigs()[0]);
 
 	latex = new QProcess();
 	connect(latex, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(updateImage(int,QProcess::ExitStatus)));
@@ -137,7 +137,7 @@
 		p->setPen(Qt::green, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 		p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
 		const QFont &font = QApplication::font();
-		p->setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
+		p->setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
 		p->drawText(QRectF(0.0, 0.0, m_width, m_height), tr("Rendering..."));
 	}
 	else if (m_err)
@@ -148,7 +148,7 @@
 		p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
 		p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 		const QFont &font = QApplication::font();
-		p->setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
+		p->setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
 		p->drawText(QRectF(0.0, 0.0, m_width, m_height), tr("Render Error"));
 	}
 	else
@@ -177,7 +177,7 @@
 	double offY = m_imageYOffset / yres;
 
 	bool imageLoaded = PageItem_ImageFrame::loadImage(imageFile, true, realDpi(), showMsg);
-	if (PrefsManager::instance()->latexForceDpi())
+	if (PrefsManager::instance().latexForceDpi())
 	{
 		pixm.imgInfo.xres = pixm.imgInfo.yres = realDpi();
 	}
@@ -460,7 +460,7 @@
 {
 	if (m_dpi)
 		return m_dpi;
-	return PrefsManager::instance()->latexResolution();
+	return PrefsManager::instance().latexResolution();
 }
 
 void PageItem_LatexFrame::setDpi(int newDpi)
@@ -474,7 +474,7 @@
 	if (relative)
 	{
 		QFileInfo fi;
-		const QStringList configs = PrefsManager::instance()->latexConfigs();
+		const QStringList configs = PrefsManager::instance().latexConfigs();
 		for (const QString& config : configs)
 		{
 			fi.setFile(config);
@@ -507,7 +507,7 @@
 	}
 	QString newFormula;
 	if (unchanged) {
-		if (PrefsManager::instance()->latexStartWithEmptyFrames()) {
+		if (PrefsManager::instance().latexStartWithEmptyFrames()) {
 			newFormula = "";
 		} else {
 			newFormula = config->emptyFrameText();

Modified: trunk/Scribus/scribus/pageitem_symbol.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem_symbol.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_symbol.cpp	Mon Jul  1 19:04:12 2019
@@ -67,7 +67,7 @@
 			p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
 			p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 			const QFont &font = QApplication::font();
-			p->setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
+			p->setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.findFont(font.family(), QFontInfo(font).styleName()), font.pointSizeF());
 			p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 			p->drawLine(FPoint(m_width, 0), FPoint(m_width, m_height));
 			p->drawLine(FPoint(m_width, m_height), FPoint(0, m_height));

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Mon Jul  1 19:04:12 2019
@@ -3680,13 +3680,13 @@
 		double scpInv = 0.0;
 		if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && (no_stroke))
 		{
-			p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if ((isBookmark) || (m_isAnnotation))
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if ((BackBox != nullptr) || (NextBox != nullptr))
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if (m_Locked)
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 
 			p->setFillMode(0);
 			p->setupSharpPolygon(&PoLine);
@@ -3724,9 +3724,9 @@
 		}
 		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
 		{
-			p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if (m_Locked)
-				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setFillMode(ScPainter::None);
 			p->drawSharpRect(0, 0, m_width, m_height);
 			no_fill = false;
@@ -4696,7 +4696,7 @@
 
 bool PageItem_TextFrame::checkKeyIsShortcut(QKeyEvent *k)
 {
-	QMap<QString, Keys> keyMap=PrefsManager::instance()->appPrefs.keyShortcutPrefs.KeyActions;
+	QMap<QString, Keys> keyMap=PrefsManager::instance().appPrefs.keyShortcutPrefs.KeyActions;
 
 	bool ret = false;
 	int keyCode =0;
@@ -4913,13 +4913,13 @@
 	qreal top   = Height - sideLength;// * 1.5;
 	qreal bottom = top   + sideLength;
 
-	QColor color(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor);
+	QColor color(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor);
 	if ((isBookmark) || (m_isAnnotation))
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor;
 	if ((BackBox != nullptr) || (NextBox != nullptr))
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor;
 	if (m_Locked)
-		color = PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor;
+		color = PrefsManager::instance().appPrefs.displayPrefs.frameLockColor;
 	if (m_Doc->m_Selection->containsItem(this))
 		color = Qt::red;
 

Modified: trunk/Scribus/scribus/pagesize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pagesize.cpp
==============================================================================
--- trunk/Scribus/scribus/pagesize.cpp	(original)
+++ trunk/Scribus/scribus/pagesize.cpp	Mon Jul  1 19:04:12 2019
@@ -120,9 +120,9 @@
 QStringList PageSize::activeSizeList() const
 {
 	QStringList pageSizes=sizeList();
-	if (PrefsManager::instance()->appPrefs.activePageSizes.count()==0)
+	if (PrefsManager::instance().appPrefs.activePageSizes.count()==0)
 		return QStringList(pageSizes);
-	QStringList activePageSizes(PrefsManager::instance()->appPrefs.activePageSizes);
+	QStringList activePageSizes(PrefsManager::instance().appPrefs.activePageSizes);
 	QStringList activeSizes;
 	for (int i = 0; i < activePageSizes.size(); ++i)
 	{
@@ -136,9 +136,9 @@
 {
 	QStringList pageTRSizes=sizeTRList();
 	QStringList pageSizes=sizeList();
-	if (PrefsManager::instance()->appPrefs.activePageSizes.count()==0)
+	if (PrefsManager::instance().appPrefs.activePageSizes.count()==0)
 		return QStringList(pageTRSizes);
-	QStringList activePageSizes(PrefsManager::instance()->appPrefs.activePageSizes);
+	QStringList activePageSizes(PrefsManager::instance().appPrefs.activePageSizes);
 	QStringList activeTRSizes;
 	for (int i = 0; i < activePageSizes.size(); ++i)
 	{

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Mon Jul  1 19:04:12 2019
@@ -619,7 +619,7 @@
 		PDF_Error( tr("Qt build miss both \"UTF-16\" and \"ISO-10646-UCS-2\" text codecs, pdf export is not possible") );
 		return false;
 	}
-	if (PDF_Begin_Doc(fn, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, usedFonts, doc.scMW()->bookmarkPalette->BView))
+	if (PDF_Begin_Doc(fn, PrefsManager::instance().appPrefs.fontPrefs.AvailFonts, usedFonts, doc.scMW()->bookmarkPalette->BView))
 	{
 		QMap<int, int> pageNsMpa;
 		for (uint a = 0; a < pageNs.size(); ++a)
@@ -10929,8 +10929,8 @@
 		}
 		else
 		{
-			ImInfo.sxa *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0;
-			ImInfo.sya *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0;
+			ImInfo.sxa *= PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 72.0;
+			ImInfo.sya *= PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 72.0;
 		}
 	}
 	if (!fromAN && output)

Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp	(original)
+++ trunk/Scribus/scribus/pluginmanager.cpp	Mon Jul  1 19:04:12 2019
@@ -38,7 +38,7 @@
 
 PluginManager::PluginManager() :
 	QObject(nullptr),
-	prefs(PrefsManager::instance()->prefsFile->getPluginContext("pluginmanager"))
+	prefs(PrefsManager::instance().prefsFile->getPluginContext("pluginmanager"))
 {
 }
 

Modified: trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -52,7 +52,7 @@
 	documentColorList->setPixmapType(ColorListBox::fancyPixmap);
 	documentColorList->setColors(m_Doc->PageColors, false);
 	// preferences
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("colorwheel");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("colorwheel");
 	typeCombo->setCurrentIndex(prefs->getInt("cw_type", 0));
 	angleSpin->setValue(prefs->getInt("cw_angle", 15));
 	colorList->setPixmapType(ColorListBox::fancyPixmap);

Modified: trunk/Scribus/scribus/plugins/export/pixmapexport/dialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/export/pixmapexport/dialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/pixmapexport/dialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/export/pixmapexport/dialog.cpp	Mon Jul  1 19:04:12 2019
@@ -28,7 +28,7 @@
 {
 	setupUi(this);
 	setModal(true);
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("pixmapexport");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("pixmapexport");
 
 	QDirModel * dirModel = new QDirModel(this);
 	dirModel->setFilter(QDir::AllDirs);

Modified: trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -130,7 +130,7 @@
 	QString fileName;
 	if (doc!=nullptr)
 	{
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("svgex");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("svgex");
 		QString wdir = prefs->get("wdir", ".");
 		QScopedPointer<CustomFDialog> openDia( new CustomFDialog(doc->scMW(), wdir, QObject::tr("Save as"), QObject::tr("%1;;All Files (*)").arg(FormatsManager::instance()->extensionsForFormat(FormatsManager::SVG)), fdHidePreviewCheckBox) );
 		openDia->setSelection(getFileNameByPage(doc, doc->currentPage()->pageNr(), "svg"));

Modified: trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -133,7 +133,7 @@
 	QString fileName;
 	if (doc!=nullptr)
 	{
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("xpsex");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("xpsex");
 		QString wdir = prefs->get("wdir", ".");
 		QScopedPointer<CustomFDialog> openDia( new CustomFDialog(doc->scMW(), wdir, QObject::tr("Save as"), QObject::tr("Microsoft XPS (*.xps *.XPS);;All Files (*)"), fdHidePreviewCheckBox) );
 

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	Mon Jul  1 19:04:12 2019
@@ -766,7 +766,7 @@
 	}
 	int ObCount = 0;
 	int activeLayer = 0;
-	PrefsManager* prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
@@ -799,14 +799,14 @@
 		m_Doc->PageSp=dc.attribute("AUTOSPALTEN").toInt();
 		m_Doc->PageSpa=ScCLocale::toDoubleC(dc.attribute("ABSTSPALTEN"));
 		m_Doc->setUnitIndex(dc.attribute("UNITS", "0").toInt());
-		m_Doc->guidesPrefs().gridShown = prefsManager->appPrefs.guidesPrefs.gridShown;
-		m_Doc->guidesPrefs().guidesShown = prefsManager->appPrefs.guidesPrefs.guidesShown;
-		m_Doc->guidesPrefs().colBordersShown = prefsManager->appPrefs.guidesPrefs.colBordersShown;
-		m_Doc->guidesPrefs().framesShown = prefsManager->appPrefs.guidesPrefs.framesShown;
-		m_Doc->guidesPrefs().layerMarkersShown = prefsManager->appPrefs.guidesPrefs.layerMarkersShown;
-		m_Doc->guidesPrefs().marginsShown = prefsManager->appPrefs.guidesPrefs.marginsShown;
-		m_Doc->guidesPrefs().baselineGridShown = prefsManager->appPrefs.guidesPrefs.baselineGridShown;
-		m_Doc->guidesPrefs().linkShown = prefsManager->appPrefs.guidesPrefs.linkShown;
+		m_Doc->guidesPrefs().gridShown = prefsManager.appPrefs.guidesPrefs.gridShown;
+		m_Doc->guidesPrefs().guidesShown = prefsManager.appPrefs.guidesPrefs.guidesShown;
+		m_Doc->guidesPrefs().colBordersShown = prefsManager.appPrefs.guidesPrefs.colBordersShown;
+		m_Doc->guidesPrefs().framesShown = prefsManager.appPrefs.guidesPrefs.framesShown;
+		m_Doc->guidesPrefs().layerMarkersShown = prefsManager.appPrefs.guidesPrefs.layerMarkersShown;
+		m_Doc->guidesPrefs().marginsShown = prefsManager.appPrefs.guidesPrefs.marginsShown;
+		m_Doc->guidesPrefs().baselineGridShown = prefsManager.appPrefs.guidesPrefs.baselineGridShown;
+		m_Doc->guidesPrefs().linkShown = prefsManager.appPrefs.guidesPrefs.linkShown;
 		m_Doc->guidesPrefs().showPic = true;
 		m_Doc->guidesPrefs().showControls = false;
 		m_Doc->guidesPrefs().renderStackOrder.clear();
@@ -815,7 +815,7 @@
 // 		DoFonts.clear();
 		m_Doc->itemToolPrefs().textSize=qRound(ScCLocale::toDoubleC(dc.attribute("DSIZE")) * 10);
 		Defont=dc.attribute("DFONT");
-		m_Doc->itemToolPrefs().textFont = prefsManager->appPrefs.itemToolPrefs.textFont;
+		m_Doc->itemToolPrefs().textFont = prefsManager.appPrefs.itemToolPrefs.textFont;
 		m_AvailableFonts->findFont(Defont, m_Doc);
 		m_Doc->itemToolPrefs().textFont = Defont;
 		m_Doc->itemToolPrefs().textColumns=dc.attribute("DCOL", "1").toInt();
@@ -853,7 +853,7 @@
 		m_Doc->cmsSettings().CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
 		m_Doc->cmsSettings().GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
 		m_Doc->cmsSettings().BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
-		m_Doc->cmsSettings().DefaultMonitorProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+		m_Doc->cmsSettings().DefaultMonitorProfile = prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 		m_Doc->cmsSettings().DefaultPrinterProfile = dc.attribute("DPPr","");
 		m_Doc->cmsSettings().DefaultImageRGBProfile = dc.attribute("DPIn","");
 		m_Doc->cmsSettings().DefaultImageCMYKProfile = dc.attribute("DPPr",""); // Use DPPr to match 1.2.x behavior
@@ -883,8 +883,8 @@
 		m_Doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
 		m_Doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
 		m_Doc->SnapGrid  = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
-		m_Doc->guidesPrefs().minorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MINGRID"), prefsManager->appPrefs.guidesPrefs.minorGridSpacing);
-		m_Doc->guidesPrefs().majorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MAJGRID"), prefsManager->appPrefs.guidesPrefs.majorGridSpacing);
+		m_Doc->guidesPrefs().minorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MINGRID"), prefsManager.appPrefs.guidesPrefs.minorGridSpacing);
+		m_Doc->guidesPrefs().majorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MAJGRID"), prefsManager.appPrefs.guidesPrefs.majorGridSpacing);
 		m_Doc->itemToolPrefs().lineStartArrow = 0;
 		m_Doc->itemToolPrefs().lineEndArrow = 0;
 		m_Doc->LastAuto = nullptr;
@@ -2265,9 +2265,9 @@
 	tmpf = pg->attribute("FONT", doc->itemToolPrefs().textFont);
 	if (tmpf.isEmpty())
 		tmpf = doc->itemToolPrefs().textFont;
-	PrefsManager *prefsManager=PrefsManager::instance();
-	prefsManager->appPrefs.fontPrefs.AvailFonts.findFont(tmpf, doc);
-	vg->charStyle().setFont(prefsManager->appPrefs.fontPrefs.AvailFonts[tmpf]);
+	PrefsManager& prefsManager=PrefsManager::instance();
+	prefsManager.appPrefs.fontPrefs.AvailFonts.findFont(tmpf, doc);
+	vg->charStyle().setFont(prefsManager.appPrefs.fontPrefs.AvailFonts[tmpf]);
 	vg->charStyle().setFontSize(qRound(ScCLocale::toDoubleC(pg->attribute("FONTSIZE"), 12.0) * 10.0));
 	vg->setHasDropCap(static_cast<bool>(pg->attribute("DROP", "0").toInt()));
 	vg->setDropCapLines(pg->attribute("DROPLIN", "2").toInt());

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Mon Jul  1 19:04:12 2019
@@ -930,13 +930,12 @@
 
 void Scribus134Format::readCMSSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
 	doc->cmsSettings().SoftProofOn     = attrs.valueAsBool("DPSo", false);
 	doc->cmsSettings().SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
 	doc->cmsSettings().CMSinUse   = attrs.valueAsBool("DPuse", false);
 	doc->cmsSettings().GamutCheck = attrs.valueAsBool("DPgam", false);
 	doc->cmsSettings().BlackPoint = attrs.valueAsBool("DPbla", true);
-	doc->cmsSettings().DefaultMonitorProfile   = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+	doc->cmsSettings().DefaultMonitorProfile   = PrefsManager::instance().appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 	doc->cmsSettings().DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
 	doc->cmsSettings().DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
 	doc->cmsSettings().DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
@@ -973,9 +972,9 @@
 
 void Scribus134Format::readGuideSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
-	doc->guidesPrefs().minorGridSpacing = attrs.valueAsDouble("MINGRID", prefsManager->appPrefs.guidesPrefs.minorGridSpacing);
-	doc->guidesPrefs().majorGridSpacing = attrs.valueAsDouble("MAJGRID", prefsManager->appPrefs.guidesPrefs.majorGridSpacing);
+	PrefsManager& prefsManager = PrefsManager::instance();
+	doc->guidesPrefs().minorGridSpacing = attrs.valueAsDouble("MINGRID", prefsManager.appPrefs.guidesPrefs.minorGridSpacing);
+	doc->guidesPrefs().majorGridSpacing = attrs.valueAsDouble("MAJGRID", prefsManager.appPrefs.guidesPrefs.majorGridSpacing);
 	doc->guidesPrefs().gridShown    = attrs.valueAsBool("SHOWGRID", false);
 	doc->guidesPrefs().guidesShown  =attrs.valueAsBool("SHOWGUIDES", true);
 	doc->guidesPrefs().colBordersShown  = attrs.valueAsBool("showcolborders", false);
@@ -1983,7 +1982,7 @@
 		{
 			newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PARSEP);
 			ParagraphStyle newStyle;
-//			PrefsManager* prefsManager = PrefsManager::instance();
+//			PrefsManager& prefsManager = PrefsManager::instance();
 			readParagraphStyle(doc, reader, newStyle);
 			newItem->itemText.setStyle(newItem->itemText.length()-1, newStyle);
 			newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, lastStyle->Style);
@@ -1991,7 +1990,7 @@
 		else if (tName == "trail")
 		{
 			ParagraphStyle newStyle;
-//			PrefsManager* prefsManager = PrefsManager::instance();
+//			PrefsManager& prefsManager = PrefsManager::instance();
 			readParagraphStyle(doc, reader, newStyle);
 			newItem->itemText.setStyle(newItem->itemText.length(), newStyle);
 		}

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	Mon Jul  1 19:04:12 2019
@@ -237,7 +237,7 @@
 	TableIDM.clear();
 	TableItemsF.clear();
 	TableIDF.clear();
-	PrefsManager* prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 	while (!DOC.isNull())
 	{
 		QDomElement dc=DOC.toElement();
@@ -271,7 +271,7 @@
 		m_Doc->itemToolPrefs().textSize=qRound(ScCLocale::toDoubleC(dc.attribute("DSIZE")) * 10);
 		Defont=dc.attribute("DFONT");
 		//findFont will use that if it doesnt find the font:
-		m_Doc->itemToolPrefs().textFont = prefsManager->appPrefs.itemToolPrefs.textFont;
+		m_Doc->itemToolPrefs().textFont = prefsManager.appPrefs.itemToolPrefs.textFont;
 		m_AvailableFonts->findFont(Defont, m_Doc);
 		m_Doc->itemToolPrefs().textFont = Defont;
 		m_Doc->itemToolPrefs().textColumns= dc.attribute("DCOL", "1").toInt();
@@ -313,7 +313,7 @@
 		m_Doc->cmsSettings().CMSinUse = static_cast<bool>(dc.attribute("DPuse", "0").toInt());
 		m_Doc->cmsSettings().GamutCheck = static_cast<bool>(dc.attribute("DPgam", "0").toInt());
 		m_Doc->cmsSettings().BlackPoint = static_cast<bool>(dc.attribute("DPbla", "1").toInt());
-		m_Doc->cmsSettings().DefaultMonitorProfile = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+		m_Doc->cmsSettings().DefaultMonitorProfile = prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 		m_Doc->cmsSettings().DefaultPrinterProfile = dc.attribute("DPPr","");
 		m_Doc->cmsSettings().DefaultImageRGBProfile = dc.attribute("DPIn","");
 		m_Doc->cmsSettings().DefaultImageCMYKProfile = dc.attribute("DPInCMYK","");
@@ -353,8 +353,8 @@
 		m_Doc->setHyphAutomatic(static_cast<bool>(dc.attribute("AUTOMATIC", "1").toInt()));
 		m_Doc->setHyphAutoCheck(static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt()));
 		m_Doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
-		m_Doc->guidesPrefs().minorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MINGRID"), prefsManager->appPrefs.guidesPrefs.minorGridSpacing);
-		m_Doc->guidesPrefs().majorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MAJGRID"), prefsManager->appPrefs.guidesPrefs.majorGridSpacing);
+		m_Doc->guidesPrefs().minorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MINGRID"), prefsManager.appPrefs.guidesPrefs.minorGridSpacing);
+		m_Doc->guidesPrefs().majorGridSpacing = ScCLocale::toDoubleC(dc.attribute("MAJGRID"), prefsManager.appPrefs.guidesPrefs.majorGridSpacing);
 		m_Doc->guidesPrefs().gridShown = static_cast<bool>(dc.attribute("SHOWGRID", "0").toInt());
 		m_Doc->guidesPrefs().guidesShown = static_cast<bool>(dc.attribute("SHOWGUIDES", "1").toInt());
 		m_Doc->guidesPrefs().colBordersShown = static_cast<bool>(dc.attribute("showcolborders", "0").toInt());
@@ -2576,12 +2576,12 @@
 
 QString Scribus13Format::AskForFont(const QString& fStr, ScribusDoc *doc)
 {
-	PrefsManager *prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 //	QFont fo;
 	QString tmpf = fStr;
 	if ((!(*m_AvailableFonts).contains(tmpf)) || (!(*m_AvailableFonts)[tmpf].usable()))
 	{
-		if ((!prefsManager->appPrefs.fontPrefs.GFontSub.contains(tmpf)) || (!(*m_AvailableFonts)[prefsManager->appPrefs.fontPrefs.GFontSub[tmpf]].usable()))
+		if ((!prefsManager.appPrefs.fontPrefs.GFontSub.contains(tmpf)) || (!(*m_AvailableFonts)[prefsManager.appPrefs.fontPrefs.GFontSub[tmpf]].usable()))
 		{
 			qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
 			MissingFont *dia = new MissingFont(nullptr, tmpf, doc);
@@ -2589,10 +2589,10 @@
 			tmpf = dia->getReplacementFont();
 			delete dia;
 			qApp->restoreOverrideCursor();
-			prefsManager->appPrefs.fontPrefs.GFontSub[fStr] = tmpf;
+			prefsManager.appPrefs.fontPrefs.GFontSub[fStr] = tmpf;
 		}
 		else
-			tmpf = prefsManager->appPrefs.fontPrefs.GFontSub[tmpf];
+			tmpf = prefsManager.appPrefs.fontPrefs.GFontSub[tmpf];
 		ReplacedFonts[fStr] = tmpf;
 	}
 	if (!doc->UsedFonts.contains(tmpf))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Mon Jul  1 19:04:12 2019
@@ -2115,13 +2115,12 @@
 
 void Scribus150Format::readCMSSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
 	doc->cmsSettings().SoftProofOn     = attrs.valueAsBool("DPSo", false);
 	doc->cmsSettings().SoftProofFullOn = attrs.valueAsBool("DPSFo", false);
 	doc->cmsSettings().CMSinUse   = attrs.valueAsBool("DPuse", false);
 	doc->cmsSettings().GamutCheck = attrs.valueAsBool("DPgam", false);
 	doc->cmsSettings().BlackPoint = attrs.valueAsBool("DPbla", true);
-	doc->cmsSettings().DefaultMonitorProfile   = prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+	doc->cmsSettings().DefaultMonitorProfile   = PrefsManager::instance().appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 	doc->cmsSettings().DefaultPrinterProfile   = attrs.valueAsString("DPPr","");
 	doc->cmsSettings().DefaultImageRGBProfile  = attrs.valueAsString("DPIn","");
 	doc->cmsSettings().DefaultImageCMYKProfile = attrs.valueAsString("DPInCMYK","");
@@ -2158,9 +2157,9 @@
 
 void Scribus150Format::readGuideSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
-	doc->guidesPrefs().minorGridSpacing = attrs.valueAsDouble("MINGRID", prefsManager->appPrefs.guidesPrefs.minorGridSpacing);
-	doc->guidesPrefs().majorGridSpacing = attrs.valueAsDouble("MAJGRID", prefsManager->appPrefs.guidesPrefs.majorGridSpacing);
+	PrefsManager& prefsManager = PrefsManager::instance();
+	doc->guidesPrefs().minorGridSpacing = attrs.valueAsDouble("MINGRID", prefsManager.appPrefs.guidesPrefs.minorGridSpacing);
+	doc->guidesPrefs().majorGridSpacing = attrs.valueAsDouble("MAJGRID", prefsManager.appPrefs.guidesPrefs.majorGridSpacing);
 	doc->guidesPrefs().gridShown    = attrs.valueAsBool("SHOWGRID", false);
 	doc->guidesPrefs().guidesShown  =attrs.valueAsBool("SHOWGUIDES", true);
 	doc->guidesPrefs().colBordersShown  = attrs.valueAsBool("showcolborders", false);
@@ -2212,8 +2211,7 @@
 
 void Scribus150Format::readToolSettings(ScribusDoc* doc, ScXmlStreamAttributes& attrs)
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
-	const ItemToolPrefs& defToolPrefs = prefsManager->appPrefs.itemToolPrefs;
+	const ItemToolPrefs& defToolPrefs = PrefsManager::instance().appPrefs.itemToolPrefs;
 
 	QString textFont = attrs.valueAsString("DFONT");
 	m_AvailableFonts->findFont(textFont, doc);
@@ -6602,7 +6600,7 @@
 {
 	bool  found(false);
 	const StyleSet<ParagraphStyle> * docParagraphStyles = tempStyles? tempStyles : & doc->paragraphStyles();
-	//UNUSED: PrefsManager* prefsManager = PrefsManager::instance();
+	//UNUSED: PrefsManager& prefsManager = PrefsManager::instance();
 	readParagraphStyle(doc, reader, style);
 	for (int xx=0; xx<docParagraphStyles->count(); ++xx)
 	{

Modified: trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp	Mon Jul  1 19:04:12 2019
@@ -42,7 +42,7 @@
 
 	// scribus config
 	defaultStr = tr("Woven silk pyjamas exchanged for blue quartz", "font preview");
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("fontpreview");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("fontpreview");
 	uint srt = prefs->getUInt("sortColumn", 0);
 	bool extend = prefs->getBool("extendedView", false);
 	extendedCheckBox->setChecked(extend);
@@ -70,7 +70,7 @@
 		if (m_Doc->m_Selection->count() != 0)
 			searchName = m_Doc->currentStyle.charStyle().font().scName();
 		else
-			searchName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+			searchName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 	}
 	QModelIndexList found = fontModel->match(fontModel->index(0, 0),
 											 Qt::DisplayRole, searchName,

Modified: trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp	Mon Jul  1 19:04:12 2019
@@ -455,7 +455,7 @@
 			if (!font.isEmpty())
 			{
 				font = getFontName(font);
-				pStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
+				pStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[font]);
 			}
 			else
 			{
@@ -465,12 +465,12 @@
 					if (fonta == "minorHAnsi")
 					{
 						fonta = getFontName(themeFont1);
-						pStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fonta]);
+						pStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fonta]);
 					}
 					else if (fonta == "majorHAnsi")
 					{
 						fonta = getFontName(themeFont2);
-						pStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fonta]);
+						pStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fonta]);
 					}
 				}
 			}
@@ -669,14 +669,14 @@
 QString DocXIm::getFontName(const QString& name)
 {
 	QString fontName = name;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (it.current().family().toLower() == fontName.toLower())
 		{
 			if (it.currentKey().toLower() == fontName.toLower()) // exact Match
 				return fontName;
-			QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+			QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 			if (slist.count() > 0)
 			{
 				slist.sort();
@@ -690,17 +690,17 @@
 		}
 	}
 
-	if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
+	if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(fontName))
 	{
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		MissingFont dia(nullptr, fontName, m_Doc);
 		static_cast<void>(dia.exec());
 		qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia.getReplacementFont();
+		PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName] = dia.getReplacementFont();
 		fontName = dia.getReplacementFont();
 	}
 	else
-		fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+		fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName];
 
 	return fontName;
 }

Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	Mon Jul  1 19:04:12 2019
@@ -1077,7 +1077,7 @@
 				tmpOStyle.fontName = m_fontMap[actStyle.fontName.value];
 			else
 				tmpOStyle.fontName = actStyle.fontName.value;
-			if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
+			if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
 			{
 				tmpOStyle.fontName = constructFontName(tmpOStyle.fontName, "");
 				m_fontMap[actStyle.fontName.value] = tmpOStyle.fontName;
@@ -1099,7 +1099,7 @@
 						tmpOStyle.fontName = m_fontMap[odtStyle.fontName.value];
 					else
 						tmpOStyle.fontName = constructFontName(odtStyle.fontName.value, "");
-					if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
+					if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
 					{
 						tmpOStyle.fontName = constructFontName(tmpOStyle.fontName, "");
 						m_fontMap[odtStyle.fontName.value] = tmpOStyle.fontName;
@@ -1328,14 +1328,14 @@
 QString ODTIm::constructFontName(const QString& fontBaseName, const QString& fontStyle)
 {
 	QString fontName;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (fontBaseName.toLower() != it.current().family().toLower())
 			continue;
 
 		// found the font family, now go for the style
-		QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+		QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 		slist.sort();
 		if (slist.count() > 0)
 		{
@@ -1362,9 +1362,9 @@
 	QString family = fontBaseName;
 	if (!fontStyle.isEmpty())
 		family += " " + fontStyle;
-	if (PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
-	{
-		fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+	if (PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
+	{
+		fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 		return fontName;
 	}
 
@@ -1374,7 +1374,7 @@
 		fontName = dia->getReplacementFont();
 	else
 		fontName = m_Doc->itemToolPrefs().textFont;
-	PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
+	PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 
 	return fontName;
@@ -1389,30 +1389,30 @@
 	m_item->itemText.removeChars(posC, 1);
 	if (fam.isEmpty())
 		return;
-	QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
+	QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[fam];
 	if (kind == 0)
 	{
 		if (slist.contains("Italic"))
-			tmpCStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+			tmpCStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 	}
 	else if (kind == 1)
 	{
 		if (slist.contains("Oblique"))
-			tmpCStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Oblique"]);
+			tmpCStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Oblique"]);
 	}
 	else if (kind == 2)
 	{
 		if (slist.contains("Bold"))
-			tmpCStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+			tmpCStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 	}
 	else if (kind == 3)
 	{
 		if (slist.contains("Bold Italic"))
-			tmpCStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+			tmpCStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 	}
 	else if (kind == 4)
 	{
 		if (slist.contains("Bold Oblique"))
-			tmpCStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Oblique"]);
-	}
-}
+			tmpCStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Oblique"]);
+	}
+}

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp	Mon Jul  1 19:04:12 2019
@@ -61,7 +61,7 @@
 
 SxwIm::SxwIm(const QString& fileName, const QString& enc, gtWriter* w, bool textOnly)
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("SxwIm");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("SxwIm");
 	bool update = prefs->getBool("update", true);
 	bool prefix = prefs->getBool("prefix", true);
 	bool ask = prefs->getBool("askAgain", true);

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp	Mon Jul  1 19:04:12 2019
@@ -46,7 +46,7 @@
 	filters = nullptr;
 	writer = w;
 	writer->setOverridePStyleFont(false);
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("TextFilter");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("TextFilter");
 	tfDia* tfdia = new tfDia();
 	if (tfdia->exec())
 	{

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp	Mon Jul  1 19:04:12 2019
@@ -34,7 +34,7 @@
 	setWindowIcon(QIcon(IconManager::instance().loadIcon("AppIcon.png")));
 	setWindowTitle( tr("Create filter"));
 	setMinimumWidth(524);
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("TextFilter");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("TextFilter");
 
 	//Get last window geometry values
 	int vleft   = qMax(0, prefs->getInt("x", 10));

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp	Mon Jul  1 19:04:12 2019
@@ -99,7 +99,7 @@
 // 	thirdRegexpCheck = nullptr;
 	fifthRegexpCheck = nullptr;
 
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("TextFilter");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("TextFilter");
 	history = prefs->getTable("history");
 
 	QHBoxLayout *layout = new QHBoxLayout(this);

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	Mon Jul  1 19:04:12 2019
@@ -296,26 +296,26 @@
 	m_item->itemText.removeChars(posC, 1);
 	if (fam.isEmpty())
 		return;
-	QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
+	QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[fam];
 	if (m_isBold)
 	{
 		if (m_isItalic)
 		{
 			if (slist.contains("Bold Italic"))
-				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 		}
 		else if (slist.contains("Bold"))
-			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+			m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 	}
 	else
 	{
 		if (m_isItalic)
 		{
 			if (slist.contains("Italic"))
-				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 		}
 		else if (slist.contains("Regular"))
-			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+			m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 	}
 }
 
@@ -331,26 +331,26 @@
 //	QString fam = m_currentCharStyle.font().family();
 	if (fam.isEmpty())
 		return;
-	QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
+	QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[fam];
 	if (m_isItalic)
 	{
 		if (m_isBold)
 		{
 			if (slist.contains("Bold Italic"))
-				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 		}
 		else if (slist.contains("Italic"))
-			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+			m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 	}
 	else
 	{
 		if (m_isBold)
 		{
 			if (slist.contains("Bold"))
-				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+				m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 		}
 		else if (slist.contains("Regular"))
-			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+			m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 	}
 }
 
@@ -423,10 +423,10 @@
 	/** m_define/apply font */
 	flushText();
 	m_token = getToken();
-	QString font = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+	QString font = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 	if (m_token != "$")
 		font = getFontName(m_token);
-	m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
+	m_currentCharStyle.setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[font]);
 	if (!m_doc->UsedFonts.contains(font))
 		m_doc->AddFont(font);
 }
@@ -434,7 +434,7 @@
 QString XtgScanner::getFontName(const QString& name)
 {
 	QString fontName = name;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (it.current().family().toLower() == fontName.toLower())
@@ -442,7 +442,7 @@
 			if (it.currentKey().toLower() == fontName.toLower()) // exact Match
 				return fontName;
 
-			QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+			QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 			slist.sort();
 			if (slist.count() > 0)
 			{
@@ -456,9 +456,9 @@
 		}
 	}
 
-	if (PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
-	{
-		fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+	if (PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(fontName))
+	{
+		fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName];
 		return fontName;
 	}
 
@@ -466,12 +466,12 @@
 	QScopedPointer<MissingFont> dia(new MissingFont(nullptr, fontName, m_doc));
 	if (dia->exec())
 	{
-		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
+		PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
 		fontName = dia->getReplacementFont();
 	}
 	else
 	{
-		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = m_doc->itemToolPrefs().textFont;
+		PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName] = m_doc->itemToolPrefs().textFont;
 		fontName = m_doc->itemToolPrefs().textFont;
 	}
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp	Mon Jul  1 19:04:12 2019
@@ -173,13 +173,13 @@
 /* Set default Page to size defined in Preferences */
 	x = 0.0;
 	y = 0.0;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	parseHeader(fName, x, y, b, h);
 	if (b == 0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docX = x;
 	docY = y;
 	docWidth = b - x;
@@ -284,8 +284,8 @@
 /* Set default Page to size defined in Preferences */
 	x = 0.0;
 	y = 0.0;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	parseHeader(fName, x, y, b, h);
 	docX = x;
 	docY = y;
@@ -401,8 +401,8 @@
 /* Set default Page to size defined in Preferences */
 	x = 0.0;
 	y = 0.0;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	if (progressDialog)
 	{
 		progressDialog->setOverallProgress(1);
@@ -410,9 +410,9 @@
 	}
 	parseHeader(fName, x, y, b, h);
 	if (b == 0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docX = x;
 	docY = y;
 	docWidth = b - x;
@@ -2498,7 +2498,7 @@
 			family.replace( QRegExp( "'" ) , QChar( ' ' ) );
 			textFont = m_Doc->itemToolPrefs().textFont;
 			bool found = false;
-			SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+			SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 			for ( ; it.hasNext(); it.next())
 			{
 				QString fam;
@@ -2516,10 +2516,10 @@
 			else
 			{
 				if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-					textFont = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+					textFont = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 				else
 				{
-					if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
+					if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
 					{
 						qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 						MissingFont *dia = new MissingFont(nullptr, family, m_Doc);
@@ -2527,10 +2527,10 @@
 						QString tmpf = dia->getReplacementFont();
 						delete dia;
 						qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-						PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = tmpf;
+						PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = tmpf;
 					}
 					else
-						textFont = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+						textFont = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 				}
 			}
 			textSize *= 10.0;

Modified: trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -125,7 +125,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importai");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importai");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), FormatsManager::instance()->fileDialogFormatList(FormatsManager::AI));
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp	Mon Jul  1 19:04:12 2019
@@ -68,8 +68,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -163,9 +163,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -121,7 +121,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importcdr");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importcdr");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.cdr *.CDR);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp	Mon Jul  1 19:04:12 2019
@@ -110,8 +110,8 @@
 	QFileInfo fi = QFileInfo(fName);
 	baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -206,8 +206,8 @@
 		progressDialog->setOverallProgress(1);
 		qApp->processEvents();
 	}
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -124,7 +124,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importcgm");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importcgm");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.cgm *.CGM);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp	Mon Jul  1 19:04:12 2019
@@ -63,9 +63,9 @@
 	double b, h;
 	parseHeader(fName, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -162,9 +162,9 @@
 	}
 	parseHeader(fNameIn, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -117,7 +117,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importcvg");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importcvg");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.cvg *.CVG);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp	Mon Jul  1 19:04:12 2019
@@ -69,8 +69,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
-	double b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	double h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	double b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	double h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -176,8 +176,8 @@
 		progressDialog->setOverallProgress(1);
 		qApp->processEvents();
 	}
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;
@@ -715,7 +715,7 @@
 			{
 				textFont = m_Doc->itemToolPrefs().textFont;
 				bool found = false;
-				SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+				SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 				for ( ; it.hasNext(); it.next())
 				{
 					QString fn = it.current().scName();
@@ -728,10 +728,10 @@
 				if (!found)
 				{
 					if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-						fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+						fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 					else
 					{
-						if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
+						if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(fontName))
 						{
 							qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 							MissingFont *dia = new MissingFont(nullptr, fontName, m_Doc);
@@ -739,11 +739,11 @@
 							textFont = dia->getReplacementFont();
 							delete dia;
 							qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-							PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = textFont;
+							PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName] = textFont;
 							fontName = textFont;
 						}
 						else
-							fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+							fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName];
 					}
 				}
 			}

Modified: trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -125,7 +125,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importdrw");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importdrw");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.drw *.DRW);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemf.cpp	Mon Jul  1 19:04:12 2019
@@ -473,9 +473,9 @@
 	double y = 0;
 	parseHeader(fName, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	docX = x;
@@ -606,9 +606,9 @@
 	}
 	parseHeader(fNameIn, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	docX = x;

Modified: trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -122,7 +122,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importemf");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importemf");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.emf *.EMF);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfh.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfh.cpp	Mon Jul  1 19:04:12 2019
@@ -68,8 +68,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -163,9 +163,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -119,7 +119,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importfh");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importfh");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.fh* *.FH*);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidml.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidml.cpp	Mon Jul  1 19:04:12 2019
@@ -155,8 +155,8 @@
 			progressDialog = nullptr;
 			QFileInfo fi = QFileInfo(fName);
 			baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
-			docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-			docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+			docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+			docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 			m_Doc = new ScribusDoc();
 			m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 			m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -313,8 +313,8 @@
 		qApp->processEvents();
 	}
 	/* Set default Page to size defined in Preferences */
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	baseX = 0;
 	baseY = 0;
 	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))
@@ -3254,7 +3254,7 @@
 
 QString IdmlPlug::constructFontName(const QString& fontBaseName, const QString& fontStyle)
 {
-	QString fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+	QString fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 	if (fontTranslateMap.contains(fontBaseName))
 	{
 		QMap<QString, QString> styleMap = fontTranslateMap[fontBaseName];
@@ -3262,7 +3262,7 @@
 		{
 			QString postName = styleMap[fontStyle];
 			bool found = false;
-			SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+			SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 			for ( ; it.hasNext(); it.next())
 			{
 				if (it.current().psName() == postName)
@@ -3275,12 +3275,12 @@
 			if (!found)
 			{
 				if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-					fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+					fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 				else
 				{
 					QString family = fontBaseName + " " + fontStyle;
 					family = family.remove("$ID/");
-					if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
+					if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
 					{
 						qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 						MissingFont *dia = new MissingFont(nullptr, family, m_Doc);
@@ -3288,10 +3288,10 @@
 						fontName = dia->getReplacementFont();
 						delete dia;
 						qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-						PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
+						PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
 					}
 					else
-						fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+						fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 				}
 			}
 		}

Modified: trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -142,7 +142,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importidml");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importidml");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.idml *.IDML *.idms *.IDMS);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp	Mon Jul  1 19:04:12 2019
@@ -173,8 +173,8 @@
 		qApp->processEvents();
 	}
 	/* Set default Page to size defined in Preferences */
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	baseX = 0;
 	baseY = 0;
 	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))
@@ -2563,7 +2563,7 @@
 				tmpOStyle.fontName = m_fontMap[actStyle.fontName.value];
 			else
 				tmpOStyle.fontName = actStyle.fontName.value;
-			if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
+			if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(tmpOStyle.fontName))
 			{
 				tmpOStyle.fontName = constructFontName(tmpOStyle.fontName, "");
 				m_fontMap[actStyle.fontName.value] = tmpOStyle.fontName;
@@ -3287,13 +3287,13 @@
 {
 	QString fontName;
 	bool found = false;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (fontBaseName.toLower() == it.current().family().toLower())
 		{
 			// found the font family, now go for the style
-			QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+			QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 			slist.sort();
 			if (slist.count() > 0)
 			{
@@ -3327,13 +3327,13 @@
 	if (!found)
 	{
 		if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-			fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+			fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 		else
 		{
 			QString family = fontBaseName;
 			if (!fontStyle.isEmpty())
 				family += " " + fontStyle;
-			if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
+			if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
 			{
 				qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 				MissingFont *dia = new MissingFont(nullptr, family, m_Doc);
@@ -3341,10 +3341,10 @@
 				fontName = dia->getReplacementFont();
 				delete dia;
 				qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-				PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
+				PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
 			}
 			else
-				fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+				fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 		}
 	}
 	return fontName;

Modified: trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -141,7 +141,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importodg");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importodg");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.odg *.ODG *.fodg *.FODG *.odp *.ODP *.fodp *.FODP);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	Mon Jul  1 19:04:12 2019
@@ -168,7 +168,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("OODrawImport");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("OODrawImport");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), QObject::tr("OpenOffice.org Draw (*.sxd *.SXD);;All Files (*)"));
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpages.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpages.cpp	Mon Jul  1 19:04:12 2019
@@ -89,8 +89,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -188,9 +188,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;
@@ -537,8 +537,8 @@
 	{
 		QFileInfo fi = QFileInfo(fName);
 		baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
-		docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-		docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+		docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 		m_Doc = new ScribusDoc();
 		m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 		m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -642,8 +642,8 @@
 		qApp->processEvents();
 	}
 	/* Set default Page to size defined in Preferences */
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	baseX = 0;
 	baseY = 0;
 	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))

Modified: trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -125,7 +125,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importpages");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importpages");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.pages *.PAGES);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpct.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpct.cpp	Mon Jul  1 19:04:12 2019
@@ -66,9 +66,9 @@
 	double b, h, x, y;
 	parseHeader(fName, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -167,9 +167,9 @@
 	}
 	parseHeader(fNameIn, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;
@@ -1410,7 +1410,7 @@
 	ts.readRawData(fontRawName.data(), nameLen);
 	QString fontName = fontRawName;
 	fontName = fontName.simplified();
-	SCFonts fonts = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts;
+	SCFonts fonts = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts;
 	SCFontsIterator it(fonts);
 	for ( ; it.hasNext() ; it.next())
 	{

Modified: trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -117,7 +117,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importpct");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importpct");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.pct *.PCT *.pict *.PICT);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	Mon Jul  1 19:04:12 2019
@@ -216,9 +216,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -157,7 +157,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importpdf");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importpdf");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.pdf *.PDF);;All Files (*)");
 		if (diaf.exec())
@@ -205,7 +205,7 @@
 			args.append("-dCompatibilityLevel=1.4");
 			args.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(cleanFile)) );
 			args.append( QDir::toNativeSeparators(fileName) );
-			System(getShortPathName(PrefsManager::instance()->ghostscriptExecutable()), args, errFile, errFile, &cancel);
+			System(getShortPathName(PrefsManager::instance().ghostscriptExecutable()), args, errFile, errFile, &cancel);
 			args.clear();
 			isCleanedFile = true;
 		}

Modified: trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpm.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpm.cpp	Mon Jul  1 19:04:12 2019
@@ -68,8 +68,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -163,9 +163,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -118,7 +118,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importpm");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importpm");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.pmd *.PMD *.pm *.PM *.pm3 *.PM3 *.pm4 *.PM4 *.pm5 *.PM5 *.pm6 *.PM6 *.p65 *.P65);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.cpp	Mon Jul  1 19:04:12 2019
@@ -71,8 +71,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -166,9 +166,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -119,7 +119,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importpub");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importpub");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.pub *.PUB);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	Mon Jul  1 19:04:12 2019
@@ -993,7 +993,7 @@
 						  const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 						  if (fmt)
 						  {
-							  fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+							  fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 							  fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 							  if (m_Doc->m_Selection->count() > 0)
 							  {
@@ -1146,7 +1146,7 @@
 						  const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 						  if (fmt)
 						  {
-							  fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+							  fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 							  fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 							  if (m_Doc->m_Selection->count() > 0)
 							  {
@@ -1288,7 +1288,7 @@
 						const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 						if (fmt)
 						{
-							fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+							fmt->setupTargets(m_Doc, nullptr, nullptr, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 							fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 							if (m_Doc->m_Selection->count() > 0)
 							{
@@ -2669,7 +2669,7 @@
 					  const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 					  if (fmt)
 					  {
-						  fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+						  fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 						  fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 						  if (m_Doc->m_Selection->count() > 0)
 						  {
@@ -2817,7 +2817,7 @@
 						  const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 						  if (fmt)
 						  {
-							  fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+							  fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 							  fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 							  if (m_Doc->m_Selection->count() > 0)
 							  {
@@ -2952,7 +2952,7 @@
 						const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 						if (fmt)
 						{
-							fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+							fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 							fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 							if (m_Doc->m_Selection->count() > 0)
 							{
@@ -3432,13 +3432,13 @@
 {
 	QString fontName;
 	bool found = false;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (fontBaseName.toLower() == it.current().family().toLower())
 		{
 			// found the font family, now go for the style
-			QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+			QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 			slist.sort();
 			if (slist.count() > 0)
 			{
@@ -3472,13 +3472,13 @@
 	if (!found)
 	{
 		if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-			fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+			fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 		else
 		{
 			QString family = fontBaseName;
 			if (!fontStyle.isEmpty())
 				family += " " + fontStyle;
-			if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
+			if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
 			{
 				qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 				MissingFont *dia = new MissingFont(nullptr, family, m_Doc);
@@ -3486,10 +3486,10 @@
 				fontName = dia->getReplacementFont();
 				delete dia;
 				qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-				PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
+				PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
 			}
 			else
-				fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+				fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 		}
 	}
 	return fontName;

Modified: trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	Mon Jul  1 19:04:12 2019
@@ -66,9 +66,9 @@
 	double b, h;
 	parseHeader(fName, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -167,9 +167,9 @@
 	}
 	parseHeader(fNameIn, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -118,7 +118,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importshape");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importshape");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.shape *.SHAPE);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsml.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsml.cpp	Mon Jul  1 19:04:12 2019
@@ -64,9 +64,9 @@
 	double b, h;
 	parseHeader(fName, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -162,9 +162,9 @@
 	}
 	parseHeader(fNameIn, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -118,7 +118,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importsml");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importsml");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.sml *.SML);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -160,7 +160,7 @@
 	if (filename.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("SVGPlugin");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("SVGPlugin");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(mw, wdir, QObject::tr("Open"), FormatsManager::instance()->fileDialogFormatList(FormatsManager::SVG));
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp	Mon Jul  1 19:04:12 2019
@@ -300,9 +300,9 @@
 	double y = 0;
 	parseHeader(fName, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	docX = x;
@@ -433,9 +433,9 @@
 	}
 	parseHeader(fNameIn, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	docX = x;

Modified: trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -123,7 +123,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importsvm");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importsvm");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.svm *.SVM);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -147,12 +147,12 @@
 	//execute uniconvertor
 	QProcess uniconv;
 	uniconv.setProcessChannelMode(QProcess::MergedChannels);
-	uniconv.start(PrefsManager::instance()->uniconvExecutable(), arguments);
+	uniconv.start(PrefsManager::instance().uniconvExecutable(), arguments);
 
 	//handle errors
 	if (!uniconv.waitForStarted(120000)) {
 		qWarning() << "Uniconvertor failed:" <<
-			PrefsManager::instance()->uniconvExecutable() << arguments;
+			PrefsManager::instance().uniconvExecutable() << arguments;
 		ScMessageBox::warning(mw, CommonStrings::trWarning,
 			tr("Starting Uniconvertor failed! The executable name in "
 			"File->Preferences->External Tools may be incorrect or the "

Modified: trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importviva.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/viva/importviva.cpp	Mon Jul  1 19:04:12 2019
@@ -113,8 +113,8 @@
 	progressDialog = nullptr;
 	QFileInfo fi = QFileInfo(fName);
 	baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	m_Doc = new ScribusDoc();
 	m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 	m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -237,8 +237,8 @@
 		qApp->processEvents();
 	}
 	/* Set default Page to size defined in Preferences */
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	baseX = 0;
 	baseY = 0;
 	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))
@@ -2300,13 +2300,13 @@
 {
 	QString fontName = "";
 	bool found = false;
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (fontBaseName.toLower() == it.current().family().toLower())
 		{
 			// found the font family, now go for the style
-			QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+			QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 			slist.sort();
 			if (slist.count() > 0)
 			{
@@ -2340,13 +2340,13 @@
 	if (!found)
 	{
 		if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
-			fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
+			fontName = PrefsManager::instance().appPrefs.itemToolPrefs.textFont;
 		else
 		{
 			QString family = fontBaseName;
 			if (!fontStyle.isEmpty())
 				family += " " + fontStyle;
-			if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
+			if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(family))
 			{
 				qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 				MissingFont *dia = new MissingFont(nullptr, family, m_Doc);
@@ -2354,10 +2354,10 @@
 				fontName = dia->getReplacementFont();
 				delete dia;
 				qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-				PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
+				PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
 			}
 			else
-				fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family];
+				fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family];
 		}
 	}
 	return fontName;

Modified: trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -125,7 +125,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importviva");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importviva");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.xml *.XML);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp	Mon Jul  1 19:04:12 2019
@@ -71,8 +71,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -166,9 +166,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -119,7 +119,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importvsd");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importvsd");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.vsd *.VSD *.vdx *.VDX *.vsdx *.VSDX);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -139,7 +139,7 @@
 	if (filename.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("WMFPlugin");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("WMFPlugin");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(mw, wdir, QObject::tr("Open"), FormatsManager::instance()->fileDialogFormatList(FormatsManager::WMF));
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp	Mon Jul  1 19:04:12 2019
@@ -435,8 +435,8 @@
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
-	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	progressDialog = nullptr;
@@ -530,9 +530,9 @@
 		qApp->processEvents();
 	}
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -117,7 +117,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importwpg");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importwpg");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.wpg *.WPG);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp	Mon Jul  1 19:04:12 2019
@@ -272,9 +272,9 @@
 	}
 //	parseHeader(fName, x, y, b, h);
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -118,7 +118,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importxar");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importxar");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.xar *.XAR);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	Mon Jul  1 19:04:12 2019
@@ -67,9 +67,9 @@
 	docX = x;
 	docY = y;
 	if (w == 0.0)
-		w = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		w = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = w - x;
 	docHeight = h - y;
 	progressDialog = nullptr;
@@ -295,9 +295,9 @@
 	docX = x;
 	docY = y;
 	if (b == 0.0)
-		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+		b = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
 	if (h == 0.0)
-		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		h = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b - x;
 	docHeight = h - y;
 	baseX = 0;

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -117,7 +117,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importxfig");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importxfig");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.fig *.FIG);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxps.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxps.cpp	Mon Jul  1 19:04:12 2019
@@ -123,8 +123,8 @@
 	{
 		QFileInfo fi = QFileInfo(fName);
 		baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
-		docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-		docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+		docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+		docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 		m_Doc = new ScribusDoc();
 		m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 		m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -229,8 +229,8 @@
 		qApp->processEvents();
 	}
 	/* Set default Page to size defined in Preferences */
-	docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
-	docHeight = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
+	docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
 	baseX = 0;
 	baseY = 0;
 	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))
@@ -580,8 +580,8 @@
 		return;
 
 	QDomElement docElem = designMapDom.documentElement();
-	docWidth = docElem.attribute("Width", QString("%1").arg(PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth)).toDouble() * conversionFactor;
-	docHeight = docElem.attribute("Height", QString("%1").arg(PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight)).toDouble() * conversionFactor;
+	docWidth = docElem.attribute("Width", QString("%1").arg(PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth)).toDouble() * conversionFactor;
+	docHeight = docElem.attribute("Height", QString("%1").arg(PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight)).toDouble() * conversionFactor;
 	if (importerFlags & LoadSavePlugin::lfCreateDoc)
 	{
 		if (firstPage)
@@ -1939,7 +1939,7 @@
 	{
 		ft.write(fontData);
 		ft.close();
-		t = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.LoadScalableFont(fname);
+		t = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.LoadScalableFont(fname);
 		loadedFonts.insert(fileName, t);
 		return t;
 	}

Modified: trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp	Mon Jul  1 19:04:12 2019
@@ -141,7 +141,7 @@
 	if (fileName.isEmpty())
 	{
 		flags |= lfInteractive;
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importxps");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("importxps");
 		QString wdir = prefs->get("wdir", ".");
 		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.oxps *.OXPS *.xps *.XPS);;All Files (*)");
 		if (diaf.exec())

Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp	Mon Jul  1 19:04:12 2019
@@ -2111,7 +2111,7 @@
 
 void PictureBrowserSettings::load()
 {
-	PrefsContext *pictureBrowserPluginPrefs = PrefsManager::instance()->prefsFile->getPluginContext("picturebrowser");
+	PrefsContext *pictureBrowserPluginPrefs = PrefsManager::instance().prefsFile->getPluginContext("picturebrowser");
 
 	saveSettings = pictureBrowserPluginPrefs->getBool("pb_savesettings", true);
 	showMore = pictureBrowserPluginPrefs->getBool("pb_showmore", false);
@@ -2128,7 +2128,7 @@
 
 void PictureBrowserSettings::save()
 {
-	PrefsContext *pictureBrowserPluginPrefs = PrefsManager::instance()->prefsFile->getPluginContext("picturebrowser");
+	PrefsContext *pictureBrowserPluginPrefs = PrefsManager::instance().prefsFile->getPluginContext("picturebrowser");
 
 	pictureBrowserPluginPrefs->set("pb_savesettings", saveSettings);
 	pictureBrowserPluginPrefs->set("pb_showmore", showMore);

Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -76,7 +76,7 @@
 
 void SATDialog::readPrefs()
 {
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("satemplate");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("satemplate");
 	author = prefs->get("author", "");
 	email = prefs->get("email", "");
 	isFullDetail = prefs->getBool("isFullDetail", false);

Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp	(original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp	Mon Jul  1 19:04:12 2019
@@ -124,7 +124,7 @@
 	bool hasName = doc->hasName;
 	bool isModified = doc->isModified();
 	QString userTemplatesDir = ScPaths::instance().userTemplateDir(true);
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString oldCollect = dirs->get("collect", ".");
 	if (userTemplatesDir.isEmpty())
 	{

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	Mon Jul  1 19:04:12 2019
@@ -17,7 +17,7 @@
 	ColorList edc;
 	PyObject *l;
 	int cc = 0;
-	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
+	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance().colorSet();
 	ColorList::Iterator it;
 	l = PyList_New(edc.count());
 	for (it = edc.begin(); it != edc.end(); ++it)
@@ -40,7 +40,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
+	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance().colorSet();
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
@@ -66,7 +66,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
+	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance().colorSet();
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
@@ -91,7 +91,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
+	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance().colorSet();
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
@@ -115,7 +115,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
+	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance().colorSet();
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
@@ -157,7 +157,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
@@ -196,7 +196,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
@@ -231,7 +231,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
@@ -269,7 +269,7 @@
 	}
 	else
 	{
-		ColorList* colorList = PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList = PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
@@ -307,7 +307,7 @@
 	}
 	else
 	{
-		ColorList* colorList = PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList = PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.", "python error").toLocal8Bit().constData());
@@ -347,7 +347,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 			colorList->insert(col, ScColor(c, m, y, k));
 		else
@@ -392,7 +392,7 @@
 	}
 	else
 	{
-		ColorList* colorList = PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList = PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			ScColor tmp;
@@ -433,7 +433,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 			colorList->insert(col, ScColor(r, g, b));
 		else
@@ -477,7 +477,7 @@
 	}
 	else
 	{
-		ColorList* colorList = PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList = PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			ScColor tmp;
@@ -527,7 +527,7 @@
 	}
 	else
 	{
-		ColorList* colorList = PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList = PrefsManager::instance().colorSetPtr();
 		if (!colorList->contains(col))
 		{
 			ScColor tmp;
@@ -574,7 +574,7 @@
 	}
 	else
 	{
-		ColorList* colorList=PrefsManager::instance()->colorSetPtr();
+		ColorList* colorList=PrefsManager::instance().colorSetPtr();
 		if (colorList->contains(col))
 			colorList->remove(col);
 		else

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	Mon Jul  1 19:04:12 2019
@@ -34,14 +34,14 @@
 PyObject *scribus_fontnames(PyObject* /* self */)
 {
 	int cc2 = 0;
-	SCFontsIterator it2(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it2(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	for ( ; it2.hasNext() ; it2.next())
 	{
 		if (it2.current().usable())
 			cc2++;
 	}
 	PyObject *l = PyList_New(cc2);
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	int cc = 0;
 	for ( ; it.hasNext() ; it.next())
 	{
@@ -56,8 +56,8 @@
 
 PyObject *scribus_xfontnames(PyObject* /* self */)
 {
-	PyObject *l = PyList_New(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.count());
-	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+	PyObject *l = PyList_New(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.count());
+	SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 	int cc = 0;
 	PyObject *row;
 	for ( ; it.hasNext() ; it.next())
@@ -95,7 +95,7 @@
 	if (!PyArg_ParseTupleAndKeywords(args, kw, "esesesi|es", kwargs,
 				"utf-8", &Name, "utf-8", &FileName, "utf-8", &Sample, &Size, "ascii", &format))
 		return nullptr;
-	if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Name)))
+	if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Font not found.","python error").toLocal8Bit().constData());
 		return nullptr;
@@ -109,7 +109,7 @@
 	if (!format)
 		// User specified no format, so use the historical default of PPM format.
 		format =  const_cast<char*>("PPM");
-	QPixmap pm = FontSample(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[QString::fromUtf8(Name)], Size, ts, Qt::white);
+	QPixmap pm = FontSample(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[QString::fromUtf8(Name)], Size, ts, Qt::white);
 	// If the user specified an empty filename, return the image data as
 	// a string. Otherwise, save it to disk.
 	if (QString::fromUtf8(FileName).isEmpty())

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	Mon Jul  1 19:04:12 2019
@@ -625,7 +625,7 @@
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set font on a non-text frame.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	if (!PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Font)))
+	if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(QString::fromUtf8(Font)))
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Font not found.", "python error").toLocal8Bit().constData());
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	Mon Jul  1 19:04:12 2019
@@ -408,7 +408,7 @@
 	for (int i = 0; i < PyList_Size(self->pages); ++i) {
 		options.pageNumbers.push_back((int)PyInt_AsLong(PyList_GetItem(self->pages, i)));
 	}
-	int Nr = (self->copies < 1) ? 1 : self->copies;
+	int copyCount = (self->copies < 1) ? 1 : self->copies;
 	SepName = QString(PyString_AsString(self->separation));
 	options.printer   = prn;
 	options.prnEngine = (PrintEngine) self->pslevel;
@@ -431,7 +431,6 @@
 	QMap<QString, QMap<uint, FPointArray> > ReallyUsed;
 	ReallyUsed.clear();
 	ScCore->primaryMainWindow()->doc->getUsedFonts(ReallyUsed);
-	PrefsManager *prefsManager=PrefsManager::instance();
 
 #if defined(_WIN32)
 	if (!options.toFile)
@@ -449,7 +448,7 @@
 	}
 #endif
 
-	PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, ScCore->primaryMainWindow()->doc->PageColors, false, true);
+	PSLib *dd = new PSLib(options, true, PrefsManager::instance().appPrefs.fontPrefs.AvailFonts, ReallyUsed, ScCore->primaryMainWindow()->doc->PageColors, false, true);
 	if (dd != nullptr)
 	{
 		if (!fil)
@@ -486,8 +485,8 @@
 				else
 				{
 					cmd = "lpr -P" + prn;
-					if (Nr > 1)
-						cmd += " -#" + cc.setNum(Nr);
+					if (copyCount > 1)
+						cmd += " -#" + cc.setNum(copyCount);
 					cmd += " "+fna;
 				}
 				system(cmd.toLocal8Bit().constData());

Modified: trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	Mon Jul  1 19:04:12 2019
@@ -91,7 +91,7 @@
 {
 	QFont font = QFont("Fixed");
 	font.setStyleHint(QFont::TypeWriter);
-	font.setPointSize(PrefsManager::instance()->appPrefs.uiPrefs.applicationFontSize);
+	font.setPointSize(PrefsManager::instance().appPrefs.uiPrefs.applicationFontSize);
 	commandEdit->setFont(font);	
 	outputEdit->setFont(font);
 }
@@ -368,7 +368,7 @@
 
 SyntaxColors::SyntaxColors()
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("scriptplugin");
 	if (prefs)
 	{
 		errorColor.setNamedColor(prefs->get("syntaxerror", "#aa0000"));
@@ -393,7 +393,7 @@
 
 void SyntaxColors::saveToPrefs()
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("scriptplugin");
 	if (prefs)
 	{
 		prefs->set("syntaxerror", qcolor2named(errorColor));

Modified: trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp	Mon Jul  1 19:04:12 2019
@@ -67,7 +67,7 @@
 	scripterCore->setExtensionsEnabled(extensionScriptsChk->isChecked());
 	scripterCore->setStartupScript(startupScriptEdit->text());
 	// colors
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("scriptplugin");
 	if (prefs)
 	{
 		prefs->set("syntaxerror", errorColor.name());

Modified: trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -17,8 +17,8 @@
 	setupUi(this);
 
 	m_extEnable = extEnable;
-	PrefsManager *prefsManager = PrefsManager::instance();
-	QString scriptDir(prefsManager->appPrefs.pathPrefs.scripts);
+	PrefsManager& prefsManager = PrefsManager::instance();
+	QString scriptDir(prefsManager.appPrefs.pathPrefs.scripts);
 	if (!m_lastScriptDir.isEmpty() && QDir(m_lastScriptDir).exists())
 		fileWidget->setDirectory(m_lastScriptDir);
 	else if (!scriptDir.isEmpty() && QDir(scriptDir).exists())

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Mon Jul  1 19:04:12 2019
@@ -144,7 +144,7 @@
 {
 	m_menuMgr->clearMenuStrings("RecentScripts");
 	m_recentScriptActions.clear();
-	uint max = qMin(PrefsManager::instance()->appPrefs.uiPrefs.recentDocCount, m_recentScripts.count());
+	uint max = qMin(PrefsManager::instance().appPrefs.uiPrefs.recentDocCount, m_recentScripts.count());
 	for (uint m = 0; m < max; ++m)
 	{
 		QString strippedName=m_recentScripts[m];
@@ -483,7 +483,7 @@
 
 void ScripterCore::readPlugPrefs()
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("scriptplugin");
 	if (!prefs)
 	{
 		qDebug("scriptplugin: Unable to load prefs");
@@ -510,7 +510,7 @@
 
 void ScripterCore::savePlugPrefs()
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getPluginContext("scriptplugin");
 	if (!prefs)
 	{
 		qDebug("scriptplugin: Unable to load prefs");

Modified: trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp	(original)
+++ trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp	Mon Jul  1 19:04:12 2019
@@ -315,7 +315,7 @@
 
 void ShapePalette::writeToPrefs()
 {
-	QString prFile = QDir::toNativeSeparators(PrefsManager::instance()->preferencesLocation()+"/scribusshapes.xml");
+	QString prFile = QDir::toNativeSeparators(PrefsManager::instance().preferencesLocation()+"/scribusshapes.xml");
 	QFile f(prFile);
 	if (!f.open(QIODevice::WriteOnly))
 		return;
@@ -351,7 +351,7 @@
 
 void ShapePalette::readFromPrefs()
 {
-	QString prFile = QDir::toNativeSeparators(PrefsManager::instance()->preferencesLocation()+"/scribusshapes.xml");
+	QString prFile = QDir::toNativeSeparators(PrefsManager::instance().preferencesLocation()+"/scribusshapes.xml");
 	QFileInfo fi(prFile);
 	if (fi.exists())
 	{
@@ -416,7 +416,7 @@
 
 void ShapePalette::Import()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString s = QFileDialog::getOpenFileName(this, tr("Choose a shape file to import"), dirs->get("shape_load", "."), tr("Photoshop Custom Shape (*.csh *.CSH)"));
 	if (!s.isEmpty())
 	{

Modified: trunk/Scribus/scribus/plugins/short-words/configuration.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/configuration.cpp	(original)
+++ trunk/Scribus/scribus/plugins/short-words/configuration.cpp	Mon Jul  1 19:04:12 2019
@@ -34,7 +34,7 @@
 
 SWConfig::SWConfig()
 {
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("short-words");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("short-words");
 	action = prefs->getUInt("action", 0);
 	//userConfig = prefs->getUInt("userConfig", 0);
 	//editor = prefs->get("editor", "");

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp	(original)
+++ trunk/Scribus/scribus/prefsmanager.cpp	Mon Jul  1 19:04:12 2019
@@ -65,8 +65,6 @@
 
 extern bool emergencyActivated;
 
-PrefsManager* PrefsManager::m_instance = nullptr;
-
 PrefsManager::PrefsManager(QObject *parent) : QObject(parent),
 	prefsFile(nullptr),
 	m_importingFrom12(false),
@@ -80,20 +78,11 @@
 	delete prefsFile;
 }
 
-PrefsManager* PrefsManager::instance()
-{
-	if (m_instance == nullptr)
-		m_instance = new PrefsManager();
-
+PrefsManager& PrefsManager::instance()
+{
+	static PrefsManager m_instance;
 	return m_instance;
 }
-
-void PrefsManager::deleteInstance()
-{
-	delete m_instance;
-	m_instance = nullptr;
-}
-
 
 ApplicationPrefs* PrefsManager::applicationPrefs()
 {

Modified: trunk/Scribus/scribus/prefsmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/prefsmanager.h
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.h	(original)
+++ trunk/Scribus/scribus/prefsmanager.h	Mon Jul  1 19:04:12 2019
@@ -44,19 +44,13 @@
 {
 Q_OBJECT
 public:
-	PrefsManager(QObject *parent = 0);
-	~PrefsManager();
-
+	PrefsManager(PrefsManager const&) = delete;
+	void operator=(PrefsManager const&) = delete;
 	/**
 	* @brief Returns a pointer to the PrefsManager instance
 	* @return A pointer to the PrefsManager instance
 	*/
-	static PrefsManager* instance();
-	/**
-	* @brief Deletes the PrefsManager Instance
-	* Must be called when PrefsManager is no longer needed.
-	*/
-	static void deleteInstance();
+	static PrefsManager& instance();
 
 	void setup();
 	/*!
@@ -213,13 +207,8 @@
 	void languageChange();
 
 private:
-	/**
-	* @brief The only instance of PrefsManager available.
-	*
-	* PrefsManager is singleton and the instance can be queried with the method
-	* instance().
-	*/
-	static PrefsManager* m_instance;
+	PrefsManager(QObject *parent = nullptr);
+	~PrefsManager();
 
 	QString m_prefsLocation;
 	bool m_importingFrom12;

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Mon Jul  1 19:04:12 2019
@@ -1218,7 +1218,7 @@
 		if (loadRawText(fn, tmp))
 		{
 			PutStream("bEPS\n");
-			PutStream(ToStr(PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0 * scalex) + " " + ToStr(PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 72.0 * scaley) + " sc\n");
+			PutStream(ToStr(PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 72.0 * scalex) + " " + ToStr(PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 72.0 * scaley) + " sc\n");
 			PutStream(ToStr(-item->BBoxX+x * scalex) + " " + ToStr(y * scalex) + " tr\n");
 			int h = item->pixm.height();
 			PutStream("0 " + ToStr(h*scaley) + " tr\n");
@@ -1279,8 +1279,8 @@
 	PutStream("0 " + ToStr(-h*scaley) + " tr\n");
 	if ((extensionIndicatesPDF(ext)) && (!item->asLatexFrame()))
 	{
-		scalex *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 300.0;
-		scaley *= PrefsManager::instance()->appPrefs.extToolPrefs.gs_Resolution / 300.0;
+		scalex *= PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 300.0;
+		scaley *= PrefsManager::instance().appPrefs.extToolPrefs.gs_Resolution / 300.0;
 	}
 	//	PutStream(ToStr(x*scalex) + " " + ToStr(y*scaley) + " tr\n");
 	PutStream(ToStr(qRound(scalex*w)) + " " + ToStr(qRound(scaley*h)) + " sc\n");

Modified: trunk/Scribus/scribus/sampleitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/sampleitem.cpp
==============================================================================
--- trunk/Scribus/scribus/sampleitem.cpp	(original)
+++ trunk/Scribus/scribus/sampleitem.cpp	Mon Jul  1 19:04:12 2019
@@ -42,7 +42,7 @@
 	m_tmpStyle.setRightMargin(0);
 	m_tmpStyle.setGapBefore(0);
 	m_tmpStyle.setGapAfter(0);
-	m_tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[m_Doc->itemToolPrefs().textFont]);
+	m_tmpStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[m_Doc->itemToolPrefs().textFont]);
 	m_tmpStyle.charStyle().setFontSize(m_Doc->itemToolPrefs().textSize);
 //	tmpStyle.tabValues().clear();
 	m_tmpStyle.setHasDropCap(false);
@@ -154,7 +154,7 @@
 
 void SampleItem::setFont(const QString& font)
 {
-	m_tmpStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
+	m_tmpStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[font]);
 }
 
 void SampleItem::setFontSize(int fontSize, bool autoLineSpa)
@@ -290,13 +290,13 @@
 
 	UndoManager::instance()->setUndoEnabled(false); // disable undo
 
-	double frameWidth  = width / PrefsManager::instance()->appPrefs.displayPrefs.displayScale;
-	double frameHeight = height / PrefsManager::instance()->appPrefs.displayPrefs.displayScale;
+	double frameWidth  = width / PrefsManager::instance().appPrefs.displayPrefs.displayScale;
+	double frameHeight = height / PrefsManager::instance().appPrefs.displayPrefs.displayScale;
 
 	PageItem_TextFrame *previewItem = new PageItem_TextFrame(m_Doc, 0, 0, frameWidth, frameHeight, 0, "__whiteforpreviewbg__", "__whiteforpreview__");
 	QImage pm(width, height, QImage::Format_ARGB32);
 	ScPainter *painter = new ScPainter(&pm, width, height, 1.0, 0);
-	painter->setZoomFactor(PrefsManager::instance()->appPrefs.displayPrefs.displayScale);
+	painter->setZoomFactor(PrefsManager::instance().appPrefs.displayPrefs.displayScale);
 
 	if (m_Doc->UsedFonts.contains(m_tmpStyle.charStyle().font().scName()))
 		previouslyUsedFont = true;

Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp	(original)
+++ trunk/Scribus/scribus/scfonts.cpp	Mon Jul  1 19:04:12 2019
@@ -922,17 +922,17 @@
 	if (fontname.isEmpty())
 		return ScFace::none();
 	
-	PrefsManager* prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	
 	if (!contains(fontname) || !(*this)[fontname].usable())
 	{
 		QString replFont;
-		if ((!prefsManager->appPrefs.fontPrefs.GFontSub.contains(fontname)) || (!(*this)[prefsManager->appPrefs.fontPrefs.GFontSub[fontname]].usable()))
-		{
-			replFont = doc ? doc->itemToolPrefs().textFont : prefsManager->appPrefs.itemToolPrefs.textFont;
+		if ((!prefsManager.appPrefs.fontPrefs.GFontSub.contains(fontname)) || (!(*this)[prefsManager.appPrefs.fontPrefs.GFontSub[fontname]].usable()))
+		{
+			replFont = doc ? doc->itemToolPrefs().textFont : prefsManager.appPrefs.itemToolPrefs.textFont;
 		}
 		else
-			replFont = prefsManager->appPrefs.fontPrefs.GFontSub[fontname];
+			replFont = prefsManager.appPrefs.fontPrefs.GFontSub[fontname];
 		ScFace repl = (*this)[replFont].mkReplacementFor(fontname, doc ? doc->documentFileName() : QString());
 		insert(fontname, repl);
 	}
@@ -1111,7 +1111,7 @@
  * fallback if no suitable fonts are found elsewere */
 void SCFonts::AddUserPath(const QString& pf)
 {
-	PrefsContext *pc = PrefsManager::instance()->prefsFile->getContext("Fonts");
+	PrefsContext *pc = PrefsManager::instance().prefsFile->getContext("Fonts");
 	PrefsTable *extraDirs = pc->getTable("ExtraFontDirs");
 	for (int i = 0; i < extraDirs->getRowCount(); ++i)
 		AddPath(extraDirs->get(i, 0));
@@ -1160,7 +1160,7 @@
 
 void SCFonts::WriteCacheList()
 {
-	QString prefsLocation = PrefsManager::instance()->preferencesLocation();
+	QString prefsLocation = PrefsManager::instance().preferencesLocation();
 	WriteCacheList(prefsLocation);
 }
 

Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp	(original)
+++ trunk/Scribus/scribus/scpaths.cpp	Mon Jul  1 19:04:12 2019
@@ -621,9 +621,9 @@
 
 QString ScPaths::userTemplateDir(bool createIfNotExists)
 {
-	if (PrefsManager::instance()->appPrefs.pathPrefs.documentTemplates.isEmpty())
+	if (PrefsManager::instance().appPrefs.pathPrefs.documentTemplates.isEmpty())
 		return QString();
-	QDir useFilesDirectory(PrefsManager::instance()->appPrefs.pathPrefs.documentTemplates);
+	QDir useFilesDirectory(PrefsManager::instance().appPrefs.pathPrefs.documentTemplates);
 	if (createIfNotExists && !useFilesDirectory.exists())
 		useFilesDirectory.mkpath(useFilesDirectory.absolutePath());
 	return useFilesDirectory.absolutePath()+"/";

Modified: trunk/Scribus/scribus/scpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/scpreview.cpp	(original)
+++ trunk/Scribus/scribus/scpreview.cpp	Mon Jul  1 19:04:12 2019
@@ -16,13 +16,11 @@
 #include "scribusXml.h"
 #include "selection.h"
 
-ScPreview::ScPreview()
-{
-}
+
 
 QImage ScPreview::createPreview(const QString& data)
 {
-	PrefsManager *prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	double gx, gy, gw, gh;
 	ScriXmlDoc ss;
 	if (ss.readElemHeader(data, false, &gx, &gy, &gw, &gh))
@@ -48,7 +46,7 @@
 		m_Doc->setGUI(false, ScCore->primaryMainWindow(), nullptr);
 		m_Doc->setLoading(true);
 		m_Doc->DoDrawing = false;
-		if (ss.readElem(data, prefsManager->appPrefs.fontPrefs.AvailFonts, m_Doc, 0, 0, false, true, prefsManager->appPrefs.fontPrefs.GFontSub))
+		if (ss.readElem(data, prefsManager.appPrefs.fontPrefs.AvailFonts, m_Doc, 0, 0, false, true, prefsManager.appPrefs.fontPrefs.GFontSub))
 		{
 			QList<PageItem*> Elements = *m_Doc->Items;
 			Selection *tmpSel = new Selection(m_Doc, false);

Modified: trunk/Scribus/scribus/scpreview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scpreview.h
==============================================================================
--- trunk/Scribus/scribus/scpreview.h	(original)
+++ trunk/Scribus/scribus/scpreview.h	Mon Jul  1 19:04:12 2019
@@ -15,10 +15,12 @@
 
 class SCRIBUS_API ScPreview
 {
-public:
-	ScPreview();
-	~ScPreview() {};
-	QImage createPreview(const QString& data);
+	public:
+		ScPreview()
+		{
+		}
+		~ScPreview() {};
+		QImage createPreview(const QString& data);
 };
 #endif
 

Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp	Mon Jul  1 19:04:12 2019
@@ -22,13 +22,13 @@
 	QString filename(options.filename);
 	doc.getUsedFonts(usedFonts);
 	doc.getUsedColors(usedColors);
-	PrefsManager *prefsManager = PrefsManager::instance();
-	PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, usedFonts, usedColors, options.includePDFMarks, options.useSpotColors);
+	PrefsManager& prefsManager = PrefsManager::instance();
+	PSLib *dd = new PSLib(options, true, prefsManager.appPrefs.fontPrefs.AvailFonts, usedFonts, usedColors, options.includePDFMarks, options.useSpotColors);
 	if (dd == nullptr)
 		return false;
 
 	if (!options.toFile)
-		filename = prefsManager->preferencesLocation()+"/tmp.ps";
+		filename = prefsManager.preferencesLocation()+"/tmp.ps";
 	bool psFile = dd->PS_set_file(filename);
 	if (!psFile)
 	{

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Jul  1 19:04:12 2019
@@ -294,12 +294,12 @@
 extern bool emergencyActivated;
 
 
-ScribusMainWindow::ScribusMainWindow()
+ScribusMainWindow::ScribusMainWindow() :
+	m_prefsManager(PrefsManager::instance())
 {
 	actionManager=nullptr;
 	appModeHelper=nullptr;
 	scrMenuMgr=nullptr;
-	m_prefsManager=nullptr;
 	m_formatsManager=nullptr;
 	resourceManager=nullptr;
 	m_mainWindowStatusLabel=nullptr;
@@ -358,12 +358,11 @@
 	appModeHelper = new AppModeHelper();
 	appModeHelper->setup(actionManager, &scrActions, &scrRecentFileActions, &scrWindowsActions, &scrScrapActions, &scrLayersActions, &scrRecentPasteActions);
 	scrMenuMgr = new ScMWMenuManager(menuBar(), actionManager);
-	m_prefsManager = PrefsManager::instance();
 	m_formatsManager = FormatsManager::instance();
 	m_objectSpecificUndo = false;
 
 	m_undoManager = UndoManager::instance();
-	PrefsContext *undoPrefs = m_prefsManager->prefsFile->getContext("undo");
+	PrefsContext *undoPrefs = m_prefsManager.prefsFile->getContext("undo");
 	m_undoManager->setUndoEnabled(undoPrefs->getBool("enabled", true));
 	m_tocGenerator = new TOCGenerator();
 	m_marksCount = 0;
@@ -385,7 +384,7 @@
 
 	if (primaryMainWindow)
 		ScCore->setSplashStatus( tr("Applying User Shortcuts") );
-	m_prefsManager->applyLoadedShortCuts();
+	m_prefsManager.applyLoadedShortCuts();
 	initKeyboardShortcuts();
 
 	resize(610, 600);
@@ -395,30 +394,30 @@
 	connect( scrActions["windowsTile"], SIGNAL(triggered()) , mdiArea, SLOT(tileSubWindows()) );
 	initPalettes();
 
-	m_prefsManager->setupMainWindow(this);
-
-	viewToolBar->previewQualitySwitcher->setCurrentIndex(m_prefsManager->appPrefs.itemToolPrefs.imageLowResType);
+	m_prefsManager.setupMainWindow(this);
+
+	viewToolBar->previewQualitySwitcher->setCurrentIndex(m_prefsManager.appPrefs.itemToolPrefs.imageLowResType);
 	if (primaryMainWindow)
 		ScCore->setSplashStatus( tr("Initializing Story Editor") );
 	storyEditor = new StoryEditor(this);
 
-	DocDir = m_prefsManager->documentDir();
+	DocDir = m_prefsManager.documentDir();
 
 	if (primaryMainWindow)
 		ScCore->setSplashStatus( tr("Initializing Languages") );
 	LanguageManager::instance();
 
 	initHyphenator();
-//	QString preLang(m_prefsManager->appPrefs.hyphPrefs.Language);
+//	QString preLang(m_prefsManager.appPrefs.hyphPrefs.Language);
 //	if (!LanguageManager::instance()->getHyphFilename( preLang ).isEmpty() )
-//		m_prefsManager->appPrefs.hyphPrefs.Language = preLang;
+//		m_prefsManager.appPrefs.hyphPrefs.Language = preLang;
 	if (primaryMainWindow)
 		ScCore->setSplashStatus( tr("Reading Scrapbook") );
 	initScrapbook();
 
-	scrActions["helpTooltips"]->setChecked(m_prefsManager->appPrefs.displayPrefs.showToolTips);
-	scrActions["showMouseCoordinates"]->setChecked(m_prefsManager->appPrefs.displayPrefs.showMouseCoordinates);
-	scrActions["stickyTools"]->setChecked(m_prefsManager->appPrefs.uiPrefs.stickyTools);
+	scrActions["helpTooltips"]->setChecked(m_prefsManager.appPrefs.displayPrefs.showToolTips);
+	scrActions["showMouseCoordinates"]->setChecked(m_prefsManager.appPrefs.displayPrefs.showMouseCoordinates);
+	scrActions["stickyTools"]->setChecked(m_prefsManager.appPrefs.uiPrefs.stickyTools);
 	ToggleTips();
 	ToggleMouseTips();
 	propertiesPalette->setFontSize();
@@ -438,18 +437,18 @@
 	QString Cpfad = QDir::toNativeSeparators(ScPaths::applicationDataDir())+"DefaultColors.xml";
 	QFile fc(Cpfad);
 	if (fc.exists())
-		csm.loadPalette(Cpfad, m_doc, m_prefsManager->appPrefs.colorPrefs.DColors, m_prefsManager->appPrefs.defaultGradients, m_prefsManager->appPrefs.defaultPatterns, false);
+		csm.loadPalette(Cpfad, m_doc, m_prefsManager.appPrefs.colorPrefs.DColors, m_prefsManager.appPrefs.defaultGradients, m_prefsManager.appPrefs.defaultPatterns, false);
 	else
 	{
-		if (m_prefsManager->appPrefs.colorPrefs.DColorSet != "Scribus Small")
+		if (m_prefsManager.appPrefs.colorPrefs.DColorSet != "Scribus Small")
 		{
 			QStringList CustomColorSets = csm.userPaletteNames();
-			if (CustomColorSets.contains(m_prefsManager->appPrefs.colorPrefs.DColorSet))
-				Cpfad = csm.userPaletteFileFromName(m_prefsManager->appPrefs.colorPrefs.DColorSet);
+			if (CustomColorSets.contains(m_prefsManager.appPrefs.colorPrefs.DColorSet))
+				Cpfad = csm.userPaletteFileFromName(m_prefsManager.appPrefs.colorPrefs.DColorSet);
 			else
-				Cpfad = csm.paletteFileFromName(m_prefsManager->appPrefs.colorPrefs.DColorSet);
+				Cpfad = csm.paletteFileFromName(m_prefsManager.appPrefs.colorPrefs.DColorSet);
 			if (!Cpfad.isEmpty())
-				csm.loadPalette(Cpfad, m_doc, m_prefsManager->appPrefs.colorPrefs.DColors, m_prefsManager->appPrefs.defaultGradients, m_prefsManager->appPrefs.defaultPatterns, false);
+				csm.loadPalette(Cpfad, m_doc, m_prefsManager.appPrefs.colorPrefs.DColors, m_prefsManager.appPrefs.defaultGradients, m_prefsManager.appPrefs.defaultPatterns, false);
 		}
 	}
 	appModeHelper->setStartupActionsEnabled(false);
@@ -586,7 +585,7 @@
 		if ((ScrAction*)(it.value()) != nullptr)
 		{
 			QString accelerator = it.value()->shortcut().toString();
-			m_prefsManager->setKeyEntry(it.key(), it.value()->cleanMenuText(), accelerator,0);
+			m_prefsManager.setKeyEntry(it.key(), it.value()->cleanMenuText(), accelerator,0);
 		}
 		//else
 		//	qDebug() << it.key();
@@ -734,13 +733,13 @@
 
 void ScribusMainWindow::initScrapbook()
 {
-	QString scrapbookFileO = QDir::toNativeSeparators(m_prefsManager->preferencesLocation()+"/scrap13.scs");
+	QString scrapbookFileO = QDir::toNativeSeparators(m_prefsManager.preferencesLocation()+"/scrap13.scs");
 	QFileInfo scrapbookFileInfoO = QFileInfo(scrapbookFileO);
 	if (scrapbookFileInfoO.exists())
 	{
 		scrapbookPalette->readOldContents(scrapbookFileO, ScPaths::scrapbookDir(true) + "main");
 		QDir d = QDir();
-		d.rename(scrapbookFileO, QDir::toNativeSeparators(m_prefsManager->preferencesLocation()+"/scrap13.backup"));
+		d.rename(scrapbookFileO, QDir::toNativeSeparators(m_prefsManager.preferencesLocation()+"/scrap13.backup"));
 	}
 	QString scrapbookTemp = QDir::toNativeSeparators(ScPaths::scrapbookDir(true) + "tmp");
 	QFileInfo scrapbookTempInfo = QFileInfo(scrapbookTemp);
@@ -752,7 +751,7 @@
 		scrapbookPalette->readContents(scrapbookFile);
 	scrapbookPalette->setScrapbookFileName(scrapbookFile);
 	ScCore->fileWatcher->addDir(scrapbookFile, true);
-	scrapbookPalette->setOpenScrapbooks(m_prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks);
+	scrapbookPalette->setOpenScrapbooks(m_prefsManager.appPrefs.scrapbookPrefs.RecentScrapbooks);
 	rebuildRecentPasteMenu();
 	connect(scrapbookPalette, SIGNAL(updateRecentMenue()), this, SLOT(rebuildRecentPasteMenu()));
 	connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), scrapbookPalette, SLOT(reloadLib(QString )));
@@ -777,7 +776,7 @@
 	mdiArea = new QMdiArea(this);
 	mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
 	mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
-	if (m_prefsManager->appPrefs.uiPrefs.useTabs)
+	if (m_prefsManager.appPrefs.uiPrefs.useTabs)
 	{
 		mdiArea->setViewMode(QMdiArea::TabbedView);
 		mdiArea->setTabsClosable(true);
@@ -1603,7 +1602,7 @@
 {
 	bool retVal;
 	if (e->type() == QEvent::ToolTip)
-		return (!m_prefsManager->appPrefs.displayPrefs.showToolTips);
+		return (!m_prefsManager.appPrefs.displayPrefs.showToolTips);
 
 	if ( e->type() == QEvent::KeyPress )
 	{
@@ -1731,7 +1730,7 @@
 		slotSelect();
 		if (doc->m_Selection->isEmpty())
 			HaveNewSel();
-		m_prefsManager->appPrefs.uiPrefs.stickyTools = false;
+		m_prefsManager.appPrefs.uiPrefs.stickyTools = false;
 		scrActions["stickyTools"]->setChecked(false);
 		return;
 	}
@@ -1774,7 +1773,7 @@
 		if ((doc->appMode != modeEdit) && (doc->m_Selection->isEmpty()))
 		{
 			int pg;
-			int wheelVal = m_prefsManager->mouseWheelJump();
+			int wheelVal = m_prefsManager.mouseWheelJump();
 			if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
 				wheelVal = qMax(qRound(wheelVal / 10.0), 1);
 			switch (kk)
@@ -1789,7 +1788,7 @@
 				break;
 			case Qt::Key_PageUp:
 				if (doc->masterPageMode() || doc->symbolEditMode() || doc->inlineEditMode())
-					view->scrollBy(0, -m_prefsManager->mouseWheelJump());
+					view->scrollBy(0, -m_prefsManager.mouseWheelJump());
 				else
 				{
 					pg = doc->currentPageNumber();
@@ -1805,7 +1804,7 @@
 				break;
 			case Qt::Key_PageDown:
 				if (doc->masterPageMode() || doc->symbolEditMode() || doc->inlineEditMode())
-					view->scrollBy(0, m_prefsManager->mouseWheelJump());
+					view->scrollBy(0, m_prefsManager.mouseWheelJump());
 				else
 				{
 					pg = doc->currentPageNumber();
@@ -1971,7 +1970,7 @@
 	modeToolBar->connectPrefsSlot(false);
 	pdfToolBar->connectPrefsSlot(false);
 
-	m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.clear();
+	m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.clear();
 	QList<QTabBar *> bars = findChildren<QTabBar *>(QString());
 	for (int i = 0; i < bars.count(); ++i)
 	{
@@ -1985,7 +1984,7 @@
 				currentTab.palettes.append(obj->objectName());
 		}
 		if (!currentTab.palettes.isEmpty())
-			m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.append(currentTab);
+			m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.append(currentTab);
 	}
 
 	propertiesPalette->hide();
@@ -2006,12 +2005,12 @@
 
 	// Clean up plugins, THEN save prefs to disk
 	ScCore->pluginManager->cleanupPlugins();
-	if (!m_prefsManager->appPrefs.scrapbookPrefs.persistentScrapbook)
+	if (!m_prefsManager.appPrefs.scrapbookPrefs.persistentScrapbook)
 		scrapbookPalette->cleanUpTemp();
-	m_prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks.clear();
-	m_prefsManager->appPrefs.scrapbookPrefs.RecentScrapbooks = scrapbookPalette->getOpenScrapbooks();
+	m_prefsManager.appPrefs.scrapbookPrefs.RecentScrapbooks.clear();
+	m_prefsManager.appPrefs.scrapbookPrefs.RecentScrapbooks = scrapbookPalette->getOpenScrapbooks();
 	if (!emergencyActivated)
-		m_prefsManager->SavePrefs();
+		m_prefsManager.SavePrefs();
 	UndoManager::deleteInstance();
 	FormatsManager::deleteInstance();
 //	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
@@ -2038,16 +2037,16 @@
 	QSet<QString> foundFiles;
 	QDir::SortFlags sortflags = QDir::Name | QDir::Time;
 	QDir::Filters filterflags = QDir::Files | QDir::NoSymLinks | QDir::NoDot | QDir::NoDotDot;
-	if (!m_prefsManager->appPrefs.docSetupPrefs.AutoSaveDir.isEmpty())
-	{
-		QDir dirAuto(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveDir, "*_emergency_*.sla", sortflags, filterflags);
+	if (!m_prefsManager.appPrefs.docSetupPrefs.AutoSaveDir.isEmpty())
+	{
+		QDir dirAuto(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveDir, "*_emergency_*.sla", sortflags, filterflags);
 		QFileInfoList aList = dirAuto.entryInfoList();
 		if (aList.count() > 0)
 		{
 			for (int i = 0; i < aList.count(); i++)
 				foundFiles.insert(aList[i].absoluteFilePath());
 		}
-		QDir dirAuto2(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveDir, "*_autosave_*.sla", sortflags, filterflags);
+		QDir dirAuto2(m_prefsManager.appPrefs.docSetupPrefs.AutoSaveDir, "*_autosave_*.sla", sortflags, filterflags);
 		QFileInfoList aList2 = dirAuto2.entryInfoList();
 		if (aList2.count() > 0)
 		{
@@ -2055,12 +2054,12 @@
 				foundFiles.insert(aList2[i].absoluteFilePath());
 		}
 	}
-	QDir dirDoc(m_prefsManager->documentDir(), "*_emergency_*.sla", sortflags, filterflags);
+	QDir dirDoc(m_prefsManager.documentDir(), "*_emergency_*.sla", sortflags, filterflags);
 	QFileInfoList dList = dirDoc.entryInfoList();
 	for (int i = 0; i < dList.count(); i++)
 		foundFiles.insert(dList[i].absoluteFilePath());
 
-	QDir dirDoc2(m_prefsManager->documentDir(), "*_autosave_*.sla", sortflags, filterflags);
+	QDir dirDoc2(m_prefsManager.documentDir(), "*_autosave_*.sla", sortflags, filterflags);
 	QFileInfoList dList2 = dirDoc2.entryInfoList();
 	for (int i = 0; i < dList2.count(); i++)
 		foundFiles.insert(dList2[i].absoluteFilePath());
@@ -2107,7 +2106,7 @@
 void ScribusMainWindow::startUpDialog()
 {
 	bool docSet = false;
-	PrefsContext* docContext = m_prefsManager->prefsFile->getContext("docdirs", false);
+	PrefsContext* docContext = m_prefsManager.prefsFile->getContext("docdirs", false);
 	NewDoc* dia = new NewDoc(this, m_recentDocsList, true, ScCore->getGuiLanguage());
 	if (dia->exec())
 	{
@@ -2154,7 +2153,7 @@
 				UndoManager::instance()->renameStack(dia->nftGui->currentDocumentTemplate->name);
 				doc->setDocumentFileName(dia->nftGui->currentDocumentTemplate->name);
 				updateActiveWindowCaption(QObject::tr("Document Template: ") + dia->nftGui->currentDocumentTemplate->name);
-				QDir::setCurrent(PrefsManager::instance()->documentDir());
+				QDir::setCurrent(PrefsManager::instance().documentDir());
 				removeRecent(fileName);
 			}
 		}
@@ -2179,7 +2178,7 @@
 	{
 		appModeHelper->setStartupActionsEnabled(false);
 	}
-	m_prefsManager->setShowStartupDialog(!dia->startUpDialog->isChecked());
+	m_prefsManager.setShowStartupDialog(!dia->startUpDialog->isChecked());
 	delete dia;
 	m_mainWindowStatusLabel->setText( tr("Ready"));
 	if (docSet)
@@ -2274,13 +2273,13 @@
 	}
 	else
 	{
-		if (m_prefsManager->appPrefs.colorPrefs.DColorSet != "Scribus Small")
+		if (m_prefsManager.appPrefs.colorPrefs.DColorSet != "Scribus Small")
 		{
 			QStringList CustomColorSets = csm.userPaletteNames();
-			if (CustomColorSets.contains(m_prefsManager->appPrefs.colorPrefs.DColorSet))
-				Cpfad = csm.userPaletteFileFromName(m_prefsManager->appPrefs.colorPrefs.DColorSet);
+			if (CustomColorSets.contains(m_prefsManager.appPrefs.colorPrefs.DColorSet))
+				Cpfad = csm.userPaletteFileFromName(m_prefsManager.appPrefs.colorPrefs.DColorSet);
 			else
-				Cpfad = csm.paletteFileFromName(m_prefsManager->appPrefs.colorPrefs.DColorSet);
+				Cpfad = csm.paletteFileFromName(m_prefsManager.appPrefs.colorPrefs.DColorSet);
 			if (!Cpfad.isEmpty())
 				csm.loadPalette(Cpfad, doc, colorList, gradientsList, patternsList, false);
 			doc->PageColors = colorList;
@@ -2288,7 +2287,7 @@
 			doc->docPatterns = patternsList;
 		}
 		else
-			doc->PageColors = m_prefsManager->appPrefs.colorPrefs.DColors;
+			doc->PageColors = m_prefsManager.appPrefs.colorPrefs.DColors;
 	}
 	tempDoc->PageColors.ensureDefaultColors();
 	tempDoc->setup(unitIndex, pageArrangement, firstPageLocation, orientation, firstPageNumber, defaultPageSize, newDocName);
@@ -2333,13 +2332,13 @@
 	if (requiresGUI)
 	{
 		tempDoc->createHyphenator();
-		tempDoc->docHyphenator->ignoredWords = m_prefsManager->appPrefs.hyphPrefs.ignoredWords;
-		tempDoc->docHyphenator->specialWords = m_prefsManager->appPrefs.hyphPrefs.specialWords;
+		tempDoc->docHyphenator->ignoredWords = m_prefsManager.appPrefs.hyphPrefs.ignoredWords;
+		tempDoc->docHyphenator->specialWords = m_prefsManager.appPrefs.hyphPrefs.specialWords;
 	}
 	tempDoc->setLoading(false);
 	//run after setGUI to set up guidepalette ok
 
-	tempView->setScale(m_prefsManager->displayScale());
+	tempView->setScale(m_prefsManager.displayScale());
 	if (requiresGUI)
 	{
 		//done in newactinw actionManager->connectNewViewActions(tempView);
@@ -2403,7 +2402,7 @@
 			UndoManager::instance()->renameStack(currentTemplate->name);
 			doc->setDocumentFileName(currentTemplate->name);
 			updateActiveWindowCaption(QObject::tr("Document Template: ") + currentTemplate->name);
-			QDir::setCurrent(PrefsManager::instance()->documentDir());
+			QDir::setCurrent(PrefsManager::instance().documentDir());
 			removeRecent(QDir::cleanPath(currentTemplate->file));
 		}
 		qApp->restoreOverrideCursor();
@@ -2416,7 +2415,7 @@
 	ScribusWin* w = new ScribusWin(mdiArea, doc);
 	w->setMainWindow(this);
 	view = new ScribusView(w, this, doc);
-	view->setScale(m_prefsManager->displayScale());
+	view->setScale(m_prefsManager.displayScale());
 	w->setView(view);
 	ActWin = w;
 	w->setCentralWidget(view);
@@ -2580,7 +2579,7 @@
 	}
 	view = ActWin->view();
 	bool b = zoomSpinBox->blockSignals(true);
-	zoomSpinBox->setValue(view->scale() * 100.0 / PrefsManager::instance()->appPrefs.displayPrefs.displayScale);
+	zoomSpinBox->setValue(view->scale() * 100.0 / PrefsManager::instance().appPrefs.displayPrefs.displayScale);
 	zoomSpinBox->blockSignals(b);
 	actionManager->connectNewViewActions(view);
 	actionManager->disconnectNewDocActions();
@@ -2978,7 +2977,7 @@
 	QString strippedName, localName;
 	scrMenuMgr->clearMenuStrings("FileOpenRecent");
 	scrRecentFileActions.clear();
-	int max = qMin(m_prefsManager->appPrefs.uiPrefs.recentDocCount, m_recentDocsList.count());
+	int max = qMin(m_prefsManager.appPrefs.uiPrefs.recentDocCount, m_recentDocsList.count());
 	for (int i = 0; i < max; ++i)
 	{
 		strippedName = localName = QDir::toNativeSeparators(m_recentDocsList[i]);
@@ -2997,7 +2996,7 @@
 	scrMenuMgr->clearMenuStrings("EditPasteRecent");
 
 	scrRecentPasteActions.clear();
-	int max = qMin(m_prefsManager->appPrefs.scrapbookPrefs.numScrapbookCopies, scrapbookPalette->tempBView->objectMap.count());
+	int max = qMin(m_prefsManager.appPrefs.scrapbookPrefs.numScrapbookCopies, scrapbookPalette->tempBView->objectMap.count());
 	if (max > 0)
 	{
 		QMap<QString,BibView::Elem>::Iterator it;
@@ -3158,7 +3157,7 @@
 	formats.append("Scribus Objects (*.sce *.SCE)");
 	formats.sort(Qt::CaseInsensitive);
 	allFormats += formats.join(";;");
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("pastefile", ".");
 	CustomFDialog dia(this, wdir, tr("Open"), allFormats, fdExistingFiles | fdDisableOk);
 	QString fileName("");
@@ -3171,7 +3170,7 @@
 	else
 		return;
 
-	PrefsManager::instance()->prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
+	PrefsManager::instance().prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
 	QFileInfo fi(fileName);
 	QString suffix = fi.suffix().toLower();
 	if ((suffix == "sce") || (suffix == "shape"))
@@ -3270,9 +3269,9 @@
 
 bool ScribusMainWindow::slotFileOpen()
 {
-	PrefsContext* docContext = m_prefsManager->prefsFile->getContext("docdirs", false);
+	PrefsContext* docContext = m_prefsManager.prefsFile->getContext("docdirs", false);
 	QString docDir(".");
-	QString prefsDocDir(m_prefsManager->documentDir());
+	QString prefsDocDir(m_prefsManager.documentDir());
 	if (!prefsDocDir.isEmpty())
 		docDir = docContext->get("docsopen", prefsDocDir);
 	else
@@ -3523,17 +3522,17 @@
 		if (docProfileDir.exists())
 			ScCore->getCMSProfilesDir(fi.absolutePath()+"/profiles", false, false);
 
-		m_prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", filename);
+		m_prefsManager.appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", filename);
 		QDir docFontDir(fi.absolutePath() + "/fonts");
 		if (docFontDir.exists())
-			m_prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/fonts", filename);
+			m_prefsManager.appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/fonts", filename);
 		QDir docFontDir2(fi.absolutePath() + "/Fonts");
 		if (docFontDir2.exists())
-			m_prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Fonts", filename);
+			m_prefsManager.appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Fonts", filename);
 		QDir docFontDir3(fi.absolutePath() + "/Document fonts");
 		if (docFontDir3.exists())
-			m_prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Document fonts", filename);
-		m_prefsManager->appPrefs.fontPrefs.AvailFonts.updateFontMap();
+			m_prefsManager.appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Document fonts", filename);
+		m_prefsManager.appPrefs.fontPrefs.AvailFonts.updateFontMap();
 		if (view != nullptr)
 		{
 			actionManager->disconnectNewViewActions();
@@ -3552,7 +3551,7 @@
 		w->setMainWindow(this);
 		view = new ScribusView(w, this, doc);
 		doc->setGUI(true, this, view);
-		view->setScale(m_prefsManager->displayScale());
+		view->setScale(m_prefsManager.displayScale());
 		w->setView(view);
 		alignDistributePalette->setDoc(doc);
 		ActWin = w;
@@ -3609,10 +3608,10 @@
 		HaveDoc++;
 		if (doc->checkerProfiles().count() == 0)
 		{
-			m_prefsManager->initDefaultCheckerPrefs(doc->checkerProfiles());
+			m_prefsManager.initDefaultCheckerPrefs(doc->checkerProfiles());
 			doc->setCurCheckProfile(CommonStrings::PDF_1_4);
 		}
-		m_prefsManager->insertMissingCheckerProfiles(doc->checkerProfiles());
+		m_prefsManager.insertMissingCheckerProfiles(doc->checkerProfiles());
 		if (doc->pdfOptions().LPISettings.count() == 0)
 		{
 			struct LPIData lpo;
@@ -3636,55 +3635,55 @@
 			if (!ScCore->InputProfiles.contains(doc->cmsSettings().DefaultImageRGBProfile))
 			{
 				missing = doc->cmsSettings().DefaultImageRGBProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultImageRGBProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
+				doc->cmsSettings().DefaultImageRGBProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
 			}
 			if (!ScCore->InputProfilesCMYK.contains(doc->cmsSettings().DefaultImageCMYKProfile))
 			{
 				missing = doc->cmsSettings().DefaultImageCMYKProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultImageCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
+				doc->cmsSettings().DefaultImageCMYKProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
 			}
 			if (!ScCore->InputProfiles.contains(doc->cmsSettings().DefaultSolidColorRGBProfile))
 			{
 				missing = doc->cmsSettings().DefaultSolidColorRGBProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultSolidColorRGBProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+				doc->cmsSettings().DefaultSolidColorRGBProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 			}
 			if (!ScCore->InputProfilesCMYK.contains(doc->cmsSettings().DefaultSolidColorCMYKProfile))
 			{
 				missing = doc->cmsSettings().DefaultSolidColorCMYKProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultSolidColorCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+				doc->cmsSettings().DefaultSolidColorCMYKProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
 			}
 			if (!ScCore->MonitorProfiles.contains(doc->cmsSettings().DefaultMonitorProfile))
 			{
 				missing = doc->cmsSettings().DefaultMonitorProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultMonitorProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+				doc->cmsSettings().DefaultMonitorProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 			}
 			if (!ScCore->PrinterProfiles.contains(doc->cmsSettings().DefaultPrinterProfile))
 			{
 				missing = doc->cmsSettings().DefaultPrinterProfile;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
-				doc->cmsSettings().DefaultPrinterProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
+				doc->cmsSettings().DefaultPrinterProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 			}
 			if (!ScCore->PrinterProfiles.contains(doc->pdfOptions().PrintProf))
 			{
 				missing = doc->pdfOptions().PrintProf;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
 				doc->pdfOptions().PrintProf = doc->cmsSettings().DefaultPrinterProfile;
@@ -3692,7 +3691,7 @@
 			if (!ScCore->InputProfiles.contains(doc->pdfOptions().ImageProf))
 			{
 				missing = doc->pdfOptions().ImageProf;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
 				doc->pdfOptions().ImageProf = doc->cmsSettings().DefaultImageRGBProfile;
@@ -3700,7 +3699,7 @@
 			if (!ScCore->InputProfiles.contains(doc->pdfOptions().SolidProf))
 			{
 				missing = doc->pdfOptions().SolidProf;
-				replacement = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+				replacement = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 				if (!missingMap.contains(missing, replacement))
 					missingMap.insert(missing, replacement);
 				doc->pdfOptions().SolidProf = doc->cmsSettings().DefaultSolidColorRGBProfile;
@@ -3902,11 +3901,11 @@
 		QString formatD(FormatsManager::instance()->fileDialogFormatList(FormatsManager::IMAGESIMGFRAME));
 
 		QString docDir = ".";
-		QString prefsDocDir=m_prefsManager->documentDir();
+		QString prefsDocDir=m_prefsManager.documentDir();
 		if (!prefsDocDir.isEmpty())
-			docDir = m_prefsManager->prefsFile->getContext("dirs")->get("images", prefsDocDir);
+			docDir = m_prefsManager.prefsFile->getContext("dirs")->get("images", prefsDocDir);
 		else
-			docDir = m_prefsManager->prefsFile->getContext("dirs")->get("images", ".");
+			docDir = m_prefsManager.prefsFile->getContext("dirs")->get("images", ".");
 
 		QStringList fileNames;
 		fileNames.clear();
@@ -3917,7 +3916,7 @@
 		//QStringList fileNames = CFileDialog( docDir, tr("Open"), formatD, "", fdShowPreview | fdExistingFiles);
 		if (!fileNames.isEmpty())
 		{
-			m_prefsManager->prefsFile->getContext("dirs")->set("images", fileNames[0].left(fileNames[0].lastIndexOf("/")));
+			m_prefsManager.prefsFile->getContext("dirs")->set("images", fileNames[0].left(fileNames[0].lastIndexOf("/")));
 			view->requestMode(modeImportImage);
 			CanvasMode_ImageImport* cii=dynamic_cast<CanvasMode_ImageImport*>(view->canvasMode());
 			if (cii)
@@ -4085,7 +4084,7 @@
 	{
 		QFileInfo fiB(currItem->Pfile);
 
-		PrefsContext* docContext = m_prefsManager->prefsFile->getContext("docdirs", false);
+		PrefsContext* docContext = m_prefsManager.prefsFile->getContext("docdirs", false);
 		QString wdir = ".";
 		if (doc->hasName)
 		{
@@ -4094,7 +4093,7 @@
 		}
 		else
 		{
-			QString prefsDocDir = m_prefsManager->documentDir();
+			QString prefsDocDir = m_prefsManager.documentDir();
 			if (!prefsDocDir.isEmpty())
 				wdir = docContext->get("place_as", prefsDocDir);
 			else
@@ -4210,7 +4209,7 @@
 	doc->is12doc=false;
 	bool ret = false;
 	QString filename;
-	PrefsContext* docContext = m_prefsManager->prefsFile->getContext("docdirs", false);
+	PrefsContext* docContext = m_prefsManager.prefsFile->getContext("docdirs", false);
 	QString wdir = ".";
 	if (doc->hasName)
 	{
@@ -4225,7 +4224,7 @@
 	}
 	else
 	{
-		QString prefsDocDir=m_prefsManager->documentDir();
+		QString prefsDocDir=m_prefsManager.documentDir();
 		if (!prefsDocDir.isEmpty())
 			wdir = docContext->get("save_as", prefsDocDir);
 		else
@@ -4237,7 +4236,7 @@
 			filename = wdir;
 		filename += doc->documentFileName() + ".sla";
 	}
-	bool saveCompressed=m_prefsManager->appPrefs.docSetupPrefs.saveCompressed;
+	bool saveCompressed=m_prefsManager.appPrefs.docSetupPrefs.saveCompressed;
 	if (saveCompressed)
 		filename.append(".gz");
 
@@ -4372,9 +4371,9 @@
 	ActWin = nullptr;
 	if ( HaveDoc == 0 )
 	{
-		QString prefsDocDir( PrefsManager::instance()->documentDir() );
+		QString prefsDocDir( PrefsManager::instance().documentDir() );
 		if ( QDir().exists(prefsDocDir) )
-			QDir::setCurrent( PrefsManager::instance()->documentDir() );
+			QDir::setCurrent( PrefsManager::instance().documentDir() );
 		else
 			QDir::setCurrent( QDir::homePath() );
 	}
@@ -4460,7 +4459,7 @@
 	ColorList usedSpots;
 	doc->getUsedColors(usedSpots, true);
 	QStringList spots = usedSpots.keys();
-	PrintDialog *printer = new PrintDialog(this, doc, doc->Print_Options, m_prefsManager->appPrefs.printerPrefs.GCRMode, spots);
+	PrintDialog *printer = new PrintDialog(this, doc, doc->Print_Options, m_prefsManager.appPrefs.printerPrefs.GCRMode, spots);
 	printer->setMinMax(1, doc->Pages->count(), doc->currentPage()->pageNr()+1);
 	printDinUse = true;
 	connect(printer, SIGNAL(doPreview()), this, SLOT(doPrintPreview()));
@@ -4626,7 +4625,7 @@
 			return;
 		ScriXmlDoc ss;
 		QString BufferS = ss.writeElem(doc, doc->m_Selection);
-		if ((m_prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
+		if ((m_prefsManager.appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
 		{
 			scrapbookPalette->objFromCopyAction(BufferS, currItem->itemName());
 			rebuildRecentPasteMenu();
@@ -4710,7 +4709,7 @@
 		QString BufferS = ss.writeElem(doc, &tempSelection);
 		if (!internalCopy)
 		{
-			if ((m_prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
+			if ((m_prefsManager.appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
 			{
 				scrapbookPalette->objFromCopyAction(BufferS, currItem->itemName());
 				rebuildRecentPasteMenu();
@@ -5271,27 +5270,27 @@
 
 void ScribusMainWindow::ToggleTips()
 {
-	m_prefsManager->appPrefs.displayPrefs.showToolTips = scrActions["helpTooltips"]->isChecked();
+	m_prefsManager.appPrefs.displayPrefs.showToolTips = scrActions["helpTooltips"]->isChecked();
 }
 
 void ScribusMainWindow::ToggleMouseTips()
 {
-	m_prefsManager->appPrefs.displayPrefs.showMouseCoordinates = scrActions["showMouseCoordinates"]->isChecked();
+	m_prefsManager.appPrefs.displayPrefs.showMouseCoordinates = scrActions["showMouseCoordinates"]->isChecked();
 }
 
 void ScribusMainWindow::SaveText()
 {
 	LoadEnc = "";
 	QString wdir = ".";
-	QString prefsDocDir=m_prefsManager->documentDir();
+	QString prefsDocDir=m_prefsManager.documentDir();
 	if (!prefsDocDir.isEmpty())
-		wdir = m_prefsManager->prefsFile->getContext("dirs")->get("save_text", prefsDocDir);
+		wdir = m_prefsManager.prefsFile->getContext("dirs")->get("save_text", prefsDocDir);
 	else
-		wdir = m_prefsManager->prefsFile->getContext("dirs")->get("save_text", ".");
+		wdir = m_prefsManager.prefsFile->getContext("dirs")->get("save_text", ".");
 	QString fn = CFileDialog( wdir, tr("Save As"), tr("Text Files (*.txt);;All Files (*)"), "", fdShowCodecs|fdHidePreviewCheckBox);
 	if (!fn.isEmpty())
 	{
-		m_prefsManager->prefsFile->getContext("dirs")->set("save_text", fn.left(fn.lastIndexOf("/")));
+		m_prefsManager.prefsFile->getContext("dirs")->set("save_text", fn.left(fn.lastIndexOf("/")));
 		const StoryText& story (doc->m_Selection->itemAt(0)->itemText);
 		Serializer::writeWithEncoding(fn, LoadEnc, story.text(0, story.length()));
 	}
@@ -5559,7 +5558,7 @@
 	}
 	//Zoom to %
 	else
-		finalZoomFactor = zoomFactor*m_prefsManager->displayScale()/100.0;
+		finalZoomFactor = zoomFactor*m_prefsManager.displayScale()/100.0;
 
 	if (finalZoomFactor == view->scale())
 		return;
@@ -5581,9 +5580,9 @@
 
 void ScribusMainWindow::ToggleStickyTools()
 {
-	m_prefsManager->appPrefs.uiPrefs.stickyTools = !m_prefsManager->appPrefs.uiPrefs.stickyTools;
-	scrActions["stickyTools"]->setChecked(m_prefsManager->appPrefs.uiPrefs.stickyTools);
-	if (HaveDoc && doc->appMode!=modeNormal && !m_prefsManager->appPrefs.uiPrefs.stickyTools)
+	m_prefsManager.appPrefs.uiPrefs.stickyTools = !m_prefsManager.appPrefs.uiPrefs.stickyTools;
+	scrActions["stickyTools"]->setChecked(m_prefsManager.appPrefs.uiPrefs.stickyTools);
+	if (HaveDoc && doc->appMode!=modeNormal && !m_prefsManager.appPrefs.uiPrefs.stickyTools)
 		view->requestMode(modeNormal);
 }
 
@@ -6049,7 +6048,7 @@
 {
 	m_keyrep=false;
 
-	if (newMode==modeDrawLatex && !m_prefsManager->renderFrameConfigured())
+	if (newMode==modeDrawLatex && !m_prefsManager.renderFrameConfigured())
 	{
 		ScMessageBox::critical(this, "Render Frames Not Configured", "Your Render Frame configuration seems to be invalid. Please check the settings in the External Tools section of the Preferences dialog.");
 		return;
@@ -6638,38 +6637,38 @@
 {
 	QString oldMonitorProfile(ScCore->monitorProfile.productDescription());
 	slotSelect();
-	struct ApplicationPrefs oldPrefs(m_prefsManager->appPrefs);
+	struct ApplicationPrefs oldPrefs(m_prefsManager.appPrefs);
 	PreferencesDialog prefsDialog(this, oldPrefs);
 	int prefsResult=prefsDialog.exec();
 	if (prefsResult==QDialog::Accepted)
 	{
 		struct ApplicationPrefs newPrefs(prefsDialog.prefs());
-		m_prefsManager->setNewPrefs(newPrefs);
-		m_prefsManager->applyLoadedShortCuts();
+		m_prefsManager.setNewPrefs(newPrefs);
+		m_prefsManager.applyLoadedShortCuts();
 
 		//TODO: and the other dirs?
-		DocDir = m_prefsManager->documentDir();
+		DocDir = m_prefsManager.documentDir();
 		if (oldPrefs.pathPrefs.documents != newPrefs.pathPrefs.documents)
 		{
-			PrefsContext* docContext = m_prefsManager->prefsFile->getContext("docdirs", false);
+			PrefsContext* docContext = m_prefsManager.prefsFile->getContext("docdirs", false);
 			docContext->set("docsopen", newPrefs.pathPrefs.documents);
 		}
 
-		ScQApp->neverSplash(!m_prefsManager->appPrefs.uiPrefs.showSplashOnStartup);
-
-		QString newUILanguage = m_prefsManager->uiLanguage();
+		ScQApp->neverSplash(!m_prefsManager.appPrefs.uiPrefs.showSplashOnStartup);
+
+		QString newUILanguage = m_prefsManager.uiLanguage();
 		if (oldPrefs.uiPrefs.language != newUILanguage || ScQApp->currGUILanguage()!=newUILanguage)
 			ScQApp->changeGUILanguage(newUILanguage);
-		m_prefsManager->appPrefs.uiPrefs.language = ScQApp->currGUILanguage();
-		QString newUIStyle = m_prefsManager->guiStyle();
+		m_prefsManager.appPrefs.uiPrefs.language = ScQApp->currGUILanguage();
+		QString newUIStyle = m_prefsManager.guiStyle();
 		if (oldPrefs.uiPrefs.style != newUIStyle)
 		{
 			if (newUIStyle.isEmpty())
-				ScQApp->setStyle(m_prefsManager->guiSystemStyle());
+				ScQApp->setStyle(m_prefsManager.guiSystemStyle());
 			else
 				ScQApp->setStyle(QStyleFactory::create(newUIStyle));
 		}
-		int newUIFontSize = m_prefsManager->guiFontSize();
+		int newUIFontSize = m_prefsManager.guiFontSize();
 		if (oldPrefs.uiPrefs.applicationFontSize != newUIFontSize)
 		{
 			QFont apf = qApp->font();
@@ -6677,7 +6676,7 @@
 			qApp->setFont(apf);
 		}
 		emit UpdateRequest(reqDefFontListUpdate);
-		if (m_prefsManager->appPrefs.uiPrefs.useTabs)
+		if (m_prefsManager.appPrefs.uiPrefs.useTabs)
 		{
 			mdiArea->setViewMode(QMdiArea::TabbedView);
 			mdiArea->setTabsClosable(true);
@@ -6685,7 +6684,7 @@
 		}
 		else
 			mdiArea->setViewMode(QMdiArea::SubWindowView);
-		bool shadowChanged = oldPrefs.displayPrefs.showPageShadow != m_prefsManager->showPageShadow();
+		bool shadowChanged = oldPrefs.displayPrefs.showPageShadow != m_prefsManager.showPageShadow();
 		QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
 		if (!windows.isEmpty())
 		{
@@ -6697,14 +6696,14 @@
 				if (!scw)
 					qFatal("ScribusMainWindow::slotPrefsOrg !scw");
 				ScribusView* scw_v = scw->view();
-				if (oldPrefs.displayPrefs.displayScale != m_prefsManager->displayScale())
+				if (oldPrefs.displayPrefs.displayScale != m_prefsManager.displayScale())
 				{
 					int x = qRound(qMax(scw_v->contentsX() / scw_v->scale(), 0.0));
 					int y = qRound(qMax(scw_v->contentsY() / scw_v->scale(), 0.0));
 					int w = qRound(qMin(scw_v->visibleWidth() / scw_v->scale(), scw->doc()->currentPage()->width()));
 					int h = qRound(qMin(scw_v->visibleHeight() / scw_v->scale(), scw->doc()->currentPage()->height()));
 					scw_v->rememberOldZoomLocation(w / 2 + x,h / 2 + y);
-					scw_v->zoom((scw_v->scale() / oldPrefs.displayPrefs.displayScale) * m_prefsManager->displayScale());
+					scw_v->zoom((scw_v->scale() / oldPrefs.displayPrefs.displayScale) * m_prefsManager.displayScale());
 					zoomSpinBox->setMaximum(doc->opToolPrefs().magMax);
 				}
 				if (shadowChanged)
@@ -6729,7 +6728,7 @@
 			if (!success)
 			{
 				newPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = oldMonitorProfile;
-				m_prefsManager->setNewPrefs(newPrefs);
+				m_prefsManager.setNewPrefs(newPrefs);
 				QString message = tr("An error occurred while opening monitor profile.\nFormer monitor profile will be used." );
 				if (ScCore->usingGUI())
 					ScMessageBox::warning(this, CommonStrings::trWarning, message);
@@ -6743,7 +6742,7 @@
 		icm.setMaxCacheEntries(newPrefs.imageCachePrefs.maxCacheEntries);
 		icm.setCompressionLevel(newPrefs.imageCachePrefs.compressionLevel);
 
-		m_prefsManager->SavePrefs();
+		m_prefsManager.SavePrefs();
 	}
 }
 
@@ -6832,11 +6831,11 @@
 	nsEditor->startup();
 	symbolPalette->startup();
 #if QT_VERSION < 0x050600
-	if (!m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.isEmpty())
-	{
-		for (int a = 0; a < m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.count(); a++)
-		{
-			QStringList actTab = m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[a].palettes;
+	if (!m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.isEmpty())
+	{
+		for (int a = 0; a < m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.count(); a++)
+		{
+			QStringList actTab = m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].palettes;
 			QDockWidget *container = findChild<QDockWidget *>(actTab[0]);
 			if (container)
 			{
@@ -6859,9 +6858,9 @@
 					{
 						if (obj->objectName() == container->objectName())
 						{
-							if (m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[a].activeTab > -1)
+							if (m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].activeTab > -1)
 							{
-								bar->setCurrentIndex(m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[a].activeTab);
+								bar->setCurrentIndex(m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[a].activeTab);
 								found = true;
 								break;
 							}
@@ -6874,11 +6873,11 @@
 		}
 	}
 #else
-	if (!m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.isEmpty())
-	{
-		for (int i = 0; i < m_prefsManager->appPrefs.uiPrefs.tabbedPalettes.count(); i++)
-		{
-			QStringList actTab = m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[i].palettes;
+	if (!m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.isEmpty())
+	{
+		for (int i = 0; i < m_prefsManager.appPrefs.uiPrefs.tabbedPalettes.count(); i++)
+		{
+			QStringList actTab = m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[i].palettes;
 			QDockWidget *container = findChild<QDockWidget *>(actTab[0]);
 			QList<QTabBar *> bars = findChildren<QTabBar *>(QString());
 			bool found = false;
@@ -6892,9 +6891,9 @@
 					{
 						if (obj->objectName() == container->objectName())
 						{
-							if (m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[i].activeTab > -1)
+							if (m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[i].activeTab > -1)
 							{
-								bar->setCurrentIndex(m_prefsManager->appPrefs.uiPrefs.tabbedPalettes[i].activeTab);
+								bar->setCurrentIndex(m_prefsManager.appPrefs.uiPrefs.tabbedPalettes[i].activeTab);
 								found = true;
 								break;
 							}
@@ -6907,8 +6906,8 @@
 		}
 	}
 #endif
-	move(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.xPosition, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.yPosition);
-	resize(m_prefsManager->appPrefs.uiPrefs.mainWinSettings.width, m_prefsManager->appPrefs.uiPrefs.mainWinSettings.height);
+	move(m_prefsManager.appPrefs.uiPrefs.mainWinSettings.xPosition, m_prefsManager.appPrefs.uiPrefs.mainWinSettings.yPosition);
+	resize(m_prefsManager.appPrefs.uiPrefs.mainWinSettings.width, m_prefsManager.appPrefs.uiPrefs.mainWinSettings.height);
 
 	// init the toolbars
 	fileToolBar->initVisibility();
@@ -6936,7 +6935,7 @@
 		scrActions["toolsPreflightVerifier"]->setChecked(false);
 		disconnect(docCheckerPalette, SIGNAL(ignoreAllErrors()), this, SLOT(doPrintPreview()));
 	}
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
 	QString currentPrinter(prefs->get("CurrentPrn"));
 	PrintEngine currentEngine = (PrintEngine) prefs->get("CurrentPrnEngine", "3").toInt();
 	if ( PPreview::usePostscriptPreview(currentPrinter, currentEngine) && ( !ScCore->haveGS() ) )
@@ -6949,29 +6948,29 @@
 	previewDinUse = true;
 	connect(dia, SIGNAL(doPrint()), this, SLOT(slotReallyPrint()));
 	dia->exec();
-	PrefsManager *prefsManager=PrefsManager::instance();
-	prefsManager->appPrefs.printPreviewPrefs.PrPr_Mode = dia->EnableCMYK->isChecked();
-	prefsManager->appPrefs.printPreviewPrefs.PrPr_AntiAliasing = dia->AntiAlias->isChecked();
-	prefsManager->appPrefs.printPreviewPrefs.PrPr_Transparency = dia->AliasTr->isChecked();
+	PrefsManager& prefsManager=PrefsManager::instance();
+	prefsManager.appPrefs.printPreviewPrefs.PrPr_Mode = dia->EnableCMYK->isChecked();
+	prefsManager.appPrefs.printPreviewPrefs.PrPr_AntiAliasing = dia->AntiAlias->isChecked();
+	prefsManager.appPrefs.printPreviewPrefs.PrPr_Transparency = dia->AliasTr->isChecked();
 	if (ScCore->haveTIFFSep() && dia->postscriptPreview)
 	{
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_C = dia->flagsVisible["Cyan"]->isChecked();
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_M = dia->flagsVisible["Magenta"]->isChecked();
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_Y = dia->flagsVisible["Yellow"]->isChecked();
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_K = dia->flagsVisible["Black"]->isChecked();
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_InkCoverage = dia->EnableInkCover->isChecked();
-		prefsManager->appPrefs.printPreviewPrefs.PrPr_InkThreshold = dia->CoverThresholdValue->value();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_C = dia->flagsVisible["Cyan"]->isChecked();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_M = dia->flagsVisible["Magenta"]->isChecked();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_Y = dia->flagsVisible["Yellow"]->isChecked();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_K = dia->flagsVisible["Black"]->isChecked();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_InkCoverage = dia->EnableInkCover->isChecked();
+		prefsManager.appPrefs.printPreviewPrefs.PrPr_InkThreshold = dia->CoverThresholdValue->value();
 	}
 	disconnect(dia, SIGNAL(doPrint()), this, SLOT(slotReallyPrint()));
 	previewDinUse = false;
 	delete dia;
-	QFile::remove(prefsManager->preferencesLocation()+"/tmp.ps");
-	QFile::remove(prefsManager->preferencesLocation()+"/sc.png");
-	QDir d(prefsManager->preferencesLocation()+"/", "sc.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
+	QFile::remove(prefsManager.preferencesLocation()+"/tmp.ps");
+	QFile::remove(prefsManager.preferencesLocation()+"/sc.png");
+	QDir d(prefsManager.preferencesLocation()+"/", "sc.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
 	if ((d.exists()) && (d.count() != 0))
 	{
 		for (uint i = 0; i < d.count(); i++)
-			QFile::remove(prefsManager->preferencesLocation() +"/" + d[i]);
+			QFile::remove(prefsManager.preferencesLocation() +"/" + d[i]);
 	}
 }
 
@@ -7026,7 +7025,7 @@
 	options.useColor = true;
 	options.mirrorH = false;
 	options.mirrorV = false;
-	options.doGCR = m_prefsManager->appPrefs.printerPrefs.GCRMode;
+	options.doGCR = m_prefsManager.appPrefs.printerPrefs.GCRMode;
 	options.setDevParam = false;
 	options.doClip = true;
 	options.cropMarks = false;
@@ -7036,7 +7035,7 @@
 	options.markLength = 20.0;
 	options.markOffset = 0.0;
 	options.bleeds.set(0, 0, 0, 0);
-	PSLib *pslib = new PSLib(options, false, m_prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
+	PSLib *pslib = new PSLib(options, false, m_prefsManager.appPrefs.fontPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
 	if (pslib != nullptr)
 	{
 		qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -7118,15 +7117,15 @@
 	}
 	filename = QDir::toNativeSeparators(filename);
 	QString wdir = ".";
-	QString prefsDocDir=m_prefsManager->documentDir();
+	QString prefsDocDir=m_prefsManager.documentDir();
 	if (!prefsDocDir.isEmpty())
-		wdir = m_prefsManager->prefsFile->getContext("dirs")->get("eps", prefsDocDir);
+		wdir = m_prefsManager.prefsFile->getContext("dirs")->get("eps", prefsDocDir);
 	else
-		wdir = m_prefsManager->prefsFile->getContext("dirs")->get("eps", ".");
+		wdir = m_prefsManager.prefsFile->getContext("dirs")->get("eps", ".");
 	QString fn = CFileDialog( wdir, tr("Save As"), tr("%1;;All Files (*)").arg(m_formatsManager->extensionsForFormat(FormatsManager::EPS)), filename, fdHidePreviewCheckBox | fdNone);
 	if (!fn.isEmpty())
 	{
-		m_prefsManager->prefsFile->getContext("dirs")->set("eps", fn.left(fn.lastIndexOf("/")));
+		m_prefsManager.prefsFile->getContext("dirs")->set("eps", fn.left(fn.lastIndexOf("/")));
 		if (overwrite(this, fn))
 		{
 			QString epsError;
@@ -7221,7 +7220,7 @@
 		doc->pdfOptions().SubsetList = tmpEm;
 	}
 	MarginStruct optBleeds(doc->pdfOptions().bleeds);
-	PDFExportDialog dia(this, doc->documentFileName(), ReallyUsed, view, doc->pdfOptions(), ScCore->PDFXProfiles, m_prefsManager->appPrefs.fontPrefs.AvailFonts, ScCore->PrinterProfiles);
+	PDFExportDialog dia(this, doc->documentFileName(), ReallyUsed, view, doc->pdfOptions(), ScCore->PDFXProfiles, m_prefsManager.appPrefs.fontPrefs.AvailFonts, ScCore->PrinterProfiles);
 	if (!dia.exec())
 		return;
 
@@ -7319,13 +7318,13 @@
 	qApp->restoreOverrideCursor();
 	if (errorMsg.isEmpty() && doc->pdfOptions().openAfterExport && !doc->pdfOptions().doMultiFile)
 	{
-		QString pdfViewer(PrefsManager::instance()->appPrefs.extToolPrefs.pdfViewerExecutable);
+		QString pdfViewer(PrefsManager::instance().appPrefs.extToolPrefs.pdfViewerExecutable);
 		if (pdfViewer.isEmpty())
 		{
 			pdfViewer = QFileDialog::getOpenFileName(this, tr("Locate your PDF viewer"), QString(), QString());
 			if (!QFileInfo::exists(pdfViewer))
 				pdfViewer="";
-			PrefsManager::instance()->appPrefs.extToolPrefs.pdfViewerExecutable=pdfViewer;
+			PrefsManager::instance().appPrefs.extToolPrefs.pdfViewerExecutable=pdfViewer;
 		}
 		if (!pdfViewer.isEmpty())
 		{
@@ -7500,7 +7499,7 @@
 		view->requestMode(submodeEndNodeEdit);
 
 	ScriXmlDoc ss;
-	if (ss.readElem(xml, m_prefsManager->appPrefs.fontPrefs.AvailFonts, docc, x, y, art, loca, m_prefsManager->appPrefs.fontPrefs.GFontSub))
+	if (ss.readElem(xml, m_prefsManager.appPrefs.fontPrefs.AvailFonts, docc, x, y, art, loca, m_prefsManager.appPrefs.fontPrefs.GFontSub))
 	{
 		vie->DrawNew();
 		if (doc == docc)
@@ -8188,7 +8187,7 @@
 
 void ScribusMainWindow::SetShortCut()
 {
-	for (QMap<QString,Keys>::Iterator it = m_prefsManager->appPrefs.keyShortcutPrefs.KeyActions.begin(); it != m_prefsManager->appPrefs.keyShortcutPrefs.KeyActions.end(); ++it )
+	for (QMap<QString,Keys>::Iterator it = m_prefsManager.appPrefs.keyShortcutPrefs.KeyActions.begin(); it != m_prefsManager.appPrefs.keyShortcutPrefs.KeyActions.end(); ++it )
 	{
 		if (!it.value().actionName.isEmpty())
 			if (scrActions[it.value().actionName])
@@ -8334,9 +8333,9 @@
 	}
 	//For each hyphenation file, grab the strings and the hyphenation data.
 //	QString lang = QString(QLocale::system().name()).left(2);
-//	m_prefsManager->appPrefs.hyphPrefs.Language = "en_GB";
+//	m_prefsManager.appPrefs.hyphPrefs.Language = "en_GB";
 //	if (!LanguageManager::instance()->getHyphFilename(lang).isEmpty() )
-//		m_prefsManager->appPrefs.hyphPrefs.Language = lang;
+//		m_prefsManager.appPrefs.hyphPrefs.Language = lang;
 
 /*
 	if ((hyphDir.exists()) && (hyphDir.count() != 0))
@@ -8352,10 +8351,10 @@
 //IL			LangTransl.insert(fileLangAbbrev, tLang);
 			langmgr->addHyphLang(fileLangAbbrev, hyphDir[dc]);
 			if (fileLangAbbrev == lang)
-				prefsManager->appPrefs.hyphPrefs.Language = fileLangAbbrev;
+				prefsManager.appPrefs.hyphPrefs.Language = fileLangAbbrev;
 		}
 		if (tLang.isEmpty())
-			prefsManager->appPrefs.hyphPrefs.Language = "en_GB";
+			prefsManager.appPrefs.hyphPrefs.Language = "en_GB";
 	}
 	*/
 }
@@ -8444,7 +8443,7 @@
 void ScribusMainWindow::emergencySave()
 {
 	emergencyActivated=true;
-	if (!m_prefsManager || !m_prefsManager->appPrefs.miscPrefs.saveEmergencyFile)
+	if (!m_prefsManager.appPrefs.miscPrefs.saveEmergencyFile)
 		return;
 	std::cout << "Calling Emergency Save" << std::endl;
 	QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
@@ -8461,7 +8460,7 @@
 		doc->setMasterPageMode(false);
 		doc->setModified(false);
 		QString base = tr("Document");
-		QString path = m_prefsManager->documentDir();
+		QString path = m_prefsManager.documentDir();
 		QString fileName;
 		if (doc->hasName)
 		{
@@ -8541,7 +8540,7 @@
 		return;
 	}
 #endif
-	QString imageEditorExecutable=m_prefsManager->imageEditorExecutable();
+	QString imageEditorExecutable=m_prefsManager.imageEditorExecutable();
 	if (currItem->imageIsAvailable)
 	{
 		bool startFailed=false;
@@ -8647,9 +8646,9 @@
 	if (!HaveDoc)
 		return;
 	LoremManager loremMgr(doc, this);
-	if (m_prefsManager->appPrefs.miscPrefs.useStandardLI)
-	{
-		loremMgr.insertLoremIpsum("la.xml", m_prefsManager->appPrefs.miscPrefs.paragraphsLI);
+	if (m_prefsManager.appPrefs.miscPrefs.useStandardLI)
+	{
+		loremMgr.insertLoremIpsum("la.xml", m_prefsManager.appPrefs.miscPrefs.paragraphsLI);
 		return;
 	}
 
@@ -8664,7 +8663,7 @@
 
 	//Update colours in case someone has a translated None colour in their preference settings
 	//before changing the tr_NoneColor to the new value. See #9267, #5529
-	m_prefsManager->languageChange();
+	m_prefsManager.languageChange();
 	CommonStrings::languageChange();
 	LanguageManager::instance()->languageChange();
 	qApp->setLayoutDirection(QLocale(ScCore->getGuiLanguage()).textDirection());
@@ -9284,14 +9283,14 @@
 	}
 	else
 	{
-		Gradients = &m_prefsManager->appPrefs.defaultGradients;
-		edc = m_prefsManager->colorSet();
-		docPatterns = &m_prefsManager->appPrefs.defaultPatterns;
+		Gradients = &m_prefsManager.appPrefs.defaultGradients;
+		edc = m_prefsManager.colorSet();
+		docPatterns = &m_prefsManager.appPrefs.defaultPatterns;
 		tmpDoc = m_doc;
 		doc = m_doc;
 	}
 	m_undoManager->setUndoEnabled(false);
-	ColorsAndFillsDialog *dia = new ColorsAndFillsDialog(this, Gradients, edc, m_prefsManager->colorSetName(), docPatterns, tmpDoc, this);
+	ColorsAndFillsDialog *dia = new ColorsAndFillsDialog(this, Gradients, edc, m_prefsManager.colorSetName(), docPatterns, tmpDoc, this);
 	if (dia->exec())
 	{
 		if (HaveDoc)
@@ -9340,11 +9339,11 @@
 		else
 		{
 			// Update tools colors if needed
-			m_prefsManager->replaceToolColors(dia->replaceColorMap);
-			m_prefsManager->setColorSet(dia->m_colorList);
-			propertiesPalette->Cpal->setColors(m_prefsManager->colorSet());
-			m_prefsManager->appPrefs.defaultGradients = dia->dialogGradients;
-			m_prefsManager->appPrefs.defaultPatterns = dia->dialogPatterns;
+			m_prefsManager.replaceToolColors(dia->replaceColorMap);
+			m_prefsManager.setColorSet(dia->m_colorList);
+			propertiesPalette->Cpal->setColors(m_prefsManager.colorSet());
+			m_prefsManager.appPrefs.defaultGradients = dia->dialogGradients;
+			m_prefsManager.appPrefs.defaultPatterns = dia->dialogPatterns;
 			QString Cpfad = QDir::toNativeSeparators(ScPaths::applicationDataDir())+"DefaultColors.xml";
 			const FileFormat *fmt = LoadSavePlugin::getFormatById(FORMATID_SLA150EXPORT);
 			if (fmt)
@@ -9357,11 +9356,11 @@
 				s_doc->PageColors = dia->m_colorList;
 				s_doc->setGradients(dia->dialogGradients);
 				s_doc->setPatterns(dia->dialogPatterns);
-				fmt->setupTargets(s_doc, nullptr, this, mainWindowProgressBar, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+				fmt->setupTargets(s_doc, nullptr, this, mainWindowProgressBar, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 				fmt->savePalette(Cpfad);
 				delete s_doc;
 			}
-			m_prefsManager->setColorSetName(dia->getColorSetName());
+			m_prefsManager.setColorSetName(dia->getColorSetName());
 			doc = nullptr;
 		}
 	}

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Mon Jul  1 19:04:12 2019
@@ -651,7 +651,7 @@
 	double m_storedViewScale;
 	StyleManager *m_styleManager;
 	UndoManager *m_undoManager;
-	PrefsManager *m_prefsManager;
+	PrefsManager& m_prefsManager;
 	FormatsManager *m_formatsManager;
 
 	QPointer<HelpBrowser> m_helpBrowser;

Modified: trunk/Scribus/scribus/scribusXml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribusXml.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusXml.cpp	(original)
+++ trunk/Scribus/scribus/scribusXml.cpp	Mon Jul  1 19:04:12 2019
@@ -145,7 +145,7 @@
 	const FileFormat *fmt = LoadSavePlugin::getFormatById(FORMATID_SLA150IMPORT);
 	if (fmt)
 	{
-		fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+		fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 		fmt->loadElements(elementData, fileDir, toLayer, xPos, yPos, loc);
 		return true;
 	}
@@ -217,7 +217,7 @@
 	const FileFormat *fmt = LoadSavePlugin::getFormatById(FORMATID_SLA150EXPORT);
 	if (fmt)
 	{
-		fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+		fmt->setupTargets(doc, nullptr, doc->scMW(), nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 		documentStr = fmt->saveElements(xp, yp, wp, hp, selection, ba);
 	}
 	return documentStr;

Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp	(original)
+++ trunk/Scribus/scribus/scribusapp.cpp	Mon Jul  1 19:04:12 2019
@@ -115,7 +115,6 @@
 {
 	delete m_ScCore;
 	delete m_scDLMgr;
-	PrefsManager::deleteInstance();
 	LocaleManager::deleteInstance();
 	LanguageManager::deleteInstance();
 }

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp	(original)
+++ trunk/Scribus/scribus/scribuscore.cpp	Mon Jul  1 19:04:12 2019
@@ -49,7 +49,8 @@
 //extern ScribusQApp* ScQApp;
 
 ScribusCore::ScribusCore() : defaultEngine(colorMgmtEngineFactory.createDefaultEngine()),
-							 m_iconManager(IconManager::instance())
+							m_iconManager(IconManager::instance()),
+							 m_prefsManager(PrefsManager::instance())
 {
 	m_ScribusInitialized = false;
 	m_currScMW = 0;
@@ -59,7 +60,6 @@
 
 	m_SplashScreen = nullptr;
 	m_undoManager = nullptr;
-	m_prefsManager = nullptr;
 
 	m_UseGUI = false;
 	m_HaveCMS = false;
@@ -141,13 +141,13 @@
 		{
 			if (!scribus->recoverFile(recoverFiles))
 			{
-				if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog)
+				if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog)
 					scribus->startUpDialog();
 			}
 		}
 		else
 		{
-			if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog && usingGUI())
+			if (PrefsManager::instance().appPrefs.uiPrefs.showStartupDialog && usingGUI())
 				scribus->startUpDialog();
 			else
 				scribus->setFocus();
@@ -171,29 +171,28 @@
 	// FIXME: Splash needs the prefs loaded by initDefaults() to know if it must force the image to grayscale
 	initSplash(showSplash);
 	LocaleManager::instance();
-	m_prefsManager = PrefsManager::instance();
-	m_prefsManager->setup();
+	m_prefsManager.setup();
 	//CB #4428 Get fonts before prefs are set to default
 	bool haveFonts = false;
 	haveFonts = ScCore->initFonts(showFontInfo);
 	if (!haveFonts)
 		return EXIT_FAILURE;
-	m_prefsManager->initDefaults();
-	m_prefsManager->initDefaultGUIFont(qApp->font());
-	m_prefsManager->initArrowStyles();
+	m_prefsManager.initDefaults();
+	m_prefsManager.initDefaultGUIFont(qApp->font());
+	m_prefsManager.initArrowStyles();
 	m_undoManager = UndoManager::instance();
 	fileWatcher = new FileWatcher(this);
 	pluginManager = new PluginManager();
 
 	setSplashStatus( tr("Initializing Keyboard Shortcuts") );
-	m_prefsManager->initDefaultActionKeys();
+	m_prefsManager.initDefaultActionKeys();
 	setSplashStatus( tr("Reading Preferences") );
-	m_prefsManager->ReadPrefs();
-	m_prefsManager->appPrefs.uiPrefs.showSplashOnStartup=showSplash;
-	if (!m_iconManager.setActiveFromPrefs(m_prefsManager->appPrefs.uiPrefs.iconSet))
+	m_prefsManager.ReadPrefs();
+	m_prefsManager.appPrefs.uiPrefs.showSplashOnStartup=showSplash;
+	if (!m_iconManager.setActiveFromPrefs(m_prefsManager.appPrefs.uiPrefs.iconSet))
 	{
 		//reset prefs name to chosen name based on version, when prefs is empty or not found
-		m_prefsManager->appPrefs.uiPrefs.iconSet=m_iconManager.activeSetBasename();
+		m_prefsManager.appPrefs.uiPrefs.iconSet=m_iconManager.activeSetBasename();
 	}
 
 	m_HaveGS = testGSAvailability();
@@ -209,10 +208,10 @@
 
 	setSplashStatus( tr("Initializing Image Cache") );
 	ScImageCacheManager & icm = ScImageCacheManager::instance();
-	icm.setEnabled(m_prefsManager->appPrefs.imageCachePrefs.cacheEnabled);
-	icm.setMaxCacheSizeMiB(m_prefsManager->appPrefs.imageCachePrefs.maxCacheSizeMiB);
-	icm.setMaxCacheEntries(m_prefsManager->appPrefs.imageCachePrefs.maxCacheEntries);
-	icm.setCompressionLevel(m_prefsManager->appPrefs.imageCachePrefs.compressionLevel);
+	icm.setEnabled(m_prefsManager.appPrefs.imageCachePrefs.cacheEnabled);
+	icm.setMaxCacheSizeMiB(m_prefsManager.appPrefs.imageCachePrefs.maxCacheSizeMiB);
+	icm.setMaxCacheEntries(m_prefsManager.appPrefs.imageCachePrefs.maxCacheEntries);
+	icm.setCompressionLevel(m_prefsManager.appPrefs.imageCachePrefs.compressionLevel);
 	icm.initialize();
 	return 0;
 }
@@ -287,7 +286,7 @@
 bool ScribusCore::initFonts(bool showFontInfo)
 {
 	setSplashStatus( tr("Searching for Fonts") );
-	bool haveFonts=m_prefsManager->GetAllFonts(showFontInfo);
+	bool haveFonts=m_prefsManager.GetAllFonts(showFontInfo);
 	if (!haveFonts)
 	{
 		closeSplash();
@@ -311,7 +310,7 @@
 	InputProfilesCMYK.clear();
 	LabProfiles.clear();
 	profDirs = ScPaths::systemProfilesDirs();
-	profDirs.prepend( m_prefsManager->appPrefs.pathPrefs.colorProfiles );
+	profDirs.prepend( m_prefsManager.appPrefs.pathPrefs.colorProfiles );
 	profDirs.prepend( ScPaths::instance().shareDir()+"profiles/");
 	for (int i = 0; i < profDirs.count(); i++)
 	{
@@ -461,12 +460,12 @@
 		MonitorProfiles.insert(defaultRGBString, defaultRGBProfile.profilePath());
 
 	// Open monitor profile as defined by user preferences
-	QString displayProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+	QString displayProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 	if (MonitorProfiles.contains(displayProfile))
 		monitorProfile = defaultEngine.openProfileFromFile( MonitorProfiles[displayProfile] );
 	if (monitorProfile.isNull())
 	{
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = defaultRGBString;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = defaultRGBString;
 		monitorProfile = defaultRGBProfile;
 	}
 
@@ -519,7 +518,7 @@
 	QString defaultCMYKString1 = "ISO Coated v2 300% (basICColor)";
 	QString defaultCMYKString2 = "Fogra27L CMYK Coated Press";
 
-	QString defaultImageRGBProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
+	QString defaultImageRGBProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile;
 	if ((defaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(defaultImageRGBProfile)))
 	{
 		ip = InputProfiles.find(defaultRGBString1);
@@ -527,10 +526,10 @@
 			ip = InputProfiles.find(defaultRGBString2);
 		if (ip == InputProfiles.end())
 			ip = InputProfiles.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
-	}
-
-	QString defaultImageCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
+	}
+
+	QString defaultImageCMYKProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
 	if ((defaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultImageCMYKProfile)))
 	{
 		ip = InputProfilesCMYK.find(defaultCMYKString1);
@@ -538,10 +537,10 @@
 			ip = InputProfilesCMYK.find(defaultCMYKString2);
 		if (ip == InputProfilesCMYK.end())
 			ip = InputProfilesCMYK.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
-	}
-
-	QString defaultSolidColorRGBProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
+	}
+
+	QString defaultSolidColorRGBProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 	if ((defaultSolidColorRGBProfile.isEmpty()) || (!InputProfiles.contains(defaultSolidColorRGBProfile)))
 	{
 		ip = InputProfiles.find(defaultRGBString1);
@@ -549,10 +548,10 @@
 			ip = InputProfiles.find(defaultRGBString2);
 		if (ip == InputProfiles.end())
 			ip = InputProfiles.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile = ip.key();
-	}
-
-	QString defaultSolidColorCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile = ip.key();
+	}
+
+	QString defaultSolidColorCMYKProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
 	if ((defaultSolidColorCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultSolidColorCMYKProfile)))
 	{
 		ip = InputProfilesCMYK.find(defaultCMYKString1);
@@ -560,10 +559,10 @@
 			ip = InputProfilesCMYK.find(defaultCMYKString2);
 		if (ip == InputProfilesCMYK.end())
 			ip = InputProfilesCMYK.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile = ip.key();
-	}
-
-	QString defaultMonitorProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile = ip.key();
+	}
+
+	QString defaultMonitorProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
 	if ((defaultMonitorProfile.isEmpty()) || (!MonitorProfiles.contains(defaultMonitorProfile)))
 	{
 		ip = MonitorProfiles.find(defaultRGBString1);
@@ -571,10 +570,10 @@
 			ip = MonitorProfiles.find(defaultRGBString2);
 		if (ip == MonitorProfiles.end())
 			ip = MonitorProfiles.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = ip.key();
-	}
-
-	QString defaultPrinterProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = ip.key();
+	}
+
+	QString defaultPrinterProfile = m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile;
 	if ((defaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(defaultPrinterProfile)))
 	{
 		ip = PrinterProfiles.find(defaultCMYKString1);
@@ -582,7 +581,7 @@
 			ip = PrinterProfiles.find(defaultCMYKString2);
 		if (ip == PrinterProfiles.end())
 			ip = PrinterProfiles.begin();
-		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile = ip.key();
+		m_prefsManager.appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile = ip.key();
 	}
 
 	InitDefaultColorTransforms();

Modified: trunk/Scribus/scribus/scribuscore.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribuscore.h
==============================================================================
--- trunk/Scribus/scribus/scribuscore.h	(original)
+++ trunk/Scribus/scribus/scribuscore.h	Mon Jul  1 19:04:12 2019
@@ -134,7 +134,7 @@
 	ScSplashScreen *m_SplashScreen;
 	IconManager& m_iconManager;
 	UndoManager *m_undoManager;
-	PrefsManager *m_prefsManager;
+	PrefsManager& m_prefsManager;
 	bool m_ScribusInitialized;
 	bool m_UseGUI;
 	QList<QString> m_Files;

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Mon Jul  1 19:04:12 2019
@@ -202,8 +202,8 @@
 
 
 ScribusDoc::ScribusDoc() : UndoObject( tr("Document")), Observable<ScribusDoc>(nullptr),
-	m_appPrefsData(PrefsManager::instance()->appPrefs),
-	m_docPrefsData(PrefsManager::instance()->appPrefs),
+	m_appPrefsData(PrefsManager::instance().appPrefs),
+	m_docPrefsData(PrefsManager::instance().appPrefs),
 	m_undoManager(UndoManager::instance()),
 	m_automaticTextFrames(false),
 	m_guardedObject(this),
@@ -240,8 +240,8 @@
 
 
 ScribusDoc::ScribusDoc(const QString& docName, int unitindex, const PageSize& pagesize, const MarginStruct& margins, const DocPagesSetup& pagesSetup) : UndoObject( tr("Document")),
-	m_appPrefsData(PrefsManager::instance()->appPrefs),
-	m_docPrefsData(PrefsManager::instance()->appPrefs),
+	m_appPrefsData(PrefsManager::instance().appPrefs),
+	m_docPrefsData(PrefsManager::instance().appPrefs),
 	m_undoManager(UndoManager::instance()),
 	m_docUnitRatio(unitGetRatioFromIndex(m_appPrefsData.docSetupPrefs.docUnitIndex)),
 	m_automaticTextFrames(pagesSetup.autoTextFrames),
@@ -296,8 +296,8 @@
 	m_itemsChanged.connectObserver(m_docUpdater);
 	m_pagesChanged.connectObserver(m_docUpdater);
 
-	PrefsManager *prefsManager = PrefsManager::instance();
-	m_docPrefsData.colorPrefs.DCMSset = prefsManager->appPrefs.colorPrefs.DCMSset;
+	PrefsManager& prefsManager = PrefsManager::instance();
+	m_docPrefsData.colorPrefs.DCMSset = prefsManager.appPrefs.colorPrefs.DCMSset;
 	m_docPrefsData.pdfPrefs.SolidProf = m_docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 	m_docPrefsData.pdfPrefs.ImageProf = m_docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
 	m_docPrefsData.pdfPrefs.PrintProf = m_docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
@@ -393,7 +393,7 @@
 	cstyle.setScaleH(1000);
 	cstyle.setScaleV(1000);
 	cstyle.setTracking(0);
-	cstyle.setLanguage(PrefsManager::instance()->appPrefs.docSetupPrefs.language);
+	cstyle.setLanguage(PrefsManager::instance().appPrefs.docSetupPrefs.language);
 	
 	m_docParagraphStyles.create(pstyle);
 	m_docParagraphStyles.makeDefault( &(m_docParagraphStyles[0]) );
@@ -709,9 +709,9 @@
 	}
 
 	appMode = modeNormal;
-	PrefsManager *prefsManager=PrefsManager::instance();
-
-	m_docPrefsData.colorPrefs.DCMSset = prefsManager->appPrefs.colorPrefs.DCMSset;
+	PrefsManager& prefsManager=PrefsManager::instance();
+
+	m_docPrefsData.colorPrefs.DCMSset = prefsManager.appPrefs.colorPrefs.DCMSset;
 	m_docPrefsData.pdfPrefs.SolidProf = m_docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
 	m_docPrefsData.pdfPrefs.ImageProf = m_docPrefsData.colorPrefs.DCMSset.DefaultImageRGBProfile;
 	m_docPrefsData.pdfPrefs.PrintProf = m_docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
@@ -4215,9 +4215,9 @@
 			UsedFonts.erase(itfo);
 		}
 	}
-	PrefsManager* prefsManager=PrefsManager::instance();
-	AddFont(prefsManager->appPrefs.itemToolPrefs.textFont);//, prefsManager->appPrefs.AvailFonts[prefsManager->appPrefs.itemToolPrefs.textFont]->Font);
-	AddFont(m_docPrefsData.itemToolPrefs.textFont);//, prefsManager->appPrefs.AvailFonts[itemToolPrefs.textFont]->Font);
+	PrefsManager& prefsManager=PrefsManager::instance();
+	AddFont(prefsManager.appPrefs.itemToolPrefs.textFont);//, prefsManager.appPrefs.AvailFonts[prefsManager.appPrefs.itemToolPrefs.textFont]->Font);
+	AddFont(m_docPrefsData.itemToolPrefs.textFont);//, prefsManager.appPrefs.AvailFonts[itemToolPrefs.textFont]->Font);
 	return Really;
 }
 
@@ -5428,7 +5428,7 @@
 			{
 				if (QFile::exists(iafData.source))
 				{
-					PrefsManager::instance()->prefsFile->getContext("dirs")->set("images", iafData.source.left(iafData.source.lastIndexOf("/")));
+					PrefsManager::instance().prefsFile->getContext("dirs")->set("images", iafData.source.left(iafData.source.lastIndexOf("/")));
 					currItem->EmProfile = "";
 					currItem->pixm.imgInfo.isRequest = false;
 					currItem->UseEmbedded = true;

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Mon Jul  1 19:04:12 2019
@@ -139,7 +139,7 @@
 	QScrollArea(win),
 	Doc(doc),
 	m_canvas(new Canvas(doc, this)),
-	Prefs(&(PrefsManager::instance()->appPrefs)),
+	Prefs(&(PrefsManager::instance().appPrefs)),
 	undoManager(UndoManager::instance()),
 	m_ScMW(mw),
 	OldScale(0),
@@ -162,7 +162,7 @@
 {
 	setObjectName("s");
 	QPalette p=palette();
-	p.setBrush(QPalette::Window, PrefsManager::instance()->appPrefs.displayPrefs.scratchColor);
+	p.setBrush(QPalette::Window, PrefsManager::instance().appPrefs.displayPrefs.scratchColor);
 	setPalette(p);
 	setAttribute(Qt::WA_StaticContents);
 	setAttribute(Qt::WA_InputMethodEnabled, true);
@@ -407,7 +407,7 @@
 		m_canvasMode->deactivate(false);
 		m_canvasMode = m_canvasMode->delegate();
 		m_canvasMode->activate(true);
-		if (PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
+		if (PrefsManager::instance().appPrefs.uiPrefs.stickyTools)
 		{
 			m_canvas->setForcedRedraw(true);
 			//			Doc->m_Selection->clear();

Modified: trunk/Scribus/scribus/styles/charstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/styles/charstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/styles/charstyle.cpp	(original)
+++ trunk/Scribus/scribus/styles/charstyle.cpp	Mon Jul  1 19:04:12 2019
@@ -500,7 +500,7 @@
 ScFace parse<ScFace>(const Xml_string& str)
 {
 	// FIXME: enable font substitution here
-	return PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[str];
+	return PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[str];
 }
 
 

Modified: trunk/Scribus/scribus/text/screenpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/text/screenpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/text/screenpainter.cpp	(original)
+++ trunk/Scribus/scribus/text/screenpainter.cpp	Mon Jul  1 19:04:12 2019
@@ -193,8 +193,8 @@
 		m_painter->setupPolygon(&outline, true);
 		QColor oldBrush = m_painter->brush();
 		m_painter->setBrush(gc.hasFlag(ScLayout_SuppressSpace) ? Qt::green
-															   : PrefsManager::instance()->appPrefs.displayPrefs.controlCharColor);
-		m_painter->setBrush(PrefsManager::instance()->appPrefs.displayPrefs.controlCharColor);
+															   : PrefsManager::instance().appPrefs.displayPrefs.controlCharColor);
+		m_painter->setBrush(PrefsManager::instance().appPrefs.displayPrefs.controlCharColor);
 		if (stroke)
 		{
 			QColor tmp = m_painter->pen();
@@ -335,7 +335,7 @@
 	if (m_item->m_Doc->guidesPrefs().framesShown)
 	{
 		int fm = m_painter->fillMode();
-		m_painter->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, 0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+		m_painter->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, 0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
 		m_painter->setFillMode(ScPainter::None);
 		QRectF bBox = embedded->getVisualBoundingRect();
 		m_painter->drawSharpRect(0, 0, bBox.width(), bBox.height());

Modified: trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp	(original)
+++ trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp	Mon Jul  1 19:04:12 2019
@@ -203,26 +203,26 @@
 		m_item->itemText.removeChars(posC, 1);
 		if (fam.isEmpty())
 			return;
-		QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
+		QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[fam];
 		if (m_isItalic)
 		{
 			if (m_isBold)
 			{
 				if (slist.contains("Bold Italic"))
-					m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+					m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 			}
 			else if (slist.contains("Italic"))
-				m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+				m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 		}
 		else
 		{
 			if (m_isBold)
 			{
 				if (slist.contains("Bold"))
-					m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+					m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 			}
 			else if (slist.contains("Regular"))
-				m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+				m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 		}
 	}
 
@@ -237,26 +237,26 @@
 		m_item->itemText.removeChars(posC, 1);
 		if (fam.isEmpty())
 			return;
-		QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
+		QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[fam];
 		if (m_isBold)
 		{
 			if (m_isItalic)
 			{
 				if (slist.contains("Bold Italic"))
-					m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+					m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 			}
 			else if (slist.contains("Bold"))
-				m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+				m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 		}
 		else
 		{
 			if (m_isItalic)
 			{
 				if (slist.contains("Italic"))
-					m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+					m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 			}
 			else if (slist.contains("Regular"))
-				m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+				m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 		}
 	}
 
@@ -394,7 +394,7 @@
 	{
 		if (m_fontTableReal.contains(fontIndex))
 		{
-			m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[m_fontTableReal[fontIndex].fontName()]);
+			m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[m_fontTableReal[fontIndex].fontName()]);
 			if (m_fontTableReal[fontIndex].encoding() > 0)
 				setEncoding(m_fontTableReal[fontIndex].encoding());
 		}
@@ -404,7 +404,7 @@
 			{
 				FontTableEntry fontTableEntry = m_fontTable[fontIndex];
 				QString fontName = getFontName(fontTableEntry.fontName());
-				m_textCharStyle.top().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fontName]);
+				m_textCharStyle.top().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fontName]);
 				fontTableEntry.setFontName(fontName);
 				m_fontTableReal.insert(fontIndex, fontTableEntry);
 				if (fontTableEntry.encoding() > 0)
@@ -447,7 +447,7 @@
 			{
 				FontTableEntry fontTableEntry = m_fontTable[fontInd];
 				QString fontName = getFontName(fontTableEntry.fontName());
-				pStyle.charStyle().setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fontName]);
+				pStyle.charStyle().setFont(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[fontName]);
 				fontTableEntry.setFontName(fontName);
 				m_fontTableReal.insert(fontInd, fontTableEntry);
 			}
@@ -687,7 +687,7 @@
 					const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 					if (fmt)
 					{
-						fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+						fmt->setupTargets(m_Doc, 0, 0, 0, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 						fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 						if (m_Doc->m_Selection->count() > 0)
 						{
@@ -725,7 +725,7 @@
 	QString SlaDocumentRtfOutput::getFontName(const QString& name)
 	{
 		QString fontName(name);
-		SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
+		SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
 		for ( ; it.hasNext(); it.next())
 		{
 			if (it.current().family().toLower() == fontName.toLower())
@@ -736,7 +736,7 @@
 				}
 				else
 				{
-					QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
+					QStringList slist = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.fontMap[it.current().family()];
 					slist.sort();
 					if (slist.count() > 0)
 					{
@@ -750,17 +750,17 @@
 				}
 			}
 		}
-		if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
+		if (!PrefsManager::instance().appPrefs.fontPrefs.GFontSub.contains(fontName))
 		{
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 			MissingFont dia(0, fontName, m_Doc);
 			dia.exec();
 			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-			PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia.getReplacementFont();
+			PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName] = dia.getReplacementFont();
 			fontName = dia.getReplacementFont();
 		}
 		else
-			fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+			fontName = PrefsManager::instance().appPrefs.fontPrefs.GFontSub[fontName];
 		return fontName;
 	}
 

Modified: trunk/Scribus/scribus/ui/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/annot.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annot.cpp	(original)
+++ trunk/Scribus/scribus/ui/annot.cpp	Mon Jul  1 19:04:12 2019
@@ -70,7 +70,7 @@
 	view = vie;
 	MaxSeite = Seite;
 	QStringList tl;
-	dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 
 	Annotation& annotation = m_annotation;
 	if ((annotation.ActionType() == Annotation::Action_GoTo) || (annotation.ActionType() == Annotation::Action_GoToR_FileRel) || (annotation.ActionType() == Annotation::Action_GoToR_FileAbs))

Modified: trunk/Scribus/scribus/ui/annota.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/annota.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annota.cpp	(original)
+++ trunk/Scribus/scribus/ui/annota.cpp	Mon Jul  1 19:04:12 2019
@@ -435,7 +435,7 @@
 void Annota::GetFile()
 {
 	QString fn;
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("annot_getfile", ".");
 	CustomFDialog dia(this, wdir, tr("Open"), tr("%1;;All Files (*)").arg(FormatsManager::instance()->extensionsForFormat(FormatsManager::PDF)));
 	if (!Destfile->text().isEmpty())

Modified: trunk/Scribus/scribus/ui/charselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/charselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/charselect.cpp	Mon Jul  1 19:04:12 2019
@@ -34,7 +34,7 @@
 	uniSaveButton->setIcon(IconManager::instance().loadIcon("16/document-save.png"));
 	uniClearButton->setIcon(IconManager::instance().loadIcon("16/document-new.png"));
 
-	m_userTableModel = new CharTableModel(this, 6, m_doc, PrefsManager::instance()->appPrefs.itemToolPrefs.textFont);
+	m_userTableModel = new CharTableModel(this, 6, m_doc, PrefsManager::instance().appPrefs.itemToolPrefs.textFont);
 	loadUserContent(ScPaths::applicationDataDir() + "charpalette.ucp");
 
 	m_unicodeSearchModel = new UnicodeSearchModel(this);

Modified: trunk/Scribus/scribus/ui/charselectenhanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/charselectenhanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.cpp	Mon Jul  1 19:04:12 2019
@@ -23,7 +23,7 @@
 	setupUi(this);
 
 	m_charTableModel = new CharTableModel(this, 26, m_doc);//,
-//                                           PrefsManager::instance()->appPrefs.toolSettings.defFont);
+//                                           PrefsManager::instance().appPrefs.toolSettings.defFont);
 	m_charTable->setModel(m_charTableModel);
 	m_charTable->setDragEnabled(true);
 

Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp	(original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp	Mon Jul  1 19:04:12 2019
@@ -45,8 +45,8 @@
 	minResDPI(0),
 	maxResDPI(0)
 {
-	showPagesWithoutErrors=PrefsManager::instance()->appPrefs.verifierPrefs.showPagesWithoutErrors;
-	showNonPrintingLayerErrors=PrefsManager::instance()->appPrefs.verifierPrefs.showNonPrintingLayerErrors;
+	showPagesWithoutErrors=PrefsManager::instance().appPrefs.verifierPrefs.showPagesWithoutErrors;
+	showNonPrintingLayerErrors=PrefsManager::instance().appPrefs.verifierPrefs.showNonPrintingLayerErrors;
 
 	graveError = IconManager::instance().loadPixmap("22/dialog-error.png");
 	onlyWarning = IconManager::instance().loadPixmap("22/dialog-warning.png");
@@ -249,8 +249,8 @@
 
 void CheckDocument::doReScan()
 {
-	showPagesWithoutErrors=PrefsManager::instance()->appPrefs.verifierPrefs.showPagesWithoutErrors;
-	showNonPrintingLayerErrors=PrefsManager::instance()->appPrefs.verifierPrefs.showNonPrintingLayerErrors;
+	showPagesWithoutErrors=PrefsManager::instance().appPrefs.verifierPrefs.showPagesWithoutErrors;
+	showNonPrintingLayerErrors=PrefsManager::instance().appPrefs.verifierPrefs.showNonPrintingLayerErrors;
 	newScan(curCheckProfile->currentText());
 }
 

Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp	Mon Jul  1 19:04:12 2019
@@ -1033,7 +1033,7 @@
 		formats += tr("Gimp Gradient Files \"*.ggr\" (*.ggr *.GGR);;");
 		formats += tr("All Files (*)");
 		allFormats += formats;
-		PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+		PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 		QString wdir = dirs->get("gradients", ".");
 		CustomFDialog dia(this, wdir, tr("Open"), allFormats, fdHidePreviewCheckBox | fdExistingFiles | fdDisableOk);
 		if (dia.exec() == QDialog::Accepted)
@@ -1042,7 +1042,7 @@
 			return;
 		if (!fileName.isEmpty())
 		{
-			PrefsManager::instance()->prefsFile->getContext("dirs")->set("gradients", fileName.left(fileName.lastIndexOf("/")));
+			PrefsManager::instance().prefsFile->getContext("dirs")->set("gradients", fileName.left(fileName.lastIndexOf("/")));
 			QFileInfo fi(fileName);
 			QString ext = fi.suffix().toLower();
 			if (ext == "sgr")
@@ -1066,7 +1066,7 @@
 		QString extra = allFormatsV.join(" *.");
 		extra.prepend(" *.");
 		QString fileName;
-		PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+		PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 		QString wdir = dirs->get("colors", ".");
 		QString docexts("*.sla *.sla.gz *.scd *.scd.gz");
 		QString aiepsext(FormatsManager::instance()->extensionListForFormat(FormatsManager::EPS|FormatsManager::PS|FormatsManager::AI, 0));
@@ -1186,7 +1186,7 @@
 		imgFormats.append("ps");
 		qSort(formats);
 		allFormats += formats.join(";;");
-		PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+		PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 		QString wdir = dirs->get("patterns", ".");
 		CustomFDialog dia(this, wdir, tr("Open"), allFormats, fdHidePreviewCheckBox | fdExistingFiles | fdDisableOk);
 		if (dia.exec() != QDialog::Accepted)
@@ -1195,7 +1195,7 @@
 		if (fileName.isEmpty())
 			return;
 		qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
-		PrefsManager::instance()->prefsFile->getContext("dirs")->set("patterns", fileName.left(fileName.lastIndexOf("/")));
+		PrefsManager::instance().prefsFile->getContext("dirs")->set("patterns", fileName.left(fileName.lastIndexOf("/")));
 		QFileInfo fi(fileName);
 		if ((fi.suffix().toLower() == "sce") || (!imgFormats.contains(fi.suffix().toLower())))
 		{
@@ -1223,7 +1223,7 @@
 
 void ColorsAndFillsDialog::loadPatternDir()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("patterndir", ".");
 	QString fileName = QFileDialog::getExistingDirectory(this, tr("Choose a Directory"), wdir);
 	if (!fileName.isEmpty())
@@ -1325,7 +1325,7 @@
 	if (fi.suffix().toLower() == "sce")
 	{
 		ScriXmlDoc ss;
-		ss.readElem(data, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, m_doc, m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset(), true, true, PrefsManager::instance()->appPrefs.fontPrefs.GFontSub);
+		ss.readElem(data, PrefsManager::instance().appPrefs.fontPrefs.AvailFonts, m_doc, m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset(), true, true, PrefsManager::instance().appPrefs.fontPrefs.GFontSub);
 	}
 	else
 	{
@@ -1337,7 +1337,7 @@
 			const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 			if (fmt)
 			{
-				fmt->setupTargets(m_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+				fmt->setupTargets(m_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 				fmt->loadFile(data, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted|LoadSavePlugin::lfKeepPatterns|LoadSavePlugin::lfLoadAsPattern);
 			}
 		}
@@ -1965,7 +1965,7 @@
 		s_doc->PageColors = m_colorList;
 		s_doc->setGradients(dialogGradients);
 		s_doc->setPatterns(dialogPatterns);
-		fmt->setupTargets(s_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+		fmt->setupTargets(s_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 		fmt->savePalette(filename);
 		delete s_doc;
 	}

Modified: trunk/Scribus/scribus/ui/cupsoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/cupsoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cupsoptions.cpp	(original)
+++ trunk/Scribus/scribus/ui/cupsoptions.cpp	Mon Jul  1 19:04:12 2019
@@ -54,7 +54,7 @@
 	setModal(true);
 	setWindowTitle( tr( "Printer Options" ) );
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
-	prefs = PrefsManager::instance()->prefsFile->getContext("cups_options");
+	prefs = PrefsManager::instance().prefsFile->getContext("cups_options");
 	setSizeGripEnabled(true);
 	CupsOptionsLayout = new QVBoxLayout( this );
 	CupsOptionsLayout->setSpacing( 5 );

Modified: trunk/Scribus/scribus/ui/curvewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/curvewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/curvewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/curvewidget.cpp	Mon Jul  1 19:04:12 2019
@@ -406,7 +406,7 @@
 void CurveWidget::doLoad()
 {
 	QString fileName;
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("curves", ".");
 	CustomFDialog dia(this, wdir, tr("Open"), tr("Curve Files (*.scu *.SCU);;All Files (*)"), fdHidePreviewCheckBox | fdExistingFiles);
 	if (dia.exec() == QDialog::Accepted)
@@ -445,7 +445,7 @@
 void CurveWidget::doSave()
 {
 	QString fileName;
-	QString wdir = PrefsManager::instance()->prefsFile->getContext("dirs")->get("curves", ".");
+	QString wdir = PrefsManager::instance().prefsFile->getContext("dirs")->get("curves", ".");
 	CustomFDialog dia(this, wdir, tr("Save as"), tr("Curve Files (*.scu *.SCU);;All Files (*)"), fdHidePreviewCheckBox | fdNone);
 	if (dia.exec() == QDialog::Accepted)
 		fileName = dia.selectedFile();
@@ -455,7 +455,7 @@
 	{
 		if (!fileName.endsWith(".scu"))
 			fileName += ".scu";
-		PrefsManager::instance()->prefsFile->getContext("dirs")->set("curves", fileName.left(fileName.lastIndexOf("/")));
+		PrefsManager::instance().prefsFile->getContext("dirs")->set("curves", fileName.left(fileName.lastIndexOf("/")));
 		if (overwrite(this, fileName))
 		{
 			QString efval = "";

Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -209,9 +209,9 @@
 		if (im.isNull())
 			return;
 		QString desc = tr("Size:")+" ";
-		desc += value2String(im.text("XSize").toDouble(), PrefsManager::instance()->appPrefs.docSetupPrefs.docUnitIndex, true, true);
+		desc += value2String(im.text("XSize").toDouble(), PrefsManager::instance().appPrefs.docSetupPrefs.docUnitIndex, true, true);
 		desc += " x ";
-		desc += value2String(im.text("YSize").toDouble(), PrefsManager::instance()->appPrefs.docSetupPrefs.docUnitIndex, true, true);
+		desc += value2String(im.text("YSize").toDouble(), PrefsManager::instance().appPrefs.docSetupPrefs.docUnitIndex, true, true);
 		im = im.scaled(w - 5, h - 21, Qt::KeepAspectRatio, Qt::SmoothTransformation);
 		QPainter p;
 		QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill.png"));

Modified: trunk/Scribus/scribus/ui/dcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/dcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/dcolor.cpp	Mon Jul  1 19:04:12 2019
@@ -38,8 +38,8 @@
 	colorToDelLabel = new QLabel( colorName, this );
 	delColorLayout->addWidget( colorToDelLabel, 0, 1 );
 
-	PrefsManager* prefsManager = PrefsManager::instance();
-	bool isToolColor = prefsManager->isToolColor(colorName);
+	PrefsManager& prefsManager = PrefsManager::instance();
+	bool isToolColor = prefsManager.isToolColor(colorName);
 	replaceLabel = nullptr;
 	replacementColData = nullptr;
 	if (haveDoc || isToolColor)

Modified: trunk/Scribus/scribus/ui/editor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/editor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/editor.cpp	(original)
+++ trunk/Scribus/scribus/ui/editor.cpp	Mon Jul  1 19:04:12 2019
@@ -35,7 +35,7 @@
 	IconManager& im=IconManager::instance();
 	setWindowIcon(im.loadIcon("AppIcon.png"));
 	view = vie;
-	dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	EditorLayout = new QVBoxLayout(this);
 	EditTex = new QTextEdit(this);
 	newAct = new QAction(im.loadIcon("16/document-new.png"), tr("&New"), this);

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Mon Jul  1 19:04:12 2019
@@ -44,9 +44,9 @@
 
 extern ScribusQApp* ScQApp;
 
-FontCombo::FontCombo(QWidget* pa) : QComboBox(pa)
-{
-	prefsManager = PrefsManager::instance();
+FontCombo::FontCombo(QWidget* pa) : QComboBox(pa),
+									prefsManager(PrefsManager::instance())
+{
 	ttfFont = IconManager::instance().loadPixmap("font_truetype16.png");
 	otfFont = IconManager::instance().loadPixmap("font_otf16.png");
 	psFont = IconManager::instance().loadPixmap("font_type1_16.png");
@@ -63,7 +63,7 @@
 	clear();
 	QMap<QString, QString> rlist;
 	rlist.clear();
-	SCFontsIterator it(prefsManager->appPrefs.fontPrefs.AvailFonts);
+	SCFontsIterator it(prefsManager.appPrefs.fontPrefs.AvailFonts);
 	for ( ; it.hasNext(); it.next())
 	{
 		if (it.current().usable())
@@ -79,7 +79,7 @@
 	}
 	for (QMap<QString,QString>::Iterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
 	{
-		ScFace fon = prefsManager->appPrefs.fontPrefs.AvailFonts[it2.value()];
+		ScFace fon = prefsManager.appPrefs.fontPrefs.AvailFonts[it2.value()];
 		if (! fon.usable() )
 			continue;
 		ScFace::FontType type = fon.type();
@@ -106,10 +106,10 @@
 		QWidget(parent),
 		fontFaceLabel(nullptr),
 		fontStyleLabel(nullptr),
-		showLabels(labels)
+		showLabels(labels),
+		prefsManager(PrefsManager::instance())
 {
 	currDoc = nullptr;
-	prefsManager = PrefsManager::instance();
 	ttfFont = IconManager::instance().loadPixmap("font_truetype16.png");
 	otfFont = IconManager::instance().loadPixmap("font_otf16.png");
 	psFont = IconManager::instance().loadPixmap("font_type1_16.png");
@@ -167,11 +167,11 @@
 	QString curr = fontStyle->currentText();
 	fontStyle->clear();
 	QString fntFamily = fontFamily->itemText(id);
-	QStringList slist, styleList = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[fntFamily];
+	QStringList slist, styleList = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[fntFamily];
 	for (QStringList::ConstIterator it = styleList.begin(); it != styleList.end(); ++it)
 	{
-		SCFonts::ConstIterator fIt = prefsManager->appPrefs.fontPrefs.AvailFonts.find(fntFamily + " " + *it);
-		if (fIt != prefsManager->appPrefs.fontPrefs.AvailFonts.end())
+		SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(fntFamily + " " + *it);
+		if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
 		{
 			if (!fIt->usable() || fIt->isReplacement())
 				continue;
@@ -204,8 +204,8 @@
 
 void FontComboH::setCurrentFont(const QString& f)
 {
-	QString family = prefsManager->appPrefs.fontPrefs.AvailFonts[f].family();
-	QString style = prefsManager->appPrefs.fontPrefs.AvailFonts[f].style();
+	QString family = prefsManager.appPrefs.fontPrefs.AvailFonts[f].family();
+	QString style = prefsManager.appPrefs.fontPrefs.AvailFonts[f].style();
 	// If we already have the correct font+style, nothing to do
 	if ((fontFamily->currentText() == family) && (fontStyle->currentText() == style))
 		return;
@@ -213,15 +213,15 @@
 	bool styleSigBlocked = fontStyle->blockSignals(true);
 	setCurrentComboItem(fontFamily, family);
 	fontStyle->clear();
-	QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
+	QStringList slist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[family];
 	slist.sort();
 	QStringList ilist;
 	if (currDoc != nullptr)
 	{
 		for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
 		{
-			SCFonts::ConstIterator fIt = prefsManager->appPrefs.fontPrefs.AvailFonts.find(family + " " + *it3);
-			if (fIt != prefsManager->appPrefs.fontPrefs.AvailFonts.end())
+			SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it3);
+			if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
 			{
 				if (!fIt->usable() || fIt->isReplacement())
 					continue;
@@ -250,20 +250,20 @@
 	bool styleSigBlocked = fontStyle->blockSignals(true);
 	fontFamily->clear();
 	fontStyle->clear();
-	QStringList rlist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap.keys();
+	QStringList rlist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.keys();
 	QMap<QString, ScFace::FontType> flist;
 	flist.clear();
 	for (QStringList::ConstIterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
 	{
 		if (currentDoc != nullptr)
 		{
-			QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[*it2];
+			QStringList slist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[*it2];
 			slist.sort();
 			for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
 			{
-				if ( prefsManager->appPrefs.fontPrefs.AvailFonts.contains(*it2 + " " + *it3))
+				if ( prefsManager.appPrefs.fontPrefs.AvailFonts.contains(*it2 + " " + *it3))
 				{
-					const ScFace& fon(prefsManager->appPrefs.fontPrefs.AvailFonts[*it2 + " " + *it3]);
+					const ScFace& fon(prefsManager.appPrefs.fontPrefs.AvailFonts[*it2 + " " + *it3]);
 					ScFace::FontType type = fon.type();
 					if (!fon.usable() || fon.isReplacement() || !(currentDoc->documentFileName() == fon.localForDocument() || fon.localForDocument().isEmpty()))
 						continue;
@@ -278,13 +278,13 @@
 		}
 		else
 		{
-			QMap<QString, QStringList>::ConstIterator fmIt = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap.find(*it2);
-			if (fmIt == prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap.end())
+			QMap<QString, QStringList>::ConstIterator fmIt = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.find(*it2);
+			if (fmIt == prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.end())
 				continue;
 			if (fmIt->count() <= 0)
 				continue;
 			QString fullFontName = (*it2) + " " + fmIt->at(0);
-			ScFace fon = prefsManager->appPrefs.fontPrefs.AvailFonts[fullFontName];
+			ScFace fon = prefsManager.appPrefs.fontPrefs.AvailFonts[fullFontName];
 			if ( !fon.usable() || fon.isReplacement() )
 				continue;
 			ScFace::FontType type = fon.type();
@@ -310,15 +310,15 @@
 			fontFamily->addItem(ttfFont, it2a.key());
 	}
 	QString family = fontFamily->currentText();
-	QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
+	QStringList slist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[family];
 	slist.sort();
 	QStringList ilist;
 	if (currentDoc != nullptr)
 	{
 		for (QStringList::ConstIterator it = slist.begin(); it != slist.end(); ++it)
 		{
-			SCFonts::ConstIterator fIt = prefsManager->appPrefs.fontPrefs.AvailFonts.find(family + " " + *it);
-			if (fIt != prefsManager->appPrefs.fontPrefs.AvailFonts.end())
+			SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it);
+			if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
 			{
 				if (!fIt->usable() || fIt->isReplacement())
 					continue;
@@ -461,8 +461,7 @@
 const ScFace& getScFace(const QString& className, const QString& text)
 {
 	QFontDatabase& fontDb = ScQApp->qtFontDatabase();
-	PrefsManager* prefsManager = PrefsManager::instance();
-	SCFonts& availableFonts = prefsManager->appPrefs.fontPrefs.AvailFonts;
+	SCFonts& availableFonts = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts;
 
 	// Handle FontComboH class witch has only Family names in the combo class.
 	if (className == "FontComboH" || className == "SMFontComboH")
@@ -661,7 +660,6 @@
 FontComboValidator::FontComboValidator(QObject* parent)
 	: QValidator(parent)
 {
-	prefsManager = PrefsManager::instance();
 }
 
 QValidator::State FontComboValidator::validate(QString & input, int & pos) const

Modified: trunk/Scribus/scribus/ui/fontcombo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/fontcombo.h
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.h	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.h	Mon Jul  1 19:04:12 2019
@@ -56,7 +56,7 @@
 	void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
 
 private:
-	PrefsManager* prefsManager;
+	PrefsManager& prefsManager;
 	QPixmap ttfFont;
 	QPixmap otfFont;
 	QPixmap psFont;
@@ -92,7 +92,7 @@
 	QComboBox* fontStyle;
 	QLabel *fontFaceLabel;
 	QLabel *fontStyleLabel;
-	PrefsManager* prefsManager;
+	PrefsManager& prefsManager;
 	ScribusDoc *currDoc;
 	bool isForAnnotation, isForSubstitute;
 	QPixmap ttfFont;
@@ -135,8 +135,5 @@
 public:
 	FontComboValidator(QObject* parent = 0);
 	virtual State validate(QString & input, int & pos) const;
-
-protected:
-	PrefsManager* prefsManager;
 };
 #endif

Modified: trunk/Scribus/scribus/ui/gtdialogs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/gtdialogs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtdialogs.cpp	(original)
+++ trunk/Scribus/scribus/ui/gtdialogs.cpp	Mon Jul  1 19:04:12 2019
@@ -128,13 +128,13 @@
 	m_fileName = "";
 	m_encoding = "";
 	m_importer = -1;
-	m_prefs = PrefsManager::instance()->prefsFile->getContext("gtDialogs");
+	m_prefs = PrefsManager::instance().prefsFile->getContext("gtDialogs");
 }
 
 bool gtDialogs::runFileDialog(const QString& filters, const QStringList& importers)
 {
 	bool accepted = false;
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString dir = dirs->get("get_text", ".");
 	
 	m_fdia = new gtFileDialog(filters, importers, dir);

Modified: trunk/Scribus/scribus/ui/gtfiledialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/gtfiledialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtfiledialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/gtfiledialog.cpp	Mon Jul  1 19:04:12 2019
@@ -85,7 +85,7 @@
 
 void gtFileDialog::loadSettings()
 {
-	PrefsContext* context = PrefsManager::instance()->prefsFile->getContext("textimport_dialog");
+	PrefsContext* context = PrefsManager::instance().prefsFile->getContext("textimport_dialog");
 	if (context->contains("filter"))
 	{
 		QString filter = context->get("filter");
@@ -121,7 +121,7 @@
 
 void gtFileDialog::saveSettings()
 {
-	PrefsContext* context = PrefsManager::instance()->prefsFile->getContext("textimport_dialog");
+	PrefsContext* context = PrefsManager::instance().prefsFile->getContext("textimport_dialog");
 	context->set("filter"  , fileWidget->selectedNameFilter());
 	context->set("importer", importerCombo->currentText());
 	context->set("encoding", encodingCombo->currentText());

Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp	(original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp	Mon Jul  1 19:04:12 2019
@@ -256,7 +256,7 @@
 //	splitter->setStretchFactor(splitter->indexOf(tabWidget), 0);
 //	splitter->setStretchFactor(splitter->indexOf(textBrowser), 1);
 	// reset previous size
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("helpbrowser");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("helpbrowser");
 	int xsize = prefs->getUInt("xsize", 640);
 	int ysize = prefs->getUInt("ysize", 480);
 	resize(QSize(xsize, ysize).expandedTo(minimumSizeHint()) );

Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/hruler.cpp	Mon Jul  1 19:04:12 2019
@@ -35,7 +35,6 @@
 
 #include "canvasgesture_rulermove.h"
 #include "hruler.h"
-#include "prefsmanager.h"
 #include "scpage.h"
 
 #include "scribusdoc.h"
@@ -96,7 +95,6 @@
 	m_whereToDraw(0),
 	m_drawMark(false)
 {
-	prefsManager=PrefsManager::instance();
 	setBackgroundRole(QPalette::Window);
 	setAutoFillBackground(true);
 	QPalette palette;

Modified: trunk/Scribus/scribus/ui/hruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/hruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.h	(original)
+++ trunk/Scribus/scribus/ui/hruler.h	Mon Jul  1 19:04:12 2019
@@ -126,7 +126,6 @@
 	void MarkerMoved(double base, double xp);
 
 private:
-	PrefsManager *prefsManager;
 	RulerGesture* rulerGesture;
 };
 

Modified: trunk/Scribus/scribus/ui/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/insertaframe.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.cpp	(original)
+++ trunk/Scribus/scribus/ui/insertaframe.cpp	Mon Jul  1 19:04:12 2019
@@ -223,12 +223,12 @@
 {
 	QString formatD(FormatsManager::instance()->fileDialogFormatList(FormatsManager::IMAGESIMGFRAME));
 	QString docDir = ".";
-	PrefsManager* prefsManager=PrefsManager::instance();
-	QString prefsDocDir(prefsManager->documentDir());
+	PrefsManager& prefsManager=PrefsManager::instance();
+	QString prefsDocDir(prefsManager.documentDir());
 	if (!prefsDocDir.isEmpty())
-		docDir = prefsManager->prefsFile->getContext("dirs")->get("images", prefsDocDir);
+		docDir = prefsManager.prefsFile->getContext("dirs")->get("images", prefsDocDir);
 	else
-		docDir = prefsManager->prefsFile->getContext("dirs")->get("images", ".");
+		docDir = prefsManager.prefsFile->getContext("dirs")->get("images", ".");
 		
 	QString fileName("");
 	CustomFDialog dia(this, docDir, tr("Open"), formatD, fdShowPreview | fdExistingFiles | fdDisableOk);

Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp	Mon Jul  1 19:04:12 2019
@@ -46,7 +46,7 @@
 	//Fill application list
 	programComboBox->clear();
 
-	const QStringList configs = PrefsManager::instance()->latexConfigs();
+	const QStringList configs = PrefsManager::instance().latexConfigs();
 	for (const QString& config : configs)
 	{
 		QString name = LatexConfigCache::instance()->parser(config)->description();
@@ -131,7 +131,7 @@
 		return;
 	}
 	
-	QString full_command = PrefsManager::instance()->latexEditorExecutable();
+	QString full_command = PrefsManager::instance().latexEditorExecutable();
 	if (full_command.isEmpty())
 	{
 		ScMessageBox::information(nullptr, tr("Information"),
@@ -239,7 +239,7 @@
 	externalEditorPushButton->setText( tr("Run External Editor...") );
 	ScMessageBox::critical(nullptr, tr("Error"), "<qt>" +
 		tr("Running the editor \"%1\" failed!").
-		arg(PrefsManager::instance()->latexEditorExecutable()) +
+		arg(PrefsManager::instance().latexEditorExecutable()) +
 		"</qt>");
 }
 

Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp	(original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp	Mon Jul  1 19:04:12 2019
@@ -165,7 +165,7 @@
 
 	paraBox = new QSpinBox( this );
 	paraBox->setMinimum( 1 );
-	paraBox->setValue(PrefsManager::instance()->appPrefs.miscPrefs.paragraphsLI);
+	paraBox->setValue(PrefsManager::instance().appPrefs.miscPrefs.paragraphsLI);
 	layout2->addWidget( paraBox );
 
 	paraSpacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );

Modified: trunk/Scribus/scribus/ui/marksmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/marksmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marksmanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/marksmanager.cpp	Mon Jul  1 19:04:12 2019
@@ -19,7 +19,7 @@
 	QString pname(name);
 	if (pname.isEmpty())
 		pname = "marksManager";
-	m_prefs = PrefsManager::instance()->prefsFile->getContext(pname);
+	m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
 	setDoc(nullptr);
 	languageChange();
 	EditButton->setEnabled(false);

Modified: trunk/Scribus/scribus/ui/mergedoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/mergedoc.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mergedoc.cpp	(original)
+++ trunk/Scribus/scribus/ui/mergedoc.cpp	Mon Jul  1 19:04:12 2019
@@ -138,7 +138,7 @@
 	QString fn;
 	int dummy;
 	count = 0;
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("merge", ".");
 	CustomFDialog *dia = new CustomFDialog(this, wdir, tr("Open"), tr("Documents (*.sla *.sla.gz *.scd *.scd.gz);;All Files (*)"));
 	if (!fromDocData->text().isEmpty())

Modified: trunk/Scribus/scribus/ui/missing.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/missing.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/missing.cpp	(original)
+++ trunk/Scribus/scribus/ui/missing.cpp	Mon Jul  1 19:04:12 2019
@@ -40,7 +40,7 @@
 	useLabel = new QLabel( tr( "Use" ), this );
 	missingFontGridLayout->addWidget( useLabel, 1, 1 );
 	replaceFontCombo = new FontComboH(this);
-	replaceFontCombo->setCurrentFont(doc == nullptr ? PrefsManager::instance()->appPrefs.itemToolPrefs.textFont : doc->itemToolPrefs().textFont);
+	replaceFontCombo->setCurrentFont(doc == nullptr ? PrefsManager::instance().appPrefs.itemToolPrefs.textFont : doc->itemToolPrefs().textFont);
 	replacementFont = replaceFontCombo->currentFont();
 	missingFontGridLayout->addWidget( replaceFontCombo, 1, 2 );
 	insteadLabel = new QLabel( tr( "instead" ), this );

Modified: trunk/Scribus/scribus/ui/newfile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/newfile.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newfile.cpp	(original)
+++ trunk/Scribus/scribus/ui/newfile.cpp	Mon Jul  1 19:04:12 2019
@@ -90,17 +90,17 @@
 	return QSize(maxX, maxY);
 }
 
-NewDoc::NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp, const QString& lang) : QDialog( parent )
+NewDoc::NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp, const QString& lang) : QDialog( parent ),
+	prefsManager(PrefsManager::instance())
 {
 	setObjectName(QString::fromLocal8Bit("NewDocumentWindow"));
 	setModal(true);
-	prefsManager=PrefsManager::instance();
 	m_tabSelected = 0;
 	m_onStartup = startUp;
-	m_unitIndex = prefsManager->appPrefs.docSetupPrefs.docUnitIndex;
+	m_unitIndex = prefsManager.appPrefs.docSetupPrefs.docUnitIndex;
 	m_unitRatio = unitGetRatioFromIndex(m_unitIndex);
 	m_unitSuffix = unitGetSuffixFromIndex(m_unitIndex);
-	m_orientation = prefsManager->appPrefs.docSetupPrefs.pageOrientation;
+	m_orientation = prefsManager.appPrefs.docSetupPrefs.pageOrientation;
 	setWindowTitle( tr( "New Document" ) );
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	TabbedNewDocLayout = new QVBoxLayout( this );
@@ -131,7 +131,7 @@
 	if (startUp)
 	{
 		startUpDialog = new QCheckBox( tr( "Do not show this dialog again" ), this );
-		startUpDialog->setChecked(!prefsManager->appPrefs.uiPrefs.showStartupDialog);
+		startUpDialog->setChecked(!prefsManager.appPrefs.uiPrefs.showStartupDialog);
 		Layout1->addWidget( startUpDialog );
 	}
 	QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
@@ -187,10 +187,10 @@
 
 	layoutsView = new PageLayoutsWidget( pageSizeGroupBox );
 	layoutsView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
-	for (int pg = 0; pg < prefsManager->appPrefs.pageSets.count(); ++pg)
+	for (int pg = 0; pg < prefsManager.appPrefs.pageSets.count(); ++pg)
 	{
 		QListWidgetItem *ic;
-		QString psname=CommonStrings::translatePageSetString(prefsManager->appPrefs.pageSets[pg].Name);
+		QString psname=CommonStrings::translatePageSetString(prefsManager.appPrefs.pageSets[pg].Name);
 		if (pg == 0)
 		{
 			ic = new QListWidgetItem( IconManager::instance().loadIcon("32/page-simple.png"), psname, layoutsView );
@@ -201,12 +201,12 @@
 			ic = new QListWidgetItem( IconManager::instance().loadIcon("32/page-doublesided.png"), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 		}
-		else if (pg == 2 && prefsManager->appPrefs.docSetupPrefs.pagePositioning == 2)
+		else if (pg == 2 && prefsManager.appPrefs.docSetupPrefs.pagePositioning == 2)
 		{
 			ic = new QListWidgetItem( IconManager::instance().loadIcon("32/page-3fold.png"), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 		}
-		else if (pg == 3 && prefsManager->appPrefs.docSetupPrefs.pagePositioning == 3)
+		else if (pg == 3 && prefsManager.appPrefs.docSetupPrefs.pagePositioning == 3)
 		{
 			ic = new QListWidgetItem( IconManager::instance().loadIcon("32/page-4fold.png"), psname, layoutsView );
 			ic->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
@@ -219,7 +219,7 @@
 
 	TextLabel1 = new QLabel( tr( "&Size:" ), pageSizeGroupBox );
 	pageSizeGroupBoxLayout->addWidget( TextLabel1, 0, 1 );
-	PageSize ps(prefsManager->appPrefs.docSetupPrefs.pageSize);
+	PageSize ps(prefsManager.appPrefs.docSetupPrefs.pageSize);
 	pageSizeComboBox = new QComboBox( pageSizeGroupBox );
 	pageSizeComboBox->addItems(ps.activeSizeTRList());
 	pageSizeComboBox->addItem( CommonStrings::trCustomPageSize );
@@ -232,7 +232,7 @@
 	pageOrientationComboBox->addItem( tr( "Portrait" ) );
 	pageOrientationComboBox->addItem( tr( "Landscape" ) );
 	pageOrientationComboBox->setEditable(false);
-	pageOrientationComboBox->setCurrentIndex(prefsManager->appPrefs.docSetupPrefs.pageOrientation);
+	pageOrientationComboBox->setCurrentIndex(prefsManager.appPrefs.docSetupPrefs.pageOrientation);
 	TextLabel2->setBuddy(pageOrientationComboBox);
 	pageSizeGroupBoxLayout->addWidget( pageOrientationComboBox, 1, 2 );
 
@@ -258,12 +258,12 @@
 	pageSizeGroupBoxLayout->addWidget( unitOfMeasureLabel, 4, 1 );
 	pageSizeGroupBoxLayout->addWidget( unitOfMeasureComboBox, 4, 2 );
 
-	MarginStruct marg(prefsManager->appPrefs.docSetupPrefs.margins);
+	MarginStruct marg(prefsManager.appPrefs.docSetupPrefs.margins);
 	marginGroup = new MarginWidget(newDocFrame,  tr( "Margin Guides" ), &marg, m_unitIndex );
-	marginGroup->setPageWidthHeight(prefsManager->appPrefs.docSetupPrefs.pageWidth, prefsManager->appPrefs.docSetupPrefs.pageHeight);
-	marginGroup->setFacingPages(!(prefsManager->appPrefs.docSetupPrefs.pagePositioning == singlePage));
-	widthSpinBox->setValue(prefsManager->appPrefs.docSetupPrefs.pageWidth * m_unitRatio);
-	heightSpinBox->setValue(prefsManager->appPrefs.docSetupPrefs.pageHeight * m_unitRatio);
+	marginGroup->setPageWidthHeight(prefsManager.appPrefs.docSetupPrefs.pageWidth, prefsManager.appPrefs.docSetupPrefs.pageHeight);
+	marginGroup->setFacingPages(!(prefsManager.appPrefs.docSetupPrefs.pagePositioning == singlePage));
+	widthSpinBox->setValue(prefsManager.appPrefs.docSetupPrefs.pageWidth * m_unitRatio);
+	heightSpinBox->setValue(prefsManager.appPrefs.docSetupPrefs.pageHeight * m_unitRatio);
 	QStringList pageSizes=ps.activeSizeTRList();
 	int sizeIndex=pageSizes.indexOf(ps.nameTR());
 	if (sizeIndex!=-1)
@@ -271,8 +271,8 @@
 	else
 		pageSizeComboBox->setCurrentIndex(pageSizeComboBox->count()-1);
 	marginGroup->setPageSize(pageSizeComboBox->currentText());
-	marginGroup->setNewBleeds(prefsManager->appPrefs.docSetupPrefs.bleeds);
-	marginGroup->setMarginPreset(prefsManager->appPrefs.docSetupPrefs.marginPreset);
+	marginGroup->setNewBleeds(prefsManager.appPrefs.docSetupPrefs.bleeds);
+	marginGroup->setMarginPreset(prefsManager.appPrefs.docSetupPrefs.marginPreset);
 
 	optionsGroupBox = new QGroupBox( newDocFrame );
 	optionsGroupBox->setTitle( tr( "Options" ) );
@@ -294,13 +294,13 @@
 	layoutLabel1->setText( tr( "First Page is:" ) );
 	firstPage = new ScComboBox( optionsGroupBox );
 	firstPage->clear();
-	selectItem(prefsManager->appPrefs.docSetupPrefs.pagePositioning);
+	selectItem(prefsManager.appPrefs.docSetupPrefs.pagePositioning);
 	optionsGroupBoxLayout->addRow( layoutLabel1, firstPage );
-	firstPage->setCurrentIndex(prefsManager->appPrefs.pageSets[prefsManager->appPrefs.docSetupPrefs.pagePositioning].FirstPage);
-
-	setDocLayout(prefsManager->appPrefs.docSetupPrefs.pagePositioning);
-	setSize(prefsManager->appPrefs.docSetupPrefs.pageSize);
-	setOrientation(prefsManager->appPrefs.docSetupPrefs.pageOrientation);
+	firstPage->setCurrentIndex(prefsManager.appPrefs.pageSets[prefsManager.appPrefs.docSetupPrefs.pagePositioning].FirstPage);
+
+	setDocLayout(prefsManager.appPrefs.docSetupPrefs.pagePositioning);
+	setSize(prefsManager.appPrefs.docSetupPrefs.pageSize);
+	setOrientation(prefsManager.appPrefs.docSetupPrefs.pageOrientation);
 
 	autoTextFrame = new QCheckBox( optionsGroupBox );
 	autoTextFrame->setText( tr( "&Automatic Text Frames" ) );
@@ -348,9 +348,9 @@
 
 void NewDoc::createOpenDocPage()
 {
-	PrefsContext* docContext = prefsManager->prefsFile->getContext("docdirs", false);
+	PrefsContext* docContext = prefsManager.prefsFile->getContext("docdirs", false);
 	QString docDir = ".";
-	QString prefsDocDir=prefsManager->documentDir();
+	QString prefsDocDir=prefsManager.documentDir();
 	if (!prefsDocDir.isEmpty())
 		docDir = docContext->get("docsopen", prefsDocDir);
 	else
@@ -408,7 +408,7 @@
 	recentDocLayout->setSpacing(5);
 	recentDocListBox = new QListWidget(recentDocFrame);
 	recentDocLayout->addWidget(recentDocListBox);
-	uint max = qMin(prefsManager->appPrefs.uiPrefs.recentDocCount, recentDocList.count());
+	uint max = qMin(prefsManager.appPrefs.uiPrefs.recentDocCount, recentDocList.count());
 	for (uint m = 0; m < max; ++m)
 		recentDocListBox->addItem( QDir::toNativeSeparators(recentDocList[m]) );
 	if (max>0)
@@ -460,7 +460,7 @@
 		firstPage->setEnabled(true);
 		firstPage->clear();
 		QStringList::Iterator pNames;
-		for (pNames = prefsManager->appPrefs.pageSets[nr].pageNames.begin(); pNames != prefsManager->appPrefs.pageSets[nr].pageNames.end(); ++pNames )
+		for (pNames = prefsManager.appPrefs.pageSets[nr].pageNames.begin(); pNames != prefsManager.appPrefs.pageSets[nr].pageNames.end(); ++pNames )
 		{
 			firstPage->addItem(CommonStrings::translatePageSetLocString((*pNames)));
 		}
@@ -653,7 +653,7 @@
 {
 	marginGroup->setFacingPages(layout != singlePage);
 	m_choosenLayout = layout;
-	firstPage->setCurrentIndex(prefsManager->appPrefs.pageSets[m_choosenLayout].FirstPage);
+	firstPage->setCurrentIndex(prefsManager.appPrefs.pageSets[m_choosenLayout].FirstPage);
 }
 
 void NewDoc::recentDocListBox_doubleClicked()

Modified: trunk/Scribus/scribus/ui/newfile.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/newfile.h
==============================================================================
--- trunk/Scribus/scribus/ui/newfile.h	(original)
+++ trunk/Scribus/scribus/ui/newfile.h	Mon Jul  1 19:04:12 2019
@@ -161,7 +161,7 @@
 	QVBoxLayout* openDocLayout;
 	QVBoxLayout* recentDocLayout;
 	QVBoxLayout *verticalLayout;
-	PrefsManager* prefsManager;
+	PrefsManager& prefsManager;
 	QStringList recentDocList;
 
 	double m_unitRatio;

Modified: trunk/Scribus/scribus/ui/notesstyleseditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/notesstyleseditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/notesstyleseditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/notesstyleseditor.cpp	Mon Jul  1 19:04:12 2019
@@ -17,7 +17,7 @@
 	QString pname(name);
 	if (pname.isEmpty())
 		pname = "notesStylesEditor";
-	m_prefs = PrefsManager::instance()->prefsFile->getContext(pname);
+	m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
 
 	setBlockSignals(true);
 	

Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	Mon Jul  1 19:04:12 2019
@@ -135,8 +135,8 @@
 
 void PagePalette_MasterPages::styleChange()
 {
-	PrefsManager* prefsManager = PrefsManager::instance();
-	if (prefsManager->appPrefs.uiPrefs.style=="Macintosh" || (os_is_osx() && prefsManager->appPrefs.uiPrefs.style==""))
+	PrefsManager& prefsManager = PrefsManager::instance();
+	if (prefsManager.appPrefs.uiPrefs.style=="Macintosh" || (os_is_osx() && prefsManager.appPrefs.uiPrefs.style==""))
 		finishButton->setMinimumHeight(32);
 	else
 		finishButton->setMinimumHeight(0);
@@ -233,7 +233,7 @@
 		masterPageNameWrong |= (masterPageName == CommonStrings::trMasterPageNormalRight);
 		masterPageNameWrong |=  masterPageName.isEmpty();
 	}
-	PrefsManager* prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	int inde = m_doc->MasterNames[m_currentPage];
 	int nr = m_doc->Pages->count();
 	ScPage* from = m_doc->Pages->at(inde);
@@ -301,7 +301,7 @@
 			{
 				ScriXmlDoc ss;
 				QString buffer = ss.writeElem(m_doc, m_doc->m_Selection);
-				ss.readElemToLayer(buffer, prefsManager->appPrefs.fontPrefs.AvailFonts, m_doc, destination->xOffset(), destination->yOffset(), false, true, prefsManager->appPrefs.fontPrefs.GFontSub, it->ID);
+				ss.readElemToLayer(buffer, prefsManager.appPrefs.fontPrefs.AvailFonts, m_doc, destination->xOffset(), destination->yOffset(), false, true, prefsManager.appPrefs.fontPrefs.GFontSub, it->ID);
 				m_doc->m_Selection->clear();
 			}
 		}

Modified: trunk/Scribus/scribus/ui/pdfexportdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/pdfexportdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfexportdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pdfexportdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -91,7 +91,7 @@
 		}
 		else
 		{
-			PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+			PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 			QString pdfdir = dirs->get("pdf", fi.path());
 			if (pdfdir.right(1) != "/")
 				pdfdir += "/";
@@ -232,7 +232,7 @@
 
 void PDFExportDialog::ChangeFile()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir  = dirs->get("pdf", ScPaths::userDocumentDir());
 
 	QString wfile = QDir::fromNativeSeparators(fileNameLineEdit->text()); 

Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -177,13 +177,12 @@
 
 void PreferencesDialog::restoreDefaults()
 {
-	prefsManager->initDefaults();
+	PrefsManager::instance().initDefaults();
 	setupGui();
 }
 
 void PreferencesDialog::initPreferenceValues()
 {
-	prefsManager=PrefsManager::instance();
 	mainWin = (ScribusMainWindow*)parent();
 	docUnitIndex = localPrefs.docSetupPrefs.docUnitIndex;
 	unitRatio = unitGetRatioFromIndex(docUnitIndex);

Modified: trunk/Scribus/scribus/ui/preferencesdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/preferencesdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.h	(original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.h	Mon Jul  1 19:04:12 2019
@@ -43,8 +43,6 @@
 #include "ui/prefs_typography.h"
 #include "ui/prefs_userinterface.h"
 
-
-class PrefsManager;
 class ScribusMainWindow;
 class ScribusDoc;
 
@@ -121,7 +119,6 @@
 		double unitRatio;
 		int docUnitIndex;
 		ScribusMainWindow* mainWin;
-		PrefsManager* prefsManager;
 		ScribusDoc* m_Doc;
 		ApplicationPrefs localPrefs;
 };

Modified: trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetup.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetup.cpp	Mon Jul  1 19:04:12 2019
@@ -202,7 +202,7 @@
 	autosaveDirEdit->setEnabled(!prefsData->docSetupPrefs.AutoSaveLocation);
 	changeAutoDir->setEnabled(!prefsData->docSetupPrefs.AutoSaveLocation);
 	showAutosaveClockOnCanvasCheckBox->setChecked(prefsData->displayPrefs.showAutosaveClockOnCanvas);
-	undoCheckBox->setChecked(PrefsManager::instance()->prefsFile->getContext("undo")->getBool("enabled", true));
+	undoCheckBox->setChecked(PrefsManager::instance().prefsFile->getContext("undo")->getBool("enabled", true));
 	int undoLength = UndoManager::instance()->getHistoryLength();
 	if (undoLength == -1)
 		undoLengthSpinBox->setEnabled(false);
@@ -238,7 +238,7 @@
 		UndoManager::instance()->clearStack();
 	UndoManager::instance()->setUndoEnabled(undoActive);
 	UndoManager::instance()->setAllHistoryLengths(undoLengthSpinBox->value());
-	static PrefsContext *undoPrefs = PrefsManager::instance()->prefsFile->getContext("undo");
+	static PrefsContext *undoPrefs = PrefsManager::instance().prefsFile->getContext("undo");
 	undoPrefs->set("enabled", undoActive);
 }
 

Modified: trunk/Scribus/scribus/ui/prefs_fonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/prefs_fonts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_fonts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_fonts.cpp	Mon Jul  1 19:04:12 2019
@@ -42,7 +42,7 @@
 {
 	setupUi(this);
 
-	RList = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub;
+	RList = PrefsManager::instance().appPrefs.fontPrefs.GFontSub;
 	UsedFonts.clear();
 	CurrentPath = "";
 	m_askBeforeSubstitute = true;
@@ -124,7 +124,7 @@
 
 void Prefs_Fonts::restoreDefaults(struct ApplicationPrefs *prefsData)
 {
-	// 	SCFonts* availFonts=&(PrefsManager::instance()->appPrefs.AvailFonts);
+	// 	SCFonts* availFonts=&(PrefsManager::instance().appPrefs.AvailFonts);
 	m_availFonts = prefsData->fontPrefs.AvailFonts;
 	fontListTableView->setFonts(m_availFonts);
 	/*
@@ -312,7 +312,7 @@
 void Prefs_Fonts::readPaths()
 {
 	Q_ASSERT(m_doc==nullptr); // should never be called in doc-specific prefs
-	PrefsContext *fontPrefsContext = PrefsManager::instance()->prefsFile->getContext("Fonts");
+	PrefsContext *fontPrefsContext = PrefsManager::instance().prefsFile->getContext("Fonts");
 	PrefsTable *fontPathTable = fontPrefsContext->getTable("ExtraFontDirs");
 	pathListWidget->clear();
 	for (int i = 0; i < fontPathTable->getRowCount(); ++i)
@@ -322,7 +322,7 @@
 void Prefs_Fonts::writePaths() const
 {
 	Q_ASSERT(m_doc==nullptr); // should never be called in doc-specific prefs
-	PrefsContext *fontPrefsContext = PrefsManager::instance()->prefsFile->getContext("Fonts");
+	PrefsContext *fontPrefsContext = PrefsManager::instance().prefsFile->getContext("Fonts");
 	PrefsTable *fontPathTable = fontPrefsContext->getTable("ExtraFontDirs");
 	fontPathTable->clear();
 	for (int i = 0; i < pathListWidget->count(); ++i)
@@ -342,7 +342,7 @@
 void Prefs_Fonts::AddPath()
 {
 	Q_ASSERT(m_doc==nullptr); // should never be called in doc-specific prefs
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	CurrentPath = dirs->get("fontprefs", ".");
 	QString s = QFileDialog::getExistingDirectory(this, tr("Choose a Directory"), CurrentPath);
 	if (s.isEmpty())
@@ -405,7 +405,7 @@
 void Prefs_Fonts::DelPath()
 {
 	Q_ASSERT(m_doc==nullptr); // should never be called in doc-specific prefs
-	QFile fx(PrefsManager::instance()->preferencesLocation()+"/scribusfont13.rc");
+	QFile fx(PrefsManager::instance().preferencesLocation()+"/scribusfont13.rc");
 	if (!fx.open(QIODevice::WriteOnly))
 		return;
 

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp	Mon Jul  1 19:04:12 2019
@@ -77,8 +77,8 @@
 	double unitRatio = unitGetRatioFromIndex(docUnitIndex);
 	unitChange(docUnitIndex);
 
-	PrefsManager* prefsManager=PrefsManager::instance();
-	ColorList* colorList = (m_doc != nullptr) ? (&m_doc->PageColors) : prefsManager->colorSetPtr();
+	PrefsManager& prefsManager=PrefsManager::instance();
+	ColorList* colorList = (m_doc != nullptr) ? (&m_doc->PageColors) : prefsManager.colorSetPtr();
 
 	//Text Tool
 	for (int i=0; i<textFontComboBox->count(); ++i)
@@ -378,8 +378,8 @@
 		}
 		else
 		{
-			PrefsManager* prefsManager=PrefsManager::instance();
-			ColorList* colorList=prefsManager->colorSetPtr();
+			PrefsManager& prefsManager=PrefsManager::instance();
+			ColorList* colorList=prefsManager.colorSetPtr();
 			si.setBgColor((*colorList)[textFrameFillColorComboBox->currentText()].getRawRGBColor());
 		}
 		si.setBgShade(textFrameFillShadingSpinBox->value());
@@ -395,8 +395,8 @@
 		}
 		else
 		{
-			PrefsManager* prefsManager=PrefsManager::instance();
-			ColorList* colorList=prefsManager->colorSetPtr();
+			PrefsManager& prefsManager=PrefsManager::instance();
+			ColorList* colorList=prefsManager.colorSetPtr();
 			si.setTxColor((*colorList)[textColorComboBox->currentText()].getRawRGBColor());
 		}
 		si.setTxShade(textColorShadingSpinBox->value());

Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	Mon Jul  1 19:04:12 2019
@@ -124,7 +124,7 @@
 
 void Prefs_KeyboardShortcuts::importKeySetFile()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString currentPath = dirs->get("keymapprefs_import", ScPaths::instance().shareDir() + "keysets/");
 	QString s = QFileDialog::getOpenFileName(this, tr("Select a Key set file to read"), currentPath, tr("Key Set XML Files (*.xml)"));
 	if (!s.isEmpty())
@@ -132,7 +132,7 @@
 }
 void Prefs_KeyboardShortcuts::exportKeySetFile()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString currentPath= dirs->get("keymapprefs_export", ".");
 	QString s = QFileDialog::getSaveFileName(this, tr("Select a Key set file to save to"), currentPath, tr("Key Set XML Files (*.xml)") );
 	if (!s.isEmpty())

Modified: trunk/Scribus/scribus/ui/prefs_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/prefs_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printer.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_printer.cpp	Mon Jul  1 19:04:12 2019
@@ -60,7 +60,7 @@
 
 	destinationComboBox->addItem( tr("File"));
 
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
 
 	QString selectedDest = prefs->get("CurrentPrn", "");
 	int prnIndex = destinationComboBox->findText(selectedDest);
@@ -99,7 +99,7 @@
 
 void Prefs_Printer::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
 {
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
+	PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
 	prefs->set("CurrentPrn", destinationComboBox->currentText());
 	prefs->set("OtherCom", useAltPrinterCmdCheckBox->isChecked());
 	prefs->set("Command", altPrinterCmdLineEdit->text());

Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp	(original)
+++ trunk/Scribus/scribus/ui/preview.cpp	Mon Jul  1 19:04:12 2019
@@ -72,12 +72,12 @@
 
 extern bool printDinUse;
 
-PPreview::PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent )
+PPreview::PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent ),
+	prefsManager(PrefsManager::instance())
 {
 	setModal(true);
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	Q_ASSERT(!docu->masterPageMode());
-	prefsManager=PrefsManager::instance();
 	postscriptPreview = usePostscriptPreview(printer, engine);
 	QString caption = tr("Print Preview");
 #ifdef _WIN32
@@ -126,17 +126,17 @@
 	Layout2->setAlignment( Qt::AlignTop );
 	AntiAlias = new QCheckBox(devTitle);
 	AntiAlias->setText( tr("Enable &Antialiasing"));
-	AntiAlias->setChecked(postscriptPreview ? prefsManager->appPrefs.printPreviewPrefs.PrPr_AntiAliasing : false);
+	AntiAlias->setChecked(postscriptPreview ? prefsManager.appPrefs.printPreviewPrefs.PrPr_AntiAliasing : false);
 	AntiAlias->setEnabled(postscriptPreview);
 	Layout2->addWidget(AntiAlias);
 	AliasTr = new QCheckBox(devTitle);
 	AliasTr->setText( tr("Display Trans&parency"));
-	AliasTr->setChecked(postscriptPreview ? prefsManager->appPrefs.printPreviewPrefs.PrPr_Transparency : false);
+	AliasTr->setChecked(postscriptPreview ? prefsManager.appPrefs.printPreviewPrefs.PrPr_Transparency : false);
 	AliasTr->setEnabled(postscriptPreview);
 	Layout2->addWidget(AliasTr);
 	EnableCMYK = new QCheckBox(devTitle);
 	EnableCMYK->setText( tr("&Display CMYK"));
-	EnableCMYK->setChecked((HaveTiffSep && postscriptPreview) ? prefsManager->appPrefs.printPreviewPrefs.PrPr_Mode : false);
+	EnableCMYK->setChecked((HaveTiffSep && postscriptPreview) ? prefsManager.appPrefs.printPreviewPrefs.PrPr_Mode : false);
 	EnableCMYK->setEnabled(HaveTiffSep && postscriptPreview);
 	Layout2->addWidget(EnableCMYK);
 	if (HaveTiffSep)
@@ -164,28 +164,28 @@
 		cp->setFocusPolicy(Qt::NoFocus);
 		connect(cp, SIGNAL(clicked()), this, SLOT(ToggleCMYK_Colour()));
 		Table->setCellWidget(0, 0, cp);
-		cp->setChecked(prefsManager->appPrefs.printPreviewPrefs.PrPr_C);
+		cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_C);
 		flagsVisible.insert("Cyan", cp);
 		Table->setItem(1, 1, new QTableWidgetItem( tr("Magenta")));
 		cp = new QCheckBox(this);
 		cp->setFocusPolicy(Qt::NoFocus);
 		connect(cp, SIGNAL(clicked()), this, SLOT(ToggleCMYK_Colour()));
 		Table->setCellWidget(1, 0, cp);
-		cp->setChecked(prefsManager->appPrefs.printPreviewPrefs.PrPr_M);
+		cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_M);
 		flagsVisible.insert("Magenta", cp);
 		Table->setItem(2, 1, new QTableWidgetItem( tr("Yellow")));
 		cp = new QCheckBox(this);
 		cp->setFocusPolicy(Qt::NoFocus);
 		connect(cp, SIGNAL(clicked()), this, SLOT(ToggleCMYK_Colour()));
 		Table->setCellWidget(2, 0, cp);
-		cp->setChecked(prefsManager->appPrefs.printPreviewPrefs.PrPr_Y);
+		cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_Y);
 		flagsVisible.insert("Yellow", cp);
 		Table->setItem(3, 1, new QTableWidgetItem( tr("Black")));
 		cp = new QCheckBox(this);
 		cp->setFocusPolicy(Qt::NoFocus);
 		connect(cp, SIGNAL(clicked()), this, SLOT(ToggleCMYK_Colour()));
 		Table->setCellWidget(3, 0, cp);
-		cp->setChecked(prefsManager->appPrefs.printPreviewPrefs.PrPr_K);
+		cp->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_K);
 		flagsVisible.insert("Black", cp);
 		for (int sp = 0; sp < spots.count(); ++sp)
 		{
@@ -202,7 +202,7 @@
 
 		EnableInkCover = new QCheckBox(devTitle);
 		EnableInkCover->setText( tr("Display Ink Coverage"));
-		EnableInkCover->setChecked(prefsManager->appPrefs.printPreviewPrefs.PrPr_InkCoverage);
+		EnableInkCover->setChecked(prefsManager.appPrefs.printPreviewPrefs.PrPr_InkCoverage);
 		EnableInkCover->setEnabled( postscriptPreview );
 		Layout2->addWidget(EnableInkCover);
 		connect(EnableInkCover, SIGNAL(clicked()), this, SLOT(ToggleCMYK_Colour()));
@@ -218,7 +218,7 @@
 		CoverThresholdValue->setMinimum(0);
 		CoverThresholdValue->setSingleStep(10);
 		CoverThresholdValue->setSpecialValueText( tr("None"));
-		CoverThresholdValue->setValue(prefsManager->appPrefs.printPreviewPrefs.PrPr_InkThreshold);
+		CoverThresholdValue->setValue(prefsManager.appPrefs.printPreviewPrefs.PrPr_InkThreshold);
 		if ((EnableCMYK->isChecked()) && (EnableInkCover->isChecked()))
 			CoverThresholdValue->setEnabled(true);
 		else
@@ -309,7 +309,7 @@
 	Anzeige->setWidget(Anz);
 	int w = Anz->width() + tbWidth + 50;
 	resize(qMin(QApplication::desktop()->width()-30,w), 500);
-	if (!PrefsManager::instance()->appPrefs.printPreviewPrefs.PrPr_Mode)
+	if (!PrefsManager::instance().appPrefs.printPreviewPrefs.PrPr_Mode)
 	{
 		if (HaveTiffSep)
 			Table->setEnabled(false);
@@ -353,7 +353,7 @@
 	}
 	else
 	{
-		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
+		PrefsContext* prefs = PrefsManager::instance().prefsFile->getContext("print_options");
 		EnableGCR->setChecked( postscriptPreview ? prefs->getBool("DoGCR", false) : false);
 		EnableGCR->setEnabled( postscriptPreview );
 		MirrorHor->setChecked(prefs->getBool("MirrorH", false));
@@ -531,7 +531,7 @@
 		options.markLength = 20.0;
 		options.markOffset = 0.0;
 		options.bleeds.set(0, 0, 0, 0);
-		PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
+		PSLib *dd = new PSLib(options, true, prefsManager.appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
 		if (!dd)
 			return ret;
 		dd->PS_set_file( ScPaths::tempFileDir() + "/tmp.ps");
@@ -586,7 +586,7 @@
 			args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(ScCore->defaultRGBProfile.profilePath()));
 	}
 	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = prefsManager->prefsFile->getContext("Fonts");
+	PrefsContext *pc = prefsManager.prefsFile->getContext("Fonts");
 	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
 	const char sep = ScPaths::envPathSeparator;
 	if (extraFonts->getRowCount() >= 1)
@@ -607,7 +607,7 @@
 	args.append( "showpage" );
 	args.append( "-c" );
 	args.append( "quit" );
-	ret = System(getShortPathName(prefsManager->ghostscriptExecutable()), args);
+	ret = System(getShortPathName(prefsManager.ghostscriptExecutable()), args);
 	return ret;
 }
 
@@ -642,7 +642,7 @@
 		options.markLength = 20.0;
 		options.markOffset = 0.0;
 		options.bleeds.set(0, 0, 0, 0);
-		PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
+		PSLib *dd = new PSLib(options, true, prefsManager.appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
 		if (dd != nullptr)
 		{
 			dd->PS_set_file(ScPaths::tempFileDir()+"/tmp.ps");
@@ -680,7 +680,7 @@
 		args.append("-sOutputICCProfile=" + QDir::toNativeSeparators(ScCore->defaultCMYKProfile.profilePath()));
 	}
 	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = prefsManager->prefsFile->getContext("Fonts");
+	PrefsContext *pc = prefsManager.prefsFile->getContext("Fonts");
 	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
 	const char sep = ScPaths::envPathSeparator;
 	if (extraFonts->getRowCount() >= 1)
@@ -721,7 +721,7 @@
 //	args3.append(cmd);
 
 //	args3.append("-f");
-	QString gsExe(getShortPathName(prefsManager->ghostscriptExecutable()));
+	QString gsExe(getShortPathName(prefsManager.ghostscriptExecutable()));
 	ret = System(gsExe, args1 + args3 + args2, ScPaths::tempFileDir()+"/sc.tif.txt" );
 
 	QFile sepInfo(QDir::toNativeSeparators(ScPaths::tempFileDir()+"/sc.tif.txt"));

Modified: trunk/Scribus/scribus/ui/preview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/preview.h
==============================================================================
--- trunk/Scribus/scribus/ui/preview.h	(original)
+++ trunk/Scribus/scribus/ui/preview.h	Mon Jul  1 19:04:12 2019
@@ -160,7 +160,7 @@
 	QHBoxLayout* Layout6;
 	QHBoxLayout* Layout7;
 	QVBoxLayout* settingsBarLayout;
-	PrefsManager *prefsManager;
+	PrefsManager& prefsManager;
 
 	void setValues();
 	void getUserSelection(int);

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp	Mon Jul  1 19:04:12 2019
@@ -45,7 +45,7 @@
 	m_doc = doc;
 	unit = doc->unitIndex();
 	unitRatio = unitGetRatioFromIndex(doc->unitIndex());
-	prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
+	prefs = PrefsManager::instance().prefsFile->getContext("print_options");
 	DevMode = printOptions.devMode;
 	PrinterOpts = "";
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
@@ -375,7 +375,7 @@
 
 void PrintDialog::SelFile()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("printdir", ".");
 	CustomFDialog dia(this, wdir, tr("Save As"), tr("PostScript Files (*.ps);;All Files (*)"), fdNone | fdHidePreviewCheckBox);
 	if (!LineEdit1->text().isEmpty())

Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp	Mon Jul  1 19:04:12 2019
@@ -47,7 +47,7 @@
 	m_palettePrefs(nullptr),
 	m_visibleOnStartup(false)
 {
-	if (PrefsManager::instance()->appPrefs.uiPrefs.useSmallWidgets)
+	if (PrefsManager::instance().appPrefs.uiPrefs.useSmallWidgets)
 	{
 		setStyleSheet("	QToolButton { margin: 1px; padding: 0px; font-size: 10px; } \
 						QToolButton:pressed { padding-top: 2px; padding-left: 2px } \
@@ -68,7 +68,7 @@
 	setWindowIcon(IconManager::instance().loadPixmap("AppIcon.png"));
 	setPrefsContext(prefsContext);
 	setObjectName(prefsContext);
-	connect(PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(setFontSize()));
+	connect(&PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(setFontSize()));
 }
 
 void ScDockPalette::setPrefsContext(const QString& context)
@@ -78,7 +78,7 @@
 		m_prefsContextName=context;
 		if (!m_prefsContextName.isEmpty())
 		{
-			m_palettePrefs = PrefsManager::instance()->prefsFile->getContext(m_prefsContextName);
+			m_palettePrefs = PrefsManager::instance().prefsFile->getContext(m_prefsContextName);
 			if (m_palettePrefs)
 				m_visibleOnStartup = m_palettePrefs->getBool("visible");
 		}
@@ -129,7 +129,7 @@
 void ScDockPalette::setFontSize()
 {
 	QFont newfont(font());
-	newfont.setPointSize(PrefsManager::instance()->appPrefs.uiPrefs.paletteFontSize);
+	newfont.setPointSize(PrefsManager::instance().appPrefs.uiPrefs.paletteFontSize);
 	setFont(newfont);
 }
 

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp	Mon Jul  1 19:04:12 2019
@@ -502,7 +502,7 @@
 	QDir thumbs(dirPath);
 	if (thumbs.exists())
 	{
-		if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+		if ((canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 			thumbs.mkdir(".ScribusThumbs");
 		thumbs.cd(".ScribusThumbs");
 	}
@@ -584,7 +584,7 @@
 						f = cf.data();
 					ScPreview *pre = new ScPreview();
 					pm = QPixmap::fromImage(pre->createPreview(f));
-					if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+					if ((canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 						pm.save(filePath + "/.ScribusThumbs/" + fi.baseName() + ".png", "PNG");
 					delete pre;
 				}
@@ -626,7 +626,7 @@
 					{
 						QImage im = fmt->readThumbnail(dirPath + "/" + d4[dc]);
 						im = im.scaled(60, 60, Qt::KeepAspectRatio, Qt::SmoothTransformation);
-						if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+						if ((canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 							im.save(filePath + "/.ScribusThumbs/" + fi.fileName() + ".png", "PNG");
 						pm = QPixmap::fromImage(im);
 					}
@@ -667,7 +667,7 @@
 				if (im.loadPicture(dirPath + "/" + d5[dc], 1, cms, ScImage::Thumbnail, 72, &mode))
 				{
 					QImage img = im.scaled(60, 60, Qt::KeepAspectRatio, Qt::SmoothTransformation);
-					if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+					if ((canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 						img.save(filePath + "/.ScribusThumbs/" + fi.fileName() + ".png", "PNG");
 					pm = QPixmap::fromImage(img);
 				}
@@ -787,7 +787,7 @@
 	setWidget( containerWidget );
 
 	languageChange();
-	m_prefs = PrefsManager::instance()->prefsFile->getContext("Scrapbook");
+	m_prefs = PrefsManager::instance().prefsFile->getContext("Scrapbook");
 	conf_HideDirs->setChecked(m_prefs->getBool("hideDirs", false));
 	conf_HideImages->setChecked(m_prefs->getBool("hideImages", false));
 	conf_HideVectors->setChecked(m_prefs->getBool("hideVectors", false));
@@ -935,7 +935,7 @@
 
 void Biblio::newLib()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString fileName = QFileDialog::getExistingDirectory(this, tr("Choose a Scrapbook Directory"), dirs->get("scrap_load", "."));
 	if (fileName.isEmpty())
 		return;
@@ -980,7 +980,7 @@
 
 void Biblio::Import()
 {
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString s = QFileDialog::getOpenFileName(this,
 	                                         tr("Choose a scrapbook file to import"),
 	                                         dirs->get("old_scrap_load", "."),
@@ -1115,7 +1115,7 @@
 			Frame3->setItemIcon(Frame3->indexOf(activeBView), IconManager::instance().loadIcon("16/lock.png"));
 		ScCore->fileWatcher->addDir(d.absolutePath(), true);
 		d.cdUp();
-		PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+		PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 		dirs->set("scrap_load", d.absolutePath());
 		activeBView->scrollToTop();
 		updateView();
@@ -1146,7 +1146,7 @@
 		Frame3->setItemIcon(Frame3->indexOf(activeBView), IconManager::instance().loadIcon("16/lock.png"));
 	ScCore->fileWatcher->addDir(d.absolutePath(), true);
 	d.cdUp();
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	dirs->set("scrap_load", d.absolutePath());
 	activeBView->scrollToTop();
 	updateView();
@@ -1257,7 +1257,7 @@
 	QDir thumbs(bv->ScFilename);
 	if (thumbs.exists())
 	{
-		if ((bv->canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+		if ((bv->canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 			thumbs.mkdir(".ScribusThumbs");
 	}
 	QFileInfo fi(dt);
@@ -1301,7 +1301,7 @@
 	if (bv == tempBView)
 	{
 		m_tempCount++;
-		if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
+		if (tempBView->objectMap.count() > PrefsManager::instance().appPrefs.scrapbookPrefs.numScrapbookCopies)
 		{
 			QMap<QString,BibView::Elem>::Iterator it;
 			it = tempBView->objectMap.begin();
@@ -1664,12 +1664,12 @@
 	s.setDevice(&f);
 	s.writeRawData(cf.data(), cf.length());
 	f.close();
-	if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
+	if (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews)
 	{
 		QDir thumbs(activeBView->ScFilename);
 		if (thumbs.exists())
 		{
-			if ((activeBView->canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+			if ((activeBView->canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 				thumbs.mkdir(".ScribusThumbs");
 		}
 		img.save(QDir::cleanPath(QDir::toNativeSeparators(activeBView->ScFilename + "/.ScribusThumbs/" + nam +".png")), "PNG");
@@ -1690,7 +1690,7 @@
 		item->setHidden(conf_HideVectors->isChecked());
 	if (Frame3->currentIndex() == 1)
 	{
-		if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
+		if (tempBView->objectMap.count() > PrefsManager::instance().appPrefs.scrapbookPrefs.numScrapbookCopies)
 		{
 			QMap<QString,BibView::Elem>::Iterator it;
 			it = tempBView->objectMap.begin();
@@ -1765,12 +1765,12 @@
 	ScPreview *pre = new ScPreview();
 	QPixmap pm = QPixmap::fromImage(pre->createPreview(ff));
 	activeBView->addObject(nam, QDir::cleanPath(QDir::toNativeSeparators(activeBView->ScFilename + "/" + nam + ".sce")), pm);
-	if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
+	if (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews)
 	{
 		QDir thumbs(activeBView->ScFilename);
 		if (thumbs.exists())
 		{
-			if ((activeBView->canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+			if ((activeBView->canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 				thumbs.mkdir(".ScribusThumbs");
 		}
 		pm.save(QDir::cleanPath(QDir::toNativeSeparators(activeBView->ScFilename + "/.ScribusThumbs/" + nam +".png")), "PNG");
@@ -1789,7 +1789,7 @@
 
 	if (Frame3->currentIndex() == 1)
 	{
-		if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
+		if (tempBView->objectMap.count() > PrefsManager::instance().appPrefs.scrapbookPrefs.numScrapbookCopies)
 		{
 			QMap<QString,BibView::Elem>::Iterator it;
 			it = tempBView->objectMap.begin();
@@ -1843,12 +1843,12 @@
 	ScPreview *pre = new ScPreview();
 	QPixmap pm = QPixmap::fromImage(pre->createPreview(text));
 	tempBView->addObject(nam, QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename + "/" + nam + ".sce")), pm);
-	if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
+	if (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews)
 	{
 		QDir thumbs(tempBView->ScFilename);
 		if (thumbs.exists())
 		{
-			if ((tempBView->canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+			if ((tempBView->canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 				thumbs.mkdir(".ScribusThumbs");
 		}
 		pm.save(QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename + "/.ScribusThumbs/" + nam +".png")), "PNG");
@@ -1864,7 +1864,7 @@
 	item->setToolTip(nam);
 	tempBView->objectMap[nam].widgetItem = item;
 	delete pre;
-	if (tempBView->objectMap.count() > PrefsManager::instance()->appPrefs.scrapbookPrefs.numScrapbookCopies)
+	if (tempBView->objectMap.count() > PrefsManager::instance().appPrefs.scrapbookPrefs.numScrapbookCopies)
 	{
 		QMap<QString,BibView::Elem>::Iterator it;
 		it = tempBView->objectMap.begin();
@@ -1930,12 +1930,12 @@
 	ScPreview *pre = new ScPreview();
 	QPixmap pm = QPixmap::fromImage(pre->createPreview(ff));
 	actBView->addObject(nam, QDir::cleanPath(QDir::toNativeSeparators(actBView->ScFilename + "/" + nam + ".sce")), pm);
-	if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
+	if (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews)
 	{
 		QDir thumbs(actBView->ScFilename);
 		if (thumbs.exists())
 		{
-			if ((actBView->canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
+			if ((actBView->canWrite) && (PrefsManager::instance().appPrefs.scrapbookPrefs.writePreviews))
 				thumbs.mkdir(".ScribusThumbs");
 		}
 		pm.save(QDir::cleanPath(QDir::toNativeSeparators(actBView->ScFilename + "/.ScribusThumbs/" + nam +".png")), "PNG");

Modified: trunk/Scribus/scribus/ui/scrpalettebase.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/scrpalettebase.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrpalettebase.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrpalettebase.cpp	Mon Jul  1 19:04:12 2019
@@ -44,7 +44,7 @@
 	m_palettePrefs(nullptr),
 	m_visibleOnStartup(false)
 {
-	if (PrefsManager::instance()->appPrefs.uiPrefs.useSmallWidgets)
+	if (PrefsManager::instance().appPrefs.uiPrefs.useSmallWidgets)
 	{
 		setStyleSheet("	QToolButton { margin: 1px; padding: 0px; font-size: 10px; } \
 						QToolButton:pressed { padding-top: 2px; padding-left: 2px } \
@@ -64,7 +64,7 @@
 	setWindowIcon(IconManager::instance().loadIcon("AppIcon.png"));
 	setPrefsContext(prefsContext);
 	setModal(modal);
-	connect(PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(setFontSize()));
+	connect(&PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(setFontSize()));
 }
 
 void ScrPaletteBase::setPrefsContext(const QString& context)
@@ -74,7 +74,7 @@
 		m_prefsContextName=context;
 		if (!m_prefsContextName.isEmpty())
 		{
-			m_palettePrefs = PrefsManager::instance()->prefsFile->getContext(m_prefsContextName);
+			m_palettePrefs = PrefsManager::instance().prefsFile->getContext(m_prefsContextName);
 			if (m_palettePrefs)
 				m_visibleOnStartup = m_palettePrefs->getBool("visible");
 		}
@@ -108,7 +108,7 @@
 void ScrPaletteBase::setFontSize()
 {
 	QFont newfont(font());
-	newfont.setPointSize(PrefsManager::instance()->appPrefs.uiPrefs.paletteFontSize);
+	newfont.setPointSize(PrefsManager::instance().appPrefs.uiPrefs.paletteFontSize);
 	setFont(newfont);
 }
 

Modified: trunk/Scribus/scribus/ui/sctoolbar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/sctoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctoolbar.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctoolbar.cpp	Mon Jul  1 19:04:12 2019
@@ -47,7 +47,7 @@
 	dockBottom(false),
 	dockLeft(false)
 {
-	m_prefs=PrefsManager::instance()->prefsFile->getContext(m_name);
+	m_prefs=PrefsManager::instance().prefsFile->getContext(m_name);
 	setObjectName(prefName);
 	setAllowedAreas(Qt::AllToolBarAreas);
 	this->setIconSize(QSize(16,16));

Modified: trunk/Scribus/scribus/ui/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/search.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/search.cpp	(original)
+++ trunk/Scribus/scribus/ui/search.cpp	Mon Jul  1 19:04:12 2019
@@ -359,7 +359,7 @@
 	setTabOrder( DoReplace, AllReplace );
 	setTabOrder( AllReplace, Leave );
 
-	m_prefs = PrefsManager::instance()->prefsFile->getContext("SearchReplace");
+	m_prefs = PrefsManager::instance().prefsFile->getContext("SearchReplace");
 	readPrefs();
 }
 

Modified: trunk/Scribus/scribus/ui/smcellstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/smcellstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstyle.cpp	Mon Jul  1 19:04:12 2019
@@ -127,7 +127,7 @@
 		if (index > -1)
 			m_selection.append(&m_cachedStyles[index]);
 	}
-	m_page->show(m_selection, cellStyles, PrefsManager::instance()->appPrefs.docSetupPrefs.language, m_doc->unitIndex());
+	m_page->show(m_selection, cellStyles, PrefsManager::instance().appPrefs.docSetupPrefs.language, m_doc->unitIndex());
 	setupConnections();
 }
 

Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp	Mon Jul  1 19:04:12 2019
@@ -171,7 +171,7 @@
 
 void SMCStyleWidget::slotEnableFontFeatures(const QString& s)
 {
-	const ScFace& font = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
+	const ScFace& font = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[s];
 	fontfeaturesSetting->enableFontFeatures(font.fontFeatures());
 }
 

Modified: trunk/Scribus/scribus/ui/smtablestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/smtablestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestyle.cpp	Mon Jul  1 19:04:12 2019
@@ -123,7 +123,7 @@
 		if (index > -1)
 			m_selection.append(&m_cachedStyles[index]);
 	}
-	m_page->show(m_selection, tableStyles, PrefsManager::instance()->appPrefs.docSetupPrefs.language, m_doc->unitIndex());
+	m_page->show(m_selection, tableStyles, PrefsManager::instance().appPrefs.docSetupPrefs.language, m_doc->unitIndex());
 	setupConnections();
 }
 

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Mon Jul  1 19:04:12 2019
@@ -160,7 +160,7 @@
 			m_selection.append(&m_tmpStyles[index]);
 	}
 
-	m_pwidget->show(m_selection, pstyles, cstyles, m_doc->unitIndex(), PrefsManager::instance()->appPrefs.docSetupPrefs.language);
+	m_pwidget->show(m_selection, pstyles, cstyles, m_doc->unitIndex(), PrefsManager::instance().appPrefs.docSetupPrefs.language);
 
 	setupConnections();
 }
@@ -1939,7 +1939,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->charStyle().resetFont();
 	else {
-		ScFace sf = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
+		ScFace sf = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[s];
 		
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->charStyle().setFont(sf);
@@ -2191,7 +2191,7 @@
 			m_selection.append(&m_tmpStyles[index]);
 
 	}
-	m_page->show(m_selection, cstyles, PrefsManager::instance()->appPrefs.docSetupPrefs.language, m_doc->unitIndex());
+	m_page->show(m_selection, cstyles, PrefsManager::instance().appPrefs.docSetupPrefs.language, m_doc->unitIndex());
 	setupConnections();
 }
 
@@ -3024,7 +3024,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->resetFont();
 	else {
-		ScFace sf = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
+		ScFace sf = PrefsManager::instance().appPrefs.fontPrefs.AvailFonts[s];
 
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setFont(sf);

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Mon Jul  1 19:04:12 2019
@@ -1443,9 +1443,9 @@
 	fontsAction=addWidget(Fonts);
 	fontsAction->setVisible(true);
 	Size = new ScrSpinBox( 0.5, 2048, this, SC_POINTS );
-	PrefsManager* prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	Size->setSuffix( unitGetSuffixFromIndex(SC_POINTS) );
-	Size->setValue(prefsManager->appPrefs.itemToolPrefs.textSize / 10.0);
+	Size->setValue(prefsManager.appPrefs.itemToolPrefs.textSize / 10.0);
 	sizeAction=addWidget(Size);
 	sizeAction->setVisible(true);
 	lblScaleTxtH = new QLabel("", this);
@@ -1557,10 +1557,10 @@
 //	m_currPara(0),
 //	m_currChar(0),
 	charSelect(nullptr),
-	charSelectUsed(false)
+	charSelectUsed(false),
+	prefsManager(PrefsManager::instance())
 {
 	m_spellActive=false;
-	prefsManager=PrefsManager::instance();
 #ifdef Q_OS_MAC
 	noIcon = IconManager::instance().loadPixmap("noicon.png");
 #endif
@@ -1589,7 +1589,7 @@
 	connect(charSelect, SIGNAL(insertSpecialChar()), this, SLOT(slot_insertSpecialChar()));
 	connect(charSelect, SIGNAL(insertUserSpecialChar(QChar,QString)), this, SLOT(slot_insertUserSpecialChar(QChar,QString)));
 
-	m_smartSelection = prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
+	m_smartSelection = prefsManager.appPrefs.storyEditorPrefs.smartTextSelection;
 	seActions["settingsSmartTextSelection"]->setChecked(m_smartSelection);
 }
 
@@ -1627,7 +1627,7 @@
 
 void StoryEditor::loadPrefs()
 {
-	prefs = PrefsManager::instance()->prefsFile->getPluginContext("StoryEditor");
+	prefs = PrefsManager::instance().prefsFile->getPluginContext("StoryEditor");
 	int vleft   = qMax(-80, prefs->getInt("left", 10));
 #if defined(Q_OS_MAC) || defined(_WIN32)
 	int vtop	= qMax(64, prefs->getInt("top", 10));
@@ -1850,7 +1850,7 @@
 {
 	unicodeCharActionNames.clear();
 	seActions.clear();
-	m_smartSelection = prefsManager->appPrefs.storyEditorPrefs.smartTextSelection;
+	m_smartSelection = prefsManager.appPrefs.storyEditorPrefs.smartTextSelection;
 	initActions();
 	ActionManager::initUnicodeActions(&seActions, this, &unicodeCharActionNames);
 	seActions["unicodeSoftHyphen"]->setEnabled(false);//CB TODO doesn't work in SE yet.
@@ -1979,8 +1979,6 @@
 	setCentralWidget( EdSplit );
 	//Final setup
 	resize( QSize(660, 500).expandedTo(minimumSizeHint()) );
-	if (prefsManager==nullptr)
-		sDebug(QString("%1").arg("prefsmgr null"));
 
 	EditorBar->editor = Editor;
 	Editor->installEventFilter(this);
@@ -1991,10 +1989,10 @@
 void StoryEditor::setupEditorGUI()
 {
 	QFont fo;
-	fo.fromString(prefsManager->appPrefs.storyEditorPrefs.guiFont);
+	fo.fromString(prefsManager.appPrefs.storyEditorPrefs.guiFont);
 	Editor->setFont(fo);
 	QPalette pal;
-	QColor newColor(prefsManager->appPrefs.storyEditorPrefs.guiFontColorBackground);
+	QColor newColor(prefsManager.appPrefs.storyEditorPrefs.guiFontColorBackground);
 	pal.setColor(QPalette::Active, QPalette::Base, newColor);
 	pal.setColor(QPalette::Inactive, QPalette::Base, newColor);
 	pal.setColor(QPalette::Disabled, QPalette::Base, newColor);
@@ -2290,7 +2288,7 @@
 		pal.setColor(QPalette::Inactive, QPalette::Base, newColor);
 		pal.setColor(QPalette::Disabled, QPalette::Base, newColor);
 		Editor->setPalette(pal);
-		prefsManager->appPrefs.storyEditorPrefs.guiFontColorBackground = newColor;
+		prefsManager.appPrefs.storyEditorPrefs.guiFontColorBackground = newColor;
 	}
 	m_blockUpdate = false;
 }
@@ -2299,7 +2297,7 @@
 {
 	m_blockUpdate = true;
 	Editor->setFont( QFontDialog::getFont( nullptr, Editor->font(), this ) );
-	prefsManager->appPrefs.storyEditorPrefs.guiFont = Editor->font().toString();
+	prefsManager.appPrefs.storyEditorPrefs.guiFont = Editor->font().toString();
 	EditorBar->doRepaint();
 	m_blockUpdate = false;
 }
@@ -2336,7 +2334,7 @@
 {
 	if (!m_doc->UsedFonts.contains(f)) {
 		if (!m_doc->AddFont(f)) {
-//, prefsManager->appPrefs.AvailFonts[f]->Font)) {
+//, prefsManager.appPrefs.AvailFonts[f]->Font)) {
 			FontTools->Fonts->RebuildList(m_doc);
 			return;
 		};
@@ -3370,8 +3368,8 @@
 		EditorBar->setRepaint(false);
 		QString LoadEnc = "";
 		QString fileName = "";
-		PrefsContext* dirs = prefsManager->prefsFile->getContext("dirs");
-		QString wdir = dirs->get("story_load", prefsManager->documentDir());
+		PrefsContext* dirs = prefsManager.prefsFile->getContext("dirs");
+		QString wdir = dirs->get("story_load", prefsManager.documentDir());
 		CustomFDialog dia(this, wdir, tr("Open"), tr("Text Files (*.txt);;All Files (*)"), fdExistingFiles | fdShowCodecs | fdDisableOk);
 		if (dia.exec() != QDialog::Accepted)
 			return;
@@ -3403,10 +3401,10 @@
 void StoryEditor::SaveTextFile()
 {
 	m_blockUpdate = true;
-	QString LoadEnc = "";
-	QString fileName = "";
-	PrefsContext* dirs = prefsManager->prefsFile->getContext("dirs");
-	QString wdir = dirs->get("story_save", prefsManager->appPrefs.pathPrefs.documents);
+	QString LoadEnc;
+	QString fileName;
+	PrefsContext* dirs = prefsManager.prefsFile->getContext("dirs");
+	QString wdir = dirs->get("story_save", prefsManager.appPrefs.pathPrefs.documents);
 	CustomFDialog dia(this, wdir, tr("Save as"), tr("Text Files (*.txt);;All Files (*)"), fdShowCodecs|fdHidePreviewCheckBox);
 	qApp->processEvents();
 	if (dia.exec() != QDialog::Accepted)

Modified: trunk/Scribus/scribus/ui/storyeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/storyeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.h	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.h	Mon Jul  1 19:04:12 2019
@@ -533,7 +533,7 @@
 	QGridLayout* ButtonGroup1Layout;
 	QGridLayout* ButtonGroup2Layout;
 
-	PrefsManager* prefsManager;
+	PrefsManager& prefsManager;
 	PrefsContext* prefs;
 
 	QStringList unicodeCharActionNames;

Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp	Mon Jul  1 19:04:12 2019
@@ -54,7 +54,7 @@
 	QString pname(name);
 	if (pname.isEmpty())
 		pname = "styleManager";
-	m_prefs = PrefsManager::instance()->prefsFile->getContext(pname);
+	m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
 	m_isEditMode = true;
 	m_isStoryEditMode = false;
 	m_editPosition.setX(m_prefs->getInt("eX", x()));
@@ -335,7 +335,7 @@
 	if (!m_doc)
 		return;
 
-	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
+	PrefsContext* dirs = PrefsManager::instance().prefsFile->getContext("dirs");
 	QString wdir = dirs->get("editformats", ".");
 	CustomFDialog dia(this, wdir, tr("Open"), tr("documents (*.sla *.sla.gz *.scd *.scd.gz);;All Files (*)"));
 	if (dia.exec() == QDialog::Accepted)
@@ -1136,7 +1136,7 @@
 			return true;
 	}
 
-	ApplicationPrefs *prefsData=&(PrefsManager::instance()->appPrefs);
+	ApplicationPrefs *prefsData=&(PrefsManager::instance().appPrefs);
 	for (QMap<QString,Keys>::Iterator it=prefsData->keyShortcutPrefs.KeyActions.begin();
 		 it!=prefsData->keyShortcutPrefs.KeyActions.end(); ++it)
 	{

Modified: trunk/Scribus/scribus/ui/vruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/vruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/vruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/vruler.cpp	Mon Jul  1 19:04:12 2019
@@ -36,7 +36,6 @@
 #include <cmath>
 
 #include "canvasgesture_rulermove.h"
-#include "prefsmanager.h"
 #include "scpage.h"
 #include "scribusdoc.h"
 #include "scribusview.h"
@@ -51,7 +50,6 @@
 	m_drawMark(false),
 	m_whereToDraw(0)
 {
-	prefsManager=PrefsManager::instance();
 	setBackgroundRole(QPalette::Window);
 	setAutoFillBackground(true);
 	QPalette palette;

Modified: trunk/Scribus/scribus/ui/vruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/ui/vruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/vruler.h	(original)
+++ trunk/Scribus/scribus/ui/vruler.h	Mon Jul  1 19:04:12 2019
@@ -74,7 +74,6 @@
 	void unitChange();
 
 private:
-	PrefsManager *prefsManager;
 	RulerGesture* rulerGesture;
 };
 

Modified: trunk/Scribus/scribus/undogui.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/undogui.cpp
==============================================================================
--- trunk/Scribus/scribus/undogui.cpp	(original)
+++ trunk/Scribus/scribus/undogui.cpp	Mon Jul  1 19:04:12 2019
@@ -223,7 +223,7 @@
 
 	updateFromPrefs();
 	languageChange();
-	connect(PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(updateFromPrefs()));
+	connect(&PrefsManager::instance(), SIGNAL(prefsChanged()), this, SLOT(updateFromPrefs()));
 	connect(undoButton, SIGNAL(clicked()), this, SLOT(undoClicked()));
 	connect(redoButton, SIGNAL(clicked()), this, SLOT(redoClicked()));
 	connect(undoList, SIGNAL(currentRowChanged(int)), this, SLOT(undoListClicked(int)));

Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp	(original)
+++ trunk/Scribus/scribus/undomanager.cpp	Mon Jul  1 19:04:12 2019
@@ -80,7 +80,7 @@
 	currentUndoObjectId_ = -1;
 	if (!UndoManager::IGuides)
 		initIcons();
-	prefs_ = PrefsManager::instance()->prefsFile->getContext("undo");
+	prefs_ = PrefsManager::instance().prefsFile->getContext("undo");
 	languageChange();
 	setUndoEnabled(prefs_->getBool("enabled", true));
 }

Modified: trunk/Scribus/scribus/urllauncher.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/urllauncher.cpp
==============================================================================
--- trunk/Scribus/scribus/urllauncher.cpp	(original)
+++ trunk/Scribus/scribus/urllauncher.cpp	Mon Jul  1 19:04:12 2019
@@ -36,7 +36,7 @@
 		QWidget *p=parent;
 		if (p==nullptr)
 			p=ScCore->primaryMainWindow();
-		QString extBrowser(PrefsManager::instance()->extBrowserExecutable());
+		QString extBrowser(PrefsManager::instance().extBrowserExecutable());
 		if (extBrowser.isEmpty())
 		{
 			if (!QDesktopServices::openUrl(link))
@@ -44,7 +44,7 @@
 				extBrowser = QFileDialog::getOpenFileName(p, tr("Locate your web browser"), QString(), QString());
 				if (!QFileInfo::exists(extBrowser))
 					extBrowser.clear();
-				PrefsManager::instance()->setExtBrowserExecutable(extBrowser);
+				PrefsManager::instance().setExtBrowserExecutable(extBrowser);
 			}
 		}
 		if (!extBrowser.isEmpty())
@@ -54,7 +54,7 @@
 			bool ok = QProcess::startDetached(extBrowser, args);
 			if (!ok)
 			{
-				QMessageBox::StandardButton sb=ScMessageBox::critical(p, tr("External Web Browser Failed to Start"), tr("Scribus was not able to start the external web browser application %1. Please check the setting in Preferences.\nWould you like to start the system's default browser instead?").arg(PrefsManager::instance()->extBrowserExecutable()), QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Ok);
+				QMessageBox::StandardButton sb=ScMessageBox::critical(p, tr("External Web Browser Failed to Start"), tr("Scribus was not able to start the external web browser application %1. Please check the setting in Preferences.\nWould you like to start the system's default browser instead?").arg(PrefsManager::instance().extBrowserExecutable()), QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Ok);
 				if (sb==QMessageBox::Ok)
 					QDesktopServices::openUrl(link);
 			}

Modified: trunk/Scribus/scribus/util_file.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/util_file.cpp
==============================================================================
--- trunk/Scribus/scribus/util_file.cpp	(original)
+++ trunk/Scribus/scribus/util_file.cpp	Mon Jul  1 19:04:12 2019
@@ -267,7 +267,7 @@
 
 	doc->m_Selection->clear();
 	doc->m_Selection->delaySignalsOn();
-	fmt->setupTargets(doc, nullptr, nullptr, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+	fmt->setupTargets(doc, nullptr, nullptr, nullptr, &(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts));
 	fmt->loadFile(fileName, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
 	if (!doc->m_Selection->isEmpty())
 	{

Modified: trunk/Scribus/scribus/util_ghostscript.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23060&path=/trunk/Scribus/scribus/util_ghostscript.cpp
==============================================================================
--- trunk/Scribus/scribus/util_ghostscript.cpp	(original)
+++ trunk/Scribus/scribus/util_ghostscript.cpp	Mon Jul  1 19:04:12 2019
@@ -63,7 +63,7 @@
 {
 	QString cmd;
  	QStringList args;
-	PrefsManager* prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	args.append( "-q" );
 	args.append( "-dNOPAUSE" );
 	args.append( "-dQUIET" );
@@ -77,13 +77,13 @@
 	else
 		args.append( "-sDEVICE=pngalpha" );
 	// and antialiasing
-	if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasText)
+	if (prefsManager.appPrefs.extToolPrefs.gs_AntiAliasText)
 		args.append( "-dTextAlphaBits=4" );
-	if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasGraphics)
+	if (prefsManager.appPrefs.extToolPrefs.gs_AntiAliasGraphics)
 		args.append( "-dGraphicsAlphaBits=4" );
 
 	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = PrefsManager::instance()->prefsFile->getContext("Fonts");
+	PrefsContext *pc = PrefsManager::instance().prefsFile->getContext("Fonts");
 	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
 	const char sep = ScPaths::envPathSeparator;
 	if (extraFonts->getRowCount() >= 1)
@@ -97,13 +97,13 @@
 	args.append("-c");
 	args.append("showpage");
 //	qDebug(args.join(" ").toLatin1());
-	return System( getShortPathName(prefsManager->ghostscriptExecutable()), args, fileStdErr, fileStdOut );
+	return System( getShortPathName(prefsManager.ghostscriptExecutable()), args, fileStdErr, fileStdOut );
 }
 
 int callGS(const QString& args_in, const QString& device)
 {
-	PrefsManager* prefsManager=PrefsManager::instance();
-	QString cmd1 = getShortPathName(prefsManager->ghostscriptExecutable());
+	PrefsManager& prefsManager=PrefsManager::instance();
+	QString cmd1 = getShortPathName(prefsManager.ghostscriptExecutable());
 	cmd1 += " -q -dNOPAUSE -dQUIET -dPARANOIDSAFER -dBATCH";
 	// Choose rendering device
 	if (!device.isEmpty())
@@ -114,13 +114,13 @@
 	else
 		cmd1 += " -sDEVICE=pngalpha";
 	// and antialiasing
-	if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasText)
+	if (prefsManager.appPrefs.extToolPrefs.gs_AntiAliasText)
 		cmd1 += " -dTextAlphaBits=4";
-	if (prefsManager->appPrefs.extToolPrefs.gs_AntiAliasGraphics)
+	if (prefsManager.appPrefs.extToolPrefs.gs_AntiAliasGraphics)
 		cmd1 += " -dGraphicsAlphaBits=4";
 
 	// Add any extra font paths being used by Scribus to gs's font search path
-	PrefsContext *pc = PrefsManager::instance()->prefsFile->getContext("Fonts");
+	PrefsContext *pc = PrefsManager::instance().prefsFile->getContext("Fonts");
 	PrefsTable *extraFonts = pc->getTable("ExtraFontDirs");
 #ifndef _WIN32
 	if (extraFonts->getRowCount() >= 1)
@@ -142,7 +142,7 @@
 
 int convertPS2PS(const QString& in, const QString& out, const QStringList& opts, int level)
 {
-	PrefsManager* prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 	QStringList args;
 	args.append( "-q" );
 	args.append( "-dQUIET" );
@@ -173,13 +173,13 @@
 	args += opts;
 	args.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(out)) );
 	args.append( QDir::toNativeSeparators(in) );
-	int ret = System( getShortPathName(prefsManager->ghostscriptExecutable()), args );
+	int ret = System( getShortPathName(prefsManager.ghostscriptExecutable()), args );
 	return ret;
 }
 
 int convertPS2PDF(const QString& in, const QString& out, const QStringList& opts)
 {
-	PrefsManager* prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 	QStringList args;
 	args.append( "-q" );
 	args.append( "-dQUIET" );
@@ -190,15 +190,15 @@
 	args += opts;
 	args.append( QString("-sOutputFile=%1").arg(QDir::toNativeSeparators(out)) );
 	args.append( QDir::toNativeSeparators(in) );
-	int ret = System( getShortPathName(prefsManager->ghostscriptExecutable()), args );
+	int ret = System( getShortPathName(prefsManager.ghostscriptExecutable()), args );
 	return ret;
 }
 
 bool testGSAvailability()
 {
 	QStringList args;
-	PrefsManager* prefsManager = PrefsManager::instance();
-	return testGSAvailability(prefsManager->ghostscriptExecutable());
+	PrefsManager& prefsManager = PrefsManager::instance();
+	return testGSAvailability(prefsManager.ghostscriptExecutable());
 }
 
 bool testGSAvailability( const QString& gsPath )
@@ -216,12 +216,12 @@
 bool testGSDeviceAvailability( const QString& device )
 {
 	QStringList args;
-	PrefsManager* prefsManager = PrefsManager::instance();
+	PrefsManager& prefsManager = PrefsManager::instance();
 	args.append( QString("-sDEVICE=%1").arg( device ) );
 	args.append( "-c" );
 	args.append( "quit" );
 	QProcess proc;
-	proc.start(getShortPathName(prefsManager->ghostscriptExecutable()), args);
+	proc.start(getShortPathName(prefsManager.ghostscriptExecutable()), args);
 	if (!proc.waitForStarted(5000))
 		return false;
 	proc.waitForFinished(5000);
@@ -233,7 +233,7 @@
 {
 	QStringList args;
 	args.append(QString("--version").toLocal8Bit());
-	QString gsExe = getShortPathName(PrefsManager::instance()->ghostscriptExecutable());
+	QString gsExe = getShortPathName(PrefsManager::instance().ghostscriptExecutable());
 	QProcess proc;
 	proc.start(gsExe.toLocal8Bit(), args);
 	if (proc.waitForStarted(5000))
@@ -409,11 +409,11 @@
 	}
 #else
 	int gsNumericVer, gsMajor, gsMinor;
-	PrefsManager* prefsManager=PrefsManager::instance();
+	PrefsManager& prefsManager=PrefsManager::instance();
 	if (getNumericGSVersion(gsMajor, gsMinor))
 	{
 		gsNumericVer = gsMajor * 100 + gsMinor;
-		gsVersions.insert(gsNumericVer, prefsManager->ghostscriptExecutable());
+		gsVersions.insert(gsNumericVer, prefsManager.ghostscriptExecutable());
 	}
 #endif
 	return gsVersions;




More information about the scribus-commit mailing list