r20259 by craig - #13190: Fix console language list output

scribus-commit scribus-commit at lists.scribus.net
Sat Jul 18 07:02:02 UTC 2015


Author: craig
Date: Sat Jul 18 07:02:02 2015
New Revision: 20259

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20259
Log:
#13190: Fix console language list output

Modified:
    trunk/Scribus/scribus/langmgr.cpp
    trunk/Scribus/scribus/scribusapp.cpp
    trunk/Scribus/scribus/ui/prefs_userinterface.cpp

Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20259&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp (original)
+++ trunk/Scribus/scribus/langmgr.cpp Sat Jul 18 07:02:02 2015
@@ -22,10 +22,12 @@
 #include <iostream>
 #include <QDebug>
 #include <QDir>
+#include <QFile>
 #include <QFileInfo>
 #include <QMap>
 #include <QObject>
 #include <QStringList> 
+#include <QTextStream>
 
 #include "scconfig.h"
 #include "langmgr.h"
@@ -428,8 +430,16 @@
 
 void LanguageManager::printInstalledList()
 {
+	QFile f;
+	f.open(stderr, QIODevice::WriteOnly);
+	QTextStream ts(&f);
 	for (int i = 0; i < langTable.size(); ++i)
-		qDebug() << langTable[i].m_priAbbrev.leftJustified(6) << ": " << langTable[i].m_name;
+	{
+		ts << "  " << langTable[i].m_priAbbrev.leftJustified(8) << ": " << langTable[i].m_name;
+		endl(ts);
+	}
+	endl(ts);
+	f.close();
 }
 
 QString LanguageManager::numericSequence(QString seq)

Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20259&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp (original)
+++ trunk/Scribus/scribus/scribusapp.cpp Sat Jul 18 07:02:02 2015
@@ -514,6 +514,7 @@
 	std::cout << "QT specific options as -display ..." ; endl(ts);
 */
 	endl(ts);
+	f.close();
 }
 
 void ScribusQApp::showAvailLangs()

Modified: trunk/Scribus/scribus/ui/prefs_userinterface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20259&path=/trunk/Scribus/scribus/ui/prefs_userinterface.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_userinterface.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_userinterface.cpp Sat Jul 18 07:02:02 2015
@@ -27,7 +27,8 @@
 	languageChange();
 
 	QStringList languageList;
-	LanguageManager::instance()->fillInstalledGUIStringList(&languageList, true);
+	languageList <<"";
+	LanguageManager::instance()->fillInstalledGUIStringList(&languageList, false);
 	languageComboBox->addItems( languageList );
 
 	// qt styles




More information about the scribus-commit mailing list