Use static getColor instead of dialog->exec

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1107401
This commit is contained in:
Kurt Hindenburg
2010-03-25 14:45:20 +00:00
parent 84b7864f84
commit 405480281e

View File

@@ -120,18 +120,18 @@ void ColorSchemeEditor::editColorItem( QTableWidgetItem* item )
if ( item->column() != 1 )
return;
KColorDialog* dialog = new KColorDialog(this);
dialog->setColor( item->background().color() );
QColor color = item->background().color();
int result = KColorDialog::getColor( color );
if ( result == KColorDialog::Accepted ) {
item->setBackground( color );
dialog->exec();
ColorEntry entry( _colors->colorEntry(item->row()) );
entry.color = color;
_colors->setColorTableEntry( item->row(), entry );
emit colorsChanged( _colors );
item->setBackground( dialog->color() );
ColorEntry entry(_colors->colorEntry(item->row()));
entry.color = dialog->color();
_colors->setColorTableEntry(item->row(),entry);
emit colorsChanged(_colors);
}
}
void ColorSchemeEditor::setDescription(const QString& text)
{