r24733 by jghali - Ooops... make_unique is C++14, not C++11

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 4 18:10:51 UTC 2021


Author: jghali
Date: Mon Oct  4 18:10:51 2021
New Revision: 24733

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24733
Log:
Ooops... make_unique is C++14, not C++11

Modified:
    trunk/Scribus/scribus/sampleitem.cpp

Modified: trunk/Scribus/scribus/sampleitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24733&path=/trunk/Scribus/scribus/sampleitem.cpp
==============================================================================
--- trunk/Scribus/scribus/sampleitem.cpp	(original)
+++ trunk/Scribus/scribus/sampleitem.cpp	Mon Oct  4 18:10:51 2021
@@ -83,7 +83,7 @@
 
 void SampleItem::setLoremIpsum(int para)
 {
-	auto loremParser = std::make_unique<LoremParser>("loremipsum.xml");
+	std::unique_ptr<LoremParser> loremParser(new LoremParser("loremipsum.xml"));
 	m_text = loremParser->createLorem(para);
 }
 
@@ -303,7 +303,7 @@
 	QImage pm(pmWidth, pmHeight, QImage::Format_ARGB32);
 	pm.setDevicePixelRatio(m_devicePixelRatio);
 
-	auto painter = std::make_unique<ScPainter>(&pm, pmWidth, pmHeight, 1.0, 0);
+	std::unique_ptr<ScPainter> painter(new ScPainter(&pm, pmWidth, pmHeight, 1.0, 0));
 	painter->setZoomFactor(PrefsManager::instance().appPrefs.displayPrefs.displayScale);
 
 	if (m_Doc->UsedFonts.contains(m_tmpStyle.charStyle().font().scName()))
@@ -311,7 +311,7 @@
 
 	m_Doc->AddFont(m_tmpStyle.charStyle().font().scName(), qRound(m_Doc->itemToolPrefs().textSize / 10.0));
 
-	auto previewItem = std::make_unique<PageItem_TextFrame>(m_Doc, 0, 0, frameWidth, frameHeight, 0, "__whiteforpreviewbg__", "__whiteforpreview__");
+	std::unique_ptr<PageItem_TextFrame> previewItem(new PageItem_TextFrame(m_Doc, 0, 0, frameWidth, frameHeight, 0, "__whiteforpreviewbg__", "__whiteforpreview__"));
 	m_text.replace(QChar(10), QChar(13)).replace(QChar(5), QChar(13));
 
 	previewItem->FrameType = PageItem::TextFrame;




More information about the scribus-commit mailing list