Commit ed6129c0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add clear button

parent 8d82c4dd
......@@ -82,7 +82,8 @@ void PhoneTypeCombo::update()
{
clear();
for (int i = 0; i < mTypeList.count(); ++i) {
const int typeListCount(mTypeList.count());
for (int i = 0; i < typeListCount; ++i) {
if (mTypeList.at(i) == -1) { // "Other..." entry
addItem(i18nc("@item:inlistbox Category of contact info field", "Other..."));
} else {
......@@ -128,6 +129,7 @@ PhoneNumberWidget::PhoneNumberWidget(QWidget *parent)
mTypeCombo = new PhoneTypeCombo(this);
mNumberEdit = new KLineEdit(this);
mNumberEdit->setTrapReturnKey(true);
mNumberEdit->setClearButtonEnabled(true);
QFontMetrics fm(font());
mNumberEdit->setMinimumWidth(fm.width(QStringLiteral("MMMMMMMMMM")));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment