r21935 by craig - Some code cleaning, mostly courtesy of clazy, part 3
scribus-commit
scribus-commit at lists.scribus.net
Thu Apr 20 06:57:07 UTC 2017
Author: craig
Date: Thu Apr 20 06:57:07 2017
New Revision: 21935
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21935
Log:
Some code cleaning, mostly courtesy of clazy, part 3
Modified:
trunk/Scribus/scribus/canvasmode_objimport.h
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/aboutplugins.cpp
trunk/Scribus/scribus/ui/annot.cpp
trunk/Scribus/scribus/ui/colorlistmodel.cpp
trunk/Scribus/scribus/ui/colorsandfills.cpp
trunk/Scribus/scribus/ui/helpbrowser.cpp
trunk/Scribus/scribus/ui/helpnavigation.h
trunk/Scribus/scribus/ui/latexeditor.cpp
trunk/Scribus/scribus/ui/latexeditor.h
trunk/Scribus/scribus/ui/sccolorslider.h
Modified: trunk/Scribus/scribus/canvasmode_objimport.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/canvasmode_objimport.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.h (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.h Thu Apr 20 06:57:07 2017
@@ -34,6 +34,7 @@
class CanvasMode_ObjImport : public CanvasMode
{
+ Q_OBJECT
public:
explicit CanvasMode_ObjImport(ScribusView* view);
virtual ~CanvasMode_ObjImport();
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Thu Apr 20 06:57:07 2017
@@ -121,12 +121,12 @@
QString BUILD_TZ = "";
QString BUILD_NAME = "";
- QString built = tr("%1 %2 %3").arg(BUILD_DAY).arg(BUILD_MONTH).arg(BUILD_YEAR);
+ QString built = tr("%1 %2 %3").arg(BUILD_DAY, BUILD_MONTH, BUILD_YEAR);
QString version = VERSION;
if (BUILD_NAME != "")
version += " \"" + BUILD_NAME + "\"";
if (BUILD_NAME == "BleedingEdge")
- built = tr("%3-%2-%1 %4 %5").arg(BUILD_DAY).arg(BUILD_MONTH).arg(BUILD_YEAR).arg(BUILD_TIME).arg(BUILD_TZ);
+ built = tr("%3-%2-%1 %4 %5").arg(BUILD_DAY, BUILD_MONTH, BUILD_YEAR, BUILD_TIME, BUILD_TZ);
#if defined(HAVE_SVNVERSION) && defined(SVNVERSION)
QString revText;
Modified: trunk/Scribus/scribus/ui/aboutplugins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/aboutplugins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aboutplugins.cpp (original)
+++ trunk/Scribus/scribus/ui/aboutplugins.cpp Thu Apr 20 06:57:07 2017
@@ -67,13 +67,13 @@
QString html;
html = QString("<html><body><h1>%1</h1>").arg(plugin->fullTrName());
html += "<table>";
- html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Filename:")).arg(fi.completeBaseName());
- html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Version:")).arg(about->version);
+ html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Filename:"), fi.completeBaseName());
+ html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Version:"), about->version);
// As we don't allow users to disable plugins, hide this
// QString ena;
// ena = pluginManager.enabled(name) ? CommonStrings::trYes : CommonStrings::trNo;
// html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Enabled:")).arg(ena);
- html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Release Date:")).arg(about->releaseDate.toString());
+ html += QString("<tr><th>%1</th><td>%2</td></tr>").arg( tr("Release Date:"), about->releaseDate.toString());
html += "</table>";
QString desc;
if (!about->shortDescription.isNull())
@@ -81,9 +81,9 @@
if (!about->description.isNull())
desc += QString("<p>%1</p>").arg(about->description);
html += QString("<h2>%1</h2>%2").arg( tr("Description:")).arg(desc);
- html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Author(s):")).arg(htmlize(about->authors));
- html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Copyright:")).arg(htmlize(about->copyright));
- html += QString("<h2>%1</h2><p>%2</p>").arg( tr("License:")).arg(htmlize(about->license));
+ html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Author(s):"), htmlize(about->authors));
+ html += QString("<h2>%1</h2><p>%2</p>").arg( tr("Copyright:"), htmlize(about->copyright));
+ html += QString("<h2>%1</h2><p>%2</p>").arg( tr("License:"), htmlize(about->license));
html += "</html>";
infoBrowser->setHtml(html);
// Use the plugin to delete the about info, so we don't
Modified: trunk/Scribus/scribus/ui/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/annot.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annot.cpp (original)
+++ trunk/Scribus/scribus/ui/annot.cpp Thu Apr 20 06:57:07 2017
@@ -56,7 +56,6 @@
ScAnnot::ScAnnot(QWidget* parent, PageItem *it, int Seite, int b, int h, ColorList Farben, ScribusView* vie)
: QDialog( parent )
{
- ScribusDoc* doc = Farben.document();
m_annotation = it->annotation();
setupUi(this);
Modified: trunk/Scribus/scribus/ui/colorlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/colorlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistmodel.cpp (original)
+++ trunk/Scribus/scribus/ui/colorlistmodel.cpp Thu Apr 20 06:57:07 2017
@@ -257,22 +257,22 @@
QString sortString2 = QString("%1-%2");
if (v1.m_color.isRegistrationColor())
- sortString1 = sortString1.arg("A").arg(v1.m_name);
+ sortString1 = sortString1.arg("A", v1.m_name);
else if (v1.m_color.isSpotColor())
- sortString1 = sortString1.arg("B").arg(v1.m_name);
+ sortString1 = sortString1.arg("B", v1.m_name);
else if (v1.m_color.getColorModel() == colorModelCMYK)
- sortString1 = sortString1.arg("C").arg(v1.m_name);
+ sortString1 = sortString1.arg("C", v1.m_name);
else
- sortString1 = sortString1.arg("D").arg(v1.m_name);
+ sortString1 = sortString1.arg("D", v1.m_name);
if (v2.m_color.isRegistrationColor())
- sortString2 = sortString2.arg("A").arg(v2.m_name);
+ sortString2 = sortString2.arg("A", v2.m_name);
else if (v2.m_color.isSpotColor())
- sortString2 = sortString2.arg("B").arg(v2.m_name);
+ sortString2 = sortString2.arg("B", v2.m_name);
else if (v2.m_color.getColorModel() == colorModelCMYK)
- sortString2 = sortString2.arg("C").arg(v2.m_name);
+ sortString2 = sortString2.arg("C", v2.m_name);
else
- sortString2 = sortString2.arg("D").arg(v2.m_name);
+ sortString2 = sortString2.arg("D", v2.m_name);
return (sortString1 < sortString2);
}
Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp (original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp Thu Apr 20 06:57:07 2017
@@ -273,13 +273,13 @@
{
QString sortString = QString("%1-%2");
if (it.value().isRegistrationColor())
- sortMap.insert(sortString.arg("A").arg(it.key()), it.key());
+ sortMap.insert(sortString.arg("A", it.key()), it.key());
else if (it.value().isSpotColor())
- sortMap.insert(sortString.arg("B").arg(it.key()), it.key());
+ sortMap.insert(sortString.arg("B", it.key()), it.key());
else if (it.value().getColorModel() == colorModelCMYK)
- sortMap.insert(sortString.arg("C").arg(it.key()), it.key());
+ sortMap.insert(sortString.arg("C", it.key()), it.key());
else
- sortMap.insert(sortString.arg("D").arg(it.key()), it.key());
+ sortMap.insert(sortString.arg("D", it.key()), it.key());
}
}
QMap<QString, QString>::Iterator itc;
Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp (original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp Thu Apr 20 06:57:07 2017
@@ -370,7 +370,6 @@
int cnt = str.count(helpNav->searchingEdit->text(), Qt::CaseInsensitive);
if (cnt > 0)
{
- QString fullname = fname;
QString toFind(fname.remove(finalBaseDir + "/"));
QMapIterator<QString, QString> i(quickHelpIndex);
while (i.hasNext())
Modified: trunk/Scribus/scribus/ui/helpnavigation.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/helpnavigation.h
==============================================================================
--- trunk/Scribus/scribus/ui/helpnavigation.h (original)
+++ trunk/Scribus/scribus/ui/helpnavigation.h Thu Apr 20 06:57:07 2017
@@ -16,6 +16,7 @@
*/
class HelpNavigation : public QWidget, public Ui::HelpBrowserNavigation
{
+ Q_OBJECT
public:
HelpNavigation(QWidget * parent);
~HelpNavigation();
Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp Thu Apr 20 06:57:07 2017
@@ -447,7 +447,6 @@
newTab->setFrameShape(QFrame::NoFrame);
QGridLayout *layout = new QGridLayout(newTab);
layout->setColumnStretch(1, 10);
- QString type = xml->attributes().value("type").toString();
QString title = "No Title";
@@ -615,6 +614,7 @@
class SCRIBUS_API XmlFontComboBox : public XmlWidget, public QFontComboBox
{
+ Q_OBJECT
public:
XmlFontComboBox(I18nXmlStreamReader *xml) : XmlWidget(xml), QFontComboBox()
{
@@ -634,6 +634,7 @@
class SCRIBUS_API XmlSpinBox : public XmlWidget, public QSpinBox
{
+ Q_OBJECT
public:
XmlSpinBox(I18nXmlStreamReader *xml) : XmlWidget(xml, false), QSpinBox() {
setRange(
@@ -665,6 +666,7 @@
class SCRIBUS_API XmlDoubleSpinBox : public XmlWidget, public QDoubleSpinBox
{
+ Q_OBJECT
public:
XmlDoubleSpinBox(I18nXmlStreamReader *xml) :
XmlWidget(xml, false), QDoubleSpinBox() {
@@ -698,6 +700,7 @@
class SCRIBUS_API XmlLineEdit : public XmlWidget, public QLineEdit
{
+ Q_OBJECT
public:
XmlLineEdit(I18nXmlStreamReader *xml) : XmlWidget(xml), QLineEdit() {
fromString(m_defaultValue);
@@ -714,6 +717,7 @@
class SCRIBUS_API XmlTextEdit : public XmlWidget, public QTextEdit
{
+ Q_OBJECT
public:
XmlTextEdit(I18nXmlStreamReader *xml) : XmlWidget(xml), QTextEdit() {
fromString(m_defaultValue);
@@ -730,6 +734,7 @@
class SCRIBUS_API XmlColorPicker : public XmlWidget, public QLabel
{
+ Q_OBJECT
public:
XmlColorPicker(I18nXmlStreamReader *xml) : XmlWidget(xml),
QLabel("Color pickers are not implemented yet!")
@@ -749,6 +754,7 @@
class SCRIBUS_API XmlComboBox : public XmlWidget, public QComboBox
{
+ Q_OBJECT
public:
XmlComboBox(I18nXmlStreamReader *xml) : XmlWidget(xml, false), QComboBox()
{
Modified: trunk/Scribus/scribus/ui/latexeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/latexeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.h (original)
+++ trunk/Scribus/scribus/ui/latexeditor.h Thu Apr 20 06:57:07 2017
@@ -41,7 +41,7 @@
class SCRIBUS_API LatexEditor : public QDialog, Ui::LatexEditor
{
- Q_OBJECT
+ Q_OBJECT
public:
LatexEditor ( PageItem_LatexFrame * );
~LatexEditor();
@@ -92,7 +92,7 @@
class SCRIBUS_API DataPushButton : public QPushButton
{
- Q_OBJECT
+ Q_OBJECT
public:
DataPushButton ( QString caption, QObject *data, bool deleteOnDestroy=false ) :
QPushButton ( caption ), data ( data ), del ( deleteOnDestroy )
@@ -117,7 +117,7 @@
class SCRIBUS_API StringPushButton : public QPushButton
{
- Q_OBJECT
+ Q_OBJECT
public:
StringPushButton ( QString caption, QString data ) :
QPushButton ( caption ), data ( data )
Modified: trunk/Scribus/scribus/ui/sccolorslider.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21935&path=/trunk/Scribus/scribus/ui/sccolorslider.h
==============================================================================
--- trunk/Scribus/scribus/ui/sccolorslider.h (original)
+++ trunk/Scribus/scribus/ui/sccolorslider.h Thu Apr 20 06:57:07 2017
@@ -16,6 +16,7 @@
class SCRIBUS_API ScColorSlider : public QSlider
{
+ Q_OBJECT
public:
ScColorSlider(QWidget* parent = 0);
More information about the scribus-commit
mailing list