diff options
Diffstat (limited to 'kexi/plugins')
-rw-r--r-- | kexi/plugins/forms/kexiformpart.cpp | 2 | ||||
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbcheckbox.cpp | 2 | ||||
-rw-r--r-- | kexi/plugins/forms/widgets/kexidblineedit.cpp | 2 | ||||
-rw-r--r-- | kexi/plugins/macros/tests/testaction.cpp | 2 | ||||
-rw-r--r-- | kexi/plugins/queries/kexiquerydesignerguieditor.cpp | 24 | ||||
-rw-r--r-- | kexi/plugins/scripting/kexidb/kexidbconnection.cpp | 8 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignerview.cpp | 82 |
7 files changed, 59 insertions, 63 deletions
diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index c53212fb..0b5f83ef 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -400,7 +400,7 @@ void KexiFormPart::slotAutoTabStopsSet(KFormDesigner::Form *form, bool set) KoProperty::Property &p = (*KFormDesigner::FormManager::self()->propertySet())["autoTabStops"]; if (!p.isNull()) - p.setValue(TQVariant(set, 4)); + p.setValue(TQVariant(set)); } void KexiFormPart::slotAssignAction() diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp index c1a8f5d4..5d123d4d 100644 --- a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp @@ -78,7 +78,7 @@ KexiDBCheckBox::value() { if (state()==NoChange) return TQVariant(); - return TQVariant(state()==On, 1); + return TQVariant(state()==On); } void KexiDBCheckBox::slotStateChanged(int ) diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 815adca9..8e74324a 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -163,7 +163,7 @@ TQVariant KexiDBLineEdit::value() return text().toLongLong(); case KexiDB::Field::Boolean: //! @todo temporary solution for booleans! - return text() == "1" ? TQVariant(true,1) : TQVariant(false,0); + return text() == "1" ? TQVariant(true) : TQVariant(false); case KexiDB::Field::Date: return dateFormatter()->stringToVariant( text() ); case KexiDB::Field::Time: diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp index 3e4d2816..fecec632 100644 --- a/kexi/plugins/macros/tests/testaction.cpp +++ b/kexi/plugins/macros/tests/testaction.cpp @@ -36,7 +36,7 @@ TestAction::TestAction() setVariable("teststring", "Stringtest", TQString("testString")); setVariable("testint", "Inttest", int(0)); setVariable("testdouble", "Doubletest", double(0.5)); - setVariable("testbool", "Booltest", TQVariant(true,0)); + setVariable("testbool", "Booltest", TQVariant(true)); } TestAction::~TestAction() diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp index 45ea8e1d..582d79e6 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp @@ -222,7 +222,7 @@ KexiQueryDesignerGuiEditor::initTableColumns() KexiTableViewColumn *col3 = new KexiTableViewColumn("visible", KexiDB::Field::Boolean, i18n("Visible"), i18n("Describes visibility for a given field or expression.")); - col3->field()->setDefaultValue( TQVariant(false, 0) ); + col3->field()->setDefaultValue( TQVariant(false) ); col3->field()->setNotNull( true ); d->data->addColumn(col3); @@ -264,7 +264,7 @@ void KexiQueryDesignerGuiEditor::initTableRows() for (int i=0; i<(int)d->sets->size(); i++) { KexiTableItem* item; d->data->append(item = d->data->createItem()); - item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); + item->at(COLUMN_ID_VISIBLE) = TQVariant(false); } d->dataTable->dataAwareObject()->setData(d->data); @@ -992,7 +992,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal( d->data->saveRowChanges(*rowItem, true); (*rowPropertySet)["sorting"].clearModifiedFlag(); // this property should look "fresh" if (!rowItem->at(COLUMN_ID_VISIBLE).toBool()) //update - (*rowPropertySet)["visible"].setValue(TQVariant(false,0), false/*rememberOldValue*/); + (*rowPropertySet)["visible"].setValue(TQVariant(false), false/*rememberOldValue*/); } } @@ -1052,7 +1052,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal( //! @todo set["alias"].setValue(columnAlias, false); //// if (!criteriaString.isEmpty()) set["criteria"].setValue( criteriaString, false ); - set["visible"].setValue( TQVariant(false,1), false ); + set["visible"].setValue( TQVariant(false), false ); } //current property set has most probably changed @@ -1199,7 +1199,7 @@ KexiQueryDesignerGuiEditor::createNewRow(const TQString& tableName, const TQStri } (*newItem)[COLUMN_ID_COLUMN]=key; (*newItem)[COLUMN_ID_TABLE]=tableName; - (*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible, 1); + (*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible); #ifndef KEXI_NO_QUERY_TOTALS (*newItem)[COLUMN_ID_TOTALS]=TQVariant(0); #endif @@ -1236,7 +1236,7 @@ void KexiQueryDesignerGuiEditor::slotNewItemAppendedForAfterDeletingInSpreadShee { KexiTableItem *item = d->data->last(); if (item) - item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); //the same init as in initTableRows() + item->at(COLUMN_ID_VISIBLE) = TQVariant(false); //the same init as in initTableRows() } void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*repaint*/) @@ -1420,7 +1420,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int if (colnum == COLUMN_ID_COLUMN) { if (newValue.isNull()) { d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(), false/*!allowSignals*/); - d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible + d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false));//invisible d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant()); #ifndef KEXI_NO_QUERY_TOTALS d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals @@ -1499,7 +1499,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int propertySetSwitched(); } d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(tableName), false/*!allowSignals*/); - d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true,1)); + d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true)); #ifndef KEXI_NO_QUERY_TOTALS d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0)); #endif @@ -1517,7 +1517,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int if (alias.isEmpty()) //-generate smallest unique alias alias = generateUniqueAlias(); } - (*set)["isExpression"].setValue(TQVariant(isExpression,1), saveOldValue); + (*set)["isExpression"].setValue(TQVariant(isExpression), saveOldValue); if (!alias.isEmpty()) { (*set)["alias"].setValue(alias, saveOldValue); //pretty printed "alias: expr" @@ -1532,7 +1532,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int if (newValue.isNull()) { if (!item->at(COLUMN_ID_COLUMN).toString().isEmpty()) d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, TQVariant(), false/*!allowSignals*/); - d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible + d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false));//invisible #ifndef KEXI_NO_QUERY_TOTALS d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals #endif @@ -1721,7 +1721,7 @@ KexiQueryDesignerGuiEditor::createPropertySet( int row, set->addProperty(prop = new KoProperty::Property("alias", TQVariant(TQString()), i18n("Alias")) ); - set->addProperty(prop = new KoProperty::Property("visible", TQVariant(true, 4)) ); + set->addProperty(prop = new KoProperty::Property("visible", TQVariant(true)) ); prop->setVisible(false); /*TODO: @@ -1739,7 +1739,7 @@ KexiQueryDesignerGuiEditor::createPropertySet( int row, set->addProperty(prop = new KoProperty::Property("criteria", TQVariant(TQString())) ); prop->setVisible(false); - set->addProperty(prop = new KoProperty::Property("isExpression", TQVariant(false, 1)) ); + set->addProperty(prop = new KoProperty::Property("isExpression", TQVariant(false)) ); prop->setVisible(false); connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp index 9d577ec1..2a5f5a92 100644 --- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp @@ -167,14 +167,10 @@ Kross::Api::Object::Ptr KexiDBConnection::insertRecord(Kross::Api::List::Ptr arg if(obj->getClassName() == "Kross::KexiDB::KexiDBFieldList") return new Kross::Api::Variant( TQVariant(connection()->insertRecord( - *Kross::Api::Object::fromObject<KexiDBFieldList>(obj)->fieldlist(), - values - ), 0)); + *Kross::Api::Object::fromObject<KexiDBFieldList>(obj)->fieldlist(), values))); return new Kross::Api::Variant( TQVariant(connection()->insertRecord( - *Kross::Api::Object::fromObject<KexiDBTableSchema>(obj)->tableschema(), - values - ), 0)); + *Kross::Api::Object::fromObject<KexiDBTableSchema>(obj)->tableschema(), values))); } bool KexiDBConnection::createDatabase(const TQString& dbname) { return connection()->createDatabase(dbname); } diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 767b5733..4b68a7de 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -325,7 +325,7 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b )); prop->setVisible(false); set->addProperty(prop = new KoProperty::Property("this:useCaptionAsObjectName", - TQVariant(true, 1), TQString())); //we want "caption" to be displayed in the header, not name + TQVariant(true), TQString())); //we want "caption" to be displayed in the header, not name prop->setVisible(false); //name @@ -376,7 +376,7 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b prop->setVisible(false);//always hidden set->addProperty(prop - = new KoProperty::Property("unsigned", TQVariant(field.isUnsigned(), 4), i18n("Unsigned Number"))); + = new KoProperty::Property("unsigned", TQVariant(field.isUnsigned()), i18n("Unsigned Number"))); set->addProperty( prop = new KoProperty::Property("length", (int)field.length()/*200?*/, i18n("Length"))); @@ -407,24 +407,24 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b // prop->setVisible(false); set->addProperty( prop - = new KoProperty::Property("primaryKey", TQVariant(field.isPrimaryKey(), 4), i18n("Primary Key"))); + = new KoProperty::Property("primaryKey", TQVariant(field.isPrimaryKey()), i18n("Primary Key"))); prop->setIcon("key"); set->addProperty( prop - = new KoProperty::Property("unique", TQVariant(field.isUniqueKey(), 4), i18n("Unique"))); + = new KoProperty::Property("unique", TQVariant(field.isUniqueKey()), i18n("Unique"))); set->addProperty( prop - = new KoProperty::Property("notNull", TQVariant(field.isNotNull(), 4), i18n("Required"))); + = new KoProperty::Property("notNull", TQVariant(field.isNotNull()), i18n("Required"))); set->addProperty( prop - = new KoProperty::Property("allowEmpty", TQVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize"))); + = new KoProperty::Property("allowEmpty", TQVariant(!field.isNotEmpty()), i18n("Allow Zero\nSize"))); set->addProperty( prop - = new KoProperty::Property("autoIncrement", TQVariant(field.isAutoIncrement(), 4), i18n("Autonumber"))); + = new KoProperty::Property("autoIncrement", TQVariant(field.isAutoIncrement()), i18n("Autonumber"))); prop->setIcon("autonumber"); set->addProperty( prop - = new KoProperty::Property("indexed", TQVariant(field.isIndexed(), 4), i18n("Indexed"))); + = new KoProperty::Property("indexed", TQVariant(field.isIndexed()), i18n("Indexed"))); //- properties related to lookup columns (used and set by the "lookup column" tab in the property pane) KexiDB::LookupFieldSchema *lookupFieldSchema = field.table() ? field.table()->lookupFieldSchema(field) : 0; @@ -491,7 +491,7 @@ void KexiTableDesignerView::slotTogglePrimaryKey() return; KoProperty::Set &set = *propertySet(); bool isSet = !set["primaryKey"].value().toBool(); - set.changeProperty("primaryKey", TQVariant(isSet,1)); //this will update all related properties as well + set.changeProperty("primaryKey", TQVariant(isSet)); //this will update all related properties as well /* CommandGroup *setPrimaryKeyCommand; if (isSet) { setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"") @@ -510,8 +510,8 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet, bool set, bool aWasPKey, CommandGroup* commandGroup) { const bool was_pkey = aWasPKey || propertySet["primaryKey"].value().toBool(); -// propertySet["primaryKey"] = TQVariant(set, 1); - d->setPropertyValueIfNeeded( propertySet, "primaryKey", TQVariant(set,1), commandGroup ); +// propertySet["primaryKey"] = TQVariant(set); + d->setPropertyValueIfNeeded( propertySet, "primaryKey", TQVariant(set), commandGroup ); if (&propertySet==this->propertySet()) { //update action and icon @ column 0 (only if we're changing current property set) d->action_toggle_pkey->setChecked(set); @@ -537,10 +537,10 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet, break; } if (i<count) {//remove - //(*s)["autoIncrement"] = TQVariant(false, 0); - d->setPropertyValueIfNeeded( *s, "autoIncrement", TQVariant(false,0), commandGroup ); - //(*s)["primaryKey"] = TQVariant(false, 0); - d->setPropertyValueIfNeeded( *s, "primaryKey", TQVariant(false,0), commandGroup ); + //(*s)["autoIncrement"] = TQVariant(false); + d->setPropertyValueIfNeeded( *s, "autoIncrement", TQVariant(false), commandGroup ); + //(*s)["primaryKey"] = TQVariant(false); + d->setPropertyValueIfNeeded( *s, "primaryKey", TQVariant(false), commandGroup ); //remove key from table d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); KexiTableItem *item = d->view->itemAt(i); @@ -560,8 +560,8 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet, //propertySet["subType"] = KexiDB::Field::typeString(KexiDB::Field::BigInteger); d->setPropertyValueIfNeeded( propertySet, "subType", KexiDB::Field::typeString(KexiDB::Field::BigInteger), commandGroup ); - //propertySet["unsigned"] = TQVariant(true,4); - d->setPropertyValueIfNeeded( propertySet, "unsigned", TQVariant(true,4), commandGroup ); + //propertySet["unsigned"] = TQVariant(true); + d->setPropertyValueIfNeeded( propertySet, "unsigned", TQVariant(true), commandGroup ); /*todo*/ d->slotBeforeCellChanged_enabled = true; } @@ -780,9 +780,9 @@ void KexiTableDesignerView::slotBeforeCellChanged( // notNull and defaultValue=false is reasonable for boolean type if (fieldType == KexiDB::Field::Boolean) { //! @todo maybe this is good for other data types as well? - d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true, 1), changeDataTypeCommand, + d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true), changeDataTypeCommand, false /*!forceAddCommand*/, false /*!rememberOldValue*/); - d->setPropertyValueIfNeeded( set, "defaultValue", TQVariant(false, 1), changeDataTypeCommand, + d->setPropertyValueIfNeeded( set, "defaultValue", TQVariant(false), changeDataTypeCommand, false /*!forceAddCommand*/, false /*!rememberOldValue*/); } @@ -799,8 +799,8 @@ void KexiTableDesignerView::slotBeforeCellChanged( /*not needed, line below will do the work d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant()); d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); */ - //set["primaryKey"] = TQVariant(false, 1); - d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false, 1), changeDataTypeCommand ); + //set["primaryKey"] = TQVariant(false); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false), changeDataTypeCommand ); //! @todo should we display (passive?) dialog informing about cleared pkey? } } @@ -884,7 +884,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) // reasonable case for boolean type: set notNull flag and "false" as default value if (fieldType == KexiDB::Field::Boolean) { field.setNotNull( true ); - field.setDefaultValue( TQVariant(false, 0) ); + field.setDefaultValue( TQVariant(false) ); } kexipluginsdbg << "KexiTableDesignerView::slotRowUpdated(): " << field.debugString() << endl; @@ -970,15 +970,15 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty setAutonumberCommand = new CommandGroup( i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) ); toplevelCommand = setAutonumberCommand; - d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true), setAutonumberCommand ); } else { setAutonumberCommand = new CommandGroup( i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) ); //d->slotPropertyChanged_enabled = false; -// set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/); +// set["autoIncrement"].setValue( TQVariant(false), false/*don't save old*/); // d->slotPropertyChanged_enabled = true; - d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setAutonumberCommand, + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false), setAutonumberCommand, true /*forceAddCommand*/, false/*rememberOldValue*/ ); addHistoryCommand( setAutonumberCommand, false /* !execute */ ); return; @@ -997,10 +997,10 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup( i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) ); toplevelCommand = unsetIndexedOrUniquOrNotNullCommand; - d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); + d->setPropertyValueIfNeeded( set, pname, TQVariant(false), unsetIndexedOrUniquOrNotNullCommand ); if (pname=="notNull") { -//? d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), unsetIndexedOrUniquOrNotNullCommand ); - d->setPropertyValueIfNeeded( set, "unique", TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); +//? d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true), unsetIndexedOrUniquOrNotNullCommand ); + d->setPropertyValueIfNeeded( set, "unique", TQVariant(false), unsetIndexedOrUniquOrNotNullCommand ); } } @@ -1091,19 +1091,19 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty else toplevelCommand = setPrimaryKeyCommand; - d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); - d->setPropertyValueIfNeeded( set, "unique", TQVariant(true,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "allowEmpty", TQVariant(false,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "indexed", TQVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(true), setPrimaryKeyCommand, true /*forceAddCommand*/ ); + d->setPropertyValueIfNeeded( set, "unique", TQVariant(true), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "allowEmpty", TQVariant(false), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "indexed", TQVariant(true), setPrimaryKeyCommand ); //! \todo: add setting for this: "Integer PKeys have autonumber set by default" - d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true), setPrimaryKeyCommand ); -/* set["unique"] = TQVariant(true,1); - set["notNull"] = TQVariant(true,1); - set["allowEmpty"] = TQVariant(false,1); - set["indexed"] = TQVariant(true,1); - set["autoIncrement"] = TQVariant(true,1);*/ +/* set["unique"] = TQVariant(true); + set["notNull"] = TQVariant(true); + set["allowEmpty"] = TQVariant(false); + set["indexed"] = TQVariant(true); + set["autoIncrement"] = TQVariant(true);*/ // d->addHistoryCommand_in_slotPropertyChanged_enabled = prev_addHistoryCommand_in_slotPropertyChanged_enabled; //down addHistoryCommand( toplevelCommand, false /* !execute */ ); } @@ -1117,8 +1117,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty else toplevelCommand = setPrimaryKeyCommand; - d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); - d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false), setPrimaryKeyCommand, true /*forceAddCommand*/ ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false), setPrimaryKeyCommand ); // set["autoIncrement"] = TQVariant(false,1); //down addHistoryCommand( toplevelCommand, false /* !execute */ ); |