summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-28 23:09:09 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-05-28 23:09:09 +0900
commit04a12485219f38e113932e8aa20b6bc12d8fa715 (patch)
tree68ee6acef9dfadc11fe8bd4d94f52d020cd8b7a1
parent03eee956313fe6172f719669a1bd3d5739e023ba (diff)
downloadkoffice-04a12485.tar.gz
koffice-04a12485.zip
Adjusted to latest TQVariant::TQVariant(bool) function.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kexi/formeditor/editlistviewdialog.cpp12
-rw-r--r--kexi/formeditor/formIO.cpp8
-rw-r--r--kexi/formeditor/widgetpropertyset.cpp6
-rw-r--r--kexi/kexidb/driver_p.cpp8
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.cpp2
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitecursor.cpp6
-rw-r--r--kexi/kexidb/utils.cpp4
-rw-r--r--kexi/migration/pqxx/pqxxmigrate.cpp2
-rw-r--r--kexi/plugins/forms/kexiformpart.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.cpp2
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.cpp2
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp2
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.cpp24
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.cpp8
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.cpp82
-rw-r--r--kexi/widget/kexiqueryparameters.cpp2
-rw-r--r--kexi/widget/tableview/kexibooltableedit.cpp16
-rw-r--r--kexi/widget/tableview/kexitextformatter.cpp2
-rw-r--r--kugar/kudesigner_lib/canvas.cpp2
-rw-r--r--kugar/kudesigner_lib/detail.cpp2
-rw-r--r--kugar/kudesigner_lib/label.cpp8
-rw-r--r--kugar/kudesigner_lib/propertyserializer.cpp2
-rw-r--r--lib/koproperty/editors/booledit.cpp4
-rw-r--r--lib/koproperty/test/test.cpp2
-rw-r--r--lib/kross/api/eventsignal.cpp2
-rw-r--r--lib/kross/api/eventslot.cpp2
-rw-r--r--lib/kross/api/qtobject.cpp2
-rw-r--r--lib/kross/main/manager.cpp2
-rw-r--r--lib/kross/python/pythonextension.cpp2
-rw-r--r--lib/kross/python/pythonscript.cpp4
-rw-r--r--lib/kross/ruby/rubymodule.cpp2
31 files changed, 110 insertions, 116 deletions
diff --git a/kexi/formeditor/editlistviewdialog.cpp b/kexi/formeditor/editlistviewdialog.cpp
index 44bc80966..5dfc176a3 100644
--- a/kexi/formeditor/editlistviewdialog.cpp
+++ b/kexi/formeditor/editlistviewdialog.cpp
@@ -109,9 +109,9 @@ EditListViewDialog::EditListViewDialog(TQWidget *parent)
m_propSet = new KoProperty::Set(TQT_TQOBJECT(this), "columns");
m_propSet->addProperty(new KoProperty::Property("caption", "Caption", i18n("Caption"),i18n("Caption")));
m_propSet->addProperty(new KoProperty::Property("width", 100, i18n("Width"), i18n("Width")));
- m_propSet->addProperty(new KoProperty::Property("clickable", TQVariant(true, 3), i18n("Clickable"), i18n("Clickable") ));
- m_propSet->addProperty(new KoProperty::Property("resizable", TQVariant(true, 3), i18n("Resizable"), i18n("Resizable") ));
- m_propSet->addProperty(new KoProperty::Property("fullwidth", TQVariant(false, 3), i18n("Full Width"), i18n("Full Width") ));
+ m_propSet->addProperty(new KoProperty::Property("clickable", TQVariant(true), i18n("Clickable"), i18n("Clickable") ));
+ m_propSet->addProperty(new KoProperty::Property("resizable", TQVariant(true), i18n("Resizable"), i18n("Resizable") ));
+ m_propSet->addProperty(new KoProperty::Property("fullwidth", TQVariant(false), i18n("Full Width"), i18n("Full Width") ));
m_editor->changeSet(m_propSet);
connect(m_propSet, TQT_SIGNAL(propertyChanged(KoProperty::Set & KoProperty::Property&)),
this, TQT_SLOT(changeProperty(KoProperty::Set & KoProperty::Property&)));
@@ -256,9 +256,9 @@ EditListViewDialog::updateItemProperties(TQListBoxItem *item)
m_propSet->blockSignals(true); // we don't want changeProperty to be called
(*m_propSet)["caption"].setValue(m_listview->columnText(id), false);
(*m_propSet)["width"].setValue(m_listview->columnWidth(id), false);
- (*m_propSet)["clickable"].setValue(TQVariant(m_listview->header()->isClickEnabled(id), 4), false);
- (*m_propSet)["resizable"].setValue(TQVariant(m_listview->header()->isResizeEnabled(id), 4), false);
- (*m_propSet)["fullwidth"].setValue(TQVariant(m_listview->header()->isStretchEnabled(id), 4), false);
+ (*m_propSet)["clickable"].setValue(TQVariant(m_listview->header()->isClickEnabled(id)), false);
+ (*m_propSet)["resizable"].setValue(TQVariant(m_listview->header()->isResizeEnabled(id)), false);
+ (*m_propSet)["fullwidth"].setValue(TQVariant(m_listview->header()->isStretchEnabled(id)), false);
m_propSet->blockSignals(false);
m_editor->changeSet(m_propSet);
}
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp
index 3d6fc8cab..657c5ccd2 100644
--- a/kexi/formeditor/formIO.cpp
+++ b/kexi/formeditor/formIO.cpp
@@ -771,10 +771,10 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name)
else if(type == "bool")
{
if(text == "true")
- return TQVariant(true, 3);
+ return TQVariant(true);
else if(text == "false")
- return TQVariant(false, 3);
- return TQVariant(text.toInt(), 3);
+ return TQVariant(false);
+ return TQVariant(text.toInt());
}
else if(type == "number")
{
@@ -1076,7 +1076,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do
// save some special properties
savePropertyElement(layout, domDoc, "property", "customLayout", Container::layoutTypeToString(item->container()->layoutType()) );
- savePropertyElement(layout, domDoc, "property", "justify", TQVariant(static_cast<KexiFlowLayout*>(item->container()->layout())->isJustified(), 3) );
+ savePropertyElement(layout, domDoc, "property", "justify", TQVariant(static_cast<KexiFlowLayout*>(item->container()->layout())->isJustified()) );
// fill the widget's grid info, ie just simulate grid layout
item->container()->createGridLayout(true);
diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp
index 74b1a4f62..64c611124 100644
--- a/kexi/formeditor/widgetpropertyset.cpp
+++ b/kexi/formeditor/widgetpropertyset.cpp
@@ -378,7 +378,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w)
}
(*this)["name"].setAutoSync(false); // name should be updated only when pressing Enter
- (*this)["enabled"].setValue( TQVariant(tree->isEnabled(), 3));
+ (*this)["enabled"].setValue( TQVariant(tree->isEnabled()));
if (winfo) {
form->library()->setPropertyOptions(*this, *winfo, w);
@@ -664,7 +664,7 @@ WidgetPropertySet::saveEnabledProperty(bool value)
(*it)->setPalette(p);
tree->setEnabled(value);
- emit widgetPropertyChanged((*it), "enabled", TQVariant(value, 3));
+ emit widgetPropertyChanged((*it), "enabled", TQVariant(value));
}
}
@@ -837,7 +837,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid
) {
// Create the wordbreak property
KoProperty::Property *p = new KoProperty::Property("wordbreak",
- TQVariant(alignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") );
+ TQVariant(alignment & TQt::WordBreak), i18n("Word Break"), i18n("Word Break") );
d->set.addProperty(p);
updatePropertyValue(tree, "wordbreak");
if (!KFormDesigner::FormManager::self()->activeForm()->library()->isPropertyVisible(
diff --git a/kexi/kexidb/driver_p.cpp b/kexi/kexidb/driver_p.cpp
index 462ce608b..fcbadb5c0 100644
--- a/kexi/kexidb/driver_p.cpp
+++ b/kexi/kexidb/driver_p.cpp
@@ -55,7 +55,7 @@ DriverPrivate::DriverPrivate()
void DriverPrivate::initInternalProperties()
{
- properties["is_file_database"] = TQVariant(isFileDriver, 1);
+ properties["is_file_database"] = TQVariant(isFileDriver);
propertyCaptions["is_file_database"] = i18n("File-based database driver");
if (isFileDriver) {
properties["file_database_mimetype"] = fileDBDriverMimeType;
@@ -77,11 +77,11 @@ void DriverPrivate::initInternalProperties()
#endif
// properties["transaction_support"] = features & Driver::TransactionsMask;
// propertyCaptions["transaction_support"] = i18n("Transaction support");
- properties["transaction_single"] = TQVariant(features & Driver::SingleTransactions, 1);
+ properties["transaction_single"] = TQVariant(features & Driver::SingleTransactions);
propertyCaptions["transaction_single"] = i18n("Single transactions support");
- properties["transaction_multiple"] = TQVariant(features & Driver::MultipleTransactions, 1);
+ properties["transaction_multiple"] = TQVariant(features & Driver::MultipleTransactions);
propertyCaptions["transaction_multiple"] = i18n("Multiple transactions support");
- properties["transaction_nested"] = TQVariant(features & Driver::NestedTransactions, 1);
+ properties["transaction_nested"] = TQVariant(features & Driver::NestedTransactions);
propertyCaptions["transaction_nested"] = i18n("Nested transactions support");
properties["kexidb_driver_version"] =
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
index 048d66859..77746a13f 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
@@ -239,7 +239,7 @@ TQVariant pqxxSqlCursor::pValue(uint pos)const
}
else if (f->type() == Field::Boolean )
{
- return QString((*m_res)[at()][pos].c_str()).lower() == "t" ? TQVariant(true, 1) : TQVariant(false, 1);
+ return QString((*m_res)[at()][pos].c_str()).lower() == "t" ? TQVariant(true) : TQVariant(false);
}
else if (f->typeGroup() == Field::BLOBGroup)
{
diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
index c8282963d..6a80f76de 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
@@ -151,7 +151,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
return TQDateTime::fromString( tmp, Qt::ISODate );
}
case Field::Boolean:
- return TQVariant(sqliteStringToBool(GET_sqlite3_column_text), 1);
+ return TQVariant(sqliteStringToBool(GET_sqlite3_column_text));
default:
return TQVariant(); //TODO
}
@@ -166,7 +166,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
case Field::BigInteger:
return TQVariant( (TQ_LLONG)sqlite3_column_int64(prepared_st_handle, i) );
case Field::Boolean:
- return TQVariant( sqlite3_column_int(prepared_st_handle, i)!=0, 1 );
+ return TQVariant( sqlite3_column_int(prepared_st_handle, i)!=0 );
default:;
}
if (f->isFPNumericType()) //WEIRD, YEAH?
@@ -480,7 +480,7 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const
case Field::BigInteger:
data[i] = TQVariant( TQString::fromLatin1(*col).toLongLong() );
case Field::Boolean:
- data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)), 1 );
+ data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)) );
break;
case Field::Date:
data[i] = TQDate::fromString( TQString::fromLatin1(*col), Qt::ISODate );
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 4baa0d8b8..b7e6a2ed6 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -939,7 +939,7 @@ TQVariant KexiDB::loadPropertyValueFromDom( const TQDomNode& node )
}
}
else if (valueType == "bool") {
- return TQVariant(text.lower()=="true" || text=="1", 1);
+ return TQVariant(text.lower()=="true" || text=="1");
}
//! @todo add more TQVariant types
KexiDBWarn << "loadPropertyValueFromDom(): unknown type '" << valueType << "'" << endl;
@@ -983,7 +983,7 @@ TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type )
ADD(Field::ShortInteger, 0);
ADD(Field::Integer, 0);
ADD(Field::BigInteger, 0);
- ADD(Field::Boolean, TQVariant(false, 0));
+ ADD(Field::Boolean, TQVariant(false));
ADD(Field::Float, 0.0);
ADD(Field::Double, 0.0);
//! @todo ok? we have no better defaults
diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp
index 9460462c0..1511bbe09 100644
--- a/kexi/migration/pqxx/pqxxmigrate.cpp
+++ b/kexi/migration/pqxx/pqxxmigrate.cpp
@@ -543,7 +543,7 @@ bool PqxxMigrate::drv_copyTable(const TQString& srcTable, KexiDB::Connection *de
}
else if (fieldsExpanded.at(index)->field->type()==KexiDB::Field::Boolean )
{
- vals.append(QString((*i).c_str()).lower() == "t" ? TQVariant(true, 1) : TQVariant(false, 1));
+ vals.append(QString((*i).c_str()).lower() == "t" ? TQVariant(true) : TQVariant(false));
}
else
{
diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp
index c53212fb6..0b5f83ef7 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 c1a8f5d4d..5d123d4dd 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 815adca94..8e74324aa 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 3e4d28162..fecec6322 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 45ea8e1d4..582d79e62 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 9d577ec18..2a5f5a92f 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 767b57330..4b68a7de0 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 */ );
diff --git a/kexi/widget/kexiqueryparameters.cpp b/kexi/widget/kexiqueryparameters.cpp
index 171df484c..a3ecdb816 100644
--- a/kexi/widget/kexiqueryparameters.cpp
+++ b/kexi/widget/kexiqueryparameters.cpp
@@ -61,7 +61,7 @@ TQValueList<TQVariant> KexiQueryParameters::getParameters(TQWidget *parent,
caption, (*it).message, list, 0/*current*/, false /*!editable*/, &ok, parent);
if (!ok || result.isEmpty())
return TQValueList<TQVariant>(); //cancelled
- values.append( TQVariant( result==list.first(), 1 ) );
+ values.append( TQVariant( result==list.first() ) );
break;
}
case KexiDB::Field::Date: {
diff --git a/kexi/widget/tableview/kexibooltableedit.cpp b/kexi/widget/tableview/kexibooltableedit.cpp
index 2bc14f4ac..f0527a95f 100644
--- a/kexi/widget/tableview/kexibooltableedit.cpp
+++ b/kexi/widget/tableview/kexibooltableedit.cpp
@@ -71,7 +71,7 @@ TQVariant KexiBoolTableEdit::value()
void KexiBoolTableEdit::clear()
{
if (field()->isNotNull())
- m_currentValue = TQVariant(false, 0);
+ m_currentValue = TQVariant(false);
else
m_currentValue = TQVariant();
}
@@ -120,13 +120,13 @@ void KexiBoolTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria
void KexiBoolTableEdit::clickedOnContents()
{
if (field()->isNotNull())
- m_currentValue = TQVariant( !m_currentValue.toBool(), 0 );
+ m_currentValue = TQVariant( !m_currentValue.toBool() );
else {
// null allowed: use the cycle: true -> false -> null
if (m_currentValue.isNull())
- m_currentValue = TQVariant( true, 1 );
+ m_currentValue = TQVariant( true );
else
- m_currentValue = m_currentValue.toBool() ? TQVariant( false, 1 ) : TQVariant();
+ m_currentValue = m_currentValue.toBool() ? TQVariant( false ) : TQVariant();
}
}
@@ -137,12 +137,11 @@ void KexiBoolTableEdit::handleAction(const TQString& actionName)
bool ok;
const int value = tqApp->clipboard()->text( TQClipboard::Clipboard ).toInt(&ok);
if (ok) {
- m_currentValue = (value==0) ? TQVariant(false, 0) : TQVariant(true, 1);
+ m_currentValue = (value==0) ? TQVariant(false) : TQVariant(true);
}
else {
m_currentValue = field()->isNotNull()
- ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : TQVariant();
+ ? TQVariant(false) : TQVariant();
}
repaintRelatedCell();
}
@@ -150,8 +149,7 @@ void KexiBoolTableEdit::handleAction(const TQString& actionName)
emit editRequested();
//! @todo handle defaultValue...
m_currentValue = field()->isNotNull()
- ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : TQVariant();
+ ? TQVariant(false) : TQVariant();
handleCopyAction(m_origValue, TQVariant());
repaintRelatedCell();
}
diff --git a/kexi/widget/tableview/kexitextformatter.cpp b/kexi/widget/tableview/kexitextformatter.cpp
index 5ff289206..b9208d431 100644
--- a/kexi/widget/tableview/kexitextformatter.cpp
+++ b/kexi/widget/tableview/kexitextformatter.cpp
@@ -157,7 +157,7 @@ TQVariant KexiTextFormatter::textToValue(const TQString& text) const
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 d->dateFormatter->stringToVariant( text );
case KexiDB::Field::Time:
diff --git a/kugar/kudesigner_lib/canvas.cpp b/kugar/kudesigner_lib/canvas.cpp
index 2bad9157a..930d57b8d 100644
--- a/kugar/kudesigner_lib/canvas.cpp
+++ b/kugar/kudesigner_lib/canvas.cpp
@@ -278,7 +278,7 @@ void Canvas::setDetailAttributes( TQDomNode *node )
attributes.namedItem( "Level" ).nodeValue().toInt(), this );
d->props[ "Level" ].setValue( attributes.namedItem( "Level" ).nodeValue().toInt() );
d->props[ "Height" ].setValue( attributes.namedItem( "Height" ).nodeValue().toInt() );
- d->props[ "Repeat" ].setValue( TQVariant( attributes.namedItem( "Repeat" ).nodeValue() == "true", 3 ) );
+ d->props[ "Repeat" ].setValue( TQVariant( attributes.namedItem( "Repeat" ).nodeValue() == "true" ) );
kugarTemplate() ->details[ attributes.namedItem( "Level" ).nodeValue().toInt() ].second = d;
addReportItems( node, d );
}
diff --git a/kugar/kudesigner_lib/detail.cpp b/kugar/kudesigner_lib/detail.cpp
index bb8ad3ef7..1892d125d 100644
--- a/kugar/kudesigner_lib/detail.cpp
+++ b/kugar/kudesigner_lib/detail.cpp
@@ -32,7 +32,7 @@ Detail::Detail( int x, int y, int width, int height, int level, Canvas *canvas )
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Detail" );
props.addProperty( new Property( "Level", 0, i18n( "Level" ), i18n( "Detail Level" ), KoProperty::Integer ), "Detail" );
- props.addProperty( new Property( "Repeat", TQVariant( false, 3 ), i18n( "Repeat" ), i18n( "Repeat After Page Break" ), KoProperty::Boolean ), "Detail" );
+ props.addProperty( new Property( "Repeat", TQVariant( false ), i18n( "Repeat" ), i18n( "Repeat After Page Break" ), KoProperty::Boolean ), "Detail" );
registerAs( Rtti_Detail );
}
diff --git a/kugar/kudesigner_lib/label.cpp b/kugar/kudesigner_lib/label.cpp
index ec39b317d..56ebf2fe5 100644
--- a/kugar/kudesigner_lib/label.cpp
+++ b/kugar/kudesigner_lib/label.cpp
@@ -62,10 +62,10 @@ Label::Label( int x, int y, int width, int height, Canvas *canvas )
props.addProperty( new Property( "BorderStyle", 1, i18n( "Line" ), i18n( "Border Style" ), KoProperty::LineStyle ), "BorderStyle" );
props.setGroupDescription( "DrawBorder", i18n( "Border" ) );
- props.addProperty( new Property( "DrawTop", TQVariant( false, 3 ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawBottom", TQVariant( false, 3 ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawLeft", TQVariant( false, 3 ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawRight", TQVariant( false, 3 ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawTop", TQVariant( false ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawBottom", TQVariant( false ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawLeft", TQVariant( false ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawRight", TQVariant( false ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
props.setGroupDescription( "Font", i18n( "Font" ) );
diff --git a/kugar/kudesigner_lib/propertyserializer.cpp b/kugar/kudesigner_lib/propertyserializer.cpp
index ae9f30d78..765cc4951 100644
--- a/kugar/kudesigner_lib/propertyserializer.cpp
+++ b/kugar/kudesigner_lib/propertyserializer.cpp
@@ -61,7 +61,7 @@ TQVariant PropertySerializer::fromString( Property *prop, const TQString &str )
case KoProperty::Integer:
return TQVariant( str.toInt() );
case KoProperty::Boolean:
- return TQVariant( str == "true", 3 );
+ return TQVariant( str == "true" );
case KoProperty::Font:
return TQVariant( TQFont( str ) );
case KoProperty::LineStyle:
diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp
index e34ee5d5b..fbeb58d57 100644
--- a/lib/koproperty/editors/booledit.cpp
+++ b/lib/koproperty/editors/booledit.cpp
@@ -60,7 +60,7 @@ BoolEdit::~BoolEdit()
TQVariant
BoolEdit::value() const
{
- return TQVariant(m_toggle->isOn(), 4);
+ return TQVariant(m_toggle->isOn());
}
void
@@ -173,7 +173,7 @@ ThreeStateBoolEdit::value() const
// list items: true, false, NULL
const int idx = m_edit->currentItem();
if (idx==0)
- return TQVariant(true, 1);
+ return TQVariant(true);
else
return idx==1 ? TQVariant(false) : TQVariant();
}
diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp
index 59fee2468..23bb80f70 100644
--- a/lib/koproperty/test/test.cpp
+++ b/lib/koproperty/test/test.cpp
@@ -62,7 +62,7 @@ Test::Test()
m_set->addProperty(new Property("Int", 2, "Int"), group);
m_set->addProperty(new Property("Double", 3.1415,"Double"), group);
- m_set->addProperty(new Property("Bool", TQVariant(true, 4), "Bool"), group);
+ m_set->addProperty(new Property("Bool", TQVariant(true), "Bool"), group);
m_set->addProperty(p = new Property("3 States", TQVariant(), "3 States", "", Boolean), group);
p->setOption("3rdState", "None");
m_set->addProperty(p = new Property("Date", TQDate::currentDate(),"Date"), group);
diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp
index c462f6cd7..9e07eed11 100644
--- a/lib/kross/api/eventsignal.cpp
+++ b/lib/kross/api/eventsignal.cpp
@@ -62,5 +62,5 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, TDESharedPtr<List> argum
m_sender->tqt_emit(signalid, uo); // emit the signal
delete [] uo;
- return new Variant( TQVariant(true,0) );
+ return new Variant( TQVariant(true) );
}
diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp
index bae298727..cffe5ae86 100644
--- a/lib/kross/api/eventslot.cpp
+++ b/lib/kross/api/eventslot.cpp
@@ -62,7 +62,7 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
m_receiver->tqt_invoke(slotid, uo); // invoke the slot
delete [] uo;
- return new Variant( TQVariant(true,0) );
+ return new Variant( TQVariant(true) );
}
/*
diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp
index 1e34c7154..631c99434 100644
--- a/lib/kross/api/qtobject.cpp
+++ b/lib/kross/api/qtobject.cpp
@@ -181,7 +181,7 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args)
m_object->tqt_invoke(slotid, uo);
delete [] uo;
- return new Variant( TQVariant(true,0) );
+ return new Variant( TQVariant(true) );
}
Kross::Api::Object::Ptr QtObject::signalNames(Kross::Api::List::Ptr)
diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp
index 4ee5490d0..75365b5a7 100644
--- a/lib/kross/main/manager.cpp
+++ b/lib/kross/main/manager.cpp
@@ -84,7 +84,7 @@ Manager::Manager()
if(! pythonlib.isEmpty()) { // If the Kross Python plugin exists we offer it as supported scripting language.
InterpreterInfo::Option::Map pythonoptions;
pythonoptions.replace("restricted",
- new InterpreterInfo::Option("Restricted", "Restricted Python interpreter", TQVariant(false,0))
+ new InterpreterInfo::Option("Restricted", "Restricted Python interpreter", TQVariant(false))
);
d->interpreterinfos.replace("python",
new InterpreterInfo("python",
diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp
index dbbe9bf6c..efa13bd72 100644
--- a/lib/kross/python/pythonextension.cpp
+++ b/lib/kross/python/pythonextension.cpp
@@ -196,7 +196,7 @@ Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object)
if(type == &PyInt_Type)
return new Kross::Api::Variant(int(Py::Int(object)));
if(type == &PyBool_Type)
- return new Kross::Api::Variant(TQVariant(object.isTrue(),0));
+ return new Kross::Api::Variant(TQVariant(object.isTrue()));
if(type == &PyLong_Type)
return new Kross::Api::Variant(TQ_LLONG(long(Py::Long(object))));
if(type == &PyFloat_Type)
diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp
index 5c2dec8ba..d7835d527 100644
--- a/lib/kross/python/pythonscript.cpp
+++ b/lib/kross/python/pythonscript.cpp
@@ -107,7 +107,7 @@ void PythonScript::initialize()
// simply access the ScriptContainer itself from within
// python scripting code.
Py::Dict moduledict = d->m_module->getDict();
- moduledict["self"] = PythonExtension::toPyObject( m_scriptcontainer );
+ moduledict["self"] = PythonExtension::toPyObject( (Kross::Api::Object::Ptr)m_scriptcontainer );
//moduledict["parent"] = PythonExtension::toPyObject( m_manager );
/*
@@ -129,7 +129,7 @@ void PythonScript::initialize()
// Compile the python script code. It will be later on request
// executed. That way we cache the compiled code.
PyObject* code = 0;
- bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false,0), true).toBool();
+ bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false), true).toBool();
krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").arg(m_scriptcontainer->getName()).arg(restricted) );
if(restricted) {
diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp
index 948a10ee9..3f6735d5c 100644
--- a/lib/kross/ruby/rubymodule.cpp
+++ b/lib/kross/ruby/rubymodule.cpp
@@ -40,7 +40,7 @@ RubyModule::RubyModule(Kross::Api::Module::Ptr mod, TQString modname) : d(new Ru
krossdebug(TQString("Module: %1").arg(modname));
VALUE rmodule = rb_define_module(modname.ascii());
rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1);
- VALUE rm = RubyExtension::toVALUE( mod.data() );
+ VALUE rm = RubyExtension::toVALUE( (Kross::Api::Object::Ptr)mod.data() );
rb_define_const(rmodule, "MODULEOBJ", rm);
}