[rkward-cvs] SF.net SVN: rkward:[4291] trunk/rkward/rkward/windows/rkcommandeditorwindow .cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Aug 23 18:02:49 UTC 2012


Revision: 4291
          http://rkward.svn.sourceforge.net/rkward/?rev=4291&view=rev
Author:   tfry
Date:     2012-08-23 18:02:49 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
Accept stored encoding, if no encoding was specified.

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2012-08-23 10:32:21 UTC (rev 4290)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2012-08-23 18:02:49 UTC (rev 4291)
@@ -373,9 +373,9 @@
 			QString p_url = RKWorkplace::mainWorkplace ()->portableUrl (m_doc->url ());
 			if (iface) {
 				KConfigGroup conf (RKWorkplace::mainWorkplace ()->workspaceConfig (), QString ("SkriptDocumentSettings %1").arg (p_url));
-				// Hmm. KTextEditor::Document's readSessionConfig() simply restores too much. Yes, I want to load bookmarks and stuff.
+				// HACK: Hmm. KTextEditor::Document's readSessionConfig() simply restores too much. Yes, I want to load bookmarks and stuff.
 				// I do not want to mess with encoding, or risk loading a different url, after the doc is already loaded!
-				if (conf.readEntry ("Encoding", encoding) != encoding) conf.writeEntry ("Encoding", encoding);
+				if (!encoding.isEmpty () && (conf.readEntry ("Encoding", encoding) != encoding)) conf.writeEntry ("Encoding", encoding);
 				if (conf.readEntry ("URL", url) != url) conf.writeEntry ("URL", url);
 				iface->readSessionConfig (conf);
 			}

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list