r18565 by jghali - - fix license file display issue on Windows due to incorrect detection of encoding

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 19 13:05:03 UTC 2013


Author: jghali
Date: Sat Oct 19 13:05:02 2013
New Revision: 18565

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18565
Log:
- fix license file display issue on Windows due to incorrect detection of encoding
- allow plain text to automatically flow in ScTextBrowser

Modified:
    trunk/Scribus/COPYING
    trunk/Scribus/scribus/ui/about.cpp
    trunk/Scribus/scribus/ui/sctextbrowser.cpp

Modified: trunk/Scribus/COPYING
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18565&path=/trunk/Scribus/COPYING
==============================================================================
--- trunk/Scribus/COPYING (original)
+++ trunk/Scribus/COPYING Sat Oct 19 13:05:02 2013
@@ -1,56 +1,29 @@
 Scribus Copyright
 Copyright 2001–2013 Franz Schmid and rest of the members of the Scribus Team.
 
-The "Scribus Team" is informally defined as the following people: 
-Franz Schmid, Peter Linnell, Craig Bradney, Jean Ghali, Hermann Kraus, 
-Riku Leino, Oleksandr Moskalenko, Christoph Schäfer, Petr Vaněk, Andreas Vox, 
-and Jain Basil.
-
-Other contributors are listed in the "Authors" tab of the dialog 
-Help > About Scribus.
-
-This program is Free Software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License (GPL) as published by 
-the Free Software Foundation; either version 2 of the License, 
-or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
-details.
-
-You should have received a copy of the GNU General Public License along 
-with this program; if not, write to the Free Software Foundation, Inc., 
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+The "Scribus Team" is informally defined as the following people: Franz Schmid, Peter Linnell, Craig Bradney, Jean Ghali, Hermann Kraus, Riku Leino, Oleksandr Moskalenko, Christoph Schäfer, Petr Vaněk, Andreas Vox, and Jain Basil.
+
+Other contributors are listed in the "Authors" tab of the dialog Help > About Scribus.
+
+This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 Parts of the code are distributed under one of the following licenses: 
 - GNU Library/Lesser Public License (LGPL), version 2 or version 2.1
 - 3-clause BSD License
 - MIT License
-- Some parts of the code are distributed under a dual licensing scheme. 
-  See the respective source files for further information.
+- Some parts of the code are distributed under a dual licensing scheme. See the respective source files for further information.
 - Other parts of the code are in the Public Domain.
 
-Some third party files in the source code don't include proper copyright 
-notices, but the Scribus developers have been told by their authors that 
-the license is compatible to the GPL version (e.g. LGPL v. 2 or 
-MIT license). This doesn't mean that you are allowed to copy or modify 
-the code without obligations. It only means that the original authors 
-forgot to add these notices. Without providing legal advice, we suggest 
-that you contact the authors of the code who are mentioned in other 
-files in the same directory and ask for permission or to update the 
-files with appropriate licensing information.
-
-Antiword, which is shipped with the Windows version of Scribus, is a 
-separately licensed program under the GPL, and the copyright license is 
-included with the program.
-
-Resources, like the documentation, dictionary files, color profiles, 
-color palettes, or templates, use their own licenses that need not be 
-compatible with any of the licenses mentioned above, because resources 
-are considered to be content, not functional code. 
-Note that some of these files, especially some color palettes, are subject 
-to very strict licensing conditions.
+Some third party files in the source code don't include proper copyright notices, but the Scribus developers have been told by their authors that the license is compatible to the GPL version (e.g. LGPL v. 2 or MIT license). This doesn't mean that you are allowed to copy or modify the code without obligations. It only means that the original authors forgot to add these notices. Without providing legal advice, we suggest that you contact the authors of the code who are mentioned in other files in the same directory and ask for permission or to update the files with appropriate licensing information.
+
+Antiword, which is shipped with the Windows version of Scribus, is a separately licensed program under the GPL, and the copyright license is included with the program.
+
+Resources, like the documentation, dictionary files, color profiles, color palettes, or templates, use their own licenses that need not be compatible with any of the licenses mentioned above, because resources are considered to be content, not functional code. 
+Note that some of these files, especially some color palettes, are subject to very strict licensing conditions.
 
 
 ------------

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18565&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Sat Oct 19 13:05:02 2013
@@ -237,8 +237,10 @@
 	else
 	{
 		QTextStream inTS(&licenceFile);
+		inTS.setAutoDetectUnicode(true);
+		inTS.setCodec("UTF-8");
 		QString licenceText = inTS.readAll();
-		textViewLicence->setSimpleText("<pre>"+licenceText+"</pre>");
+		textViewLicence->setSimpleText(licenceText);
 	} 
 	
 	//Add tab widget to about window

Modified: trunk/Scribus/scribus/ui/sctextbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18565&path=/trunk/Scribus/scribus/ui/sctextbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctextbrowser.cpp (original)
+++ trunk/Scribus/scribus/ui/sctextbrowser.cpp Sat Oct 19 13:05:02 2013
@@ -35,7 +35,7 @@
 void ScTextBrowser::setSimpleText(const QString& str)
 {
 	if(!str.isEmpty())
-		setHtml(QString::fromLocal8Bit("<html><body>%1</body></html>").arg(str));
+		setContent(str.toUtf8(), QLatin1String("text/plain; charset=utf-8"));
 	else
 		clear();
 }




More information about the scribus-commit mailing list