r25070 by craig - Code cleanup: unnecessary Qstring empty initialisation
scribus-commit
scribus-commit at lists.scribus.net
Tue Mar 29 18:34:32 UTC 2022
Author: craig
Date: Tue Mar 29 18:34:32 2022
New Revision: 25070
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25070
Log:
Code cleanup: unnecessary Qstring empty initialisation
Modified:
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/colormgmt/sclcmscolormgmtengineimpl.cpp
trunk/Scribus/scribus/gtfont.cpp
trunk/Scribus/scribus/hyphenator.cpp
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp
trunk/Scribus/scribus/latexhelpers.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pageitem_osgframe.cpp
trunk/Scribus/scribus/palettes/paletteloader_autocad_acb.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pdfwriter.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/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
trunk/Scribus/scribus/plugins/import/ai/importai.cpp
trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp
trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/prefsreader.cpp
trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
trunk/Scribus/scribus/printpreviewcreator_ps.cpp
trunk/Scribus/scribus/pslib.cpp
trunk/Scribus/scribus/scfonts.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusXml.cpp
trunk/Scribus/scribus/text/storytext.cpp
trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
trunk/Scribus/scribus/ui/annot.cpp
trunk/Scribus/scribus/ui/colorsandfills.cpp
trunk/Scribus/scribus/ui/curvewidget.cpp
trunk/Scribus/scribus/ui/gtdialogs.cpp
trunk/Scribus/scribus/ui/hruler.cpp
trunk/Scribus/scribus/ui/imageinfodialog.cpp
trunk/Scribus/scribus/ui/loremipsum.cpp
trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
trunk/Scribus/scribus/ui/outputpreview_ps.cpp
trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
trunk/Scribus/scribus/ui/pagepalette_pages.cpp
trunk/Scribus/scribus/ui/picsearch.cpp
trunk/Scribus/scribus/ui/picstatus.cpp
trunk/Scribus/scribus/ui/recoverdialog.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/util_color.cpp
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Tue Mar 29 18:34:32 2022
@@ -375,7 +375,7 @@
{
if (hoveredItem->isAnnotation())
{
- QString toolT = "";
+ QString toolT;
if (!hoveredItem->annotation().ToolTip().isEmpty())
toolT = hoveredItem->annotation().ToolTip();
if (hoveredItem->annotation().Type() == Annotation::Button)
@@ -1424,7 +1424,7 @@
void CanvasMode_Normal::handleJavaAction(PageItem* currItem, int event)
{
- QString scriptCode = "";
+ QString scriptCode;
switch (event)
{
case Annotation::Java_PressButton:
Modified: trunk/Scribus/scribus/colormgmt/sclcmscolormgmtengineimpl.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/colormgmt/sclcmscolormgmtengineimpl.cpp
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sclcmscolormgmtengineimpl.cpp (original)
+++ trunk/Scribus/scribus/colormgmt/sclcmscolormgmtengineimpl.cpp Tue Mar 29 18:34:32 2022
@@ -44,7 +44,7 @@
if ((!d.exists()) || (d.count() == 0))
return profileInfos;
- QString nam = "";
+ QString nam;
cmsHPROFILE hIn = nullptr;
for (uint dc = 0; dc < d.count(); ++dc)
Modified: trunk/Scribus/scribus/gtfont.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/gtfont.cpp
==============================================================================
--- trunk/Scribus/scribus/gtfont.cpp (original)
+++ trunk/Scribus/scribus/gtfont.cpp Tue Mar 29 18:34:32 2022
@@ -533,7 +533,7 @@
for (int i = 1; i < FontWeightMAX; ++i)
{
m_index = m_name.indexOf(fontWeights[i]); // f.e. Demi Bold
- QString tmpWeight = "";
+ QString tmpWeight;
if ((m_index == -1) && (fontWeights[i].indexOf(" ") != -1) && (fontWeights[i].indexOf(" ") != 1))
{
QString fw2 = fontWeights[i];
@@ -610,7 +610,7 @@
for (int i = 1; i < FontWidthMAX; ++i)
{
m_index = m_name.indexOf(fontWidths[i]);
- QString tmpWidth = "";
+ QString tmpWidth;
if ((m_index == -1) && (fontWidths[i].indexOf(" ") != -1) && (fontWidths[i].indexOf(" ") != 1))
{
QString fw2 = fontWidths[i];
Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp (original)
+++ trunk/Scribus/scribus/hyphenator.cpp Tue Mar 29 18:34:32 2022
@@ -138,7 +138,7 @@
return;
m_doc->DoDrawing = false;
- QString text = "";
+ QString text;
int startC = 0;
if (it->itemText.hasSelection())
@@ -197,8 +197,8 @@
break;
}
}
- QString outs = "";
- QString input = "";
+ QString outs;
+ QString input;
outs += word[0];
for (i = 1; i < wordLower.length() - 1; ++i)
{
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp Tue Mar 29 18:34:32 2022
@@ -501,7 +501,7 @@
if (m_FontListe.count() != 0)
{
bool missing = false;
- QString missingF = "";
+ QString missingF;
for (int fo = 0; fo < m_FontListe.count(); fo++)
{
if (!PrefsManager::instance().appPrefs.fontPrefs.AvailFonts.contains(m_FontListe[fo]))
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp Tue Mar 29 18:34:32 2022
@@ -1526,7 +1526,7 @@
{
uchar len, tmp;
uint adj;
- QString ret = "";
+ QString ret;
s >> len;
if (len == 0)
{
Modified: trunk/Scribus/scribus/latexhelpers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/latexhelpers.cpp
==============================================================================
--- trunk/Scribus/scribus/latexhelpers.cpp (original)
+++ trunk/Scribus/scribus/latexhelpers.cpp Tue Mar 29 18:34:32 2022
@@ -221,7 +221,7 @@
{
QString type = xml.attributes().value("type").toString();
bool itemstab = (type == "items");
- QString title = "";
+ QString title;
QString name, text, default_value;
while (!xml.atEnd())
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Mar 29 18:34:32 2022
@@ -9285,7 +9285,7 @@
{
if ((pixm.imgInfo.colorspace == ColorSpaceDuotone) && (pixm.imgInfo.duotoneColors.count() != 0) && (!reload))
{
- QString efVal = "";
+ QString efVal;
for (int cc = 0; cc < pixm.imgInfo.duotoneColors.count(); cc++)
{
if (!m_Doc->PageColors.contains(pixm.imgInfo.duotoneColors[cc].Name))
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Tue Mar 29 18:34:32 2022
@@ -99,7 +99,7 @@
if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown))
{
p->setBrush(Qt::white);
- QString htmlText = "";
+ QString htmlText;
QFileInfo fi(Pfile);
if (imageIsAvailable)
{
Modified: trunk/Scribus/scribus/pageitem_osgframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pageitem_osgframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_osgframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_osgframe.cpp Tue Mar 29 18:34:32 2022
@@ -278,7 +278,7 @@
transy = 0.0;
if (fabs(transz) < 0.0000001)
transz = 0.0;
- QString ret = "";
+ QString ret;
QString desc4 = "%1 %2 %3 ";
ret += desc4.arg(leftx).arg(lefty).arg(leftz);
ret += desc4.arg(upx).arg(upy).arg(upz);
Modified: trunk/Scribus/scribus/palettes/paletteloader_autocad_acb.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/palettes/paletteloader_autocad_acb.cpp
==============================================================================
--- trunk/Scribus/scribus/palettes/paletteloader_autocad_acb.cpp (original)
+++ trunk/Scribus/scribus/palettes/paletteloader_autocad_acb.cpp Tue Mar 29 18:34:32 2022
@@ -60,7 +60,7 @@
if (cg.tagName() == "colorEntry")
{
int r (0), g(0), b(0);
- QString colorName = "";
+ QString colorName;
QDomNode colEntry = cg.firstChild();
while (!colEntry.isNull())
{
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Tue Mar 29 18:34:32 2022
@@ -3496,7 +3496,7 @@
}
if (Options.docInfoMarks)
{
-// QString tmp = "";
+// QString tmp;
// double startX = markOffs + bleedLeft + 10.0;
FPointArray textPath;
QPainterPath painter1, painter2;
Modified: trunk/Scribus/scribus/pdfwriter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pdfwriter.cpp
==============================================================================
--- trunk/Scribus/scribus/pdfwriter.cpp (original)
+++ trunk/Scribus/scribus/pdfwriter.cpp Tue Mar 29 18:34:32 2022
@@ -533,8 +533,8 @@
void Writer::setEncryption(bool keyLen16, const QByteArray& PassOwner, const QByteArray& PassUser, int Permissions)
{
- QByteArray ok = "";
- QByteArray uk = "";
+ QByteArray ok;
+ QByteArray uk;
if (keyLen16)
m_KeyLen = 16;
@@ -754,7 +754,7 @@
}
}
write("trailer\n<<\n/Size "+Pdf::toPdf(m_XRef.count())+"\n");
- QByteArray IDs ="";
+ QByteArray IDs;
for (uint cl = 0; cl < 16; ++cl)
IDs += (m_FileID[cl]);
QByteArray IDbytes = Pdf::toHexString(IDs);
Modified: trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -650,7 +650,7 @@
lineEnd.setY(end.y() + line.width() * endOffsetFactors.y());
QDomElement cl = m_domDoc.createElement("path");
cl.setAttribute("d", "M " + FToStr(lineStart.x()) + " " + FToStr(lineStart.y()) + " L " + FToStr(lineEnd.x()) + " " + FToStr(lineEnd.y()));
- QString stroke = "";
+ QString stroke;
if (line.color() != CommonStrings::None)
cl.setAttribute("stroke", setColor(line.color(), line.shade()));
if (line.width() != 0.0)
@@ -740,7 +740,7 @@
ob2.setAttribute("fill", setColor(item->hatchBackground, 100));
ob.appendChild(ob2);
}
- QString stroke = "";
+ QString stroke;
stroke += "stroke-width:1;";
stroke += " stroke-linecap:butt;";
stroke += " stroke-linejoin:miter;";
@@ -1388,7 +1388,7 @@
QString fill = getFillStyle(embedded);
QString stroke = "stroke:none";
stroke = getStrokeStyle(embedded);
- QString transE = "";
+ QString transE;
if (embItem->isGroup())
{
transE = "translate(" + FToStr(embedded->gXpos) + ", " + FToStr(embedded->gYpos) + ")";
@@ -1839,7 +1839,7 @@
QString SVGExPlug::handleMask(PageItem *item, double xOffset, double yOffset)
{
QDomElement grad;
- QString retVal = "";
+ QString retVal;
if (item->GrMask == 0)
return retVal;
@@ -2134,7 +2134,7 @@
QString SVGExPlug::getStrokeStyle(PageItem *item)
{
- QString stroke = "";
+ QString stroke;
if (item->lineTransparency() != 0)
stroke = "stroke-opacity:" + FToStr(1.0 - item->lineTransparency()) + ";";
if (item->lineWidth() != 0.0)
Modified: trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -1469,7 +1469,7 @@
lineEnd.setY(end.y() + line.width() * endOffsetFactors.y());
QDomElement cl = p_docu.createElement("Path");
cl.setAttribute("Data", "M" + FToStr(lineStart.x() * conversionFactor) + "," + FToStr(lineStart.y() * conversionFactor) + " L" + FToStr(lineEnd.x() * conversionFactor) + " " + FToStr(lineEnd.y() * conversionFactor));
- QString dashVals = "";
+ QString dashVals;
if (line.style() != Qt::SolidLine)
dashVals = getDashString(line.style(), qMax(line.width(), 1.0));
if (!dashVals.isEmpty())
@@ -1917,7 +1917,7 @@
parentElem.setAttribute("StrokeLineJoin", "Miter");
break;
}
- QString dashVals = "";
+ QString dashVals;
if (static_cast<Qt::PenStyle>(sl->Dash) != Qt::SolidLine)
dashVals = getDashString(sl->Dash, 1);
if (!dashVals.isEmpty())
@@ -1967,13 +1967,11 @@
parentElem.setAttribute("StrokeLineJoin", "Miter");
break;
}
- QString dashVals = "";
+ QString dashVals;
if (item->DashValues.count() != 0)
{
for (auto it = item->DashValues.cbegin(); it != item->DashValues.cend(); ++it)
- {
dashVals += FToStr((*it) / item->lineWidth()) + " ";
- }
}
else
{
@@ -2408,7 +2406,7 @@
const ScColor& col = m_Doc->PageColors[farbe];
QString color = ScColorEngine::getShadeColorProof(col, m_Doc, shad).name().mid(1);
color = color.toUpper();
- QString alpha = "";
+ QString alpha;
alpha.setNum(qRound((1.0 - transparency) * 255), 16);
alpha = alpha.toUpper();
if (alpha.length() == 1)
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -969,8 +969,7 @@
a = pg.attribute("NUM").toInt();
pageName = "";
pageName = pg.attribute("NAM", "");
- QString Mus = "";
- Mus = pg.attribute("MNAM","Normal");
+ QString Mus(pg.attribute("MNAM","Normal"));
if (pageName.isEmpty())
{
//We store the pages master page but do not apply it now
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -813,8 +813,7 @@
else
Apage = m_Doc->addMasterPage(a, pageName);
Apage->LeftPg=pg.attribute("LEFT", "0").toInt();
- QString Mus = "";
- Mus = pg.attribute("MNAM","Normal");
+ QString Mus(pg.attribute("MNAM","Normal"));
if (!m_Doc->masterPageMode())
Apage->setMasterPageName(Mus);
else
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -4408,8 +4408,7 @@
if (tName == QLatin1String("OSGViews"))
{
currentView.angleFOV = tAtt.valueAsDouble("angleFOV");
- QString tmp = "";
- tmp = tAtt.valueAsString("trackM");
+ QString tmp(tAtt.valueAsString("trackM"));
ScTextStream fp(&tmp, QIODevice::ReadOnly);
double m1, m2, m3, m4;
double m5, m6, m7, m8;
@@ -5980,8 +5979,7 @@
GrShade = attrs.valueAsInt("GRSHADE", 100);
GrShade2 = attrs.valueAsInt("GRSHADE2", 100);
}
- QString GrName = "";
- GrName = attrs.valueAsString("GRNAME","");
+ QString GrName(attrs.valueAsString("GRNAME",""));
if (!GrName.isEmpty())
currItem->setGradient(GrName);
if ((currItem->GrType == Gradient_4Colors) || (currItem->GrType == Gradient_Diamond))
@@ -6074,8 +6072,7 @@
currItem->GrStrokeFocalY = attrs.valueAsDouble("GRFOCALYS", 0.0);
currItem->GrStrokeScale = attrs.valueAsDouble("GRSCALES", 1.0);
currItem->GrStrokeSkew = attrs.valueAsDouble("GRSKEWS", 0.0);
- QString GrNameS = "";
- GrNameS = attrs.valueAsString("GRNAMES","");
+ QString GrNameS(attrs.valueAsString("GRNAMES",""));
if (!GrNameS.isEmpty())
currItem->setStrokeGradient(GrNameS);
@@ -6092,8 +6089,7 @@
bool mirrorXm = attrs.valueAsBool("pMirrorXM", false);
bool mirrorYm = attrs.valueAsBool("pMirrorYM", false);
currItem->setMaskFlip(mirrorXm, mirrorYm);
- QString GrNameM = "";
- GrNameM = attrs.valueAsString("GRNAMEM","");
+ QString GrNameM(attrs.valueAsString("GRNAMEM",""));
currItem->GrMask = attrs.valueAsInt("GRTYPM", 0);
if ((currItem->GrMask == GradMask_Linear) || (currItem->GrMask == GradMask_LinearLumAlpha))
currItem->mask_gradient = VGradient(VGradient::linear);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Tue Mar 29 18:34:32 2022
@@ -498,7 +498,7 @@
docu.writeAttribute("MAJORC",m_Doc->guidesPrefs().majorGridColor.name());
docu.writeAttribute("GuideC", m_Doc->guidesPrefs().guideColor.name());
docu.writeAttribute("BaseC", m_Doc->guidesPrefs().baselineGridColor.name());
- QString renderStack = "";
+ QString renderStack;
int renderStackCount = m_Doc->guidesPrefs().renderStackOrder.count();
for (int r = 0; r < renderStackCount; r++)
{
@@ -915,7 +915,7 @@
docu.writeEmptyElement("Tabs");
docu.writeAttribute("Type", (style.tabValues().at(a)).tabType);
docu.writeAttribute("Pos", (style.tabValues().at(a)).tabPosition);
- QString tabCh = "";
+ QString tabCh;
if (!(style.tabValues().at(a)).tabFillChar.isNull())
tabCh = QString((style.tabValues().at(a)).tabFillChar);
docu.writeAttribute("Fill", tabCh);
@@ -2399,7 +2399,7 @@
docu.writeStartElement("OSGViews");
docu.writeAttribute("viewName", itv.key());
docu.writeAttribute("angleFOV", itv.value().angleFOV);
- QString trackM = "";
+ QString trackM;
for (uint matx = 0; matx < 4; ++matx)
{
for (uint maty = 0; maty < 4; ++maty)
@@ -2408,17 +2408,17 @@
}
}
docu.writeAttribute("trackM", trackM);
- QString trackC = "";
+ QString trackC;
trackC += tmp.setNum(itv.value().trackerCenter[0])+" ";
trackC += tmp.setNum(itv.value().trackerCenter[1])+" ";
trackC += tmp.setNum(itv.value().trackerCenter[2]);
docu.writeAttribute("trackC", trackC);
- QString cameraP = "";
+ QString cameraP;
cameraP += tmp.setNum(itv.value().cameraPosition[0])+" ";
cameraP += tmp.setNum(itv.value().cameraPosition[1])+" ";
cameraP += tmp.setNum(itv.value().cameraPosition[2]);
docu.writeAttribute("cameraP", cameraP);
- QString cameraU = "";
+ QString cameraU;
cameraU += tmp.setNum(itv.value().cameraUp[0])+" ";
cameraU += tmp.setNum(itv.value().cameraUp[1])+" ";
cameraU += tmp.setNum(itv.value().cameraUp[2]);
@@ -2956,7 +2956,7 @@
if (item->DashValues.count() != 0)
{
docu.writeAttribute("NUMDASH", static_cast<int>(item->DashValues.count()));
- QString dlp = "";
+ QString dlp;
QVector<double>::Iterator dax;
for (dax = item->DashValues.begin(); dax != item->DashValues.end(); ++dax)
dlp += tmp.setNum((*dax)) + " ";
Modified: trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp Tue Mar 29 18:34:32 2022
@@ -83,7 +83,7 @@
void CsvIm::loadFile()
{
- QString text = "";
+ QString text;
/*
QFile f(filename);
QFileInfo fi(f);
@@ -157,7 +157,7 @@
}
int fdIndex = line.indexOf(fieldDelimiter, vdIndexEnd + 1);
- QString tmpCol = "";
+ QString tmpCol;
if (fdIndex < 0)
{
Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -180,7 +180,7 @@
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
- QString txt = "";
+ QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
@@ -220,7 +220,7 @@
{
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
- QString txt = "";
+ QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
@@ -387,8 +387,8 @@
{
if (spt.tagName() == "style:tab-stops")
{
- QString tabDists = "";
- QString tabTypes = "";
+ QString tabDists;
+ QString tabTypes;
for (QDomElement spte = spt.firstChildElement(); !spte.isNull(); spte = spte.nextSiblingElement() )
{
if (spte.tagName() == "style:tab-stop")
@@ -467,8 +467,8 @@
{
if (spt.tagName() == "style:tab-stops")
{
- QString tabDists = "";
- QString tabTypes = "";
+ QString tabDists;
+ QString tabTypes;
for (QDomElement spte = spt.firstChildElement(); !spte.isNull(); spte = spte.nextSiblingElement() )
{
if (spte.tagName() == "style:tab-stop")
@@ -650,7 +650,7 @@
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
- QString txt = "";
+ QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
@@ -691,7 +691,7 @@
ParagraphStyle tmpStyle = newStyle;
CharStyle tmpCStyle = tmpStyle.charStyle();
ObjStyleODT pStyle = tmpOStyle;
- QString parStyleName = "";
+ QString parStyleName;
QString pStyleName = elem.toElement().attribute("text:style-name");
if (pStyleName.length() > 0)
@@ -747,7 +747,7 @@
tmpCStyle = tmpStyle.charStyle();
applyCharacterStyle(tmpCStyle, pStyle);
}
- QString txt = "";
+ QString txt;
ObjStyleODT cStyle = pStyle;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp Tue Mar 29 18:34:32 2022
@@ -123,7 +123,7 @@
inNoteBody = true;
else if (name == "style:style")
{
- QString sname = "";
+ QString sname;
bool isTextStyle = false;
for (auto attr = attrs.cbegin(); attr != attrs.cend(); ++attr)
{
@@ -324,7 +324,7 @@
QString ContentReader::getName()
{
- QString s = "";
+ QString s;
for (uint i = 0; i < styleNames.size(); ++i)
s += styleNames[i];
return s;
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp Tue Mar 29 18:34:32 2022
@@ -186,15 +186,14 @@
{
currentStyle = nullptr;
QString styleFamily = attrs.value("style:family");
- if (styleFamily == "paragraph")
- {
- gtParagraphStyle* pstyle = new gtParagraphStyle(writer->getDefaultStyle()->asGtParagraphStyle());
- pstyle->setDefaultStyle(true);
- currentStyle = dynamic_cast<gtStyle*>(pstyle);
- currentStyle->setName("default-style");
- readProperties = true;
- defaultStyleCreated = true;
- }
+ if (styleFamily != "paragraph")
+ return;
+ gtParagraphStyle* pstyle = new gtParagraphStyle(writer->getDefaultStyle()->asGtParagraphStyle());
+ pstyle->setDefaultStyle(true);
+ currentStyle = dynamic_cast<gtStyle*>(pstyle);
+ currentStyle->setName("default-style");
+ readProperties = true;
+ defaultStyleCreated = true;
}
void StyleReader::styleProperties(const SXWAttributesMap& attrs)
@@ -425,27 +424,25 @@
void StyleReader::tabStop(const SXWAttributesMap& attrs)
{
- if (currentStyle->target() == "paragraph")
- {
- gtParagraphStyle* pstyle = dynamic_cast<gtParagraphStyle*>(currentStyle);
- assert(pstyle != nullptr);
- QString pos = attrs.value("style:position");
- QString type = attrs.value("style:type");
- if (!pos.isEmpty())
- {
- if (!type.isEmpty())
- type = "left";
- double posd = getSize(pos);
- if (type == "left")
- pstyle->setTabValue(posd, LEFT_T);
- else if (type == "right")
- pstyle->setTabValue(posd, RIGHT_T);
- else if (type == "center")
- pstyle->setTabValue(posd, CENTER_T);
- else
- pstyle->setTabValue(posd, CENTER_T);
- }
- }
+ if (currentStyle->target() != "paragraph")
+ return;
+ gtParagraphStyle* pstyle = dynamic_cast<gtParagraphStyle*>(currentStyle);
+ assert(pstyle != nullptr);
+ QString pos(attrs.value("style:position"));
+ if (pos.isEmpty())
+ return;
+ QString type(attrs.value("style:type"));
+ if (!type.isEmpty())
+ type = "left";
+ double posd = getSize(pos);
+ if (type == "left")
+ pstyle->setTabValue(posd, LEFT_T);
+ else if (type == "right")
+ pstyle->setTabValue(posd, RIGHT_T);
+ else if (type == "center")
+ pstyle->setTabValue(posd, CENTER_T);
+ else
+ pstyle->setTabValue(posd, CENTER_T);
}
void StyleReader::endElement(void*, const xmlChar * name)
@@ -510,16 +507,13 @@
gtStyle* StyleReader::getStyle(const QString& name)
{
- if (styles.contains(name))
- {
- gtStyle* tmp = styles[name];
- QString tname = tmp->getName();
- if ((tname.indexOf(docname) == -1) && (usePrefix))
- tmp->setName(docname + "_" + tname);
-
- return tmp;
- }
- return getDefaultStyle();
+ if (!styles.contains(name))
+ return getDefaultStyle();
+ gtStyle* tmp = styles[name];
+ QString tname(tmp->getName());
+ if ((tname.indexOf(docname) == -1) && (usePrefix))
+ tmp->setName(docname + "_" + tname);
+ return tmp;
}
void StyleReader::setStyle(const QString& name, gtStyle* style)
@@ -717,7 +711,7 @@
double StyleReader::getSize(const QString& s, double parentSize)
{
QString dbl("0.0");
- QString lowerValue = s.toLower();
+ QString lowerValue(s.toLower());
double ret = 0.0;
if (lowerValue.indexOf("pt") != -1)
{
Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -2598,7 +2598,7 @@
}
else if ((command == "%_Bs") || (command == "%_BS"))
{
- QString stopName = "";
+ QString stopName;
double stop = ScCLocale::toDoubleC(da2[da2.count()-2]) / 100.0;
double colorShade = 100.0;
int colortype = da2[da2.count()-4].toInt();
@@ -2656,8 +2656,8 @@
void AIPlug::processPattern(QDataStream &ts)
{
- QString tmp = "";
- QString tmpData = "";
+ QString tmp;
+ QString tmpData;
while (!ts.atEnd())
{
tmp = removeAIPrefix(readLineFromDataStream(ts));
@@ -2892,8 +2892,8 @@
{
double m1, m2, m3, m4, m5, m6, x1, y1, x2, y2, dummy;
int w, h, type, alpha, bin, bits;
- QString tmp = "";
- QString cumulated = "";
+ QString tmp;
+ QString cumulated;
while (!ts.atEnd())
{
tmp = readLineFromDataStream(ts);
@@ -2904,7 +2904,7 @@
if (!tmp.isEmpty())
cumulated += " " + tmp;
}
- QString Cdata = "";
+ QString Cdata;
QStringList da;
getCommands(cumulated, da);
Cdata = da.last();
Modified: trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -1518,7 +1518,6 @@
{
quint32 foID, foFlags1, foFlags2;
qint32 foHeight, foWidth, foEsc, foOri, foWeight;
- QString fontName = "";
ds >> foID >> foHeight >> foWidth >> foEsc >> foOri >> foWeight >> foFlags1 >> foFlags2;
QByteArray foNam;
for (int c = 0; c < 32; c++)
@@ -1529,7 +1528,7 @@
break;
foNam.append(cc);
}
- fontName = QString::fromUtf8(foNam.data());
+ QString fontName(QString::fromUtf8(foNam.data()));
emfStyle sty;
sty.styType = U_OT_Font;
sty.fontRotation = foOri / 10.0;
@@ -2701,7 +2700,7 @@
ds >> sx >> sy;
if (!(txOpts & 0x00000100))
ds >> bLeft >> bTop >> bRight >> bBottom;
- QString aTxt = "";
+ QString aTxt;
for (quint32 a = 0; a < numChar; a++)
{
if (txOpts & 0x00000200)
@@ -2756,7 +2755,7 @@
void EmfPlug::handleText(QDataStream &ds, qint64 posi, bool size)
{
- QString aTxt = "";
+ QString aTxt;
QPainterPath painterPath;
qint32 bLeft, bTop, bRight, bBottom, oLeft, oTop, oRight, oBottom;
quint32 grMode, numChar, offTxt, txOpts, offDx;
@@ -4340,7 +4339,7 @@
ds >> dummy;
ds >> emSize;
ds >> unit >> flags >> dummy >> length;
- QString fontName = "";
+ QString fontName;
for (quint32 a = 0; a < length; a++)
{
quint16 cc;
@@ -4870,7 +4869,7 @@
QPainterPath painterPath;
ds >> brushID >> formatID >> numChars;
QPolygonF rect = getEMFPRect(ds, false);
- QString stringData = "";
+ QString stringData;
for (quint32 a = 0; a < numChars; a++)
{
quint16 cc;
Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -1170,7 +1170,7 @@
newStyle.setName(styleElem.attribute("Name").remove("$ID/"));
newStyle.setParent(CommonStrings::DefaultCharacterStyle);
QString fontName = m_Doc->itemToolPrefs().textFont;
- QString fontBaseName = "";
+ QString fontBaseName;
QString fontStyle = styleElem.attribute("FontStyle", "");
for (QDomNode itp = styleElem.firstChild(); !itp.isNull(); itp = itp.nextSibling())
{
@@ -1211,7 +1211,7 @@
newStyle.setName(styleElem.attribute("Name").remove("$ID/"));
newStyle.setParent(CommonStrings::DefaultParagraphStyle);
QString fontName = m_Doc->itemToolPrefs().textFont;
- QString fontBaseName = "";
+ QString fontBaseName;
QString fontStyle = styleElem.attribute("FontStyle", "");
newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
for (QDomNode itp = styleElem.firstChild(); !itp.isNull(); itp = itp.nextSibling())
@@ -1720,14 +1720,14 @@
QTransform transformation(a, b, c, d, e, f);
QString itemName = itElem.attribute("Self");
QString fillColor = def_fillColor;
- QString fillGradient = "";
+ QString fillGradient;
double gstX = def_gradientX;
double gstY = def_gradientY;
double gLen = def_gradientLen;
double gAngle = def_gradientAngle;
int fillGradientTyp = 6;
QString strokeColor = def_strokeColor;
- QString strokeGradient = "";
+ QString strokeGradient;
double gstSX = def_gradientStrokeStartX;
double gstSY = def_gradientStrokeStartY;
double gSLen = def_gradientStrokeLength;
@@ -1904,13 +1904,13 @@
bool isPathText = false;
if (itElem.tagName() == "Group")
realGroup = true;
- QString imageType = "";
- QByteArray imageData = "";
- QString imageFileName = "";
+ QString imageType;
+ QByteArray imageData;
+ QString imageFileName;
QTransform imageTransform;
double imageDX = 0;
double imageDY = 0;
- QString storyForPath = "";
+ QString storyForPath;
int pathTextType = 0;
double pathTextStart = 0;
for (QDomNode it = itElem.firstChild(); !it.isNull(); it = it.nextSibling())
@@ -2180,7 +2180,7 @@
GCoords.map(finalMat);
if (isGroup)
{
- QString pre = "";
+ QString pre;
FPointArray gClip;
if (!realGroup)
{
@@ -2615,7 +2615,7 @@
getTransformValuesFromMatrix(imageTransform, scXi, scYi, roti, dxi, dyi);
if (imageData.count() > 0)
{
- QString imgExt = "";
+ QString imgExt;
if (imageType.contains("EPS", Qt::CaseInsensitive))
imgExt = "eps";
else if (imageType.contains("GIF", Qt::CaseInsensitive))
@@ -2855,7 +2855,7 @@
void IdmlPlug::parseCharacterStyleRange(QDomElement &stt, PageItem* item, QString fontBase, QString fontStyle, ParagraphStyle &newStyle, int posC)
{
- QString data = "";
+ QString data;
bool hasChangedFont = false;
for (QDomNode stcp = stt.firstChild(); !stcp.isNull(); stcp = stcp.nextSibling())
{
@@ -2920,7 +2920,7 @@
QDomElement s = stch.toElement();
if (s.tagName() == "Content")
{
- QString ch = "";
+ QString ch;
for (QDomNode sh = s.firstChild(); !sh.isNull(); sh = sh.nextSibling())
{
QString p = sh.nodeValue();
Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -346,7 +346,7 @@
QByteArray f;
loadRawText(fn, f);
QDomDocument designMapDom;
- QString errorMsg = "";
+ QString errorMsg;
int errorLine = 0;
int errorColumn = 0;
if (!designMapDom.setContent(f, &errorMsg, &errorLine, &errorColumn))
@@ -365,7 +365,7 @@
QByteArray f;
loadRawText(fn, f);
QDomDocument designMapDom;
- QString errorMsg = "";
+ QString errorMsg;
int errorLine = 0;
int errorColumn = 0;
if (designMapDom.setContent(f, &errorMsg, &errorLine, &errorColumn))
@@ -1589,7 +1589,7 @@
{
if (nc.tagName() == "office:binary-data")
{
- QString ext = "";
+ QString ext;
QByteArray buf = QByteArray::fromBase64(nc.text().toLatin1());
if ((buf[0] == '%') && (buf[1] == '!') && (buf[2] == 'P') && (buf[3] == 'S') && (buf[4] == '-') && (buf[5] == 'A'))
ext = "eps";
@@ -1714,7 +1714,7 @@
}
applyCharacterStyle(tmpCStyle, cStyle);
maxFsize = qMax(maxFsize, cStyle.fontSize);
- QString txt = "";
+ QString txt;
if (spn.isElement())
{
if (sp.tagName() == "text:span")
@@ -3900,7 +3900,7 @@
}
else if (!gStyle.patternData.isEmpty())
{
- QString ext = "";
+ QString ext;
QByteArray buf = QByteArray::fromBase64(gStyle.patternData);
if ((buf[0] == '%') && (buf[1] == '!') && (buf[2] == 'P') && (buf[3] == 'S') && (buf[4] == '-') && (buf[5] == 'A'))
ext = "eps";
Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -479,7 +479,7 @@
mpg = mp.namedItem( "meta:keywords" );
if (!mpg.isNull())
{
- QString Keys = "";
+ QString Keys;
for (QDomNode n = mpg.firstChild(); !n.isNull(); n = n.nextSibling())
{
Keys += n.toElement().text()+", ";
Modified: trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -857,7 +857,7 @@
}
delete tmpFile;
}
- QString errorMsg = "";
+ QString errorMsg;
int errorLine = 0;
int errorColumn = 0;
if (!designMapDom.setContent(f, &errorMsg, &errorLine, &errorColumn))
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -193,7 +193,7 @@
activeTransaction = UndoManager::instance()->beginTransaction(trSettings);
bool isCleanedFile = false;
- QString cleanFile = "";
+ QString cleanFile;
if (exts.contains(fi.suffix().toLower()))
{
if (!ScCore->haveGS())
Modified: trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp Tue Mar 29 18:34:32 2022
@@ -413,7 +413,7 @@
void PdfTextRegion::renderToTextFrame(PageItem* textNode)
{
textNode->setWidthHeight(this->maxWidth, this->maxHeight);
- QString bodyText = "";
+ QString bodyText;
for (int glyphIndex = this->pdfTextRegionLines.begin()->glyphIndex; glyphIndex <= this->pdfTextRegionLines.back().segments.back().glyphIndex; glyphIndex++)
bodyText += glyphs[glyphIndex].code;
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp Tue Mar 29 18:34:32 2022
@@ -449,7 +449,7 @@
int pagNum = 0;
int xco = 0;
int yco = 0;
- QString fileName = "";
+ QString fileName;
if (act->getKind() == actionGoTo)
{
LinkGoTo *gto = (LinkGoTo*) act;
@@ -678,8 +678,8 @@
}
QString m_currColorText = "Black";
double fontSize = 12;
- QString fontName = "";
- QString itemText = "";
+ QString fontName;
+ QString itemText;
AnnotAppearance *apa = annota->getAppearStreams();
if (apa || !achar)
{
@@ -738,15 +738,14 @@
ite->annotation().setBorderColor(CommonStrings::None);
ite->annotation().setBorderWidth(0);
}
- QString tmTxt = "";
- tmTxt = UnicodeParsedString(fm->getPartialName());
+ QString tmTxt(UnicodeParsedString(fm->getPartialName()));
if (!tmTxt.isEmpty())
ite->setItemName(tmTxt);
- tmTxt = "";
+ tmTxt.clear();
tmTxt = UnicodeParsedString(fm->getAlternateUiName());
if (!tmTxt.isEmpty())
ite->annotation().setToolTip(tmTxt);
- tmTxt = "";
+ tmTxt.clear();
if (achar)
{
tmTxt = UnicodeParsedString(achar->getRolloverCaption());
Modified: trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -1809,8 +1809,8 @@
ds >> fontV;
ds >> fontL;
ds >> fontNL;
- QString fName = "";
- QString fStyle = "";
+ QString fName;
+ QString fStyle;
for (uint i = 0; i < fontNL; ++i)
{
quint8 ch;
@@ -1864,7 +1864,7 @@
void SvmPlug::handleSmallText(QDataStream &ds)
{
- QString aTxt = "";
+ QString aTxt;
QPointF p1 = getPoint(ds);
if (currentDC.fontEnc == 0xFFFF)
{
@@ -1935,7 +1935,7 @@
void SvmPlug::handleText(QDataStream &ds, quint16 version)
{
- QString aTxt = "";
+ QString aTxt;
QPointF p1 = getPoint(ds);
if (currentDC.fontEnc == 0xFFFF)
{
@@ -3317,7 +3317,7 @@
ds >> dummy;
ds >> emSize;
ds >> unit >> flags >> dummy >> length;
- QString fontName = "";
+ QString fontName;
for (quint32 a = 0; a < length; a++)
{
quint16 cc;
@@ -3847,7 +3847,7 @@
QPainterPath painterPath;
ds >> brushID >> formatID >> numChars;
QPolygonF rect = getEMFPRect(ds, false);
- QString stringData = "";
+ QString stringData;
for (quint32 a = 0; a < numChars; a++)
{
quint16 cc;
Modified: trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -980,7 +980,7 @@
double ob_rotation = 0;
QString fillColor = CommonStrings::None;
QString strokeColor = CommonStrings::None;
- QString fillGradient = "";
+ QString fillGradient;
int fillGradientTyp = 6;
int fillTint = 100;
int strokeTint = 100;
@@ -1000,7 +1000,7 @@
bool resizable = false;
FPointArray Path;
Path.resize(0);
- QString imageFile = "";
+ QString imageFile;
QByteArray imageData;
imageData.resize(0);
QVector<double> DashValues;
@@ -2044,7 +2044,7 @@
}
else if (stxe.tagName() == "vta:tabulators")
{
- QString tabs = "";
+ QString tabs;
for (QDomNode stc = stxe.firstChild(); !stc.isNull(); stc = stc.nextSibling())
{
QDomElement stce = stc.toElement();
@@ -2297,7 +2297,7 @@
QString VivaPlug::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
- QString fontName = "";
+ QString fontName;
bool found = false;
SCFontsIterator it(PrefsManager::instance().appPrefs.fontPrefs.AvailFonts);
for ( ; it.hasNext(); it.next())
Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -958,7 +958,7 @@
quint16 charC = 0;
ts >> charC;
bytesRead += 2;
- QString FullFontName = "";
+ QString FullFontName;
while (charC != 0)
{
FullFontName += QChar(charC);
@@ -968,7 +968,7 @@
charC = 0;
ts >> charC;
bytesRead += 2;
- QString TypeFaceName = "";
+ QString TypeFaceName;
while (charC != 0)
{
TypeFaceName += QChar(charC);
@@ -1005,7 +1005,7 @@
XarStyle *gc = m_gc.top();
XarText text;
text.itemText = "";
- QString iText = "";
+ QString iText;
for (quint32 a = 0; a < l; a++)
{
ts >> val;
@@ -2820,7 +2820,7 @@
quint16 charC = 0;
ts >> charC;
bytesRead += 2;
- QString XarName = "";
+ QString XarName;
while (charC != 0)
{
XarName += QChar(charC);
@@ -3300,7 +3300,7 @@
quint8 layerFlags;
ts >> layerFlags;
ts >> charC;
- QString XarName = "";
+ QString XarName;
while (charC != 0)
{
XarName += QChar(charC);
@@ -3391,13 +3391,13 @@
ts >> colorRef;
ts >> component1 >> component2 >> component3 >> component4;
ts >> charC;
- QString XarName = "";
+ QString XarName;
while (charC != 0)
{
XarName += QChar(charC);
ts >> charC;
}
-/* QString colM = "";
+/* QString colM;
switch (colorModel)
{
case 2:
@@ -3413,7 +3413,7 @@
colM = "Gray";
break;
}
- QString colT = "";
+ QString colT;
switch (colorType)
{
case 0:
Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -899,9 +899,9 @@
void XfigPlug::processSpline(QDataStream &ts, const QString& data)
{
- QString tmp = data;
- QString fArrowData = "";
- QString bArrowData = "";
+ QString tmp(data);
+ QString fArrowData;
+ QString bArrowData;
int command;
int subtype; // 0: open approximated spline
// 1: closed approximated spline
@@ -1017,9 +1017,9 @@
void XfigPlug::processArc(QDataStream &ts, const QString& data)
{
- QString tmp = data;
- QString fArrowData = "";
- QString bArrowData = "";
+ QString tmp(data);
+ QString fArrowData;
+ QString bArrowData;
int command;
int subtype; // (1: open ended arc, 2: pie-wedge (closed))
int line_style; // (enumeration type)
Modified: trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -437,7 +437,7 @@
return false;
bool parsed = false;
- QString DocumentReference = "";
+ QString DocumentReference;
QDomElement docElem = designMapDom.documentElement();
for (QDomNode drawPag = docElem.firstChild(); !drawPag.isNull(); drawPag = drawPag.nextSibling())
{
@@ -469,7 +469,7 @@
if (!designMapDom.setContent(f))
return false;
- QString PageReference = "";
+ QString PageReference;
QDomElement docElem = designMapDom.documentElement();
if (importerFlags & LoadSavePlugin::lfCreateThumbnail)
{
@@ -668,8 +668,8 @@
{
Coords.resize(0);
Coords.svgInit();
- QString pdata = "";
- QString key = dpg.attribute("x:Key");
+ QString pdata;
+ QString key(dpg.attribute("x:Key"));
if (dpg.hasAttribute("Figures"))
pdata = dpg.attribute("Figures");
else if (dpg.hasChildNodes())
@@ -715,8 +715,8 @@
obState.JoinStyle = Qt::MiterJoin;
obState.DashOffset = 0;
obState.DashPattern.clear();
- QString itemName = "";
- QString itemTarget = "";
+ QString itemName;
+ QString itemTarget;
if (dpg.hasAttribute("Name"))
itemName = dpg.attribute("Name");
if (dpg.hasAttribute("FixedPage.NavigateUri"))
@@ -1166,7 +1166,7 @@
{
Coords.resize(0);
Coords.svgInit();
- QString pdata = "";
+ QString pdata;
QString key = dpg.attribute("x:Key");
if (dpg.hasAttribute("Figures"))
pdata = dpg.attribute("Figures");
@@ -1498,7 +1498,7 @@
{
Coords.resize(0);
Coords.svgInit();
- QString svgString = "";
+ QString svgString;
bool windFill = false;
for (QDomElement dpgp = spe.firstChildElement(); !dpgp.isNull(); dpgp = dpgp.nextSiblingElement())
{
@@ -1526,7 +1526,7 @@
QString XpsPlug::parsePathGeometryXML(QDomElement &spe)
{
- QString svgString = "";
+ QString svgString;
for (QDomElement dpg = spe.firstChildElement(); !dpg.isNull(); dpg = dpg.nextSiblingElement())
{
if (dpg.tagName() != "PathFigure")
@@ -1590,8 +1590,8 @@
continue;
Coords.resize(0);
Coords.svgInit();
- QString pdata = "";
- QString key = dpg.attribute("x:Key");
+ QString pdata;
+ QString key(dpg.attribute("x:Key"));
if (dpg.hasAttribute("Figures"))
pdata = dpg.attribute("Figures");
else if (dpg.hasChildNodes())
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp Tue Mar 29 18:34:32 2022
@@ -925,7 +925,7 @@
iafData.frameType=PageItem::ImageFrame;
iafData.source=tmpImage->fileInformation.absoluteFilePath();
- QString pageList = "";
+ QString pageList;
if (insertPagesCombobox->checkstate(1) == 1)
{
Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp (original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp Tue Mar 29 18:34:32 2022
@@ -239,8 +239,8 @@
if (tmplXml.open(QIODevice::ReadOnly))
{
QTextStream stream(&tmplXml);
- QString tmp = stream.readLine();
- QString file = "";
+ QString tmp(stream.readLine());
+ QString file;
while (!tmp.isNull())
{
file += tmp + "\n";
Modified: trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp Tue Mar 29 18:34:32 2022
@@ -125,7 +125,7 @@
QString TextAPI::text()
{
- QString text = "";
+ QString text;
for (int a = 0; a < item->itemText.length(); a++)
{
if (item->HasSel)
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp Tue Mar 29 18:34:32 2022
@@ -17,7 +17,7 @@
{
char *Name = const_cast<char*>("");
PageItem *item = nullptr;
- QString result = "";
+ QString result;
if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
return nullptr;
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp Tue Mar 29 18:34:32 2022
@@ -17,7 +17,7 @@
{
char *Name = const_cast<char*>("");
PageItem *item = nullptr;
- QString result = "";
+ QString result;
if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
return nullptr;
Modified: trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp (original)
+++ trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp Tue Mar 29 18:34:32 2022
@@ -450,12 +450,12 @@
ds >> version >> count;
while (!ds.atEnd())
{
- QString string = "";
- quint32 length, dummy, shpLen, paDataLen;
+ QString string;
+ quint32 length, dummy, shpLen, paDataLen;
ds >> length;
for (uint i = 0; i < length; ++i)
{
- quint16 ch;
+ quint16 ch;
ds >> ch;
if (ch > 0)
string += char(ch);
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Tue Mar 29 18:34:32 2022
@@ -1432,7 +1432,7 @@
deGuides.setAttribute("MarginColor", appPrefs.guidesPrefs.marginColor.name());
deGuides.setAttribute("BaselineGridColor", appPrefs.guidesPrefs.baselineGridColor.name());
deGuides.setAttribute("ObjectToGuideSnapRadius", ScCLocale::toQStringC(appPrefs.guidesPrefs.guideRad));
- QString renderStack = "";
+ QString renderStack;
int renderStackCount = appPrefs.guidesPrefs.renderStackOrder.count();
for (int r = 0; r < renderStackCount; r++)
{
Modified: trunk/Scribus/scribus/prefsreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/prefsreader.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsreader.cpp (original)
+++ trunk/Scribus/scribus/prefsreader.cpp Tue Mar 29 18:34:32 2022
@@ -51,8 +51,8 @@
}
else if (name == "attribute")
{
- QString key = "";
- QString value = "";
+ QString key;
+ QString value;
for (int i = 0; i < attrs.count(); ++i)
{
if (attrs.localName(i) == "key")
Modified: trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/printpreviewcreator_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_pdf.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreator_pdf.cpp Tue Mar 29 18:34:32 2022
@@ -527,7 +527,7 @@
}
}
sepInfo.close();
- QString currSeps = "";
+ QString currSeps;
uint spc = 0;
for (int sp = 0; sp < spots.count(); ++sp)
{
Modified: trunk/Scribus/scribus/printpreviewcreator_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/printpreviewcreator_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/printpreviewcreator_ps.cpp (original)
+++ trunk/Scribus/scribus/printpreviewcreator_ps.cpp Tue Mar 29 18:34:32 2022
@@ -556,7 +556,7 @@
}
}
sepInfo.close();
- QString currSeps = "";
+ QString currSeps;
uint spc = 0;
for (int sp = 0; sp < spots.count(); ++sp)
{
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Tue Mar 29 18:34:32 2022
@@ -1933,7 +1933,7 @@
break;
if (item->isBookmark)
{
- QString bm = "";
+ QString bm;
QString cc;
for (int d = 0; d < item->itemText.length(); ++d)
{
@@ -1947,7 +1947,7 @@
{
if ((item->annotation().Type() == 0) || (item->annotation().Type() == 1) || (item->annotation().Type() == Annotation::Text) || (item->annotation().Type() == Annotation::Link))
{
- QString bm = "";
+ QString bm;
QString cc;
for (int d = 0; d < item->itemText.length(); ++d)
{
@@ -2919,7 +2919,7 @@
}
for (int ac = 0; ac < cols.count(); ac++)
{
- QString colorVal = "";
+ QString colorVal;
if ((Options.useSpotColors) && ((spotColorSet.count() > 0) && (spotColorSet.count() < 28)) && (!GraySc))
{
if (spotColorSet.contains(cols.at(ac)))
@@ -3100,7 +3100,7 @@
}
for (int ac = 0; ac < cols.count(); ac++)
{
- QString colorVal = "";
+ QString colorVal;
if ((Options.useSpotColors) && ((spotColorSet.count() > 0) && (spotColorSet.count() < 28)) && (!GraySc))
{
if (spotColorSet.contains(cols.at(ac)))
@@ -3277,7 +3277,7 @@
}
for (int ac = 0; ac < cols.count(); ac++)
{
- QString colorVal = "";
+ QString colorVal;
if ((Options.useSpotColors) && ((spotColorSet.count() > 0) && (spotColorSet.count() < 28)) && (!GraySc))
{
if (spotColorSet.contains(cols.at(ac)))
@@ -3739,7 +3739,7 @@
if (StopVec.count() > 2)
{
PutStream("/Bounds [");
- QString bctx = "";
+ QString bctx;
for (int bc = 1; bc < StopVec.count() - 1; bc++)
{
bctx += ToStr(StopVec.at(bc)) + " ";
@@ -3748,7 +3748,7 @@
}
else
PutStream("/Bounds []\n");
- QString entx = "";
+ QString entx;
PutStream("/Functions\n");
PutStream("[\n");
for (int cc = 0; cc < colorNames.count() - 1; cc++)
Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp (original)
+++ trunk/Scribus/scribus/scfonts.cpp Tue Mar 29 18:34:32 2022
@@ -515,7 +515,7 @@
return t;
bool Subset = false;
char buf[128];
- QString glyName = "";
+ QString glyName;
ScFace::FontFormat format;
ScFace::FontType type;
FT_Face face = nullptr;
@@ -648,7 +648,7 @@
static bool firstRun;
bool Subset = false;
char buf[128];
- QString glyName = "";
+ QString glyName;
ScFace::FontFormat format;
ScFace::FontType type;
FT_Face face = nullptr;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Mar 29 18:34:32 2022
@@ -8187,7 +8187,7 @@
{
LanguageManager *langmgr(LanguageManager::instance());
// langmgr.init(false);
- QString tLang = "";
+ QString tLang;
for (uint dc = 0; dc < hyphDir.count(); ++dc)
{
QFileInfo fi(hyphDir[dc]);
Modified: trunk/Scribus/scribus/scribusXml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/scribusXml.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusXml.cpp (original)
+++ trunk/Scribus/scribus/scribusXml.cpp Tue Mar 29 18:34:32 2022
@@ -67,7 +67,7 @@
bool ScriXmlDoc::readElemHeader(const QString& file, bool isFile, double *x, double *y, double *w, double *h)
{
- QString ff = "";
+ QString ff;
if (isFile)
{
QByteArray f;
@@ -157,7 +157,7 @@
return "";
double xp, yp, wp, hp;
PageItem *item;
- QString documentStr = "";
+ QString documentStr;
item = selection->itemAt(0);
auto items = getItemsFromSelection(doc, selection);
Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Tue Mar 29 18:34:32 2022
@@ -2496,7 +2496,7 @@
void begin(const Xml_string& tag, Xml_attr attr)
{
StoryText* story = this->dig->top<StoryText>();
- QString l = "";
+ QString l;
MarkType t = MARKNoType;
Mark* mrk = nullptr;
Modified: trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&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 Tue Mar 29 18:34:32 2022
@@ -624,7 +624,7 @@
void SlaDocumentRtfOutput::createImage(const QByteArray &image, int width, int height, int type)
{
- QString imgExt = "";
+ QString imgExt;
double ww = pixelsFromTwips(width);
double hh = pixelsFromTwips(height);
if ((type == 0) || (type == 3) || (type == 4))
Modified: trunk/Scribus/scribus/ui/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/annot.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annot.cpp (original)
+++ trunk/Scribus/scribus/ui/annot.cpp Tue Mar 29 18:34:32 2022
@@ -709,7 +709,7 @@
void ScAnnot::setDateSample(const QString& ds)
{
QDateTime dt = QDateTime::currentDateTime();
- QString tmp = "";
+ QString tmp;
if (ds == "m/d")
tmp = "M/d";
if (ds == "m/d/yy")
Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp (original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp Tue Mar 29 18:34:32 2022
@@ -582,7 +582,7 @@
else if (it->parent() == patternItems)
{
QString patternName = origNames[it->text(0)];
- QString newName = "";
+ QString newName;
Query dia(this, "tt", true, tr("&Name:"), tr("Rename Entry"));
dia.setEditText(it->text(0), true);
dia.setTestList(dialogPatterns.keys());
@@ -1622,7 +1622,7 @@
{
ScTextStream ts(&f);
QString tmp, dummy;
- QString gradientName = "";
+ QString gradientName;
int numEntrys = 0;
int entryCount = 0;
int stopCount = 0;
Modified: trunk/Scribus/scribus/ui/curvewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/curvewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/curvewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/curvewidget.cpp Tue Mar 29 18:34:32 2022
@@ -458,7 +458,7 @@
PrefsManager::instance().prefsFile->getContext("dirs")->set("curves", fileName.left(fileName.lastIndexOf("/")));
if (overwrite(this, fileName))
{
- QString efval = "";
+ QString efval;
FPointArray Vals = cDisplay->getCurve();
QString tmp;
tmp.setNum(Vals.size());
Modified: trunk/Scribus/scribus/ui/gtdialogs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/gtdialogs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtdialogs.cpp (original)
+++ trunk/Scribus/scribus/ui/gtdialogs.cpp Tue Mar 29 18:34:32 2022
@@ -162,7 +162,7 @@
fileExtension = ".no_extension";
QString imp = m_prefs->get("remember"+ fileExtension, QString("false"));
- QString res = "";
+ QString res;
if (imp != "false")
{
res = imp;
Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp (original)
+++ trunk/Scribus/scribus/ui/hruler.cpp Tue Mar 29 18:34:32 2022
@@ -679,7 +679,7 @@
{
case SC_IN:
{
- QString tx = "";
+ QString tx;
int num1 = static_cast<int>((xl - pos) / m_iter2 / m_cor);
if (num1 != 0)
tx = QString::number(num1);
Modified: trunk/Scribus/scribus/ui/imageinfodialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/imageinfodialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/imageinfodialog.cpp (original)
+++ trunk/Scribus/scribus/ui/imageinfodialog.cpp Tue Mar 29 18:34:32 2022
@@ -99,7 +99,7 @@
Text6 = new QLabel( "", ExGroup);
layout2->addWidget( Text6, a+2, 0 );
- QString tag = "";
+ QString tag;
if (info->exifInfo.ExposureTime != 0)
{
float exposureTime = info->exifInfo.ExposureTime;
Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp (original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp Tue Mar 29 18:34:32 2022
@@ -97,7 +97,7 @@
if (parCount < 1)
return QString();
// first paragraph is always the same
- QString lorem = "";
+ QString lorem;
if (!loremIpsum.isEmpty())
lorem = loremIpsum[0];
if (parCount > 1)
Modified: trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/outputpreview_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_pdf.cpp (original)
+++ trunk/Scribus/scribus/ui/outputpreview_pdf.cpp Tue Mar 29 18:34:32 2022
@@ -742,7 +742,7 @@
}
}
sepInfo.close();
- QString currSeps = "";
+ QString currSeps;
uint spc = 0;
for (int sp = 0; sp < spots.count(); ++sp)
{
Modified: trunk/Scribus/scribus/ui/outputpreview_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/outputpreview_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outputpreview_ps.cpp (original)
+++ trunk/Scribus/scribus/ui/outputpreview_ps.cpp Tue Mar 29 18:34:32 2022
@@ -781,7 +781,7 @@
}
}
sepInfo.close();
- QString currSeps = "";
+ QString currSeps;
uint spc = 0;
for (int sp = 0; sp < spots.count(); ++sp)
{
Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp Tue Mar 29 18:34:32 2022
@@ -163,7 +163,7 @@
if (isReservedName(m_currentPage))
continue;
- QString extraWarn = "";
+ QString extraWarn;
if (!forceDelete)
{
Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp Tue Mar 29 18:34:32 2022
@@ -90,7 +90,7 @@
{
if (tmp == CommonStrings::trMasterPageNormal)
return;
- QString extraWarn = "";
+ QString extraWarn;
for (int i=0; i < currView->m_doc->DocPages.count(); ++i )
{
if (currView->m_doc->DocPages[i]->masterPageName() == tmp)
Modified: trunk/Scribus/scribus/ui/picsearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/picsearch.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picsearch.cpp (original)
+++ trunk/Scribus/scribus/ui/picsearch.cpp Tue Mar 29 18:34:32 2022
@@ -98,8 +98,8 @@
}
int xres = im.imgInfo.xres;
int yres = im.imgInfo.yres;
- QString tmp = "";
- QString tmp2 = "";
+ QString tmp;
+ QString tmp2;
QImage im2;
if ((ix > w-5) || (iy > h-44))
{
Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp (original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp Tue Mar 29 18:34:32 2022
@@ -147,7 +147,7 @@
{
item = allItems.at(ii);
QFileInfo fi = QFileInfo(item->Pfile);
- QString Iname = "";
+ QString Iname;
if (item->isInlineImage)
Iname = tr("Embedded Image");
else
@@ -171,7 +171,7 @@
{
item = allItems.at(ii);
QFileInfo fi = QFileInfo(item->Pfile);
- QString Iname = "";
+ QString Iname;
if (item->isInlineImage)
Iname = tr("Embedded Image");
else
@@ -322,7 +322,7 @@
searchButton->setEnabled(true);
fileManagerButton->setEnabled(true);
}
- QString format = "";
+ QString format;
switch (currItem->pixm.imgInfo.type)
{
case 0:
Modified: trunk/Scribus/scribus/ui/recoverdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/recoverdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/recoverdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/recoverdialog.cpp Tue Mar 29 18:34:32 2022
@@ -139,9 +139,9 @@
QString name = fi.baseName();
QStringList parts;
parts.clear();
- QString fName = "";
- QString fDate = "";
- QString fType = "";
+ QString fName;
+ QString fDate;
+ QString fType;
if (name.contains("_emergency_"))
{
parts = name.split("_emergency_");
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Tue Mar 29 18:34:32 2022
@@ -1659,8 +1659,7 @@
if (vheight >= scr.height())
vheight = qMax(0, scr.height() - vtop);
setGeometry(vleft, vtop, vwidth, vheight);
- QByteArray state = "";
- state = prefs->get("winstate","").toLatin1();
+ QByteArray state(prefs->get("winstate","").toLatin1());
if (!state.isEmpty())
restoreState(QByteArray::fromBase64(state));
int side = prefs->getInt("side", -1);
Modified: trunk/Scribus/scribus/util_color.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25070&path=/trunk/Scribus/scribus/util_color.cpp
==============================================================================
--- trunk/Scribus/scribus/util_color.cpp (original)
+++ trunk/Scribus/scribus/util_color.cpp Tue Mar 29 18:34:32 2022
@@ -905,7 +905,7 @@
}
else
{
- QString paletteName = "";
+ QString paletteName;
QString dummy;
if (ColorEn.startsWith("GIMP Palette"))
{
More information about the scribus-commit
mailing list