r24023 by craig - Fix some compiler warnings
scribus-commit
scribus-commit at lists.scribus.net
Wed Sep 16 21:53:59 UTC 2020
Author: craig
Date: Wed Sep 16 21:53:59 2020
New Revision: 24023
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24023
Log:
Fix some compiler warnings
Modified:
trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
trunk/Scribus/scribus/langmgr.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
trunk/Scribus/scribus/scribusapp.cpp
trunk/Scribus/scribus/text/boxes.h
trunk/Scribus/scribus/text/textcontext.cpp
Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp (original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp Wed Sep 16 21:53:59 2020
@@ -320,12 +320,12 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
if ( !file.open( QIODevice::ReadOnly ) )
{
- qDebug() << "Cannot open file " << QFile::encodeName(fn).data() << endl;
+ qDebug() << "Cannot open file " << QFile::encodeName(fn).data() << Qt::endl;
return false;
}
QByteArray ba = file.readAll();
Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp (original)
+++ trunk/Scribus/scribus/langmgr.cpp Wed Sep 16 21:53:59 2020
@@ -964,9 +964,9 @@
for (int i = 0; i < m_langTable.size(); ++i)
{
ts << " " << m_langTable[i].m_priAbbrev.leftJustified(8) << ": " << m_langTable[i].m_name;
- endl(ts);
- }
- endl(ts);
+ Qt::endl(ts);
+ }
+ Qt::endl(ts);
f.close();
}
Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp Wed Sep 16 21:53:59 2020
@@ -326,7 +326,7 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
QFileInfo fi = QFileInfo(fn);
Modified: trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfh.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfh.cpp Wed Sep 16 21:53:59 2020
@@ -326,7 +326,7 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
librevenge::RVNGFileStream input(QFile::encodeName(fn).data());
Modified: trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpm.cpp Wed Sep 16 21:53:59 2020
@@ -322,7 +322,7 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
librevenge::RVNGFileStream input(QFile::encodeName(fn).data());
Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.cpp Wed Sep 16 21:53:59 2020
@@ -325,7 +325,7 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
#if HAVE_REVENGE
Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp Wed Sep 16 21:53:59 2020
@@ -329,7 +329,7 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
#if HAVE_REVENGE
Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp Wed Sep 16 21:53:59 2020
@@ -679,12 +679,12 @@
QFile file(fn);
if ( !file.exists() )
{
- qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+ qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << Qt::endl;
return false;
}
if ( !file.open( QIODevice::ReadOnly ) )
{
- qDebug() << "Cannot open file " << QFile::encodeName(fn).data() << endl;
+ qDebug() << "Cannot open file " << QFile::encodeName(fn).data() << Qt::endl;
return false;
}
QByteArray ba = file.readAll();
Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp (original)
+++ trunk/Scribus/scribus/scribusapp.cpp Wed Sep 16 21:53:59 2020
@@ -574,7 +574,7 @@
static void printArgLine(QTextStream & ts, const char * smallArg, const char* fullArg, const QString& desc)
{
ts << QString(" %1 %2 %3").arg(QString("%1,").arg(smallArg), -5).arg(fullArg, -32).arg(desc);
- endl(ts);
+ Qt::endl(ts);
}
void ScribusQApp::showUsage()
@@ -582,8 +582,8 @@
QFile f;
f.open(stderr, QIODevice::WriteOnly);
QTextStream ts(&f);
- ts << tr("Usage: scribus [options] [files]") ; endl(ts); endl(ts);
- ts << tr("Options:") ; endl(ts);
+ ts << tr("Usage: scribus [options] [files]") ; Qt::endl(ts); Qt::endl(ts);
+ ts << tr("Options:") ; Qt::endl(ts);
printArgLine(ts, ARG_FONTINFO_SHORT, ARG_FONTINFO, tr("Show information on the console when fonts are being loaded") );
printArgLine(ts, ARG_HELP_SHORT, ARG_HELP, tr("Print help (this message) and exit") );
printArgLine(ts, ARG_LANG_SHORT, ARG_LANG, tr("Uses xx as shortcut for a language, eg `en' or `de'") );
@@ -596,7 +596,7 @@
printArgLine(ts, ARG_VERSION_SHORT, ARG_VERSION, tr("Output version information and exit") );
printArgLine(ts, ARG_PYTHONSCRIPT_SHORT, qPrintable(QString("%1 <%2> [%3] ").arg(ARG_PYTHONSCRIPT, tr("script"), tr("arguments ..."))), tr("Run script in Python [with optional arguments]. This option must be last option used") );
printArgLine(ts, ARG_NOGUI_SHORT, ARG_NOGUI, tr("Do not start GUI") );
- ts << (QString(" %1").arg(CMD_OPTIONS_END,-39)) << tr("Explicit end of command line options"); endl(ts);
+ ts << (QString(" %1").arg(CMD_OPTIONS_END,-39)) << tr("Explicit end of command line options"); Qt::endl(ts);
#if defined(_WIN32) && !defined(_CONSOLE)
@@ -608,11 +608,11 @@
#endif
/* Delete me?
- std::cout << "-file|-- name Open file 'name'" ; endl(ts);
- std::cout << "name Open file 'name', the file name must not begin with '-'" ; endl(ts);
- std::cout << "QT specific options as -display ..." ; endl(ts);
+ std::cout << "-file|-- name Open file 'name'" ; Qt::endl(ts);
+ std::cout << "name Open file 'name', the file name must not begin with '-'" ; Qt::endl(ts);
+ std::cout << "QT specific options as -display ..." ; Qt::endl(ts);
*/
- endl(ts);
+ Qt::endl(ts);
f.close();
}
@@ -621,14 +621,14 @@
QFile f;
f.open(stderr, QIODevice::WriteOnly);
QTextStream ts(&f);
- ts << tr("Installed interface languages for Scribus are as follows:"); endl(ts);
- endl(ts);
+ ts << tr("Installed interface languages for Scribus are as follows:"); Qt::endl(ts);
+ Qt::endl(ts);
LanguageManager::instance()->printInstalledList();
- endl(ts);
- ts << tr("To override the default language choice:"); endl(ts);
- ts << tr("scribus -l xx or scribus --lang xx, where xx is the language of choice."); endl(ts);
+ Qt::endl(ts);
+ ts << tr("To override the default language choice:"); Qt::endl(ts);
+ ts << tr("scribus -l xx or scribus --lang xx, where xx is the language of choice."); Qt::endl(ts);
}
void ScribusQApp::showVersion()
@@ -641,20 +641,20 @@
QFile f;
f.open(stderr, QIODevice::WriteOnly);
QTextStream ts(&f);
- endl(ts);
+ Qt::endl(ts);
QString heading( tr("Scribus, Open Source Desktop Publishing") );
// Build a separator of ----s the same width as the heading
QString separator = QString("").rightJustified(heading.length(),'-');
// Then output the heading, separator, and docs/www/etc info in an aligned table
const int urlwidth = 23;
const int descwidth = -(heading.length() - urlwidth - 1);
- ts << heading; endl(ts);
- ts << separator; endl(ts);
- ts << QString("%1 %2").arg( tr("Homepage")+":", descwidth).arg("http://www.scribus.net" ); endl(ts);
- ts << QString("%1 %2").arg( tr("Documentation")+":", descwidth).arg("http://docs.scribus.net"); endl(ts);
- ts << QString("%1 %2").arg( tr("Wiki")+":", descwidth).arg("http://wiki.scribus.net"); endl(ts);
- ts << QString("%1 %2").arg( tr("Issues")+":", descwidth).arg("http://bugs.scribus.net"); endl(ts);
- endl(ts);
+ ts << heading; Qt::endl(ts);
+ ts << separator; Qt::endl(ts);
+ ts << QString("%1 %2").arg( tr("Homepage")+":", descwidth).arg("http://www.scribus.net" ); Qt::endl(ts);
+ ts << QString("%1 %2").arg( tr("Documentation")+":", descwidth).arg("http://docs.scribus.net"); Qt::endl(ts);
+ ts << QString("%1 %2").arg( tr("Wiki")+":", descwidth).arg("http://wiki.scribus.net"); Qt::endl(ts);
+ ts << QString("%1 %2").arg( tr("Issues")+":", descwidth).arg("http://bugs.scribus.net"); Qt::endl(ts);
+ Qt::endl(ts);
}
void ScribusQApp::neverSplash(bool splashOff)
Modified: trunk/Scribus/scribus/text/boxes.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/text/boxes.h
==============================================================================
--- trunk/Scribus/scribus/text/boxes.h (original)
+++ trunk/Scribus/scribus/text/boxes.h Wed Sep 16 21:53:59 2020
@@ -229,8 +229,8 @@
// void justify(const ParagraphStyle& style);
- void addBox(const Box* box);
- void removeBox(int i);
+ void addBox(const Box* box) override;
+ void removeBox(int i) override;
protected:
virtual void drawBackGround(TextLayoutPainter *p) const;
Modified: trunk/Scribus/scribus/text/textcontext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24023&path=/trunk/Scribus/scribus/text/textcontext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textcontext.cpp (original)
+++ trunk/Scribus/scribus/text/textcontext.cpp Wed Sep 16 21:53:59 2020
@@ -66,7 +66,7 @@
#endif
-QString TextContext::expand(const ExpansionPoint& expansion)
+QString TextContext::expand(const ExpansionPoint& expansion)
{
ScribusDoc* doc = m_frame->doc();
switch (expansion.getType())
More information about the scribus-commit
mailing list