r22598 by craig - More clang/clazy fixes
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 25 20:53:48 UTC 2018
Author: craig
Date: Wed Jul 25 20:53:47 2018
New Revision: 22598
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22598
Log:
More clang/clazy fixes
Modified:
trunk/Scribus/scribus/colormgmt/sccolorprofile.cpp
trunk/Scribus/scribus/colormgmt/sccolorspace.cpp
trunk/Scribus/scribus/colormgmt/sccolorspace.h
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pageitem_imageframe.h
trunk/Scribus/scribus/pageitem_latexframe.cpp
trunk/Scribus/scribus/pageitem_latexframe.h
trunk/Scribus/scribus/pageitem_line.cpp
trunk/Scribus/scribus/pageitem_line.h
trunk/Scribus/scribus/pageitem_noteframe.cpp
trunk/Scribus/scribus/pageitem_noteframe.h
trunk/Scribus/scribus/pageitem_osgframe.cpp
trunk/Scribus/scribus/pageitem_osgframe.h
trunk/Scribus/scribus/pageitem_pathtext.cpp
trunk/Scribus/scribus/pageitem_pathtext.h
trunk/Scribus/scribus/pageitem_polygon.cpp
trunk/Scribus/scribus/pageitem_polygon.h
trunk/Scribus/scribus/pageitem_polyline.cpp
trunk/Scribus/scribus/pageitem_polyline.h
trunk/Scribus/scribus/pageitem_regularpolygon.cpp
trunk/Scribus/scribus/pageitem_regularpolygon.h
trunk/Scribus/scribus/pageitem_spiral.cpp
trunk/Scribus/scribus/pageitem_spiral.h
trunk/Scribus/scribus/pageitem_symbol.cpp
trunk/Scribus/scribus/pageitem_symbol.h
trunk/Scribus/scribus/pageitem_table.cpp
trunk/Scribus/scribus/pageitem_table.h
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/pageitem_textframe.h
trunk/Scribus/scribus/scimagestructs.cpp
trunk/Scribus/scribus/scimagestructs.h
trunk/Scribus/scribus/sclayer.cpp
trunk/Scribus/scribus/sclockedfile.cpp
trunk/Scribus/scribus/scmimedata.cpp
trunk/Scribus/scribus/scmimedata.h
trunk/Scribus/scribus/scpaths.cpp
trunk/Scribus/scribus/scpattern.cpp
trunk/Scribus/scribus/scpattern.h
trunk/Scribus/scribus/scplugin.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
trunk/Scribus/scribus/scribuswin.cpp
trunk/Scribus/scribus/selection.cpp
trunk/Scribus/scribus/selection.h
trunk/Scribus/scribus/ui/proptree.cpp
trunk/Scribus/scribus/ui/proptree.h
Modified: trunk/Scribus/scribus/colormgmt/sccolorprofile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/colormgmt/sccolorprofile.cpp
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorprofile.cpp (original)
+++ trunk/Scribus/scribus/colormgmt/sccolorprofile.cpp Wed Jul 25 20:53:47 2018
@@ -7,7 +7,7 @@
#include "sccolorprofile.h"
-ScColorProfile::ScColorProfile() : m_data(NULL)
+ScColorProfile::ScColorProfile() : m_data(nullptr)
{
}
@@ -50,4 +50,4 @@
bool ScColorProfile::operator==(const ScColorProfile& other) const
{
return m_data == other.m_data;
-}
+}
Modified: trunk/Scribus/scribus/colormgmt/sccolorspace.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/colormgmt/sccolorspace.cpp
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorspace.cpp (original)
+++ trunk/Scribus/scribus/colormgmt/sccolorspace.cpp Wed Jul 25 20:53:47 2018
@@ -7,7 +7,7 @@
#include "sccolorspace.h"
-ScColorSpace::ScColorSpace() : m_data(NULL)
+ScColorSpace::ScColorSpace() : m_data(nullptr)
{
}
@@ -40,28 +40,28 @@
return ScColorProfile();
}
-uint ScColorSpace::numChannels(void) const
+uint ScColorSpace::numChannels() const
{
if (m_data)
return m_data->numChannels();
return 0;
}
-uint ScColorSpace::bytesPerChannel(void) const
+uint ScColorSpace::bytesPerChannel() const
{
if (m_data)
return m_data->bytesPerChannel();
return 0;
}
-bool ScColorSpace::hasAlphaChannel(void) const
+bool ScColorSpace::hasAlphaChannel() const
{
if (m_data)
return m_data->hasAlphaChannel();
return false;
}
-uint ScColorSpace::alphaIndex(void) const
+uint ScColorSpace::alphaIndex() const
{
if (m_data)
return m_data->alphaIndex();
@@ -127,4 +127,4 @@
bool ScColorSpace::operator==(const ScColorSpace& other) const
{
return m_data == other.m_data;
-}
+}
Modified: trunk/Scribus/scribus/colormgmt/sccolorspace.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/colormgmt/sccolorspace.h
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorspace.h (original)
+++ trunk/Scribus/scribus/colormgmt/sccolorspace.h Wed Jul 25 20:53:47 2018
@@ -32,11 +32,11 @@
eColorFormat colorFormat() const;
ScColorProfile profile() const;
- uint numChannels(void) const;
- uint bytesPerChannel(void) const;
+ uint numChannels() const;
+ uint bytesPerChannel() const;
- bool hasAlphaChannel(void) const;
- uint alphaIndex(void) const;
+ bool hasAlphaChannel() const;
+ uint alphaIndex() const;
// Restore full opacity of alpha channel
void flattenAlpha(void* dataIn, uint numElems);
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Wed Jul 25 20:53:47 2018
@@ -400,7 +400,7 @@
}
-PageItem::PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem::PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
// Initialize superclass(es)
: QObject(pa), SingleObservable<PageItem>(pa->itemsChanged()), TextContext(this),
// Initialize member variables
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Wed Jul 25 20:53:47 2018
@@ -230,7 +230,7 @@
public: // Start public functions
- PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
virtual ~PageItem();
/* these do essentially the same as a dynamic cast but might be more readable */
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Wed Jul 25 20:53:47 2018
@@ -55,7 +55,7 @@
#include "util.h"
-PageItem_ImageFrame::PageItem_ImageFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_ImageFrame::PageItem_ImageFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::ImageFrame, x, y, w, h, w2, fill, outline)
{
}
Modified: trunk/Scribus/scribus/pageitem_imageframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_imageframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.h (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_ImageFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_ImageFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_ImageFrame(const PageItem & p) : PageItem(p) {}
~PageItem_ImageFrame();
Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Wed Jul 25 20:53:47 2018
@@ -40,7 +40,7 @@
#include "latexhelpers.h"
#include "util.h"
-PageItem_LatexFrame::PageItem_LatexFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_LatexFrame::PageItem_LatexFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem_ImageFrame(pa, x, y, w, h, w2, fill, outline)
{
setUPixmap(Um::ILatexFrame);
Modified: trunk/Scribus/scribus/pageitem_latexframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_latexframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.h (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.h Wed Jul 25 20:53:47 2018
@@ -45,7 +45,7 @@
Q_OBJECT
public:
- PageItem_LatexFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_LatexFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
~PageItem_LatexFrame();
virtual PageItem_LatexFrame * asLatexFrame() { return this; }
Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp (original)
+++ trunk/Scribus/scribus/pageitem_line.cpp Wed Jul 25 20:53:47 2018
@@ -47,7 +47,7 @@
using namespace std;
-PageItem_Line::PageItem_Line(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_Line::PageItem_Line(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Line, x, y, w, h, w2, fill, outline)
{
}
@@ -377,4 +377,4 @@
totalRect = totalRect.united(QRectF(QPointF(minAr.x(), minAr.y()), QPointF(maxAr.x(), maxAr.y())));
}
totalRect.getCoords(x1, y1, x2, y2);
-}
+}
Modified: trunk/Scribus/scribus/pageitem_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_line.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.h (original)
+++ trunk/Scribus/scribus/pageitem_line.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_Line(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_Line(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Line(const PageItem & p) : PageItem(p) {}
~PageItem_Line() {};
Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Wed Jul 25 20:53:47 2018
@@ -13,7 +13,7 @@
#include <cmath>
-PageItem_NoteFrame::PageItem_NoteFrame(NotesStyle *nStyle, ScribusDoc *doc, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_NoteFrame::PageItem_NoteFrame(NotesStyle *nStyle, ScribusDoc *doc, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem_TextFrame(doc, x, y, w, h, w2, fill, outline)
{
m_nstyle = nStyle;
@@ -61,7 +61,7 @@
deleteIt = false;
}
-PageItem_NoteFrame::PageItem_NoteFrame(ScribusDoc *doc, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_NoteFrame::PageItem_NoteFrame(ScribusDoc *doc, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem_TextFrame(doc, x, y, w, h, w2, fill, outline)
{
m_nstyle = nullptr;
Modified: trunk/Scribus/scribus/pageitem_noteframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_noteframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.h (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.h Wed Jul 25 20:53:47 2018
@@ -11,8 +11,8 @@
friend class ScribusDoc;
private:
- PageItem_NoteFrame(NotesStyle *nStyle, ScribusDoc *doc, double x, double y, double w, double h, double w2, QString fill, QString outline);
- PageItem_NoteFrame(ScribusDoc *doc, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_NoteFrame(NotesStyle *nStyle, ScribusDoc *doc, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
+ PageItem_NoteFrame(ScribusDoc *doc, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_NoteFrame(PageItem_TextFrame* inFrame, NotesStyle *nStyle);
~PageItem_NoteFrame() { }
Modified: trunk/Scribus/scribus/pageitem_osgframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_osgframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_osgframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_osgframe.cpp Wed Jul 25 20:53:47 2018
@@ -41,7 +41,7 @@
#include "undostate.h"
#include "util.h"
-PageItem_OSGFrame::PageItem_OSGFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_OSGFrame::PageItem_OSGFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem_ImageFrame(pa, x, y, w, h, w2, fill, outline)
{
setUPixmap(Um::ILatexFrame);
Modified: trunk/Scribus/scribus/pageitem_osgframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_osgframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_osgframe.h (original)
+++ trunk/Scribus/scribus/pageitem_osgframe.h Wed Jul 25 20:53:47 2018
@@ -73,7 +73,7 @@
SolidOutline = 13,
ShadedIllustration = 14
};
- PageItem_OSGFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_OSGFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
~PageItem_OSGFrame();
virtual PageItem_OSGFrame * asOSGFrame() { return this; }
Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Wed Jul 25 20:53:47 2018
@@ -53,7 +53,7 @@
using namespace std;
-PageItem_PathText::PageItem_PathText(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_PathText::PageItem_PathText(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::PathText, x, y, w, h, w2, fill, outline)
{
firstChar = 0;
Modified: trunk/Scribus/scribus/pageitem_pathtext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_pathtext.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.h (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.h Wed Jul 25 20:53:47 2018
@@ -35,7 +35,7 @@
Q_OBJECT
public:
- PageItem_PathText(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_PathText(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_PathText(const PageItem & p) : PageItem(p) {}
~PageItem_PathText() {};
Modified: trunk/Scribus/scribus/pageitem_polygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_polygon.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_polygon.cpp (original)
+++ trunk/Scribus/scribus/pageitem_polygon.cpp Wed Jul 25 20:53:47 2018
@@ -43,7 +43,7 @@
using namespace std;
-PageItem_Polygon::PageItem_Polygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_Polygon::PageItem_Polygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Polygon, x, y, w, h, w2, fill, outline)
{
}
Modified: trunk/Scribus/scribus/pageitem_polygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_polygon.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_polygon.h (original)
+++ trunk/Scribus/scribus/pageitem_polygon.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_Polygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_Polygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Polygon(const PageItem & p) : PageItem(p) {}
~PageItem_Polygon() {};
Modified: trunk/Scribus/scribus/pageitem_polyline.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_polyline.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_polyline.cpp (original)
+++ trunk/Scribus/scribus/pageitem_polyline.cpp Wed Jul 25 20:53:47 2018
@@ -46,7 +46,7 @@
using namespace std;
-PageItem_PolyLine::PageItem_PolyLine(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_PolyLine::PageItem_PolyLine(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::PolyLine, x, y, w, h, w2, fill, outline)
{
}
Modified: trunk/Scribus/scribus/pageitem_polyline.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_polyline.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_polyline.h (original)
+++ trunk/Scribus/scribus/pageitem_polyline.h Wed Jul 25 20:53:47 2018
@@ -35,7 +35,7 @@
Q_OBJECT
public:
- PageItem_PolyLine(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_PolyLine(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_PolyLine(const PageItem & p) : PageItem(p) {}
~PageItem_PolyLine() {};
Modified: trunk/Scribus/scribus/pageitem_regularpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_regularpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_regularpolygon.cpp (original)
+++ trunk/Scribus/scribus/pageitem_regularpolygon.cpp Wed Jul 25 20:53:47 2018
@@ -47,7 +47,7 @@
using namespace std;
-PageItem_RegularPolygon::PageItem_RegularPolygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_RegularPolygon::PageItem_RegularPolygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::RegularPolygon, x, y, w, h, w2, fill, outline)
{
polyCorners = m_Doc->itemToolPrefs().polyCorners;
Modified: trunk/Scribus/scribus/pageitem_regularpolygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_regularpolygon.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_regularpolygon.h (original)
+++ trunk/Scribus/scribus/pageitem_regularpolygon.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_RegularPolygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_RegularPolygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_RegularPolygon(const PageItem & p) : PageItem(p) {}
~PageItem_RegularPolygon() {};
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Wed Jul 25 20:53:47 2018
@@ -47,7 +47,7 @@
using namespace std;
-PageItem_Spiral::PageItem_Spiral(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_Spiral::PageItem_Spiral(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Spiral, x, y, w, h, w2, fill, outline)
{
spiralStartAngle = m_Doc->itemToolPrefs().spiralStartAngle;
@@ -498,4 +498,4 @@
totalRect = totalRect.united(QRectF(QPointF(minAr.x(), minAr.y()), QPointF(maxAr.x(), maxAr.y())));
}
totalRect.getCoords(x1, y1, x2, y2);
-}
+}
Modified: trunk/Scribus/scribus/pageitem_spiral.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_spiral.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.h (original)
+++ trunk/Scribus/scribus/pageitem_spiral.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_Spiral(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_Spiral(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Spiral(const PageItem & p) : PageItem(p) {}
~PageItem_Spiral() {};
Modified: trunk/Scribus/scribus/pageitem_symbol.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_symbol.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.cpp (original)
+++ trunk/Scribus/scribus/pageitem_symbol.cpp Wed Jul 25 20:53:47 2018
@@ -47,7 +47,7 @@
using namespace std;
-PageItem_Symbol::PageItem_Symbol(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_Symbol::PageItem_Symbol(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Symbol, x, y, w, h, 0, CommonStrings::None, CommonStrings::None)
{
}
Modified: trunk/Scribus/scribus/pageitem_symbol.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_symbol.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.h (original)
+++ trunk/Scribus/scribus/pageitem_symbol.h Wed Jul 25 20:53:47 2018
@@ -36,7 +36,7 @@
Q_OBJECT
public:
- PageItem_Symbol(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_Symbol(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Symbol(const PageItem & p) : PageItem(p) {}
~PageItem_Symbol() {};
Modified: trunk/Scribus/scribus/pageitem_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_table.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.cpp (original)
+++ trunk/Scribus/scribus/pageitem_table.cpp Wed Jul 25 20:53:47 2018
@@ -44,8 +44,7 @@
// The minimum column width.
const double PageItem_Table::MinimumColumnWidth = 3.0;
-PageItem_Table::PageItem_Table(ScribusDoc *pa, double x, double y, double w, double h,
- double w2, QString fill, QString outline, int numRows, int numColumns) :
+PageItem_Table::PageItem_Table(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline, int numRows, int numColumns) :
PageItem(pa, PageItem::Table, x, y, w, h, w2, fill, outline),
m_rows(0), m_columns(0), m_tablePainter(new CollapsedTablePainter(this))
{
Modified: trunk/Scribus/scribus/pageitem_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_table.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.h (original)
+++ trunk/Scribus/scribus/pageitem_table.h Wed Jul 25 20:53:47 2018
@@ -83,8 +83,7 @@
public:
/// Construct a new table item with @a numRows rows and @a numColumns columns.
- PageItem_Table(ScribusDoc *pa, double x, double y, double w, double h, double w2,
- QString fill, QString outline, int numRows = 1, int numColumns = 1);
+ PageItem_Table(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline, int numRows = 1, int numColumns = 1);
/// Destructor.
~PageItem_Table();
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Wed Jul 25 20:53:47 2018
@@ -72,7 +72,7 @@
using namespace std;
-PageItem_TextFrame::PageItem_TextFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
+PageItem_TextFrame::PageItem_TextFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::TextFrame, x, y, w, h, w2, fill, outline)
{
init();
@@ -95,7 +95,7 @@
verticalAlign = 0;
incompleteLines = 0;
maxY = 0.0;
- connect(&itemText,SIGNAL(changed(int, int)), this, SLOT(slotInvalidateLayout(int, int)));
+ connect(&itemText,SIGNAL(changed(int,int)), this, SLOT(slotInvalidateLayout(int,int)));
}
static QRegion itemShape(PageItem* docItem, double xOffset, double yOffset)
@@ -1644,7 +1644,7 @@
if (current.startOfCol && !current.afterOverflow && current.recalculateY)
current.yPos = qMax(current.yPos, m_textDistanceMargins.top());
// more about par gap and dropcaps
- if ((a > firstInFrame() && itemText.isBlockStart(a)) || (a == 0 && BackBox == 0 && current.startOfCol))
+ if ((a > firstInFrame() && itemText.isBlockStart(a)) || (a == 0 && BackBox == nullptr && current.startOfCol))
{
if (!current.afterOverflow && current.recalculateY && !current.startOfCol)
current.yPos += style.gapBefore();
@@ -1899,7 +1899,7 @@
}
}
current.recalculateY = true;
- maxYAsc = 0.0, maxYDesc = 0.0;
+ maxYAsc = maxYDesc = 0.0;
double addAsce = 0.0;
if (current.startOfCol)
{
@@ -4188,7 +4188,7 @@
else
{
itemText.setCursorPosition( firstInFrame() );
- if (BackBox != 0)
+ if (BackBox != nullptr)
{
view->Deselect(true);
BackBox->itemText.setCursorPosition( BackBox->lastInFrame() );
@@ -4201,7 +4201,7 @@
m_Doc->scMW()->setTBvals(this);
break;
case Qt::Key_PageUp:
- if (itemText.cursorPosition() == firstInFrame() && BackBox != 0)
+ if (itemText.cursorPosition() == firstInFrame() && BackBox != nullptr)
{
view->Deselect(true);
BackBox->itemText.setCursorPosition( BackBox->firstInFrame() );
@@ -4215,7 +4215,7 @@
m_Doc->scMW()->setTBvals(this);
break;
case Qt::Key_PageDown:
- if (!frameDisplays(itemText.length()-1) && itemText.cursorPosition() >= lastInFrame() && NextBox != 0)
+ if (!frameDisplays(itemText.length()-1) && itemText.cursorPosition() >= lastInFrame() && NextBox != nullptr)
{
view->Deselect(true);
itemText.setCursorPosition( NextBox->lastInFrame() );
@@ -4246,7 +4246,7 @@
if (itemText.cursorPosition() < firstInFrame())
{
itemText.setCursorPosition( firstInFrame() );
- if (BackBox != 0)
+ if (BackBox != nullptr)
{
view->Deselect(true);
BackBox->itemText.setCursorPosition( BackBox->lastInFrame() );
@@ -4286,7 +4286,7 @@
{
// --CPos;
itemText.setCursorPosition(lastInFrame() + 1);
- if (NextBox != 0)
+ if (NextBox != nullptr)
{
if (NextBox->frameDisplays(itemText.cursorPosition()))
{
@@ -4347,7 +4347,7 @@
else
{
layout();
- if (oldLast != lastInFrame() && NextBox != 0 && NextBox->invalid)
+ if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
NextBox->updateLayout();
}
// Tinput = false;
@@ -4404,13 +4404,13 @@
else
{
layout();
- if (oldLast != lastInFrame() && NextBox != 0 && NextBox->invalid)
+ if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
NextBox->updateLayout();
}
if (itemText.cursorPosition() < firstInFrame())
{
itemText.setCursorPosition( firstInFrame() );
- if (BackBox != 0)
+ if (BackBox != nullptr)
{
view->Deselect(true);
if (BackBox->invalid)
@@ -4493,7 +4493,7 @@
{
if (UndoManager::undoEnabled())
{
- ScItemState<ParagraphStyle> *ip = 0;
+ ScItemState<ParagraphStyle> *ip = nullptr;
SimpleState *ss = dynamic_cast<SimpleState*>(undoManager->getLastUndo());
UndoObject *undoTarget = this;
int cursorPos = itemText.cursorPosition();
@@ -4571,12 +4571,12 @@
}
else
update();
- if (oldLast != lastInFrame() && NextBox != 0 && NextBox->invalid)
+ if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
NextBox->updateLayout();
}
//check if cursor need to jump to next linked frame
//but not for notes frames can`t be updated as may disapper during update
- if ((itemText.cursorPosition() > lastInFrame() + 1) && (lastInFrame() < (itemText.length() - 2)) && NextBox != 0)
+ if ((itemText.cursorPosition() > lastInFrame() + 1) && (lastInFrame() < (itemText.length() - 2)) && NextBox != nullptr)
{
view->Deselect(true);
NextBox->update();
@@ -5072,7 +5072,7 @@
QLabel *charCT = new QLabel(infoGroup);
QLabel *charT = new QLabel(infoGroup);
- if ((nextInChain() != 0) || (prevInChain() != 0))
+ if ((nextInChain() != nullptr) || (prevInChain() != nullptr))
infoCT->setText(tr("Linked Text"));
else
infoCT->setText(tr("Text Frame"));
@@ -5157,7 +5157,7 @@
else
actionList << "itemPDFFieldProps";
}
- if ((prevInChain() == 0) && (nextInChain() == 0))
+ if ((prevInChain() == nullptr) && (nextInChain() == nullptr))
{
actionList << "itemConvertToImageFrame";
actionList << "itemConvertToPolygon";
@@ -5961,7 +5961,7 @@
if (textLayout.lines() <= 0)
return;
- if (NextBox == 0) // Vertical alignment is not used inside a text chain
+ if (NextBox == nullptr) // Vertical alignment is not used inside a text chain
{
textLayout.box()->moveTo(textLayout.box()->x(), 0);
double newHeight = textLayout.box()->naturalHeight();
Modified: trunk/Scribus/scribus/pageitem_textframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/pageitem_textframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.h (original)
+++ trunk/Scribus/scribus/pageitem_textframe.h Wed Jul 25 20:53:47 2018
@@ -47,7 +47,7 @@
Q_OBJECT
public:
- PageItem_TextFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
+ PageItem_TextFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_TextFrame(const PageItem & p);
~PageItem_TextFrame() {}
Modified: trunk/Scribus/scribus/scimagestructs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scimagestructs.cpp
==============================================================================
--- trunk/Scribus/scribus/scimagestructs.cpp (original)
+++ trunk/Scribus/scribus/scimagestructs.cpp Wed Jul 25 20:53:47 2018
@@ -42,12 +42,12 @@
return stream;
}
-ExifValues::ExifValues(void)
+ExifValues::ExifValues()
{
init();
}
-void ExifValues::init(void)
+void ExifValues::init()
{
width = 0;
height = 0;
@@ -67,12 +67,12 @@
const qint32 ImageInfoRecord::iirVersion = 1;
-ImageInfoRecord::ImageInfoRecord(void)
+ImageInfoRecord::ImageInfoRecord()
{
init();
}
-void ImageInfoRecord::init(void)
+void ImageInfoRecord::init()
{
type = ImageTypeOther; /* 0 = jpg, 1 = tiff, 2 = psd, 3 = eps/ps, 4 = pdf, 5 = jpg2000, 6 = other */
xres = 72;
Modified: trunk/Scribus/scribus/scimagestructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scimagestructs.h
==============================================================================
--- trunk/Scribus/scribus/scimagestructs.h (original)
+++ trunk/Scribus/scribus/scimagestructs.h Wed Jul 25 20:53:47 2018
@@ -79,8 +79,8 @@
class ExifValues
{
public:
- ExifValues(void);
- void init(void);
+ ExifValues();
+ void init();
// Remember to increment this version number and update
// the QDataStream operators if this class in changed.
@@ -126,8 +126,8 @@
class ImageInfoRecord
{
public:
- ImageInfoRecord(void);
- void init(void);
+ ImageInfoRecord();
+ void init();
// Remember to increment this version number and update
// the serialization routines if this class in changed.
Modified: trunk/Scribus/scribus/sclayer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/sclayer.cpp
==============================================================================
--- trunk/Scribus/scribus/sclayer.cpp (original)
+++ trunk/Scribus/scribus/sclayer.cpp Wed Jul 25 20:53:47 2018
@@ -17,7 +17,7 @@
ScLayer::ScLayer()
{
Name = QObject::tr("New Layer");
- ID = 0;
+ ID = 0;
Level = 0;
isPrintable = true;
isViewable = true;
Modified: trunk/Scribus/scribus/sclockedfile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/sclockedfile.cpp
==============================================================================
--- trunk/Scribus/scribus/sclockedfile.cpp (original)
+++ trunk/Scribus/scribus/sclockedfile.cpp Wed Jul 25 20:53:47 2018
@@ -33,7 +33,7 @@
{
}
-ScLockedFile::ScLockedFile(const QString & name)
+ScLockedFile::ScLockedFile(const QString& name)
: m_fileName(name), m_isOpened(false), m_isLocked(false)
{
}
@@ -44,7 +44,7 @@
unlock();
}
-void ScLockedFile::setName(const QString & name)
+void ScLockedFile::setName(const QString& name)
{
m_fileName = name;
}
@@ -182,7 +182,7 @@
{
}
-ScLockedFileRO::ScLockedFileRO(const QString & name)
+ScLockedFileRO::ScLockedFileRO(const QString& name)
: ScLockedFile(name)
{
}
Modified: trunk/Scribus/scribus/scmimedata.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scmimedata.cpp
==============================================================================
--- trunk/Scribus/scribus/scmimedata.cpp (original)
+++ trunk/Scribus/scribus/scmimedata.cpp Wed Jul 25 20:53:47 2018
@@ -23,7 +23,7 @@
const QString ScMimeData::ScribusFragmentMimeType = "application/x-scribus-fragment";
const QString ScMimeData::ScribusTextMimeType = "application/x-scribus-text";
-bool ScMimeData::clipboardHasScribusData(void)
+bool ScMimeData::clipboardHasScribusData()
{
bool hasData = false;
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
@@ -40,7 +40,7 @@
return hasData;
}
-bool ScMimeData::clipboardHasScribusElem(void)
+bool ScMimeData::clipboardHasScribusElem()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (mimeData)
@@ -48,7 +48,7 @@
return false;
}
-bool ScMimeData::clipboardHasScribusFragment(void)
+bool ScMimeData::clipboardHasScribusFragment()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (mimeData)
@@ -56,7 +56,7 @@
return false;
}
-bool ScMimeData::clipboardHasScribusText(void)
+bool ScMimeData::clipboardHasScribusText()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (mimeData)
@@ -64,7 +64,7 @@
return false;
}
-bool ScMimeData::clipboardHasPlainText(void)
+bool ScMimeData::clipboardHasPlainText()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (mimeData)
@@ -72,7 +72,7 @@
return false;
}
-bool ScMimeData::clipboardHasKnownData(void)
+bool ScMimeData::clipboardHasKnownData()
{
bool hasData = false;
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
@@ -85,7 +85,7 @@
return hasData;
}
-QString ScMimeData::clipboardKnownDataExt(void)
+QString ScMimeData::clipboardKnownDataExt()
{
QString ext = "";
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
@@ -101,7 +101,7 @@
return ext;
}
-QByteArray ScMimeData::clipboardKnownDataData(void)
+QByteArray ScMimeData::clipboardKnownDataData()
{
QByteArray data = "";
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
@@ -117,7 +117,7 @@
return data;
}
-QString ScMimeData::clipboardScribusElem(void)
+QString ScMimeData::clipboardScribusElem()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
const ScElemMimeData* elemData = dynamic_cast<const ScElemMimeData*>(mimeData);
@@ -127,19 +127,19 @@
return QString::fromUtf8(data.data(), data.size());
}
-QByteArray ScMimeData::clipboardScribusFragment(void)
+QByteArray ScMimeData::clipboardScribusFragment()
{
QByteArray data = QApplication::clipboard()->mimeData()->data(ScribusFragmentMimeType);
return data;
}
-QByteArray ScMimeData::clipboardScribusText(void)
+QByteArray ScMimeData::clipboardScribusText()
{
QByteArray data = QApplication::clipboard()->mimeData()->data(ScribusTextMimeType);
return data;
}
-ScElemMimeData::ScElemMimeData(void) : QMimeData()
+ScElemMimeData::ScElemMimeData() : QMimeData()
{
m_formats << "application/x-scribus-elem" << "text/plain";
}
Modified: trunk/Scribus/scribus/scmimedata.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scmimedata.h
==============================================================================
--- trunk/Scribus/scribus/scmimedata.h (original)
+++ trunk/Scribus/scribus/scmimedata.h Wed Jul 25 20:53:47 2018
@@ -33,18 +33,18 @@
static const QString ScribusFragmentMimeType;
static const QString ScribusTextMimeType;
- static bool clipboardHasScribusData(void);
- static bool clipboardHasScribusElem(void);
- static bool clipboardHasScribusFragment(void);
- static bool clipboardHasScribusText(void);
- static bool clipboardHasPlainText(void);
- static bool clipboardHasKnownData(void);
- static QString clipboardKnownDataExt(void);
- static QByteArray clipboardKnownDataData(void);
+ static bool clipboardHasScribusData();
+ static bool clipboardHasScribusElem();
+ static bool clipboardHasScribusFragment();
+ static bool clipboardHasScribusText();
+ static bool clipboardHasPlainText();
+ static bool clipboardHasKnownData();
+ static QString clipboardKnownDataExt();
+ static QByteArray clipboardKnownDataData();
- static QString clipboardScribusElem(void);
- static QByteArray clipboardScribusFragment(void);
- static QByteArray clipboardScribusText(void);
+ static QString clipboardScribusElem();
+ static QByteArray clipboardScribusFragment();
+ static QByteArray clipboardScribusText();
};
class SCRIBUS_API ScFragmentMimeData : public QMimeData
@@ -52,10 +52,10 @@
Q_OBJECT
public:
- ScFragmentMimeData(void) : QMimeData() {}
+ ScFragmentMimeData() : QMimeData() {}
void setScribusFragment(const QByteArray& fragment) { setData(ScMimeData::ScribusFragmentMimeType, fragment); }
- QByteArray scribusFragment(void) { return data(ScMimeData::ScribusFragmentMimeType); }
+ QByteArray scribusFragment() { return data(ScMimeData::ScribusFragmentMimeType); }
};
class SCRIBUS_API ScElemMimeData : public QMimeData
@@ -69,7 +69,7 @@
virtual QVariant retrieveData ( const QString & mimeType, QVariant::Type type ) const;
public:
- ScElemMimeData(void);
+ ScElemMimeData();
virtual QStringList formats() const { return m_formats; }
virtual bool hasFormat ( const QString & mimeType ) const;
@@ -83,10 +83,10 @@
Q_OBJECT
public:
- ScTextMimeData(void) : QMimeData() {}
+ ScTextMimeData() : QMimeData() {}
void setScribusText(const QByteArray& scText) { setData(ScMimeData::ScribusTextMimeType, scText); }
- QByteArray scribusText(void) { return data(ScMimeData::ScribusFragmentMimeType); }
+ QByteArray scribusText() { return data(ScMimeData::ScribusFragmentMimeType); }
};
#endif
Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp (original)
+++ trunk/Scribus/scribus/scpaths.cpp Wed Jul 25 20:53:47 2018
@@ -132,7 +132,7 @@
ScPaths::~ScPaths() {};
-QString ScPaths::bundleDir(void) const
+QString ScPaths::bundleDir() const
{
// On MacOS/X, override the compile-time settings with a location
// obtained from the system.
@@ -391,7 +391,7 @@
return hyphDirs;
}
-QStringList ScPaths::systemFontDirs(void)
+QStringList ScPaths::systemFontDirs()
{
QStringList fontDirs;
#ifdef Q_OS_MAC
@@ -405,7 +405,7 @@
return fontDirs;
}
-QStringList ScPaths::systemProfilesDirs(void)
+QStringList ScPaths::systemProfilesDirs()
{
QStringList iccProfDirs;
#ifdef Q_OS_MAC
@@ -472,7 +472,7 @@
-QStringList ScPaths::systemCreatePalettesDirs(void)
+QStringList ScPaths::systemCreatePalettesDirs()
{
QStringList createDirs;
#ifdef Q_OS_MAC
@@ -498,7 +498,7 @@
return createDirs;
}
-QString ScPaths::oldApplicationDataDir(void)
+QString ScPaths::oldApplicationDataDir()
{
#ifdef Q_OS_WIN32
QString appData = windowsSpecialDir(CSIDL_APPDATA);
@@ -557,7 +557,7 @@
return prefsDir;
}
-QString ScPaths::imageCacheDir(void)
+QString ScPaths::imageCacheDir()
{
return applicationDataDir() + "cache/img/";
}
@@ -620,7 +620,7 @@
return useFilesDirectory.absolutePath()+"/";
}
-QString ScPaths::userDocumentDir(void)
+QString ScPaths::userDocumentDir()
{
QString userDocs = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
if (QDir(userDocs).exists())
@@ -640,7 +640,7 @@
return useFilesDirectory.absolutePath()+"/";
}
-QString ScPaths::tempFileDir(void)
+QString ScPaths::tempFileDir()
{
#ifdef Q_OS_WIN32
QString tempPath;
Modified: trunk/Scribus/scribus/scpattern.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scpattern.cpp
==============================================================================
--- trunk/Scribus/scribus/scpattern.cpp (original)
+++ trunk/Scribus/scribus/scpattern.cpp Wed Jul 25 20:53:47 2018
@@ -33,7 +33,7 @@
ScPattern::ScPattern()
{
items.clear();
- doc = 0;
+ doc = nullptr;
pattern = QImage();
scaleX = 1.0;
scaleY = 1.0;
@@ -61,7 +61,7 @@
return &pattern;
}
-void ScPattern::setPattern(QString name)
+void ScPattern::setPattern(const QString& name)
{
items.clear();
doc->setLoading(true);
Modified: trunk/Scribus/scribus/scpattern.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scpattern.h
==============================================================================
--- trunk/Scribus/scribus/scpattern.h (original)
+++ trunk/Scribus/scribus/scpattern.h Wed Jul 25 20:53:47 2018
@@ -41,7 +41,7 @@
QImage* getPattern();
void setDoc(ScribusDoc *theDoc);
- void setPattern(QString file);
+ void setPattern(const QString& file);
void createPreview();
double scaleX;
Modified: trunk/Scribus/scribus/scplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/scplugin.cpp (original)
+++ trunk/Scribus/scribus/scplugin.cpp Wed Jul 25 20:53:47 2018
@@ -19,7 +19,7 @@
//=====================================================//
ScPlugin::ScPlugin()
- : QObject(0)
+ : QObject(nullptr)
{
}
@@ -137,14 +137,14 @@
// Stub for plugins that don't implement this method to inherit
DeferredTask* ScActionPlugin::runAsync(QString /* target */)
{
- return 0;
+ return nullptr;
}
// Stub for plugins that don't implement this method to inherit
DeferredTask* ScActionPlugin::runAsync(QIODevice* /* target */)
{
- return 0;
+ return nullptr;
}
// Legacy code support; avoid relying on in new code.
@@ -161,7 +161,7 @@
bool ScActionPlugin::handleSelection(ScribusDoc* doc, int SelectedType)
{
- const uint docSelectionCount=doc->m_Selection->count();
+ const int docSelectionCount=doc->m_Selection->count();
ActionInfo ai(actionInfo());
if (SelectedType != -1)
{
@@ -179,7 +179,7 @@
if (ai.needsNumObjects > 2)
{
bool setter = true;
- for (uint bx = 0; bx < docSelectionCount; ++bx)
+ for (int bx = 0; bx < docSelectionCount; ++bx)
{
if (ai.notSuitableFor.contains(doc->m_Selection->itemAt(bx)->itemType()))
setter = false;
@@ -188,7 +188,7 @@
}
else
{
- if (docSelectionCount == static_cast<uint>(ai.needsNumObjects))
+ if (docSelectionCount == ai.needsNumObjects)
{
if (ai.needsNumObjects == 2)
{
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jul 25 20:53:47 2018
@@ -2489,7 +2489,7 @@
}
-bool ScribusDoc::AddFont(QString name, int fsize)
+bool ScribusDoc::AddFont(const QString& name, int fsize)
{
bool ret = false;
if (UsedFonts.contains(name))
@@ -2737,7 +2737,7 @@
}
-void ScribusDoc::rebuildMasterNames(void)
+void ScribusDoc::rebuildMasterNames()
{
MasterNames.clear();
for (int i = 0; i < MasterPages.count(); ++i)
@@ -2950,15 +2950,15 @@
if (!ll)
qWarning() << "Layer added without undo, could not get layer back for undo action creation";
else
- if (UndoManager::undoEnabled())
- {
- SimpleState *ss = new SimpleState(Um::AddLayer, "", Um::ICreate);
- ss->set("ADD_LAYER");
- ss->set("ACTIVE", m_ActiveLayer);
- ss->set("NAME", ll->Name);
- ss->set("LAYER_NR", ll->ID);
- m_undoManager->action(this, ss, DocName, Um::ILayer);
- }
+ if (UndoManager::undoEnabled())
+ {
+ SimpleState *ss = new SimpleState(Um::AddLayer, "", Um::ICreate);
+ ss->set("ADD_LAYER");
+ ss->set("ACTIVE", m_ActiveLayer);
+ ss->set("NAME", ll->Name);
+ ss->set("LAYER_NR", ll->ID);
+ m_undoManager->action(this, ss, DocName, Um::ILayer);
+ }
changed();
return lId;
@@ -3823,7 +3823,7 @@
return true;
}
-void ScribusDoc::removePattern(QString name)
+void ScribusDoc::removePattern(const QString& name)
{
docPatterns.remove(name);
QList<PageItem*> allItems;
@@ -5506,8 +5506,7 @@
if (activeTransaction)
{
//don't think we need this now ... newItem->checkChanges(true);
- activeTransaction.commit(target->getUName(), newItem->getUPixmap(),
- Um::Create + " " + newItem->getUName(), "", Um::ICreate);
+ activeTransaction.commit(target->getUName(), newItem->getUPixmap(), Um::Create + " " + newItem->getUName(), "", Um::ICreate);
}
}
return Items->count()-1;
@@ -5791,7 +5790,7 @@
return ret;
}
-PageItem* ScribusDoc::getItemFromName(QString name)
+PageItem* ScribusDoc::getItemFromName(const QString& name)
{
PageItem* ret = nullptr;
for (int i = 0; i < Items->count(); ++i)
@@ -5842,7 +5841,7 @@
m_automaticTextFrames=atf;
}
-bool ScribusDoc::loadPict(QString fn, PageItem *pageItem, bool reload, bool showMsg)
+bool ScribusDoc::loadPict(const QString& fn, PageItem *pageItem, bool reload, bool showMsg)
{
if (!reload)
{
@@ -6445,7 +6444,7 @@
case PageItem::TextFrame:
newItem = new PageItem_TextFrame(*oldItem);
if (UndoManager::undoEnabled() && oldItem->itemType()==PageItem::PathText)
- transactionConversion = m_undoManager->beginTransaction(currentPage()->getUName(), 0, Um::TextFrame, "", Um::ITextFrame);
+ transactionConversion = m_undoManager->beginTransaction(currentPage()->getUName(), nullptr, Um::TextFrame, "", Um::ITextFrame);
break;
//We don't allow this
/* case PageItem::Line:
@@ -6461,7 +6460,7 @@
if (secondaryItem==nullptr)
return nullptr;
if (UndoManager::undoEnabled())
- transactionConversion = m_undoManager->beginTransaction(currentPage()->getUName(), 0, Um::PathText, "", Um::ITextFrame);
+ transactionConversion = m_undoManager->beginTransaction(currentPage()->getUName(), nullptr, Um::PathText, "", Um::ITextFrame);
newItem = new PageItem_PathText(*oldItem);
break;
default:
@@ -6612,7 +6611,7 @@
}
-bool ScribusDoc::itemNameExists(const QString checkItemName)
+bool ScribusDoc::itemNameExists(const QString& checkItemName)
{
bool found = false;
QList<PageItem*> allItems;
@@ -6654,7 +6653,7 @@
m_masterPageMode = changeToMasterPageMode;
}
-void ScribusDoc::setSymbolEditMode(bool mode, QString symbolName)
+void ScribusDoc::setSymbolEditMode(bool mode, const QString& symbolName)
{
if (mode == m_symbolEditMode)
return;
@@ -7051,7 +7050,7 @@
if (key==-1)
return retVal;
//If a section is inactive, theres no page numbers printed
- if (m_docPrefsData.docSectionMap[key].active==false)
+ if (!m_docPrefsData.docSectionMap[key].active)
return "";
uint sectionIndexOffset;
if (!m_docPrefsData.docSectionMap[key].reversed)
@@ -7070,7 +7069,7 @@
return retVal;
//If a section is inactive, theres no page numbers printed
- if (m_docPrefsData.docSectionMap[key].active==false)
+ if (!m_docPrefsData.docSectionMap[key].active)
return retVal;
retVal = m_docPrefsData.docSectionMap[key].pageNumberFillChar;
if (retVal == QChar(0))
@@ -7086,7 +7085,7 @@
return retVal;
//If a section is inactive, theres no page numbers printed
- if (m_docPrefsData.docSectionMap[key].active==false)
+ if (!m_docPrefsData.docSectionMap[key].active)
return retVal;
retVal = qMin(m_docPrefsData.docSectionMap[key].pageNumberWidth, 20); // added the qmin as a sanity check -> fixes bug #9721
return retVal;
@@ -7350,10 +7349,10 @@
int myCol=columnOfPage(pageIndex);
if (myCol==0) //Left hand page
return LeftPage;
- else if (myCol>= pageSets()[m_docPrefsData.docSetupPrefs.pagePositioning].Columns-1) // Right hand page
+ if (myCol>= pageSets()[m_docPrefsData.docSetupPrefs.pagePositioning].Columns-1) // Right hand page
return RightPage;
- else //Middle pages
- return MiddlePage;
+ //Middle pages
+ return MiddlePage;
}
int ScribusDoc::columnOfPage(int pageIndex) const
@@ -7604,7 +7603,6 @@
changed();
invalidateRegion(selRect);
regionsChanged()->update(QRectF());
- return;
}
void ScribusDoc::itemSelection_LowerItem()
@@ -7905,14 +7903,14 @@
itemSelection_ApplyParagraphStyle(newStyle, customSelection);
}
-void ScribusDoc::itemSelection_SetFont(QString fon, Selection* customSelection)
+void ScribusDoc::itemSelection_SetFont(const QString& fon, Selection* customSelection)
{
CharStyle newStyle;
newStyle.setFont((*AllFonts)[fon]);
itemSelection_ApplyCharStyle(newStyle, customSelection, "FONT");
}
-void ScribusDoc::itemSelection_SetFontFeatures(QString fontfeature, Selection* customSelection)
+void ScribusDoc::itemSelection_SetFontFeatures(const QString& fontfeature, Selection* customSelection)
{
CharStyle newStyle;
newStyle.setFontFeatures(fontfeature);
@@ -9367,7 +9365,7 @@
regionsChanged()->update(QRectF());
}
-void ScribusDoc::itemSelection_ApplyCharStyle(const CharStyle & newStyle, Selection* customSelection, QString ETEA)
+void ScribusDoc::itemSelection_ApplyCharStyle(const CharStyle & newStyle, Selection* customSelection, const QString& ETEA)
{
Selection* itemSelection = (customSelection != 0) ? customSelection : m_Selection;
assert(itemSelection != nullptr);
@@ -11420,18 +11418,14 @@
{
if (itemList->contains(item))
return itemList;
- else
- {
- for (int i = 0; i < itemList->count(); i++)
- {
- if (itemList->at(i)->isGroup())
- {
- QList<PageItem*>* ite = GroupOfItem(&itemList->at(i)->groupItemList, item);
- if (ite != nullptr)
- return ite;
- }
- }
- return nullptr;
+ for (int i = 0; i < itemList->count(); i++)
+ {
+ if (itemList->at(i)->isGroup())
+ {
+ QList<PageItem*>* ite = GroupOfItem(&itemList->at(i)->groupItemList, item);
+ if (ite != nullptr)
+ return ite;
+ }
}
return nullptr;
}
@@ -11872,7 +11866,7 @@
{
PageItem *currItem = itemSelection->itemAt(i);
currItem->setImageXYOffset(x, y);
- if (currItem->imageClip.size() != 0)
+ if (!currItem->imageClip.empty())
{
currItem->imageClip = currItem->pixm.imgInfo.PDSpathData[currItem->pixm.imgInfo.usedPath].copy();
QTransform cl;
@@ -11916,7 +11910,7 @@
{
PageItem *currItem = itemSelection->itemAt(i);
currItem->setImageXYScale(x, y);
- if (currItem->imageClip.size() != 0)
+ if (!currItem->imageClip.empty())
{
currItem->imageClip = currItem->pixm.imgInfo.PDSpathData[currItem->pixm.imgInfo.usedPath].copy();
QTransform cl;
@@ -12012,7 +12006,7 @@
{
PageItem *currItem = itemSelection->itemAt(i);
currItem->setImageRotation(rot);
- if (currItem->imageClip.size() != 0)
+ if (!currItem->imageClip.empty())
{
currItem->imageClip = currItem->pixm.imgInfo.PDSpathData[currItem->pixm.imgInfo.usedPath].copy();
QTransform cl;
@@ -12083,7 +12077,7 @@
msgBox.exec();
if (msgBox.clickedButton() == abortButton)
return false;
- else if (msgBox.clickedButton() == lockButton)
+ if (msgBox.clickedButton() == lockButton)
t = 0;
else if (msgBox.clickedButton() == unlockButton)
t = 1;
@@ -12099,7 +12093,7 @@
else
targetTooltip = Um::ItemsInvolved2 + "\n";
// Make the align action a single action in Action History
- m_alignTransaction = m_undoManager->beginTransaction(Um::Selection, 0, Um::AlignDistribute, targetTooltip, Um::IAlignDistribute);
+ m_alignTransaction = m_undoManager->beginTransaction(Um::Selection, nullptr, Um::AlignDistribute, targetTooltip, Um::IAlignDistribute);
if (oneLocked && (t == 0))
{
for (int i = 0; i < alignObjectsCount; ++i)
@@ -13980,9 +13974,9 @@
{
if (m_Selection->containsItem(item.at(i)) || item.at(i)->OwnPage != OnPage(xin,yin))
continue;
- else if (item.at(i)->Parent != parentI)
+ if (item.at(i)->Parent != parentI)
continue;
- else if (fabs(item.at(i)->visualYPos() - yin) < (prefsData().guidesPrefs.guideRad / viewScale))
+ if (fabs(item.at(i)->visualYPos() - yin) < (prefsData().guidesPrefs.guideRad / viewScale))
tmpGuidesSel.insert(fabs(item.at(i)->visualYPos() - yin), i*3);
else if (fabs(item.at(i)->visualYPos() + item.at(i)->visualHeight() - yin) < (prefsData().guidesPrefs.guideRad / viewScale))
tmpGuidesSel.insert(fabs(item.at(i)->visualYPos() + item.at(i)->visualHeight() - yin), i*3+1);
@@ -14004,9 +13998,9 @@
{
if (m_Selection->containsItem(item.at(i)) || item.at(i)->OwnPage != OnPage(xin,yin))
continue;
- else if (item.at(i)->Parent != parentI)
+ if (item.at(i)->Parent != parentI)
continue;
- else if (fabs(item.at(i)->visualXPos() - xin) < (prefsData().guidesPrefs.guideRad / viewScale))
+ if (fabs(item.at(i)->visualXPos() - xin) < (prefsData().guidesPrefs.guideRad / viewScale))
tmpGuidesSel.insert(fabs(item.at(i)->visualXPos() - xin), i*3);
else if (fabs(item.at(i)->visualXPos() + item.at(i)->visualWidth() - xin) < (prefsData().guidesPrefs.guideRad / viewScale))
tmpGuidesSel.insert(fabs(item.at(i)->visualXPos() + item.at(i)->visualWidth() - xin), i*3+1);
@@ -14239,7 +14233,7 @@
-void ScribusDoc::moveRotated(PageItem *currItem, FPoint npv)
+void ScribusDoc::moveRotated(PageItem *currItem, const FPoint& npv)
{
QTransform ma;
ma.translate(currItem->xPos(), currItem->yPos());
@@ -16591,7 +16585,7 @@
QString ScribusDoc::getNumberStr(const QString& numName, int level, bool reset, const ParagraphStyle &style)
{
Q_ASSERT(numerations.contains(numName));
- NumStruct * numS = numerations.value(numName, (NumStruct*) 0);
+ NumStruct * numS = numerations.value(numName, (NumStruct*) nullptr);
if (!numS)
return QString();
numS->m_lastlevel = level;
@@ -16853,7 +16847,7 @@
return nameList;
}
-Mark* ScribusDoc::getMark(QString l, MarkType t)
+Mark* ScribusDoc::getMark(const QString& l, MarkType t)
{
foreach (Mark* mrk, m_docMarksList)
{
@@ -17260,7 +17254,7 @@
return docWasChanged;
}
-NotesStyle* ScribusDoc::newNotesStyle(NotesStyle NS)
+NotesStyle* ScribusDoc::newNotesStyle(const NotesStyle& NS)
{
QString nsName = NS.name();
@@ -17276,8 +17270,8 @@
newNS = new NotesStyle();
*newNS = NS;
QStringList nsNames;
- for (int a = 0; a< m_docNotesStylesList.count(); ++a)
- nsNames.append(m_docNotesStylesList.at(a)->name());
+ for (int i = 0; i< m_docNotesStylesList.count(); ++i)
+ nsNames.append(m_docNotesStylesList.at(i)->name());
getUniqueName(nsName, nsNames, "_");
newNS->setName(nsName);
m_docNotesStylesList.append(newNS);
@@ -17292,7 +17286,7 @@
return newNS;
}
-void ScribusDoc::renameNotesStyle(NotesStyle* NS, QString newName)
+void ScribusDoc::renameNotesStyle(NotesStyle* NS, const QString& newName)
{
foreach (Mark* mrk, m_docMarksList)
mrk->label.replace("_" + NS->name()+ "_", "_" + newName + "_");
@@ -17368,7 +17362,7 @@
ss->set("notesParStyle", NS->notesParStyle());
}
-NotesStyle* ScribusDoc::getNotesStyle(QString nsName)
+NotesStyle* ScribusDoc::getNotesStyle(const QString& nsName)
{
for (int i=0; i < m_docNotesStylesList.count(); ++i)
{
@@ -18125,7 +18119,7 @@
delete nF;
}
-bool ScribusDoc::validateNSet(NotesStyle NS, QString newName)
+bool ScribusDoc::validateNSet(const NotesStyle& NS, QString newName)
{
//check if chosen numbering type is available with chosen range, prefix and suffix
QString errStr;
@@ -18173,11 +18167,11 @@
{
if (nStyle->range() == NSRdocument)
return endNoteFrame(nStyle);
- else if (nStyle->range() == NSRsection)
+ if (nStyle->range() == NSRsection)
return endNoteFrame(nStyle, getSectionKeyForPageIndex(master->OwnPage));
- else if (nStyle->range() == NSRpage)
+ if (nStyle->range() == NSRpage)
return endNoteFrame(nStyle, (void*) DocPages.at(master->OwnPage));
- else if (nStyle->range() == NSRstory)
+ if (nStyle->range() == NSRstory)
return endNoteFrame(nStyle, master->firstInChain());
return nullptr;
}
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Wed Jul 25 20:53:47 2018
@@ -657,7 +657,7 @@
*/
QStringList getItemAttributeNames();
- bool AddFont(QString name, int fsize = 10);
+ bool AddFont(const QString& name, int fsize = 10);
/*!
* @brief TODO: Reorganise the fonts.. how? Moved from scribus.cpp
* CB: almost the same as getUsedFonts???
@@ -694,7 +694,7 @@
* @brief Set the patterns for a document
*/
bool addPattern(QString &name, ScPattern& pattern);
- void removePattern(QString name);
+ void removePattern(const QString& name);
void setPatterns(const QHash<QString, ScPattern> &patterns);
/*!
* @brief Check pattern with specified name and return it if valid
@@ -823,7 +823,7 @@
int getItemNrfromUniqueID(uint unique);
//return pointer to item
- PageItem* getItemFromName(QString name);
+ PageItem* getItemFromName(const QString& name);
//itemDelete
//itemBlah...
@@ -847,7 +847,7 @@
* @param reload
* @return
*/
- bool loadPict(QString fn, PageItem *pageItem, bool reload = false, bool showMsg = false);
+ bool loadPict(const QString& fn, PageItem *pageItem, bool reload = false, bool showMsg = false);
/**
* \brief Handle image with color profiles
* @param Pr profile
@@ -913,7 +913,7 @@
* @author Craig Ringer
** CB Moved from PageItem
*/
- bool itemNameExists(const QString itemName);
+ bool itemNameExists(const QString& itemName);
/**
* @brief Set the doc into Master page mode
@@ -926,7 +926,7 @@
/**
* @brief Set the doc into symbol edit mode
*/
- void setSymbolEditMode(bool mode, QString symbolName = "");
+ void setSymbolEditMode(bool mode, const QString& symbolName = "");
/*** Is the document in symbol edit mode? */
bool symbolEditMode() const { return m_symbolEditMode; }
@@ -1044,7 +1044,7 @@
void itemSelection_convertItemsToSymbol(QString& patternName);
void itemSelection_ApplyParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection = nullptr, bool rmDirectFormatting = false);
void itemSelection_SetParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection = nullptr);
- void itemSelection_ApplyCharStyle(const CharStyle & newstyle, Selection* customSelection = nullptr, QString ETEA = "");
+ void itemSelection_ApplyCharStyle(const CharStyle & newstyle, Selection* customSelection = nullptr, const QString& ETEA = "");
void itemSelection_SetCharStyle(const CharStyle & newstyle, Selection* customSelection = nullptr);
void itemSelection_EraseParagraphStyle(Selection* customSelection = nullptr);
void itemSelection_EraseCharStyle(Selection* customSelection = nullptr);
@@ -1065,7 +1065,7 @@
void itemSelection_SetLineSpacingMode(int w, Selection* customSelection = nullptr);
void itemSelection_SetLanguage(QString w, Selection* customSelection = nullptr);
void itemSetFont(const QString& newFont);
- void itemSelection_SetFont(QString fon, Selection* customSelection = nullptr);
+ void itemSelection_SetFont(const QString& fon, Selection* customSelection = nullptr);
void itemSelection_SetParBackgroundColor(QString farbe, Selection* customSelection = nullptr);
void itemSelection_SetParBackgroundShade(int sha, Selection* customSelection = nullptr);
void itemSelection_SetBackgroundColor(QString farbe, Selection* customSelection = nullptr);
@@ -1169,7 +1169,7 @@
bool ApplyGuides(FPoint* point, bool elementSnap = false);
bool moveItem(double newX, double newY, PageItem* ite);
void rotateItem(double win, PageItem *currItem);
- void moveRotated(PageItem *currItem, FPoint npv);
+ void moveRotated(PageItem *currItem, const FPoint& npv);
bool sizeItem(double newX, double newY, PageItem *pi, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
bool moveSizeItem(FPoint newX, FPoint newY, PageItem* currItem, bool fromMP = false, bool constrainRotation = false);
void adjustItemSize(PageItem *currItem, bool includeGroup = false, bool moveInGroup = true);
@@ -1457,7 +1457,7 @@
//! Delete the items in the current selection. When force is true, we do not warn the user and make SE happy too. Force is used from @sa Page::restorePageItemCreation
void itemSelection_DeleteItem(Selection* customSelection = nullptr, bool forceDeletion=false);
void itemSelection_SetItemFillTransparency(double t);
- void itemSelection_SetFontFeatures(QString fontfeature, Selection* customSelection = nullptr);
+ void itemSelection_SetFontFeatures(const QString& fontfeature, Selection* customSelection = nullptr);
void itemSelection_SetHyphenWordMin(int wordMin, Selection* customSelection = nullptr);
void itemSelection_SetHyphenConsecutiveLines(int consecutiveLines, Selection* customSelection = nullptr);
void itemSelection_SetHyphenChar(uint hyphenChar, Selection* customSelection = nullptr);
@@ -1715,7 +1715,7 @@
QStringList marksLabelsList(MarkType type);
//return mark with given label and given type
- Mark* getMark(QString label, MarkType type); //returns mark with label and type (labels are unique only for same type marks)
+ Mark* getMark(const QString& label, MarkType type); //returns mark with label and type (labels are unique only for same type marks)
Mark* newMark(Mark* mrk = nullptr);
TextNote* newNote(NotesStyle* NS);
@@ -1731,12 +1731,12 @@
bool invalidateVariableTextFrames(Mark* mrk, bool forceUpdate = false); //returns if any text was changed
//for foot/endnotes
- NotesStyle* newNotesStyle(NotesStyle NS);
- void renameNotesStyle(NotesStyle* NS, QString newName);
+ NotesStyle* newNotesStyle(const NotesStyle& NS);
+ void renameNotesStyle(NotesStyle* NS, const QString& newName);
//delete whole notes style with its notesframes and notes
void deleteNotesStyle(QString nsName);
void undoSetNotesStyle(SimpleState* ss, NotesStyle* ns);
- NotesStyle* getNotesStyle(QString nsName);
+ NotesStyle* getNotesStyle(const QString& nsName);
//delete note, if fromText than marks for given note will be removed
void deleteNote(TextNote* note);
void setUndoDelNote(TextNote* note);
@@ -1750,7 +1750,7 @@
//set new text styles for notes marks
void updateNotesFramesStyles(NotesStyle* nStyle);
//check conflicts beetween notes styles
- bool validateNSet(NotesStyle NS, QString newName = "");
+ bool validateNSet(const NotesStyle& NS, QString newName = "");
//update layout remove empty notesframes
bool notesFramesUpdate();
//update notesframes after changing automatic features of notes style
Modified: trunk/Scribus/scribus/scribuswin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/scribuswin.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuswin.cpp (original)
+++ trunk/Scribus/scribus/scribuswin.cpp Wed Jul 25 20:53:47 2018
@@ -36,9 +36,9 @@
ScribusWin::ScribusWin(QWidget* parent, ScribusDoc* doc) :
QMainWindow(parent),
- m_subWindow(0),
- m_ScMW(0),
- m_View(0),
+ m_subWindow(nullptr),
+ m_ScMW(nullptr),
+ m_View(nullptr),
m_winIndex(0)
{
setWindowIcon(IconManager::instance()->loadIcon("AppIcon2.png"));
@@ -57,7 +57,7 @@
++m_Doc->viewCount;
m_winIndex = ++m_Doc->viewID;
setCentralWidget(newView);
- setStatusBar(0);
+ setStatusBar(nullptr);
}
void ScribusWin::closeEvent(QCloseEvent *ce)
Modified: trunk/Scribus/scribus/selection.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/selection.cpp
==============================================================================
--- trunk/Scribus/scribus/selection.cpp (original)
+++ trunk/Scribus/scribus/selection.cpp Wed Jul 25 20:53:47 2018
@@ -500,7 +500,7 @@
return true;
}
-int Selection::objectsLayer(void) const
+int Selection::objectsLayer() const
{
if (m_SelList.isEmpty())
return -1;
@@ -516,7 +516,7 @@
return layerID;
}
-bool Selection::objectsHaveSameParent(void) const
+bool Selection::objectsHaveSameParent() const
{
int selectedItemCount = m_SelList.count();
if (selectedItemCount <= 1)
@@ -535,17 +535,17 @@
return haveSameParent;
}
-bool Selection::signalsDelayed(void)
+bool Selection::signalsDelayed()
{
return (m_isGUISelection && (m_delaySignals > 0));
}
-void Selection::delaySignalsOn(void)
+void Selection::delaySignalsOn()
{
++m_delaySignals;
}
-void Selection::delaySignalsOff(void)
+void Selection::delaySignalsOff()
{
--m_delaySignals;
if (m_delaySignals <= 0)
Modified: trunk/Scribus/scribus/selection.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/selection.h
==============================================================================
--- trunk/Scribus/scribus/selection.h (original)
+++ trunk/Scribus/scribus/selection.h Wed Jul 25 20:53:47 2018
@@ -159,17 +159,17 @@
* \brief get the layer ID of items in the selection
* @return the layer ID or -1 if items do not belong to the same layer
*/
- int objectsLayer(void) const;
+ int objectsLayer() const;
/**
* \brief detect if selected object have all same parent (doc or group)
* @return true if objects share same parent, false otherwise
*/
- bool objectsHaveSameParent(void) const;
-
- bool signalsDelayed(void);
- void delaySignalsOn(void);
- void delaySignalsOff(void);
+ bool objectsHaveSameParent() const;
+
+ bool signalsDelayed();
+ void delaySignalsOn();
+ void delaySignalsOff();
protected:
PageItem *itemAt_(int index=0);
Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp (original)
+++ trunk/Scribus/scribus/ui/proptree.cpp Wed Jul 25 20:53:47 2018
@@ -40,7 +40,7 @@
PropTreeItemDelegate::PropTreeItemDelegate(PropTreeWidget *parent) : QItemDelegate(parent)
{
m_parent = parent;
- m_edit = 0;
+ m_edit = nullptr;
}
void PropTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
@@ -117,7 +117,7 @@
QWidget *edito = nullptr;
PropTreeItem* item = (PropTreeItem*) m_parent->indexToItem(index);
if (!item)
- return 0;
+ return nullptr;
if (item->m_type == PropTreeItem::IntSpinBox)
{
@@ -168,7 +168,7 @@
connect(editor, SIGNAL(activated(QString)), item, SIGNAL(valueChanged(QString)));
}
else
- edito = 0;
+ edito = nullptr;
m_edit = edito;
if (item && m_edit)
emit item->editStarted();
@@ -278,7 +278,7 @@
return sz;
}
-PropTreeItem::PropTreeItem(QTreeWidget *parent, int typ, QString title) : QObject(parent), QTreeWidgetItem(parent),
+PropTreeItem::PropTreeItem(QTreeWidget *parent, int typ, const QString& title) : QObject(parent), QTreeWidgetItem(parent),
m_type(typ),
m_unit(0),
m_decimals(0),
@@ -297,7 +297,7 @@
setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
}
-PropTreeItem::PropTreeItem(PropTreeItem *parent, int typ, QString title) : QObject(parent), QTreeWidgetItem(parent)
+PropTreeItem::PropTreeItem(PropTreeItem *parent, int typ, const QString& title) : QObject(parent), QTreeWidgetItem(parent)
{
setText(0, title);
m_type = typ;
@@ -371,7 +371,7 @@
setData(1, Qt::DisplayRole, value);
}
-void PropTreeItem::setStringValue(QString value)
+void PropTreeItem::setStringValue(const QString& value)
{
setData(1, Qt::UserRole, value);
setData(1, Qt::DisplayRole, value);
@@ -401,7 +401,7 @@
setData(1, Qt::DisplayRole, QString("%1 %2").arg(data(1, Qt::UserRole).toString()).arg(unitGetSuffixFromIndex(m_unit)));
}
-void PropTreeItem::setComboStrings(QStringList value)
+void PropTreeItem::setComboStrings(const QStringList& value)
{
setData(1, Qt::UserRole + 1, value);
}
@@ -418,7 +418,7 @@
m_fmax = max;
}
-void PropTreeItem::setColorList(ColorList colors)
+void PropTreeItem::setColorList(const ColorList& colors)
{
m_colors = colors;
}
Modified: trunk/Scribus/scribus/ui/proptree.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22598&path=/trunk/Scribus/scribus/ui/proptree.h
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.h (original)
+++ trunk/Scribus/scribus/ui/proptree.h Wed Jul 25 20:53:47 2018
@@ -59,8 +59,8 @@
Q_OBJECT
public:
- PropTreeItem(QTreeWidget* parent, int typ, QString title);
- PropTreeItem(PropTreeItem* parent, int typ, QString title);
+ PropTreeItem(QTreeWidget* parent, int typ, const QString& title);
+ PropTreeItem(PropTreeItem* parent, int typ, const QString& title);
// PropTreeItem(QTreeWidget *parent, QString title, int value, int min, int max, int unit);
// PropTreeItem(QTreeWidget* parent, QString title, double value, double min, double max, int decimals, int unit);
// PropTreeItem(QTreeWidget *parent, QString title, QString value, QStringList values);
@@ -85,13 +85,13 @@
void setIntValue(int value);
void setDoubleValue(double value);
void setBoolValue(bool value);
- void setStringValue(QString value);
+ void setStringValue(const QString& value);
void setUnitValue(int unit);
void setDecimalsValue(int unit);
- void setComboStrings(QStringList value);
+ void setComboStrings(const QStringList& value);
void setMinMaxValues(int min, int max);
void setMinMaxValues(double min, double max);
- void setColorList(ColorList colors);
+ void setColorList(const ColorList& colors);
int m_type;
int m_unit;
int m_decimals;
More information about the scribus-commit
mailing list