r23820 by craig - Code cleanup
scribus-commit
scribus-commit at lists.scribus.net
Tue May 19 20:28:27 UTC 2020
Author: craig
Date: Tue May 19 20:28:27 2020
New Revision: 23820
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23820
Log:
Code cleanup
Modified:
trunk/Scribus/scribus/canvasmode_drawbezier.cpp
trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
trunk/Scribus/scribus/canvasmode_magnifier.cpp
trunk/Scribus/scribus/canvasmode_nodeedit.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_objimport.cpp
trunk/Scribus/scribus/chartableview.cpp
trunk/Scribus/scribus/colormgmt/sccolorprofile.h
trunk/Scribus/scribus/colormgmt/sccolorspace.h
trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.h
trunk/Scribus/scribus/exif.cpp
trunk/Scribus/scribus/fontlistmodel.cpp
trunk/Scribus/scribus/fonts/cff.h
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h
trunk/Scribus/scribus/pageitem_latexframe.cpp
trunk/Scribus/scribus/pageitem_spiral.cpp
trunk/Scribus/scribus/pageitem_table.h
trunk/Scribus/scribus/pdflib_core.h
trunk/Scribus/scribus/pdfversion.cpp
trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h
trunk/Scribus/scribus/plugins/shapes/shapepalette.h
trunk/Scribus/scribus/pslib.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/text/shapedtextfeed.h
trunk/Scribus/scribus/text/specialchars.cpp
trunk/Scribus/scribus/text/storytext.cpp
trunk/Scribus/scribus/text/textlayout.h
trunk/Scribus/scribus/ui/colorsandfills.h
trunk/Scribus/scribus/ui/contentpalette.h
trunk/Scribus/scribus/ui/pagepalette_pages.cpp
trunk/Scribus/scribus/ui/pagepalette_pages.h
trunk/Scribus/scribus/ui/polyprops.h
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/printdialog.h
trunk/Scribus/scribus/ui/printpreview.cpp
trunk/Scribus/scribus/ui/printpreview.h
trunk/Scribus/scribus/ui/propertiespalette_line.cpp
trunk/Scribus/scribus/ui/propertiespalette_line.h
trunk/Scribus/scribus/ui/propertywidget_textcolor.h
trunk/Scribus/scribus/ui/resourcemanager.cpp
trunk/Scribus/scribus/ui/scmenu.cpp
trunk/Scribus/scribus/ui/scmenu.h
trunk/Scribus/scribus/ui/smcellstylewidget.cpp
trunk/Scribus/scribus/ui/transparencypalette.h
trunk/Scribus/scribus/units.cpp
trunk/Scribus/scribus/units.h
trunk/Scribus/scribus/util.cpp
trunk/Scribus/scribus/util.h
trunk/Scribus/scribus/util_color.cpp
trunk/Scribus/scribus/vgradientex.cpp
trunk/Scribus/scribus/vgradientex.h
Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp Tue May 19 20:28:27 2020
@@ -234,7 +234,6 @@
{
const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
- double newX, newY;
PageItem *currItem;
FPoint npf, npf2;
// QRect tx;
@@ -250,8 +249,8 @@
{
if (GetItem(&currItem))
{
- newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
- newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
+ double newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
+ double newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
if (m_doc->DragP)
return;
@@ -273,8 +272,8 @@
{
if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
{
- newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
- newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
+ double newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
+ double newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
m_view->setRedrawMarkerShown(true);
Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp Tue May 19 20:28:27 2020
@@ -362,9 +362,8 @@
if (m_selectedPoint != -1)
{
m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
- FPoint mp, mp_orig;
- mp_orig = m_currItem->weldList[m_selectedPoint].weldPoint;
- mp = mp_orig - npx;
+ FPoint mp_orig = m_currItem->weldList[m_selectedPoint].weldPoint;
+ FPoint mp = mp_orig - npx;
double xx = mp.x();
double yy = mp.y();
snapToEdgePoints(xx, yy);
Modified: trunk/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.cpp Tue May 19 20:28:27 2020
@@ -129,7 +129,6 @@
void CanvasMode_Magnifier::mousePressEvent(QMouseEvent *m)
{
- double Rxp = 0, Ryp = 0;
const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->PaintSizeRect(QRect());
@@ -142,9 +141,9 @@
m_view->registerMousePress(m->globalPos());
m_Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
m_Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
- Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
+ double Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
m_Mxp = qRound(Rxp);
- Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
+ double Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
m_Myp = qRound(Ryp);
m_SeRx = m_Mxp;
m_SeRy = m_Myp;
Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Tue May 19 20:28:27 2020
@@ -45,7 +45,6 @@
void CanvasMode_NodeEdit::drawControls(QPainter* p)
{
- double x, y;
if (m_doc->m_Selection->isEmpty())
return;
if (m_doc->nodeEdit.previewMode())
@@ -102,6 +101,8 @@
p->drawLine(QPointF(a3.x(), a3.y()), QPointF(a4.x(), a4.y()));
}
}
+ double x = 0.0;
+ double y = 0.0;
// draw points
for (int i = 0; i < cli.size() - 1; i += 2)
{
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Tue May 19 20:28:27 2020
@@ -307,7 +307,10 @@
Canvas::FrameHandle frameResizeHandle(Canvas::OUTSIDE);
if (m_doc->m_Selection->count() > 0)
{
- double gx(0.0), gy(0.0), gw(0.0), gh(0.0);
+ double gx = 0.0;
+ double gy = 0.0;
+ double gw = 0.0;
+ double gh = 0.0;
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(), mousePointDoc.y()), QRectF(gx, gy, gw, gh));
}
Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp Tue May 19 20:28:27 2020
@@ -136,7 +136,6 @@
// const double mouseY = m->globalY();
const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
- double Rxp = 0, Ryp = 0;
m_canvas->PaintSizeRect(QRect());
m_canvas->m_viewMode.m_MouseButtonPressed = true;
m_canvas->m_viewMode.operItemMoving = false;
@@ -148,9 +147,9 @@
m_view->registerMousePress(m->globalPos());
m_Mxp = mousePointDoc.x();
m_Myp = mousePointDoc.y();
- Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
+ double Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
m_Mxp = qRound(Rxp);
- Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
+ double Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
m_Myp = qRound(Ryp);
if (m->button() == Qt::MidButton)
{
Modified: trunk/Scribus/scribus/chartableview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/chartableview.cpp
==============================================================================
--- trunk/Scribus/scribus/chartableview.cpp (original)
+++ trunk/Scribus/scribus/chartableview.cpp Tue May 19 20:28:27 2020
@@ -20,8 +20,7 @@
{
deleteAct = new QAction( tr("Delete"), this);
connect(deleteAct, SIGNAL(triggered()), this, SLOT(removeCharacter()));
- connect(this, SIGNAL(doubleClicked(const QModelIndex &)),
- this, SLOT(viewDoubleClicked(const QModelIndex &)));
+ connect(this, SIGNAL(doubleClicked(const QModelIndex &)),this, SLOT(viewDoubleClicked(const QModelIndex &)));
actionMenu = new QMenu(this);
actionMenu->addAction(deleteAct);
Modified: trunk/Scribus/scribus/colormgmt/sccolorprofile.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/colormgmt/sccolorprofile.h
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorprofile.h (original)
+++ trunk/Scribus/scribus/colormgmt/sccolorprofile.h Tue May 19 20:28:27 2020
@@ -43,7 +43,7 @@
bool save(QByteArray& profileData) const;
- bool operator==(const ScColorProfile& prof) const;
+ bool operator==(const ScColorProfile& other) const;
protected:
QSharedPointer<ScColorProfileData> m_data;
Modified: trunk/Scribus/scribus/colormgmt/sccolorspace.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/colormgmt/sccolorspace.h
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorspace.h (original)
+++ trunk/Scribus/scribus/colormgmt/sccolorspace.h Tue May 19 20:28:27 2020
@@ -63,7 +63,7 @@
const ScColorSpaceData* data() const { return m_data.data(); }
- bool operator==(const ScColorSpace& cspace) const;
+ bool operator==(const ScColorSpace& other) const;
protected:
QSharedPointer<ScColorSpaceData> m_data;
Modified: trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.h
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.h (original)
+++ trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.h Tue May 19 20:28:27 2020
@@ -30,7 +30,7 @@
// functions for opening icc profiles
ScColorProfile openProfileFromFile(ScColorMgmtEngine& engine, const QString& filePath) override;
- ScColorProfile openProfileFromMem (ScColorMgmtEngine& engine, const QByteArray& array) override;
+ ScColorProfile openProfileFromMem (ScColorMgmtEngine& engine, const QByteArray& data) override;
// functions for creating profiles
ScColorProfile createProfile_sRGB(ScColorMgmtEngine& engine) override;
@@ -38,16 +38,16 @@
// functions for creating transforms
ScColorTransform createTransform(ScColorMgmtEngine& colorManagementEngine,
- const ScColorProfile& inputProfile , eColorFormat inputFormat,
- const ScColorProfile& outputProfile, eColorFormat outputFormat,
- eRenderIntent renderIntent, long transformFlags) override;
- ScColorTransform createProofingTransform(ScColorMgmtEngine& colorManagementEngine,
- const ScColorProfile& inputProfile , eColorFormat inputFormat,
- const ScColorProfile& outputProfile, eColorFormat outputFormat,
- const ScColorProfile& proofing, eRenderIntent renderIntent,
- eRenderIntent proofingIntent, long transformFlags) override;
+ const ScColorProfile& inputProfile , eColorFormat inputFormat,
+ const ScColorProfile& outputProfile, eColorFormat outputFormat,
+ eRenderIntent renderIntent, long transformFlags) override;
+ ScColorTransform createProofingTransform(ScColorMgmtEngine& engine,
+ const ScColorProfile& inputProfile , eColorFormat inputFormat,
+ const ScColorProfile& outputProfile, eColorFormat outputFormat,
+ const ScColorProfile& proofProfile , eRenderIntent renderIntent,
+ eRenderIntent proofingIntent, long transformFlags) override;
-protected:
+ protected:
// Color profile cache
static QSharedPointer<ScColorProfileCache> m_profileCache;
@@ -57,7 +57,7 @@
static cmsUInt32Number translateFlagsToLcmsFlags(long flags);
static cmsUInt32Number translateFormatToLcmsFormat(eColorFormat format);
- static int translateIntentToLcmsIntent(eRenderIntent intent, eRenderIntent defaut = Intent_Relative_Colorimetric);
+ static int translateIntentToLcmsIntent(eRenderIntent intent, eRenderIntent defIntent = Intent_Relative_Colorimetric);
static eColorSpaceType translateLcmsColorSpaceType(cmsColorSpaceSignature);
static eProfileClass translateLcmsProfileClass(cmsProfileClassSignature);
Modified: trunk/Scribus/scribus/exif.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/exif.cpp
==============================================================================
--- trunk/Scribus/scribus/exif.cpp (original)
+++ trunk/Scribus/scribus/exif.cpp Tue May 19 20:28:27 2020
@@ -42,22 +42,22 @@
TagTable ProcessTable[] =
- {
- TagTable ( M_SOF0, "Baseline" ),
- TagTable ( M_SOF1, "Extended sequential" ),
- TagTable ( M_SOF2, "Progressive" ),
- TagTable ( M_SOF3, "Lossless" ),
- TagTable ( M_SOF5, "Differential sequential" ),
- TagTable ( M_SOF6, "Differential progressive" ),
- TagTable ( M_SOF7, "Differential lossless" ),
- TagTable ( M_SOF9, "Extended sequential, arithmetic coding" ),
- TagTable ( M_SOF10, "Progressive, arithmetic coding" ),
- TagTable ( M_SOF11, "Lossless, arithmetic coding" ),
- TagTable ( M_SOF13, "Differential sequential, arithmetic coding" ),
- TagTable ( M_SOF14, "Differential progressive, arithmetic coding" ),
- TagTable ( M_SOF15, "Differential lossless, arithmetic coding" ),
- TagTable ( 0, "Unknown" )
- };
+ {
+ TagTable ( M_SOF0, "Baseline" ),
+ TagTable ( M_SOF1, "Extended sequential" ),
+ TagTable ( M_SOF2, "Progressive" ),
+ TagTable ( M_SOF3, "Lossless" ),
+ TagTable ( M_SOF5, "Differential sequential" ),
+ TagTable ( M_SOF6, "Differential progressive" ),
+ TagTable ( M_SOF7, "Differential lossless" ),
+ TagTable ( M_SOF9, "Extended sequential, arithmetic coding" ),
+ TagTable ( M_SOF10, "Progressive, arithmetic coding" ),
+ TagTable ( M_SOF11, "Lossless, arithmetic coding" ),
+ TagTable ( M_SOF13, "Differential sequential, arithmetic coding" ),
+ TagTable ( M_SOF14, "Differential progressive, arithmetic coding" ),
+ TagTable ( M_SOF15, "Differential lossless, arithmetic coding" ),
+ TagTable ( 0, "Unknown" )
+ };
//--------------------------------------------------------------------------
// Describes format descriptor
@@ -856,8 +856,8 @@
// Check for format: YYYY:MM:DD HH:MM:SS format.
a = sscanf ( ExifTime, "%d:%d:%d %d:%d:%d",
- &timeptr->tm_year, &timeptr->tm_mon, &timeptr->tm_mday,
- &timeptr->tm_hour, &timeptr->tm_min, &timeptr->tm_sec );
+ &timeptr->tm_year, &timeptr->tm_mon, &timeptr->tm_mday,
+ &timeptr->tm_hour, &timeptr->tm_min, &timeptr->tm_sec );
if ( a == 6 )
{
Modified: trunk/Scribus/scribus/fontlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/fontlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.cpp (original)
+++ trunk/Scribus/scribus/fontlistmodel.cpp Tue May 19 20:28:27 2020
@@ -59,7 +59,7 @@
endResetModel();
}
-int FontListModel::rowCount(const QModelIndex&) const
+int FontListModel::rowCount(const QModelIndex& /*mi*/) const
{
return m_font_names.size();
}
@@ -69,7 +69,7 @@
return m_font_names.size();
}
-int FontListModel::columnCount(const QModelIndex&) const
+int FontListModel::columnCount(const QModelIndex& /*mi*/) const
{
return 9;
}
Modified: trunk/Scribus/scribus/fonts/cff.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/fonts/cff.h
==============================================================================
--- trunk/Scribus/scribus/fonts/cff.h (original)
+++ trunk/Scribus/scribus/fonts/cff.h Tue May 19 20:28:27 2020
@@ -230,7 +230,7 @@
/// This write the header, name index and TopDict index for exactly one font.
/// All unknown offset are preset as 4 byte cardinal and corresponding operator positions returned
- uint writeTopDict(const QByteArray& name, const QMap<operator_type, CFF_Variant>& dict, const QList<QByteArray>& oldStrings, QHash<operator_type, uint>& patches);
+ uint writeTopDict(const QByteArray& name, const QMap<operator_type, CFF_Variant>& dict, const QList<QByteArray>& oldStrings, QHash<operator_type, uint>& patchAddresses);
/// this will write another segment and return the start offset
uint writeSegment(const QByteArray& data);
void patch(QHash<operator_type, uint> patchPositions, uint patchOffset, operator_type op, uint offset, uint length = 0);
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h Tue May 19 20:28:27 2020
@@ -62,7 +62,7 @@
void handleQuickTime(QDataStream &ts, quint16 opCode);
void handleComment(QDataStream &ts, bool longComment);
QRect readRect(QDataStream &ts);
- QByteArray decodeRLE(QByteArray &in, quint16 bytesPerLine, int twoByte);
+ QByteArray decodeRLE(QByteArray &in, quint16 bytesPerLine, int multByte);
QBrush setFillPattern();
int m_baseX, m_baseY;
Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Tue May 19 20:28:27 2020
@@ -161,7 +161,8 @@
bool PageItem_LatexFrame::loadImage(const QString & filename, bool reload, int gsResolution, bool showMsg)
{
//Save state and restore afterwards
- double xres, yres;
+ double xres = 0.0;
+ double yres = 0.0;
if (imageIsAvailable)
{
xres = pixm.imgInfo.xres;
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Tue May 19 20:28:27 2020
@@ -218,7 +218,6 @@
double endAngleK = spiralEndAngle;
double spiralHeight = height();
double spiralWidth = width();
- QPainterPath path, path2;
double sh = spiralHeight / (spiralFactor + 1.0);
double sw = 0.0;
double ww = spiralWidth;
@@ -230,6 +229,8 @@
bool segPart = true;
bool draw = false;
QPointF tp;
+ QPainterPath path;
+ QPainterPath path2;
path2.moveTo(sw, sh);
while (segStart < endAngleK)
{
Modified: trunk/Scribus/scribus/pageitem_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pageitem_table.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.h (original)
+++ trunk/Scribus/scribus/pageitem_table.h Tue May 19 20:28:27 2020
@@ -667,10 +667,10 @@
*/
/// The logical active row.
- int m_activeRow;
+ int m_activeRow {0};
/// The logical active column.
- int m_activeColumn;
+ int m_activeColumn {0};
//>>End of live working variables/data
};
Modified: trunk/Scribus/scribus/pdflib_core.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pdflib_core.h
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.h (original)
+++ trunk/Scribus/scribus/pdflib_core.h Tue May 19 20:28:27 2020
@@ -111,7 +111,7 @@
PdfFont PDF_EncodeCidFont(const QByteArray& fontname, ScFace& face, const QByteArray& baseFont, PdfId fontDes, const ScFace::FaceEncoding& gl, const QMap<uint,uint>& glyphmap);
PdfFont PDF_EncodeFormFont(const QByteArray& fontname, ScFace& face, const QByteArray& baseFont, const QByteArray& subtype, PdfId fontDes);
PdfId PDF_EmbedFontObject(const QString& fontName, ScFace &face);
- PdfId PDF_EmbedFontObject(const QByteArray& ttf, const QByteArray& subtype);
+ PdfId PDF_EmbedFontObject(const QByteArray& font, const QByteArray& subtype);
PdfId PDF_EmbedType1AsciiFontObject(const QByteArray& fontData);
PdfId PDF_EmbedType1BinaryFontObject(const QByteArray& fontData);
Modified: trunk/Scribus/scribus/pdfversion.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pdfversion.cpp
==============================================================================
--- trunk/Scribus/scribus/pdfversion.cpp (original)
+++ trunk/Scribus/scribus/pdfversion.cpp Tue May 19 20:28:27 2020
@@ -60,7 +60,5 @@
bool PDFVersion::supportsPDF15PresentationEffects() const
{
- if (m_version == PDF_15 || m_version == PDF_16)
- return true;
- return false;
+ return m_version == PDF_15 || m_version == PDF_16;
}
Modified: trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp Tue May 19 20:28:27 2020
@@ -268,7 +268,8 @@
if (tmp.isEmpty())
return true;
}
- QString chl(tmp.at(0)), chr(tmp.right(1));
+ QString chl(tmp.at(0));
+ QString chr(tmp.right(1));
bool fcis = (chl.length() > 0 && chl[0].isSpace());
bool lcis = (chr.length() > 0 && chr[0].isSpace());
if (inPre)
Modified: trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp Tue May 19 20:28:27 2020
@@ -92,7 +92,6 @@
{
FILE *m_pdfp = fopen(fname.toLocal8Bit(), "rb");
pdb_header m_header;
- DWord file_size, offset;
doc_record0 m_rec0;
if (!m_pdfp)
@@ -122,6 +121,7 @@
int num_records = swap_Word( m_header.numRecords ) - 1;
ScCore->primaryMainWindow()->mainWindowProgressBar->setMaximum(num_records);
fseek(m_pdfp, PDB_HEADER_SIZE, SEEK_SET);
+ DWord offset;
GET_DWord(m_pdfp, offset);
fseek(m_pdfp, offset, SEEK_SET);
result = fread(&m_rec0, sizeof(m_rec0), 1, m_pdfp);
@@ -134,7 +134,7 @@
bCompressed = true;
fseek( m_pdfp, 0, SEEK_END );
- file_size = ftell( m_pdfp );
+ DWord file_size = ftell( m_pdfp );
for (int rec_num = 1; rec_num <= num_records; ++rec_num )
{
DWord next_offset;
Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&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 May 19 20:28:27 2020
@@ -356,7 +356,8 @@
void ContentReader::getStyle()
{
- gtStyle *style = nullptr, *tmp = nullptr;
+ gtStyle *style = nullptr;
+ gtStyle *tmp = nullptr;
if (styleNames.empty())
style = sreader->getStyle("default-style");
else
Modified: trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&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 Tue May 19 20:28:27 2020
@@ -129,7 +129,6 @@
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
cancel = false;
- double x, y, b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fNameIn);
@@ -159,10 +158,10 @@
else
progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
- x = 0.0;
- y = 0.0;
- b = 0.0;
- h = 0.0;
+ double x = 0.0;
+ double y = 0.0;
+ double b = 0.0;
+ double h = 0.0;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&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 Tue May 19 20:28:27 2020
@@ -174,9 +174,8 @@
{
ScribusMainWindow* mw = (m_Doc==nullptr) ? ScCore->primaryMainWindow() : m_Doc->scMW();
progressDialog = new MultiProgressDialog( tr("Importing: %1").arg(fi.fileName()), CommonStrings::tr_Cancel, mw );
- QStringList barNames, barTexts;
- barNames << "GI";
- barTexts << tr("Analyzing File:");
+ QStringList barNames("GI");
+ QStringList barTexts(tr("Analyzing File:"));
QList<bool> barsNumeric;
barsNumeric << false;
progressDialog->addExtraProgressBars(barNames, barTexts, barsNumeric);
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h Tue May 19 20:28:27 2020
@@ -114,7 +114,6 @@
//contains how many icons are visible at once, is calculated from QListView height/width and previewIconSize
int previewIconsVisible;
int currentRow;
- bool saveSettings;
signals:
//signal which posts a new job to the imageloading thread
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Tue May 19 20:28:27 2020
@@ -414,10 +414,9 @@
// set to print all pages
PyObject *pages = nullptr;
- int num = 0;
// which one should I use ???
// new = ScCore->primaryMainWindow()->view->Pages.count()
- num = currentDoc->Pages->count();
+ int num = currentDoc->Pages->count();
pages = PyList_New(num);
if (!pages){
PyErr_SetString(PyExc_SystemError, "Can not initialize 'pages' attribute");
@@ -485,7 +484,6 @@
self->presentation = pdfOptions.PresentMode;
// set effects values for all pages
PyObject *effval = nullptr;
- num = 0;
// which one should I use ???
// new = ScCore->primaryMainWindow()->view->Pages.count();
num = currentDoc->Pages->count();
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h Tue May 19 20:28:27 2020
@@ -84,9 +84,9 @@
// Preferences
/** \brief pref: Enable access to main interpreter and 'extension scripts' */
- bool m_enableExtPython;
+ bool m_enableExtPython {false};
/** \brief pref: Run 'from scribus import *' at scripter startup */
- bool m_importAllNames;
+ bool m_importAllNames {true};
/** \brief pref: Load this script on startup */
QString m_startupScript;
};
Modified: trunk/Scribus/scribus/plugins/shapes/shapepalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/plugins/shapes/shapepalette.h
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapepalette.h (original)
+++ trunk/Scribus/scribus/plugins/shapes/shapepalette.h Tue May 19 20:28:27 2020
@@ -110,16 +110,16 @@
void languageChange();
protected:
- ShapeView *ShapeViewWidget;
- QToolBox* Frame3;
- QWidget* containerWidget;
- QVBoxLayout* vLayout;
- QHBoxLayout* buttonLayout;
- QToolButton* importButton;
- QToolButton* closeButton;
+ ShapeView *ShapeViewWidget {nullptr};
+ QToolBox* Frame3 {nullptr};
+ QWidget* containerWidget {nullptr};
+ QVBoxLayout* vLayout {nullptr};
+ QHBoxLayout* buttonLayout {nullptr};
+ QToolButton* importButton {nullptr};
+ QToolButton* closeButton {nullptr};
- ScribusDoc *m_doc;
- ScribusMainWindow *m_scMW;
+ ScribusDoc *m_doc {nullptr};
+ ScribusMainWindow *m_scMW {nullptr};
};
#endif
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Tue May 19 20:28:27 2020
@@ -642,7 +642,7 @@
QStringList patterns = m_Doc->getPatternDependencyList(m_Doc->getUsedPatterns());
for (int i = 0; i < patterns.count(); ++i)
{
- QString patternName = patterns.at(i);
+ QString patternName(patterns.at(i));
ScPattern pa = m_Doc->docPatterns[patternName];
for (PageItemIterator it(pa.items); *it; ++it)
{
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue May 19 20:28:27 2020
@@ -6976,7 +6976,7 @@
ScMessageBox::warning(this, CommonStrings::trWarning, mess);
return;
}
- PrintPreview *dia = new PrintPreview(this, view, doc, currentPrinter, currentEngine);
+ PrintPreview *dia = new PrintPreview(this, doc, currentPrinter, currentEngine);
previewDinUse = true;
connect(dia, SIGNAL(doPrint()), this, SLOT(slotReallyPrint()));
dia->exec();
Modified: trunk/Scribus/scribus/text/shapedtextfeed.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/text/shapedtextfeed.h
==============================================================================
--- trunk/Scribus/scribus/text/shapedtextfeed.h (original)
+++ trunk/Scribus/scribus/text/shapedtextfeed.h Tue May 19 20:28:27 2020
@@ -32,7 +32,7 @@
int m_endChar;
public:
- ShapedTextFeed(ITextSource* source, int startChar, ITextContext* context, IShapedTextCache* cache = nullptr);
+ ShapedTextFeed(ITextSource* source, int firstChar, ITextContext* context, IShapedTextCache* cache = nullptr);
bool haveMoreText(int glyphPos, QList<GlyphCluster>& glyphs);
Modified: trunk/Scribus/scribus/text/specialchars.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/text/specialchars.cpp
==============================================================================
--- trunk/Scribus/scribus/text/specialchars.cpp (original)
+++ trunk/Scribus/scribus/text/specialchars.cpp Tue May 19 20:28:27 2020
@@ -77,9 +77,7 @@
if (isLatin1 && isCJK2)
return true;
bool isLatin2 = SpecialChars::isLetterRequiringSpaceAroundCJK(c2);
- if (isCJK1 && isLatin2)
- return true;
- return false;
+ return isCJK1 && isLatin2;
}
bool SpecialChars::isBreak(QChar c, bool includeColBreak)
Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Tue May 19 20:28:27 2020
@@ -126,10 +126,7 @@
}
const ParagraphStyle& trailingStyle = d->trailingStyle;
- if (trailingStyle.hasBullet() || trailingStyle.hasNum())
- return true;
-
- return false;
+ return trailingStyle.hasBullet() || trailingStyle.hasNum();
}
bool StoryText::hasTextMarks() const
@@ -2161,16 +2158,16 @@
}
*/
-ScText* StoryText::item(int itm)
-{
- assert( itm < length() );
- return const_cast<StoryText *>(this)->d->at(itm);
-}
-
-const ScText* StoryText::item(int itm) const
-{
- assert( itm < length() );
- return const_cast<StoryText *>(this)->d->at(itm);
+ScText* StoryText::item(int index)
+{
+ assert( index < length() );
+ return const_cast<StoryText *>(this)->d->at(index);
+}
+
+const ScText* StoryText::item(int index) const
+{
+ assert( index < length() );
+ return const_cast<StoryText *>(this)->d->at(index);
}
Modified: trunk/Scribus/scribus/text/textlayout.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/text/textlayout.h
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.h (original)
+++ trunk/Scribus/scribus/text/textlayout.h Tue May 19 20:28:27 2020
@@ -49,7 +49,7 @@
ITextContext* frame() { return m_frame; }
const StoryText* story() const { return m_story; }
void setStory(StoryText* story);
- void render(ScreenPainter *p, ITextContext *item) const;
+ void render(ScreenPainter *p, ITextContext *ctx) const;
void render(TextLayoutPainter *p) const;
void renderBackground(TextLayoutPainter *p) const;
int startOfLine(int pos) const;
Modified: trunk/Scribus/scribus/ui/colorsandfills.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/colorsandfills.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.h (original)
+++ trunk/Scribus/scribus/ui/colorsandfills.h Tue May 19 20:28:27 2020
@@ -57,8 +57,8 @@
void keyPressEvent(QKeyEvent *k);
- ScribusDoc *m_doc;
- ScribusMainWindow *mainWin;
+ ScribusDoc *m_doc {nullptr};
+ ScribusMainWindow *mainWin {nullptr};
QHash<QString, VGradient> dialogGradients;
QMap<QString,QString> replaceMap;
QMap<QString,QString> origNames;
@@ -67,7 +67,7 @@
QMap<QString,QString> replaceColorMap;
//! \brief Custom user's color set
QStringList customColSet;
- bool hasImportedColors;
+ bool hasImportedColors {false};
QHash<QString, ScPattern> dialogPatterns;
QMap<QString,QString> replaceMapPatterns;
QMap<QString,QString> origNamesPatterns;
Modified: trunk/Scribus/scribus/ui/contentpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/contentpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/contentpalette.h (original)
+++ trunk/Scribus/scribus/ui/contentpalette.h Tue May 19 20:28:27 2020
@@ -65,22 +65,22 @@
void languageChange();
private:
- ScribusMainWindow *m_ScMW{nullptr};
- ScGuardedPtr<ScribusDoc> m_doc{nullptr};
- PageItem* m_item;
+ ScribusMainWindow *m_ScMW {nullptr};
+ ScGuardedPtr<ScribusDoc> m_doc {nullptr};
+ PageItem* m_item {nullptr};
- bool m_haveDoc{false};
- bool m_haveItem{false};
- double m_unitRatio{1.0};
- int m_unitIndex{0};
+ bool m_haveDoc {false};
+ bool m_haveItem {false};
+ double m_unitRatio {1.0};
+ int m_unitIndex {0};
- QStackedWidget* stackedWidget{nullptr};
- ContentPalette_Default* defaultPal{nullptr};
- PropertiesPalette_Group* groupPal{nullptr};
- PropertiesPalette_Image* imagePal{nullptr};
- ContentPalette_Page* pagePal{nullptr};
- PropertiesPalette_Table* tablePal{nullptr};
- PropertiesPalette_Text* textPal{nullptr};
+ QStackedWidget* stackedWidget {nullptr};
+ ContentPalette_Default* defaultPal {nullptr};
+ PropertiesPalette_Group* groupPal {nullptr};
+ PropertiesPalette_Image* imagePal {nullptr};
+ ContentPalette_Page* pagePal {nullptr};
+ PropertiesPalette_Table* tablePal {nullptr};
+ PropertiesPalette_Text* textPal {nullptr};
void updatePanelTitle();
Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp Tue May 19 20:28:27 2020
@@ -354,7 +354,7 @@
emit gotoMasterPage(pageVar.toString());
}
-QPixmap PagePalette_Pages::createIcon(int nr, QString masterPage, const QPixmap& pixin)
+QPixmap PagePalette_Pages::createIcon(int number, QString masterPage, const QPixmap& pixin)
{
QPainter p;
// Necessary on windows to ensure the pixmap is drawable
@@ -370,9 +370,9 @@
p.setPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
//p.setFont(QFont("Helvetica", 12, QFont::Bold));
//QString tmp = tmp.setNum(nr+1);
- QString tmp(currView->m_doc->getSectionPageNumberForPageIndex(nr));
+ QString tmp(currView->m_doc->getSectionPageNumberForPageIndex(number));
if (tmp.isEmpty())
- tmp = tmp.setNum(nr+1);
+ tmp = tmp.setNum(number+1);
QRegExp Exp ("([A-Z]*[0-9]*)( *[\\.|\\-|_] *)(.*)");
if (Exp.indexIn(masterPage) != -1)
masterPage = Exp.cap(1);
Modified: trunk/Scribus/scribus/ui/pagepalette_pages.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/pagepalette_pages.h
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.h (original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.h Tue May 19 20:28:27 2020
@@ -68,7 +68,7 @@
QList<SeItem*> pageList;
QPixmap pix;
- QPixmap createIcon(int nr, QString mp, const QPixmap& pixin);
+ QPixmap createIcon(int number, QString masterPage, const QPixmap& pixin);
};
#endif // SEITENPAL_H
Modified: trunk/Scribus/scribus/ui/polyprops.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/polyprops.h
==============================================================================
--- trunk/Scribus/scribus/ui/polyprops.h (original)
+++ trunk/Scribus/scribus/ui/polyprops.h Tue May 19 20:28:27 2020
@@ -23,7 +23,7 @@
public:
PolyVectorDialog(QWidget* parent, int polyC, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot, double polyOuterCurvature);
~PolyVectorDialog() {};
- void setValues(int polyC, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot, double polyOuterCurvature);
+ void setValues(int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature);
PolygonWidget* polyWidget;
signals:
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Tue May 19 20:28:27 2020
@@ -745,9 +745,9 @@
printEngines->setCurrentIndex(oldPDLIndex);
}
-void PrintDialog::setPrintEngine(PrintEngine pdl)
-{
- QString pdlString = m_printEngineMap.key(pdl, "");
+void PrintDialog::setPrintEngine(PrintEngine engine)
+{
+ QString pdlString(m_printEngineMap.key(engine, ""));
int itemIndex = printEngines->findText(pdlString);
if (itemIndex >= 0)
printEngines->setCurrentIndex(itemIndex);
Modified: trunk/Scribus/scribus/ui/printdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/printdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.h (original)
+++ trunk/Scribus/scribus/ui/printdialog.h Tue May 19 20:28:27 2020
@@ -76,11 +76,11 @@
QByteArray m_devMode; // Buffer for storing storing printer options on Windows
QString getOptions();
- void getDefaultPrintOptions(PrintOptions& options, bool gcr);
- void storeValues();
- void refreshPrintEngineBox();
- void setPrintEngine(PrintEngine engine);
- void setStoredValues(const QString& fileName, bool gcr);
+ void getDefaultPrintOptions(PrintOptions& options, bool gcr);
+ void storeValues();
+ void refreshPrintEngineBox();
+ void setPrintEngine(PrintEngine engine);
+ void setStoredValues(const QString& fileName, bool gcr);
};
#endif // PRINTDIALOG_H
Modified: trunk/Scribus/scribus/ui/printpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/printpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.cpp (original)
+++ trunk/Scribus/scribus/ui/printpreview.cpp Tue May 19 20:28:27 2020
@@ -72,9 +72,8 @@
extern bool printDinUse;
-PrintPreview::PrintPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent ),
+PrintPreview::PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent ),
doc(docu),
- view(vin),
prefsManager(PrefsManager::instance())
{
setModal(true);
Modified: trunk/Scribus/scribus/ui/printpreview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/printpreview.h
==============================================================================
--- trunk/Scribus/scribus/ui/printpreview.h (original)
+++ trunk/Scribus/scribus/ui/printpreview.h Tue May 19 20:28:27 2020
@@ -46,7 +46,7 @@
\param printer a name of the printer
\param engine a printer engine
*/
- PrintPreview(QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine );
+ PrintPreview(QWidget* parent, ScribusDoc *docu, const QString& printer, PrintEngine engine );
~PrintPreview();
bool isCMYKPreviewEnabled() const { return enableCMYK->isChecked(); }
@@ -115,7 +115,6 @@
void doPrint();
protected:
- ScribusView *view { nullptr };
ScribusDoc *doc { nullptr };
bool havePngAlpha { false };
bool haveTiffSep { false };
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp Tue May 19 20:28:27 2020
@@ -354,18 +354,18 @@
updateLineStyles(m_doc);
}
-void PropertiesPalette_Line::updateLineStyles(ScribusDoc *dd)
+void PropertiesPalette_Line::updateLineStyles(ScribusDoc *doc)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
lineStyles->blockSignals(true);
lineStyles->clear();
- if (dd != nullptr)
+ if (doc != nullptr)
{
QHash<QString,multiLine>::Iterator it;
- for (it = dd->docLineStyles.begin(); it != dd->docLineStyles.end(); ++it)
- lineStyles->addItem( new LineFormatItem(dd, it.value(), it.key()) );
+ for (it = doc->docLineStyles.begin(); it != doc->docLineStyles.end(); ++it)
+ lineStyles->addItem( new LineFormatItem(doc, it.value(), it.key()) );
lineStyles->sortItems();
lineStyles->insertItem( 0, tr("No Style"));
if (lineStyles->currentItem())
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/propertiespalette_line.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.h Tue May 19 20:28:27 2020
@@ -46,8 +46,8 @@
private:
PageItem* currentItemFromSelection();
- void updateArrowStyles(ScribusDoc *dd);
- void updateLineStyles(ScribusDoc *dd);
+ void updateArrowStyles(ScribusDoc *doc);
+ void updateLineStyles(ScribusDoc *doc);
public slots:
void setMainWindow(ScribusMainWindow *mw);
Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.h (original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.h Tue May 19 20:28:27 2020
@@ -52,7 +52,7 @@
void showOutlineW(double x);
void showShadowOffset(double x, double y);
void showStrikeThru(double p, double w);
- void showTextColors(const QString& strokeCol, const QString& fillCol, const QString& backCol, double strokeShade, double fillShade, double backShade);
+ void showTextColors(const QString& strokeCol, const QString& fillCol, const QString& backCol, double strokeShd, double fillShd, double backShd);
void showTextEffects(int s);
void showUnderline(double p, double w);
Modified: trunk/Scribus/scribus/ui/resourcemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/resourcemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/resourcemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/resourcemanager.cpp Tue May 19 20:28:27 2020
@@ -937,9 +937,9 @@
downloadProgressBar->setVisible(true);
dataReceivedLabel->setVisible(true);
downloadProgressBar->setRange(0, m_dataFiles.count());
- for (QString f : qAsConst(m_dataFiles))
+ for (const QString& f : qAsConst(m_dataFiles))
ScQApp->dlManager()->addURL("http://services.scribus.net/"+f, true, ScPaths::downloadDir(), ScPaths::downloadDir());
- for (QString f : qAsConst(m_dataFiles))
+ for (const QString& f : qAsConst(m_dataFiles))
ScQApp->dlManager()->addURL("http://services.scribus.net/"+f+".sha256", true, ScPaths::downloadDir(), ScPaths::downloadDir());
connect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadListFinished()));
connect(ScQApp->dlManager(), SIGNAL(fileReceived(const QString&)), this, SLOT(updateProgressBar()));
Modified: trunk/Scribus/scribus/ui/scmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/scmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/scmenu.cpp Tue May 19 20:28:27 2020
@@ -49,7 +49,7 @@
delete localPopupMenu;
}
-const QString ScrPopupMenu::getMenuText()
+QString ScrPopupMenu::getMenuText()
{
return menuText;
}
@@ -60,7 +60,7 @@
localPopupMenu->menuAction()->setText(menuText);
}
-const QIcon ScrPopupMenu::getMenuIcon()
+QIcon ScrPopupMenu::getMenuIcon()
{
return menuIcon;
}
@@ -70,12 +70,12 @@
menuIcon=pMenuIcon;
}
-const QString ScrPopupMenu::getMenuName()
+QString ScrPopupMenu::getMenuName()
{
return menuName;
}
-const QString ScrPopupMenu::getParentMenuName()
+QString ScrPopupMenu::getParentMenuName()
{
return parentMenuName;
}
Modified: trunk/Scribus/scribus/ui/scmenu.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/scmenu.h
==============================================================================
--- trunk/Scribus/scribus/ui/scmenu.h (original)
+++ trunk/Scribus/scribus/ui/scmenu.h Tue May 19 20:28:27 2020
@@ -39,11 +39,11 @@
ScrPopupMenu ( QWidget * parent = nullptr, const QString& pMenuName = QString(), const QString& pMenuText = QString(), const QString& parentName = QString(), bool checkable = false);
~ScrPopupMenu ();
- const QString getMenuName();
- const QString getParentMenuName();
- const QString getMenuText();
+ QString getMenuName();
+ QString getParentMenuName();
+ QString getMenuText();
void setText(const QString& pMenuText);
- const QIcon getMenuIcon();
+ QIcon getMenuIcon();
void setMenuIcon(const QIcon& pMenuIcon);
void setEnabled(bool menuEnabled);
QMenu *getLocalPopupMenu();
Modified: trunk/Scribus/scribus/ui/smcellstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/smcellstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.cpp Tue May 19 20:28:27 2020
@@ -76,7 +76,7 @@
connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
-void SMCellStyleWidget::show(CellStyle *cellStyle, QList<CellStyle> &cellStyles, const QString &defLang, int unitIndex)
+void SMCellStyleWidget::show(CellStyle *cellStyle, QList<CellStyle> &cellStyles, const QString &defaultLanguage, int unitIndex)
{
Q_ASSERT(cellStyle);
if (!cellStyle)
Modified: trunk/Scribus/scribus/ui/transparencypalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/ui/transparencypalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.h (original)
+++ trunk/Scribus/scribus/ui/transparencypalette.h Tue May 19 20:28:27 2020
@@ -75,7 +75,7 @@
void editLineSelectorButton();
void editFillSelectorButton();
- void slotGrad(int nr);
+ void slotGrad(int number);
void slotGradType(int type);
void setNamedGradient(const QString &name);
void switchGradientMode();
Modified: trunk/Scribus/scribus/units.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/units.cpp
==============================================================================
--- trunk/Scribus/scribus/units.cpp (original)
+++ trunk/Scribus/scribus/units.cpp Tue May 19 20:28:27 2020
@@ -139,7 +139,7 @@
/*!
* @brief Returns the suffix used in GUI widgets
*/
-const QString unitGetSuffixFromIndex(const int index)
+QString unitGetSuffixFromIndex(const int index)
{
if (index==SC_P)
return "";
@@ -149,7 +149,7 @@
/*!
* @brief Returns a general suffix for each of the units
*/
-const QString unitGetStrFromIndex(const int index)
+QString unitGetStrFromIndex(const int index)
{
if (index<UNITMIN || index>UNITMAX)
return "";
@@ -169,7 +169,7 @@
/*!
* @brief Returns a general untranslated suffix for each of the units
*/
-const QString unitGetUntranslatedStrFromIndex(const int index)
+QString unitGetUntranslatedStrFromIndex(const int index)
{
if (index<UNITMIN || index>UNITMAX)
return "";
@@ -203,7 +203,7 @@
/*!
* @brief Returns a QStringList of the units for use in QComboBoxes etc
*/
-const QStringList unitGetTextUnitList()
+QStringList unitGetTextUnitList()
{
QStringList suffixList;
suffixList.append( QObject::tr( "Points (pt)" ) );
Modified: trunk/Scribus/scribus/units.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/units.h
==============================================================================
--- trunk/Scribus/scribus/units.h (original)
+++ trunk/Scribus/scribus/units.h Tue May 19 20:28:27 2020
@@ -50,14 +50,14 @@
double SCRIBUS_API unitGetRatioFromIndex(const int index);
int SCRIBUS_API unitGetBaseFromIndex(const int index);
-const QString SCRIBUS_API unitGetStrFromIndex(const int index);
-const QString SCRIBUS_API unitGetUntranslatedStrFromIndex(const int index);
-const QString SCRIBUS_API unitGetSuffixFromIndex(const int index);
+QString SCRIBUS_API unitGetStrFromIndex(const int index);
+QString SCRIBUS_API unitGetUntranslatedStrFromIndex(const int index);
+QString unitGetSuffixFromIndex(const int index);
int SCRIBUS_API unitGetDecimalsFromIndex(const int index);
int SCRIBUS_API unitGetPrecisionFromIndex(const int index);
double SCRIBUS_API unitValueFromString(const QString& value);
scUnit SCRIBUS_API unitIndexFromString(const QString& value);
-const QStringList SCRIBUS_API unitGetTextUnitList();
+QStringList SCRIBUS_API unitGetTextUnitList();
int SCRIBUS_API unitGetMaxIndex();
double SCRIBUS_API mm2pts(double mm);
double SCRIBUS_API in2pts(double in);
Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp (original)
+++ trunk/Scribus/scribus/util.cpp Tue May 19 20:28:27 2020
@@ -129,7 +129,7 @@
// Use loadRawText instead.
// FIXME XXX
//
-bool loadText(const QString& filename, QString *Buffer)
+bool loadText(const QString& filename, QString *buffer)
{
QFile f(filename);
QFileInfo fi(f);
@@ -141,7 +141,7 @@
f.read(bb.data(), f.size());
f.close();
for (int i = 0; i < bb.size(); ++i)
- *Buffer += QChar(bb[i]);
+ *buffer += QChar(bb[i]);
/*
int len = bb.size();
int oldLen = Buffer->length();
@@ -525,7 +525,7 @@
return QString("%1-%2%3.%4").arg(defaultName, QObject::tr("page", "page export")).arg(number, 3, 10, QChar('0')).arg(extension);
}
-const QString getStringFromSequence(NumFormat type, uint position, const QString& asterix)
+QString getStringFromSequence(NumFormat type, uint position, const QString& asterix)
{
QString retVal;
@@ -578,7 +578,7 @@
return retVal;
}
-const QString numberToLetterSequence(const QString& letters, uint num)
+QString numberToLetterSequence(const QString& letters, uint num)
{
QString retVal;
unsigned digits = 1;
@@ -603,7 +603,7 @@
return retVal;
}
-const QString numberToRoman(uint i)
+QString numberToRoman(uint i)
{
QString roman("");
int arabic = i;
@@ -1177,7 +1177,7 @@
name = newName;
}
-const QString numberToHebrew(uint i)
+QString numberToHebrew(uint i)
{
const QString hebrew("×××××××××××××× ×¡×¢×¤×¦×§×¨×©×ª");
QString result;
@@ -1217,7 +1217,7 @@
return result;
}
-const QString numberToCJK(uint i)
+QString numberToCJK(uint i)
{
QString result;
if (i<10)
Modified: trunk/Scribus/scribus/util.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/util.h
==============================================================================
--- trunk/Scribus/scribus/util.h (original)
+++ trunk/Scribus/scribus/util.h Tue May 19 20:28:27 2020
@@ -63,7 +63,7 @@
QString SCRIBUS_API CompressStr(QString *in);
QByteArray SCRIBUS_API CompressArray(const QByteArray& in);
//! \brief WARNING: loadText is INCORRECT - use loadRawText instead!
-bool SCRIBUS_API loadText(const QString& nam, QString *Buffer);
+bool SCRIBUS_API loadText(const QString& filename, QString *buffer);
/*! \brief Replacement version of loadText that returns a QCString as an out parameter.
The QCString is filled with the contents of the specified file. The return
byte string is of unknown encoding; the caller must handle encoding issues.
@@ -127,12 +127,12 @@
QString SCRIBUS_API getFileNameByPage(ScribusDoc* currDoc, uint pageNo, const QString& extension, const QString& prefix=QString());
//asterix is QString used in numeration when number is presented as few chars, like *, **, *** etc
//default is '*' but can be used any string
-const QString SCRIBUS_API getStringFromSequence(NumFormat type, uint position, const QString& asterix="*");
-const QString SCRIBUS_API numberToHebrew(uint i);
-const QString SCRIBUS_API numberToRoman(uint i);
-const QString SCRIBUS_API numberToCJK(uint i);
+QString getStringFromSequence(NumFormat type, uint position, const QString& asterix="*");
+QString SCRIBUS_API numberToHebrew(uint i);
+QString numberToRoman(uint i);
+QString numberToCJK(uint i);
QChar SCRIBUS_API cjkDigit(uint i);
-const QString SCRIBUS_API numberToLetterSequence(const QString& letters, uint num);
+QString numberToLetterSequence(const QString& letters, uint num);
void SCRIBUS_API parsePagesString(const QString& pages, std::vector<int>* pageNs, int sourcePageCount);
QString SCRIBUS_API readLineFromDataStream(QDataStream &s);
Modified: trunk/Scribus/scribus/util_color.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/util_color.cpp
==============================================================================
--- trunk/Scribus/scribus/util_color.cpp (original)
+++ trunk/Scribus/scribus/util_color.cpp Tue May 19 20:28:27 2020
@@ -146,11 +146,10 @@
QColor SetColor(ScribusDoc *currentDoc, const QString& color, int shad)
{
if (color == CommonStrings::None)
- return QColor(0, 0, 0, 0);
+ return {0, 0, 0, 0};
const ScColor& col = currentDoc->PageColors[color];
return ScColorEngine::getShadeColorProof(col, currentDoc, shad);
-}
-
+ }
/**
* QPixmaps are really slow with Qt/Mac 3.3.4. Really, *really*, slow.
Modified: trunk/Scribus/scribus/vgradientex.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/vgradientex.cpp
==============================================================================
--- trunk/Scribus/scribus/vgradientex.cpp (original)
+++ trunk/Scribus/scribus/vgradientex.cpp Tue May 19 20:28:27 2020
@@ -135,7 +135,7 @@
clearStops();
}
-const QList<VColorStopEx*> VGradientEx::colorStops() const
+QList<VColorStopEx*> VGradientEx::colorStops() const
{
return m_colorStops;
}
Modified: trunk/Scribus/scribus/vgradientex.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23820&path=/trunk/Scribus/scribus/vgradientex.h
==============================================================================
--- trunk/Scribus/scribus/vgradientex.h (original)
+++ trunk/Scribus/scribus/vgradientex.h Tue May 19 20:28:27 2020
@@ -115,7 +115,7 @@
VGradientEx::RepeatMethod repeatMethod() const { return m_repeatMethod; }
void setRepeatMethod(VGradientEx::RepeatMethod repeatMethod) { m_repeatMethod = repeatMethod; }
- const QList<VColorStopEx*> colorStops() const;
+ QList<VColorStopEx*> colorStops() const;
void addStop(const VColorStopEx& colorStop);
void addStop(const ScColor &color, double rampPoint, double midPoint, double opa, const QString& name = QString(), int shade = 100);
void removeStop(VColorStopEx& colorStop);
More information about the scribus-commit
mailing list