[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kabc
From: Waldo Bastian <bastian () kde ! org>
Date: 2005-03-09 15:18:41
Message-ID: 20050309151841.D18B110B25 () office ! kde ! org
[Download RAW message or body]
CVS commit by waba:
Get rid of spurious & in e-mail addresses, button->text() gets messed up by
the automatic accelerator code, fix button selection.
SUSE BR67347
M +6 -2 distributionlistdialog.cpp 1.10
--- kdelibs/kabc/distributionlistdialog.cpp #1.9:1.10
@@ -54,4 +54,5 @@ DistributionListDialog::~DistributionLis
}
+static QMap<QWidget*,QString> *sEmailMap = 0;
EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t,
@@ -60,4 +61,6 @@ EmailSelector::EmailSelector( const QStr
parent )
{
+ if (!sEmailMap)
+ sEmailMap = new QMap<QWidget*,QString>();
QFrame *topFrame = plainPage();
QBoxLayout *topLayout = new QVBoxLayout( topFrame );
@@ -70,6 +73,7 @@ EmailSelector::EmailSelector( const QStr
for( it = emails.begin(); it != emails.end(); ++it ) {
QRadioButton *button = new QRadioButton( *it, mButtonGroup );
+ sEmailMap->insert( button, *it );
if ( (*it) == current ) {
- button->setDown( true );
+ mButtonGroup->setButton(mButtonGroup->id(button));
}
}
@@ -79,5 +83,5 @@ QString EmailSelector::selected()
{
QButton *button = mButtonGroup->selected();
- if ( button ) return button->text();
+ if ( button ) return (*sEmailMap)[button];
return QString::null;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic