r24203 by craig - Replace endl with Qt:endl for QTextStream

scribus-commit scribus-commit at lists.scribus.net
Sat Nov 7 22:21:31 UTC 2020


Author: craig
Date: Sat Nov  7 22:21:31 2020
New Revision: 24203

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24203
Log:
Replace endl with Qt:endl for QTextStream

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

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24203&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp	Sat Nov  7 22:21:31 2020
@@ -316,12 +316,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=24203&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp	(original)
+++ trunk/Scribus/scribus/langmgr.cpp	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&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	Sat Nov  7 22:21:31 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=24203&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp	(original)
+++ trunk/Scribus/scribus/scribusapp.cpp	Sat Nov  7 22:21:31 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)
@@ -612,7 +612,7 @@
 	std::cout << "name          Open file 'name', the file name must not begin with '-'" ; endl(ts);
 	std::cout << "QT specific options as -display ..." ; 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)




More information about the scribus-commit mailing list