r23861 by jghali - Fix a few gcc warnings
scribus-commit
scribus-commit at lists.scribus.net
Sat May 30 20:23:18 UTC 2020
Author: jghali
Date: Sat May 30 20:23:18 2020
New Revision: 23861
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23861
Log:
Fix a few gcc warnings
Modified:
trunk/Scribus/scribus/loadsaveplugin.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.cpp
trunk/Scribus/scribus/scprintengine_ps.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/effectsdialog.cpp
trunk/Scribus/scribus/ui/markanchor.h
trunk/Scribus/scribus/ui/markvariabletext.h
trunk/Scribus/scribus/ui/osgeditor.cpp
trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
Modified: trunk/Scribus/scribus/loadsaveplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/loadsaveplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.cpp (original)
+++ trunk/Scribus/scribus/loadsaveplugin.cpp Sat May 30 20:23:18 2020
@@ -170,7 +170,7 @@
qDebug("%s", tr("No File Loader Plugins Found").toLocal8Bit().data());
// Avoid duplicate entries in the list
QSet<QString> fSet = filterList.toSet();
- filterList = fSet.toList();
+ filterList = fSet.values();
std::sort(filterList.begin(), filterList.end());
return filterList;
}
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sat May 30 20:23:18 2020
@@ -233,7 +233,6 @@
m_Doc(other.m_Doc),
m_isAnnotation(other.m_isAnnotation),
m_annotation(other.m_annotation),
- m_imageVisible(other.m_imageVisible),
m_lineWidth(other.m_lineWidth),
m_oldLineWidth(other.m_oldLineWidth),
patternStrokeVal(other.patternStrokeVal),
@@ -338,6 +337,7 @@
m_height(other.m_height),
m_rotation(other.m_rotation),
m_isSelected(other.m_isSelected),
+ m_imageVisible(other.m_imageVisible),
m_imageXScale(other.m_imageXScale),
m_imageYScale(other.m_imageYScale),
m_imageXOffset(other.m_imageXOffset),
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp Sat May 30 20:23:18 2020
@@ -495,6 +495,7 @@
<< scribus_savedoc__doc__
<< scribus_savedocas__doc__
<< scribus_setbaseline__doc__
+ << scribus_setbleeds__doc__
<< scribus_setdoctype__doc__
<< scribus_setinfo__doc__
<< scribus_setmargins__doc__
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp Sat May 30 20:23:18 2020
@@ -889,6 +889,7 @@
<< scribus_getcharacterstyle__doc__
<< scribus_getparagraphstyle__doc__
<< scribus_getstyle__doc__
+ << scribus_gettextflowmode__doc__
<< scribus_newellipse__doc__
<< scribus_newimage__doc__
<< scribus_newline__doc__
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp Sat May 30 20:23:18 2020
@@ -518,7 +518,9 @@
<< scribus_createcustomlinestyle__doc__
<< scribus_createparagraphstyle__doc__
<< scribus_getallstyles__doc__
+ << scribus_getcellstyles__doc__
<< scribus_getcharstylenames__doc__
<< scribus_getlinestyles__doc__
- << scribus_getparagraphstyles__doc__;
-}
+ << scribus_getparagraphstyles__doc__
+ << scribus_gettablestyles__doc__;
+}
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp Sat May 30 20:23:18 2020
@@ -495,6 +495,7 @@
<< scribus_savedoc__doc__
<< scribus_savedocas__doc__
<< scribus_setbaseline__doc__
+ << scribus_setbleeds__doc__
<< scribus_setdoctype__doc__
<< scribus_setinfo__doc__
<< scribus_setmargins__doc__
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp Sat May 30 20:23:18 2020
@@ -889,6 +889,7 @@
<< scribus_getcharacterstyle__doc__
<< scribus_getparagraphstyle__doc__
<< scribus_getstyle__doc__
+ << scribus_gettextflowmode__doc__
<< scribus_newellipse__doc__
<< scribus_newimage__doc__
<< scribus_newline__doc__
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.cpp Sat May 30 20:23:18 2020
@@ -518,7 +518,9 @@
<< scribus_createcustomlinestyle__doc__
<< scribus_createparagraphstyle__doc__
<< scribus_getallstyles__doc__
+ << scribus_getcellstyles__doc__
<< scribus_getcharstylenames__doc__
<< scribus_getlinestyles__doc__
- << scribus_getparagraphstyles__doc__;
-}
+ << scribus_getparagraphstyles__doc__
+ << scribus_gettablestyles__doc__;
+}
Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp (original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp Sat May 30 20:23:18 2020
@@ -10,7 +10,6 @@
#include "scribusstructs.h"
#include "scribusdoc.h"
#include "scribuscore.h"
-#include "prefsmanager.h"
#include "pslib.h"
#include "util_file.h"
#include "util_ghostscript.h"
@@ -19,7 +18,6 @@
{
bool retw = false;
QString filename(options.filename);
- PrefsManager& prefsManager = PrefsManager::instance();
PSLib *dd = new PSLib(&doc, options, PSLib::OutputPS);
if (dd == nullptr)
return false;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat May 30 20:23:18 2020
@@ -2168,7 +2168,7 @@
for (int i = 0; i < hList2.count(); i++)
foundFiles.insert(hList2[i].absoluteFilePath());
- return foundFiles.toList();
+ return foundFiles.values();
}
bool ScribusMainWindow::recoverFile(const QStringList& foundFiles)
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat May 30 20:23:18 2020
@@ -8435,7 +8435,7 @@
else
{
// Remove selected row(s).
- QList<int> selectedRows = table->selectedRows().toList();
+ QList<int> selectedRows = table->selectedRows().values();
std::sort(selectedRows.begin(), selectedRows.end(), std::greater<int>());
int index = 0;
@@ -8491,7 +8491,7 @@
else
{
// Remove selected column(s).
- QList<int> selectedColumns = table->selectedColumns().toList();
+ QList<int> selectedColumns = table->selectedColumns().values();
std::sort(selectedColumns.begin(), selectedColumns.end(), std::greater<int>());
int index = 0;
@@ -8537,8 +8537,8 @@
if (table->selectedCells().size() < 2)
return;
- QList<int> selectedRows = table->selectedRows().toList();
- QList<int> selectedColumns = table->selectedColumns().toList();
+ QList<int> selectedRows = table->selectedRows().values();
+ QList<int> selectedColumns = table->selectedColumns().values();
std::sort(selectedRows.begin(), selectedRows.end());
std::sort(selectedColumns.begin(), selectedColumns.end());
@@ -8668,7 +8668,7 @@
if (appMode == modeEditTable && !table->selectedRows().isEmpty())
{
// Distribute each contigous range of selected rows.
- QList<int> selectedRows = table->selectedRows().toList();
+ QList<int> selectedRows = table->selectedRows().values();
std::sort(selectedRows.begin(), selectedRows.end());
int startRow = selectedRows.first();
int endRow = startRow;
@@ -8711,7 +8711,7 @@
if (appMode == modeEditTable && !table->selectedColumns().isEmpty())
{
// Distribute each contigous range of selected columns.
- QList<int> selectedColumns = table->selectedColumns().toList();
+ QList<int> selectedColumns = table->selectedColumns().values();
std::sort(selectedColumns.begin(), selectedColumns.end());
int startColumn = selectedColumns.first();
int endColumn = startColumn;
Modified: trunk/Scribus/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/ui/effectsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/effectsdialog.cpp Sat May 30 20:23:18 2020
@@ -485,9 +485,12 @@
availableEffects->addItem( tr("Posterize"));
availableEffects->addItem( tr("Sharpen"));
- availableEffects->setMinimumSize(fontMetrics().width( tr( "Available Effects" ))+40, 180);
- layout2->addWidget( availableEffects );
- layout10->addLayout( layout2, 0, 0 );
+ QFontMetrics ftMetrics = this->fontMetrics();
+ int availableEffectsAdvance = ftMetrics.horizontalAdvance( tr("Available Effects"));
+
+ availableEffects->setMinimumSize(availableEffectsAdvance + 40, 180);
+ layout2->addWidget(availableEffects);
+ layout10->addLayout(layout2, 0, 0);
layout1 = new QVBoxLayout;
layout1->setMargin(0);
@@ -513,7 +516,7 @@
textLabel2->setText( tr( "Applied Effects" ) );
layout8->addWidget( textLabel2 );
usedEffects = new QListWidget( this );
- usedEffects->setMinimumSize(fontMetrics().width( tr( "Available Effects" ))+40, 180);
+ usedEffects->setMinimumSize(availableEffectsAdvance + 40, 180);
usedEffects->clear();
m_effectValMap.clear();
for (int i = 0; i < effectsList.count(); ++i)
Modified: trunk/Scribus/scribus/ui/markanchor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/ui/markanchor.h
==============================================================================
--- trunk/Scribus/scribus/ui/markanchor.h (original)
+++ trunk/Scribus/scribus/ui/markanchor.h Sat May 30 20:23:18 2020
@@ -16,7 +16,7 @@
void setValues(const QString label) override;
protected:
- void changeEvent(QEvent *e);
+ void changeEvent(QEvent *e) override;
};
#endif // MARKANCHOR_H
Modified: trunk/Scribus/scribus/ui/markvariabletext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/ui/markvariabletext.h
==============================================================================
--- trunk/Scribus/scribus/ui/markvariabletext.h (original)
+++ trunk/Scribus/scribus/ui/markvariabletext.h Sat May 30 20:23:18 2020
@@ -18,7 +18,7 @@
void setValues(const QString label, const QString text) override;
protected:
- void changeEvent(QEvent *e);
+ void changeEvent(QEvent *e) override;
private slots:
void onLabelList_currentIndexChanged(int index);
Modified: trunk/Scribus/scribus/ui/osgeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/ui/osgeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/osgeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/osgeditor.cpp Sat May 30 20:23:18 2020
@@ -73,10 +73,10 @@
QPixmap pm(54, 14);
pm.fill(currentView.colorAC);
buttonACcolor->setIcon(pm);
- buttonACcolor->setText( QString::null );
+ buttonACcolor->setText( QString() );
pm.fill(currentView.colorFC);
buttonFCcolor->setIcon(pm);
- buttonFCcolor->setText( QString::null );
+ buttonFCcolor->setText( QString() );
transpSpin->setValue(qRound(currentView.addedTransparency * 100));
transpSpin->setDecimals(0);
rootnode = new osg::Group;
@@ -205,10 +205,10 @@
QPixmap pm(54, 14);
pm.fill(currentView.colorAC);
buttonACcolor->setIcon(pm);
- buttonACcolor->setText( QString::null );
+ buttonACcolor->setText( QString:() );
pm.fill(currentView.colorFC);
buttonFCcolor->setIcon(pm);
- buttonFCcolor->setText( QString::null );
+ buttonFCcolor->setText( QString() );
osgGA::TrackballManipulator *trb = dynamic_cast<osgGA::TrackballManipulator*>(drawingarea->getCameraManipulator());
trb->setByMatrix(currentView.trackerMatrix);
trb->setCenter(currentView.trackerCenter);
Modified: trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23861&path=/trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_hyphenator.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_hyphenator.cpp Sat May 30 20:23:18 2020
@@ -61,7 +61,7 @@
{
hyphSuggestionsCheckBox->setChecked(!prefsData->hyphPrefs.Automatic);
hyphAutoCheckBox->setChecked(prefsData->hyphPrefs.AutoCheck);
- ignoreListWidget->addItems(prefsData->hyphPrefs.ignoredWords.toList());
+ ignoreListWidget->addItems(prefsData->hyphPrefs.ignoredWords.values());
ignoreListWidget->sortItems();
exceptionListWidget->addItems(prefsData->hyphPrefs.specialWords.values());
exceptionListWidget->sortItems();
More information about the scribus-commit
mailing list