summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-05-23 13:39:16 (GMT)
committerSwift Review <review@swift.im>2014-05-26 18:37:17 (GMT)
commitd9bd353dc90008bd8d723630ec9c037a3c1f5ad2 (patch)
treeab5eabfd8d8e73fbbf07aaa1dd4f04518ad900b6 /Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
parentb249168a5c7dfd4846729dcb79445afc2cf37391 (diff)
downloadswift-contrib-d9bd353dc90008bd8d723630ec9c037a3c1f5ad2.zip
swift-contrib-d9bd353dc90008bd8d723630ec9c037a3c1f5ad2.tar.bz2
Fix uninitialized variables.
Change-Id: I39c117959e41e0b76623d60b3571e58814684551 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
index 063319e..401d0a0 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
@@ -1,51 +1,51 @@
/*
- * Copyright (c) 2012 Tobias Markmann
+ * Copyright (c) 2012-2014 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include "QtVCardTelephoneField.h"
#include <QGridLayout>
#include <Swift/QtUI/QtSwiftUtil.h>
namespace Swift {
QtVCardTelephoneField::QtVCardTelephoneField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")), telephoneLineEdit(NULL) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
QtVCardTelephoneField::~QtVCardTelephoneField() {
disconnect(this, SLOT(handleEditibleChanged(bool)));
}
void QtVCardTelephoneField::setupContentWidgets() {
telephoneLineEdit = new QtResizableLineEdit(this);
#if QT_VERSION >= 0x040700
telephoneLineEdit->setPlaceholderText(tr("0118 999 881 999 119 7253"));
#endif
getGridLayout()->addWidget(telephoneLineEdit, getGridLayout()->rowCount()-1, 2, 1, 2, Qt::AlignVCenter);
setTabOrder(telephoneLineEdit, getTagComboBox());
QtVCardHomeWork::setTagComboBox(getTagComboBox());
getTagComboBox()->addTag("voice", QObject::tr("Voice"));
getTagComboBox()->addTag("fax", QObject::tr("Fax"));
getTagComboBox()->addTag("pager", QObject::tr("Pager"));
getTagComboBox()->addTag("msg", QObject::tr("Voice Messaging"));
getTagComboBox()->addTag("cell", QObject::tr("Cell"));
getTagComboBox()->addTag("video", QObject::tr("Video"));
getTagComboBox()->addTag("bbs", QObject::tr("Bulletin Board System"));
getTagComboBox()->addTag("modem", QObject::tr("Modem"));
getTagComboBox()->addTag("isdn", QObject::tr("ISDN"));
getTagComboBox()->addTag("pcs", QObject::tr("Personal Communication Services"));
childWidgets << telephoneLineEdit;
}
bool QtVCardTelephoneField::isEmpty() const {
return telephoneLineEdit->text().isEmpty();
}
void QtVCardTelephoneField::setTelephone(const VCard::Telephone& telephone) {