[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: 2005-03-25 11:32:59
Message-ID: 20050325113259.3A84848F () office ! kde ! org
[Download RAW message or body]
CVS commit by staniek:
Alter Table Dialog
- changing subType to LongText hides "length" property;
changing subType to Text shows "length" property.
M +10 -2 kexialtertabledialog.cpp 1.84
--- koffice/kexi/plugins/tables/kexialtertabledialog.cpp #1.83:1.84
@@ -228,4 +228,5 @@ static bool updatePropertiesVisibility(K
prop = &buf["length"];
visible = (fieldType == KexiDB::Field::Text);
+ kdDebug() << buf["subType"].value() << endl;
if (prop->isVisible()!=visible) {
prop->setVisible( visible );
@@ -303,5 +304,5 @@ KexiAlterTableDialog::createPropertyBuff
#endif
- buff->add( prop = new KexiProperty("defaultValue", \
field->defaultValue()/*200?*/, i18n("Default value"))); + buff->add( prop = \
new KexiProperty("defaultValue", field->defaultValue(), i18n("Default value"))); \
//TODO: show this after we get properly working editor for QVariant: \
prop->setVisible(false); @@ -677,5 +678,5 @@ void KexiAlterTableDialog::slotPropertyC
}
else if (pname=="subType") {
- if (buf["primaryKey"].value().toBool()==true && \
property.value()!=KexiDB::Field::typeString(KexiDB::Field::BigInteger)) { + \
if (buf["primaryKey"].value().toBool()==true && \
property.value().toString()!=KexiDB::Field::typeString(KexiDB::Field::BigInteger)) \
{
kdDebug() << "INVALID " << property.value().toString() << \
endl; // if (KMessageBox::Yes == \
KMessageBox::questionYesNo(this, msg, @@ -684,4 +685,11 @@ void \
KexiAlterTableDialog::slotPropertyC
}
+// kdDebug() << property.value().toString() << endl;
+// kdDebug() << buf["type"].value() << endl;
+ if (KexiDB::Field::typeGroup( buf["type"].value().toInt() ) == \
(int)KexiDB::Field::TextGroup) { + \
updatePropertiesVisibility(KexiDB::Field::typeForString(property.value().toString()), \
buf); + //properties' visiblility changed: refresh buffer
+ propertyBufferReloaded(true);
+ }
}
else {//prop==true:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic