[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/plugins/tables
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2006-01-14 16:38:10
Message-ID: 1137256690.413651.12019.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 498049 by staniek:

Table Designer
- fixed selecting subtypes



 M  +11 -5     kexialtertabledialog.cpp  


--- trunk/koffice/kexi/plugins/tables/kexialtertabledialog.cpp #498048:498049
@@ -780,6 +780,7 @@
 void KexiAlterTableDialog::slotPropertyChanged(KoProperty::Set& set, \
KoProperty::Property& property)  {
 	const QCString pname = property.name();
+	kexipluginsdbg << "KexiAlterTableDialog::slotPropertyChanged(): " << pname << " = " \
<< property.value() << endl;  if (pname=="primaryKey" && \
d->slotPropertyChanged_primaryKey_enabled) {  \
d->slotPropertyChanged_primaryKey_enabled = false;  if (property.value().toBool()) {
@@ -974,8 +975,9 @@
 				continue;
 			KoProperty::Set &set = *s;
 
-//			kdDebug() << set["subType"].value().toString() << endl;
+			kexipluginsdbg << set["subType"].value().toString() << endl;
 			int i_type = set["type"].value().toInt();
+			QString subTypeString( set["subType"].value().toString() );
 /*			if (type == (int)KexiDB::Field::BLOB) {
 //! @todo hardcoded! image is the only subtype for now
 			}
@@ -983,11 +985,15 @@
 				QString subTypeString = set["subType"].value().toString();
 				KexiDB::Field::Type type = KexiDB::Field::typeForString(subTypeString);
 			}*/
-			KexiDB::Field::Type type;
-			if (i_type <= (int)KexiDB::Field::InvalidType || i_type > \
(int)KexiDB::Field::LastType) //for sanity +			KexiDB::Field::Type type = \
KexiDB::Field::typeForString(subTypeString); +//			KexiDB::Field::Type type;
+			if (type <= (int)KexiDB::Field::InvalidType || type > \
(int)KexiDB::Field::LastType) {//for sanity  type = KexiDB::Field::Text;
-			else 
-				type = (KexiDB::Field::Type)i_type;
+				kexipluginswarn << "KexiAlterTableDialog::buildSchema(): invalid type " << type 
+					<< ", moving back to Text type" << endl;
+			}
+//			else 
+//				type = (KexiDB::Field::Type)i_type;
 
 			uint constraints = 0;
 			uint options = 0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic