[qet] [1641] CR characters in elements and TBT extra information field are now stripped .

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1641
Author:   xavier
Date:     2012-04-09 03:03:11 +0200 (Mon, 09 Apr 2012)
Log Message:
-----------
CR characters in elements and TBT extra information field are now stripped.

Modified Paths:
--------------
    branches/0.3/sources/editor/elementscene.cpp
    branches/0.3/sources/titleblock/qettemplateeditor.cpp

Modified: branches/0.3/sources/editor/elementscene.cpp
===================================================================
--- branches/0.3/sources/editor/elementscene.cpp	2012-04-09 01:03:08 UTC (rev 1640)
+++ branches/0.3/sources/editor/elementscene.cpp	2012-04-09 01:03:11 UTC (rev 1641)
@@ -940,7 +940,7 @@
 	
 	// lance le dialogue
 	if (dialog_author.exec() == QDialog::Accepted && !is_read_only) {
-		QString new_infos = text_field -> toPlainText();
+		QString new_infos = text_field -> toPlainText().remove(QChar(13)); // CR-less text
 		if (new_infos != informations()) {
 			undoStack().push(new ChangeInformationsCommand(this, informations(), new_infos));
 		}

Modified: branches/0.3/sources/titleblock/qettemplateeditor.cpp
===================================================================
--- branches/0.3/sources/titleblock/qettemplateeditor.cpp	2012-04-09 01:03:08 UTC (rev 1640)
+++ branches/0.3/sources/titleblock/qettemplateeditor.cpp	2012-04-09 01:03:11 UTC (rev 1641)
@@ -875,7 +875,7 @@
 	
 	// run the dialog
 	if (dialog_author.exec() == QDialog::Accepted && !read_only_) {
-		QString new_info = text_field -> toPlainText();
+		QString new_info = text_field -> toPlainText().remove(QChar(13)); // CR-less text
 		if (new_info != tb_template_ -> information()) {
 			pushUndoCommand(new ChangeTemplateInformationsCommand(tb_template_, tb_template_ -> information(), new_info));
 		}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/