[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 8421a8499180144f1980fbff2a44fee85e0887ba

Eugeniy Meshcheryakov eugen at debian.org
Tue Sep 30 13:59:36 UTC 2008


The following commit has been merged in the master branch:
commit a6b2a872d00def93b3c22dabe1cd943305667ecd
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date:   Sun Sep 14 19:20:14 2008 +0200

    remove UnicodeValueEditor::storedValue

diff --git a/gui/unicodevalueeditor.cxx b/gui/unicodevalueeditor.cxx
index 6df9aac..3484685 100644
--- a/gui/unicodevalueeditor.cxx
+++ b/gui/unicodevalueeditor.cxx
@@ -19,7 +19,6 @@
 
 UnicodeValueEditor::UnicodeValueEditor(QWidget *parent) : QLineEdit(parent)
 {
-	storedValue = -1;
 	QRegExp rx("^((U\\+)?[0123456789ABCDEFabcdef]+)?$");
 	QRegExpValidator *v = new QRegExpValidator(rx, this);
 	setValidator(v);
@@ -29,26 +28,22 @@ int UnicodeValueEditor::unicodeValue()
 {
 	QRegExp rx("^(U\\+)?([0123456789ABCDEFabcdef]+)$");
 	int pos = rx.indexIn(text());
-	qDebug() << "pos: " << pos;
+	int retVal;
+
 	if (pos > -1) {
 		QString value = rx.cap(2);
-		storedValue = value.toInt(0, 16);
+		retVal = value.toInt(0, 16);
 	}
 	else
-		storedValue = -1;
-	qDebug() << storedValue;
+		retVal = -1;
 
-	return storedValue;
+	return retVal;
 }
 
 void UnicodeValueEditor::setUnicodeValue(int u)
 {
-	if (u < 0) {
-		storedValue = -1;
+	if (u < 0)
 		setText(0);
-	}
-	else {
-		storedValue = u;
+	else
 		setText(QString("U+%1").arg(u, 4, 16, QLatin1Char('0')));
-	}
 }
diff --git a/gui/unicodevalueeditor.h b/gui/unicodevalueeditor.h
index 6fcee47..c185540 100644
--- a/gui/unicodevalueeditor.h
+++ b/gui/unicodevalueeditor.h
@@ -24,8 +24,6 @@ public:
 	UnicodeValueEditor(QWidget *parent = 0);
 	int unicodeValue();
 	void setUnicodeValue(int u);
-private:
-	int storedValue;
 };
 
 #endif

-- 
Fondue Font Editor



More information about the fondue-commits mailing list