From 405480281e7e4e81028ca1ffebd5c712b57e2f84 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Thu, 25 Mar 2010 14:45:20 +0000 Subject: [PATCH] Use static getColor instead of dialog->exec svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1107401 --- src/ColorSchemeEditor.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ColorSchemeEditor.cpp b/src/ColorSchemeEditor.cpp index 54982716..e39598d8 100644 --- a/src/ColorSchemeEditor.cpp +++ b/src/ColorSchemeEditor.cpp @@ -120,18 +120,18 @@ void ColorSchemeEditor::editColorItem( QTableWidgetItem* item ) if ( item->column() != 1 ) return; - KColorDialog* dialog = new KColorDialog(this); - dialog->setColor( item->background().color() ); - - dialog->exec(); - - item->setBackground( dialog->color() ); - - ColorEntry entry(_colors->colorEntry(item->row())); - entry.color = dialog->color(); - _colors->setColorTableEntry(item->row(),entry); + QColor color = item->background().color(); + int result = KColorDialog::getColor( color ); + if ( result == KColorDialog::Accepted ) { + item->setBackground( color ); + + ColorEntry entry( _colors->colorEntry(item->row()) ); + entry.color = color; + _colors->setColorTableEntry( item->row(), entry ); + + emit colorsChanged( _colors ); - emit colorsChanged(_colors); + } } void ColorSchemeEditor::setDescription(const QString& text) { -- GitLab