diff options
Diffstat (limited to 'kommander/editor/command.cpp')
-rw-r--r-- | kommander/editor/command.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index 757a6197..adc74084 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -368,7 +368,7 @@ void DeleteCommand::execute() w->hide(); TQString s = w->name(); s.prepend( "qt_dead_widget_" ); - w->setName( s ); + w->setName( s.utf8() ); formWindow()->selectWidget( TQT_TQOBJECT(w), false ); formWindow()->widgets()->remove( w ); TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); @@ -393,7 +393,7 @@ void DeleteCommand::unexecute() w->show(); TQString s = w->name(); s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - w->setName( s ); + w->setName( s.utf8() ); formWindow()->widgets()->insert( w, w ); formWindow()->selectWidget( TQT_TQOBJECT(w) ); TQValueList<MetaDataBase::Connection> conns = *connections.find( w ); @@ -438,7 +438,7 @@ void SetPropertyCommand::execute() PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem(); if ( !i ) return; - i->setValue( widget->property( propName ) ); + i->setValue( widget->property( propName.latin1() ) ); i->setChanged( false ); editor->refetchData(); editor->emitWidgetChanged(); @@ -461,7 +461,7 @@ bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); + widget->metaObject()->property( widget->metaObject()->findProperty( propName.latin1(), true ), true ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return true; @@ -532,19 +532,19 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ editor->propertyList()->setCurrentProperty( propName ); const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); + widget->metaObject()->property( widget->metaObject()->findProperty( propName.latin1(), true ), true ); if ( !p ) { if ( propName == "hAlign" ) { p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); int align = widget->property( "alignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); - align |= p->keyToValue( currentItemText ); + align |= p->keyToValue( currentItemText.utf8() ); widget->setProperty( "alignment", TQVariant( align ) ); } else if ( propName == "vAlign" ) { p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); int align = widget->property( "alignment" ).toInt(); align &= ~( AlignVertical_Mask ); - align |= p->keyToValue( currentItemText ); + align |= p->keyToValue( currentItemText.utf8() ); widget->setProperty( "alignment", TQVariant( align ) ); } else if ( propName == "wordwrap" ) { int align = widget->property( "alignment" ).toInt(); @@ -577,18 +577,18 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( p->isSetType() ) { ; } else if ( p->isEnumType() ) { - widget->setProperty( propName, p->keyToValue( currentItemText ) ); + widget->setProperty( propName.latin1(), p->keyToValue( currentItemText.utf8() ) ); } else { TQVariant ov; if ( propName == "name" || propName == "itemName" ) - ov = widget->property( propName ); + ov = widget->property( propName.latin1() ); int oldSerNum = -1; if ( v.type() == TQVariant::Pixmap ) oldSerNum = v.toPixmap().serialNumber(); - widget->setProperty( propName, v ); - if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) + widget->setProperty( propName.latin1(), v ); + if ( oldSerNum != -1 && oldSerNum != widget->property( propName.latin1() ).toPixmap().serialNumber() ) MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), - widget->property( propName ).toPixmap().serialNumber(), + widget->property( propName.latin1() ).toPixmap().serialNumber(), MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); if ( propName == "cursor" ) MetaDataBase::setCursor( (TQWidget*)widget, v.toCursor() ); @@ -1589,7 +1589,7 @@ void AddActionToToolBarCommand::execute() TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (QDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s.utf8() ); } } @@ -1644,7 +1644,7 @@ void AddActionToToolBarCommand::unexecute() if ( action->inherits( "QDesignerAction" ) ) { TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); - ( (QDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s.utf8() ); } toolBar->removeAction( action ); @@ -1750,7 +1750,7 @@ void AddMenuCommand::execute() TQString n = "PopupMenu"; popup = new QDesignerPopupMenu( mainWindow ); formWindow()->unify( TQT_TQOBJECT(popup), n, true ); - popup->setName( n ); + popup->setName( n.utf8() ); } if ( !mainWindow->child( 0, "TQMenuBar" ) ) { menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow ); @@ -1828,7 +1828,7 @@ void AddToolBarCommand::execute() toolBar = new QDesignerToolBar( mainWindow ); TQString n = "Toolbar"; formWindow()->unify( TQT_TQOBJECT(toolBar), n, true ); - toolBar->setName( n ); + toolBar->setName( n.utf8() ); mainWindow->addToolBar( toolBar, n ); } else { toolBar->show(); |