summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-01 12:36:16 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-01 15:56:34 (GMT)
commiteddd92ed76ae68cb1e202602fd3ebd11b69191a2 (patch)
tree8d396e5801d77a2f0ee4ab8e4c5093d8cf8118e6 /Swift/QtUI/QtVCardWidget
parenta79db8d446e152b715f435550c2a6e10a36ee532 (diff)
downloadswift-eddd92ed76ae68cb1e202602fd3ebd11b69191a2.zip
swift-eddd92ed76ae68cb1e202602fd3ebd11b69191a2.tar.bz2
Modernize code to use C++11 nullptr using clang-tidy
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
Diffstat (limited to 'Swift/QtUI/QtVCardWidget')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtCloseButton.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtCloseButton.h8
-rw-r--r--Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp6
-rw-r--r--Swift/QtUI/QtVCardWidget/QtResizableLineEdit.h8
-rw-r--r--Swift/QtUI/QtVCardWidget/QtTagComboBox.h8
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp6
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardAddressField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.cpp6
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp4
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h4
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardHomeWork.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardJIDField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardJIDField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp8
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.h8
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardRoleField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardRoleField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardTitleField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardTitleField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardURLField.cpp2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardURLField.h2
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp12
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardWidget.h4
33 files changed, 77 insertions, 47 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtCloseButton.cpp b/Swift/QtUI/QtVCardWidget/QtCloseButton.cpp
index ec7941c..da4f22f 100644
--- a/Swift/QtUI/QtVCardWidget/QtCloseButton.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtCloseButton.cpp
@@ -24,7 +24,7 @@ QtCloseButton::QtCloseButton(QWidget *parent) : QAbstractButton(parent) {
}
QSize QtCloseButton::sizeHint() const {
- return QSize(style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0), style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, 0));
+ return QSize(style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, nullptr, nullptr), style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, nullptr, nullptr));
}
bool QtCloseButton::event(QEvent *e) {
diff --git a/Swift/QtUI/QtVCardWidget/QtCloseButton.h b/Swift/QtUI/QtVCardWidget/QtCloseButton.h
index 1ba31a0..0c6e192 100644
--- a/Swift/QtUI/QtVCardWidget/QtCloseButton.h
+++ b/Swift/QtUI/QtVCardWidget/QtCloseButton.h
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <QAbstractButton>
@@ -13,7 +19,7 @@ namespace Swift {
class QtCloseButton : public QAbstractButton {
Q_OBJECT
public:
- explicit QtCloseButton(QWidget *parent = 0);
+ explicit QtCloseButton(QWidget *parent = nullptr);
virtual QSize sizeHint() const;
protected:
diff --git a/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp b/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
index 67c79a9..079f77d 100644
--- a/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtRemovableItemDelegate.cpp
@@ -36,7 +36,7 @@ void QtRemovableItemDelegate::paint(QPainter* painter, const QStyleOptionViewIte
if (index.data().toString().isEmpty()) {
#ifdef SWIFTEN_PLATFORM_MACOSX
// workaround for Qt not painting relative to the cell we're in, on OS X
- int height = style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0);
+ int height = style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, nullptr, nullptr);
painter->translate(option.rect.x(), option.rect.y() + (option.rect.height() - height)/2);
#endif
style->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, painter);
@@ -45,7 +45,7 @@ void QtRemovableItemDelegate::paint(QPainter* painter, const QStyleOptionViewIte
}
QWidget* QtRemovableItemDelegate::createEditor(QWidget*, const QStyleOptionViewItem&, const QModelIndex&) const {
- return NULL;
+ return nullptr;
}
bool QtRemovableItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) {
@@ -58,7 +58,7 @@ bool QtRemovableItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* mod
}
QSize QtRemovableItemDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const {
- QSize size(style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, 0) + 2, style->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, 0) + 2);
+ QSize size(style->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, nullptr, nullptr) + 2, style->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, nullptr, nullptr) + 2);
return size;
}
diff --git a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.h b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.h
index 47c6f3e..eab5b2b 100644
--- a/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.h
+++ b/Swift/QtUI/QtVCardWidget/QtResizableLineEdit.h
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <QLineEdit>
@@ -15,7 +21,7 @@ namespace Swift {
Q_PROPERTY(bool editable READ isEditable WRITE setEditable)
public:
- explicit QtResizableLineEdit(QWidget* parent = 0);
+ explicit QtResizableLineEdit(QWidget* parent = nullptr);
~QtResizableLineEdit();
bool isEditable() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtTagComboBox.h b/Swift/QtUI/QtVCardWidget/QtTagComboBox.h
index f08f136..e9dbbdd 100644
--- a/Swift/QtUI/QtVCardWidget/QtTagComboBox.h
+++ b/Swift/QtUI/QtVCardWidget/QtTagComboBox.h
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <QComboBox>
@@ -18,7 +24,7 @@ class QtTagComboBox : public QComboBox {
Q_PROPERTY(bool editable READ isEditable WRITE setEditable)
public:
- explicit QtTagComboBox(QWidget* parent = 0);
+ explicit QtTagComboBox(QWidget* parent = nullptr);
~QtTagComboBox();
bool isEditable() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
index 57bb2cd..4043dbc 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -20,7 +20,7 @@
namespace Swift {
QtVCardAddressField::QtVCardAddressField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Address")), streetLineEdit(NULL), poboxLineEdit(NULL), addressextLineEdit(NULL), cityLineEdit(NULL), pocodeLineEdit(NULL), regionLineEdit(NULL), countryLineEdit(NULL), textFieldGridLayout(NULL), textFieldGridLayoutItem(NULL), deliveryTypeLabel(NULL), domesticRadioButton(NULL), internationalRadioButton(NULL), buttonGroup(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Address")), streetLineEdit(nullptr), poboxLineEdit(nullptr), addressextLineEdit(nullptr), cityLineEdit(nullptr), pocodeLineEdit(nullptr), regionLineEdit(nullptr), countryLineEdit(nullptr), textFieldGridLayout(nullptr), textFieldGridLayoutItem(nullptr), deliveryTypeLabel(nullptr), domesticRadioButton(nullptr), internationalRadioButton(nullptr), buttonGroup(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
@@ -164,7 +164,7 @@ void QtVCardAddressField::handleEditibleChanged(bool isEditable) {
regionLineEdit->setEditable(isEditable);
countryLineEdit->setEditable(isEditable);
- deliveryTypeLabel->setText(buttonGroup->checkedButton() == 0 ? "" : buttonGroup->checkedButton()->text());
+ deliveryTypeLabel->setText(buttonGroup->checkedButton() == nullptr ? "" : buttonGroup->checkedButton()->text());
deliveryTypeLabel->setVisible(!isEditable);
domesticRadioButton->setVisible(isEditable);
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.h b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.h
index c90628a..aeebbff 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.h
@@ -32,7 +32,7 @@ class QtVCardAddressField : public QtVCardGeneralField, public QtVCardHomeWork {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Address"), UNLIMITED_INSTANCES, QtVCardAddressField)
- QtVCardAddressField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardAddressField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardAddressField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.cpp
index 7f270c5..e4a75cd 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -22,7 +22,7 @@
namespace Swift {
QtVCardAddressLabelField::QtVCardAddressLabelField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Address Label")), addressLabelPlainTextEdit(NULL), deliveryTypeLabel(NULL), domesticRadioButton(NULL), internationalRadioButton(NULL), buttonGroup(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Address Label")), addressLabelPlainTextEdit(nullptr), deliveryTypeLabel(nullptr), domesticRadioButton(nullptr), internationalRadioButton(nullptr), buttonGroup(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
@@ -97,7 +97,7 @@ void QtVCardAddressLabelField::handleEditibleChanged(bool isEditable) {
addressLabelPlainTextEdit->setReadOnly(!isEditable);
addressLabelPlainTextEdit->setStyleSheet(isEditable ? "" : "QPlainTextEdit { background: transparent; }");
- deliveryTypeLabel->setText(buttonGroup->checkedButton() == 0 ? "" : buttonGroup->checkedButton()->text());
+ deliveryTypeLabel->setText(buttonGroup->checkedButton() == nullptr ? "" : buttonGroup->checkedButton()->text());
deliveryTypeLabel->setVisible(!isEditable);
domesticRadioButton->setVisible(isEditable);
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.h b/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.h
index 16910b3..ceca88a 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardAddressLabelField.h
@@ -32,7 +32,7 @@ class QtVCardAddressLabelField : public QtVCardGeneralField, public QtVCardHomeW
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Address Label"), UNLIMITED_INSTANCES, QtVCardAddressLabelField)
- QtVCardAddressLabelField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardAddressLabelField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardAddressLabelField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.cpp
index 53dfc7f..1111295 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.cpp
@@ -22,7 +22,7 @@
namespace Swift {
QtVCardBirthdayField::QtVCardBirthdayField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Birthday"), false, false), birthdayLabel(NULL), birthdayDateEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Birthday"), false, false), birthdayLabel(nullptr), birthdayDateEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.h b/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.h
index 431751e..0383b6c 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardBirthdayField.h
@@ -28,7 +28,7 @@ class QtVCardBirthdayField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Birthday"), 1, QtVCardBirthdayField)
- QtVCardBirthdayField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardBirthdayField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardBirthdayField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.cpp
index 9926262..2a8e1c9 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.cpp
@@ -22,7 +22,7 @@
namespace Swift {
QtVCardDescriptionField::QtVCardDescriptionField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Description"), false, false), descriptionPlainTextEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Description"), false, false), descriptionPlainTextEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.h b/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.h
index 489797a..c06dd97 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardDescriptionField.h
@@ -27,7 +27,7 @@ class QtVCardDescriptionField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Description"), 1, QtVCardDescriptionField)
- QtVCardDescriptionField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardDescriptionField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardDescriptionField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp
index 44d94d7..ab69cba 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.cpp
@@ -22,8 +22,8 @@
namespace Swift {
QtVCardGeneralField::QtVCardGeneralField(QWidget* parent, QGridLayout* layout, bool editable, int row, QString label, bool preferrable, bool taggable) :
- QWidget(parent), editable(editable), preferrable(preferrable), starVisible(false), taggable(taggable), layout(layout), row(row), preferredCheckBox(0), label(0), labelText(label),
- tagComboBox(0), tagLabel(NULL), closeButton(0) {
+ QWidget(parent), editable(editable), preferrable(preferrable), starVisible(false), taggable(taggable), layout(layout), row(row), preferredCheckBox(nullptr), label(nullptr), labelText(label),
+ tagComboBox(nullptr), tagLabel(nullptr), closeButton(nullptr) {
}
QtVCardGeneralField::~QtVCardGeneralField() {
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
index d907196..48ecf9f 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardGeneralField.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -37,7 +37,7 @@ class QtVCardGeneralField : public QWidget {
Q_PROPERTY(bool empty READ isEmpty)
public:
- explicit QtVCardGeneralField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false, int row = 0, QString label = QString(),
+ explicit QtVCardGeneralField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false, int row = 0, QString label = QString(),
bool preferrable = true, bool taggable = true);
virtual ~QtVCardGeneralField();
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardHomeWork.cpp b/Swift/QtUI/QtVCardWidget/QtVCardHomeWork.cpp
index c147c68..7f204ca 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardHomeWork.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardHomeWork.cpp
@@ -14,7 +14,7 @@
namespace Swift {
-QtVCardHomeWork::QtVCardHomeWork() : tagComboBox(0) {
+QtVCardHomeWork::QtVCardHomeWork() : tagComboBox(nullptr) {
}
QtVCardHomeWork::~QtVCardHomeWork() {
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.cpp
index e563ca2..9deb7ba 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.cpp
@@ -24,7 +24,7 @@
namespace Swift {
QtVCardInternetEMailField::QtVCardInternetEMailField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("E-Mail")), emailLineEdit(NULL), emailLabel(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("E-Mail")), emailLineEdit(nullptr), emailLabel(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.h b/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.h
index 63a83e2..07f4f8d 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardInternetEMailField.h
@@ -27,7 +27,7 @@ class QtVCardInternetEMailField : public QtVCardGeneralField, public QtVCardHome
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("E-Mail"), UNLIMITED_INSTANCES, QtVCardInternetEMailField)
- QtVCardInternetEMailField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardInternetEMailField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardInternetEMailField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardJIDField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardJIDField.cpp
index 705ad6b..f93ea06 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardJIDField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardJIDField.cpp
@@ -23,7 +23,7 @@
namespace Swift {
QtVCardJIDField::QtVCardJIDField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("JID"), false, false), jidLabel(NULL), jidLineEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("JID"), false, false), jidLabel(nullptr), jidLineEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardJIDField.h b/Swift/QtUI/QtVCardWidget/QtVCardJIDField.h
index 2e9b4ef..f2df9f9 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardJIDField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardJIDField.h
@@ -26,7 +26,7 @@ class QtVCardJIDField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("JID"), UNLIMITED_INSTANCES, QtVCardJIDField)
- QtVCardJIDField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardJIDField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardJIDField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
index 8b94c42..9e303b7 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.cpp
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h>
#include <boost/algorithm/string.hpp>
@@ -17,7 +23,7 @@
namespace Swift {
QtVCardOrganizationField::QtVCardOrganizationField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Organization"), false, false), organizationLabel(NULL), organizationLineEdit(NULL), unitsTreeWidget(NULL), itemDelegate(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Organization"), false, false), organizationLabel(nullptr), organizationLineEdit(nullptr), unitsTreeWidget(nullptr), itemDelegate(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h
index 6de3167..23e89c0 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardOrganizationField.h
@@ -29,7 +29,7 @@ class QtVCardOrganizationField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Organization"), UNLIMITED_INSTANCES, QtVCardOrganizationField)
- QtVCardOrganizationField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardOrganizationField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardOrganizationField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.h b/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.h
index a0bbb24..ca6a1f3 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardPhotoAndNameFields.h
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <QMenu>
@@ -23,7 +29,7 @@ namespace Swift {
Q_PROPERTY(bool editable READ isEditable WRITE setEditable)
public:
- explicit QtVCardPhotoAndNameFields(QWidget* parent = 0);
+ explicit QtVCardPhotoAndNameFields(QWidget* parent = nullptr);
~QtVCardPhotoAndNameFields();
bool isEditable() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardRoleField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardRoleField.cpp
index 2881932..e9e29ad 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardRoleField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardRoleField.cpp
@@ -21,7 +21,7 @@
namespace Swift {
QtVCardRoleField::QtVCardRoleField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Role"), false, false), roleLineEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Role"), false, false), roleLineEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardRoleField.h b/Swift/QtUI/QtVCardWidget/QtVCardRoleField.h
index 40b5d0b..a507fef 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardRoleField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardRoleField.h
@@ -26,7 +26,7 @@ class QtVCardRoleField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Role"), UNLIMITED_INSTANCES, QtVCardRoleField)
- QtVCardRoleField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardRoleField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardRoleField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
index 4af2fa3..9421016 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.cpp
@@ -19,7 +19,7 @@
namespace Swift {
QtVCardTelephoneField::QtVCardTelephoneField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")), telephoneLineEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Telephone")), telephoneLineEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.h b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.h
index 1a08a5a..13bb232 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardTelephoneField.h
@@ -27,7 +27,7 @@ class QtVCardTelephoneField : public QtVCardGeneralField, public QtVCardHomeWork
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Telephone"), UNLIMITED_INSTANCES, QtVCardTelephoneField)
- QtVCardTelephoneField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardTelephoneField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardTelephoneField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTitleField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardTitleField.cpp
index 5da5763..14c3813 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardTitleField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardTitleField.cpp
@@ -21,7 +21,7 @@
namespace Swift {
QtVCardTitleField::QtVCardTitleField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Title"), false, false), titleLineEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("Title"), false, false), titleLineEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardTitleField.h b/Swift/QtUI/QtVCardWidget/QtVCardTitleField.h
index ff2a04e..0ea3772 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardTitleField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardTitleField.h
@@ -26,7 +26,7 @@ class QtVCardTitleField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("Title"), UNLIMITED_INSTANCES, QtVCardTitleField)
- QtVCardTitleField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardTitleField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardTitleField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardURLField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardURLField.cpp
index 8abc46e..153b897 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardURLField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardURLField.cpp
@@ -24,7 +24,7 @@
namespace Swift {
QtVCardURLField::QtVCardURLField(QWidget* parent, QGridLayout *layout, bool editable) :
- QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("URL"), false, false), urlLabel(NULL), urlLineEdit(NULL) {
+ QtVCardGeneralField(parent, layout, editable, layout->rowCount(), tr("URL"), false, false), urlLabel(nullptr), urlLineEdit(nullptr) {
connect(this, SIGNAL(editableChanged(bool)), SLOT(handleEditibleChanged(bool)));
}
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardURLField.h b/Swift/QtUI/QtVCardWidget/QtVCardURLField.h
index a1ffacd..3830a7b 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardURLField.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardURLField.h
@@ -26,7 +26,7 @@ class QtVCardURLField : public QtVCardGeneralField {
public:
GENERIC_QT_VCARD_FIELD_INFO(tr("URL"), UNLIMITED_INSTANCES, QtVCardURLField)
- QtVCardURLField(QWidget* parent = 0, QGridLayout* layout = 0, bool editable = false);
+ QtVCardURLField(QWidget* parent = nullptr, QGridLayout* layout = nullptr, bool editable = false);
virtual ~QtVCardURLField();
virtual bool isEmpty() const;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp b/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp
index 712cedf..fffd4b3 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp
@@ -227,8 +227,8 @@ VCard::ref QtVCardWidget::getVCard() {
vcard->clearAddressLabels();
- QtVCardBirthdayField* bdayField = NULL;
- QtVCardDescriptionField* descriptionField = NULL;
+ QtVCardBirthdayField* bdayField = nullptr;
+ QtVCardDescriptionField* descriptionField = nullptr;
foreach(QtVCardGeneralField* field, fields) {
QtVCardInternetEMailField* emailField;
@@ -310,7 +310,7 @@ VCard::ref QtVCardWidget::getVCard() {
}
void QtVCardWidget::addField() {
- QAction* action = NULL;
+ QAction* action = nullptr;
if ((action = dynamic_cast<QAction*>(sender()))) {
boost::shared_ptr<QtVCardFieldInfo> fieldInfo = actionFieldInfo[action];
QWidget* newField = fieldInfo->createFieldInstance(this, ui->cardFields, true);
@@ -325,7 +325,7 @@ void QtVCardWidget::addField() {
void QtVCardWidget::removeField(QtVCardGeneralField *field) {
int sameFields = 0;
- QtVCardGeneralField* fieldToChange = NULL;
+ QtVCardGeneralField* fieldToChange = nullptr;
foreach (QtVCardGeneralField* vcardField, fields) {
if ((vcardField != field) && (typeid(*vcardField) == typeid(*field))) {
sameFields++;
@@ -361,7 +361,7 @@ int QtVCardWidget::fieldTypeInstances(boost::shared_ptr<QtVCardFieldInfo> fieldT
void layoutDeleteChildren(QLayout *layout) {
while(layout->count() > 0) {
QLayoutItem* child;
- if ((child = layout->takeAt(0)) != 0) {
+ if ((child = layout->takeAt(0)) != nullptr) {
if (child->layout()) {
layoutDeleteChildren(child->layout());
}
@@ -403,7 +403,7 @@ void QtVCardWidget::clearEmptyFields() {
void QtVCardWidget::appendField(QtVCardGeneralField *field) {
connect(field, SIGNAL(deleteField(QtVCardGeneralField*)), SLOT(removeField(QtVCardGeneralField*)));
- QtVCardGeneralField* fieldToChange = NULL;
+ QtVCardGeneralField* fieldToChange = nullptr;
foreach (QtVCardGeneralField* vcardField, fields) {
if (typeid(*vcardField) == typeid(*field)) {
fieldToChange = vcardField;
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardWidget.h b/Swift/QtUI/QtVCardWidget/QtVCardWidget.h
index 95283c5..76fc46c 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardWidget.h
+++ b/Swift/QtUI/QtVCardWidget/QtVCardWidget.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -34,7 +34,7 @@ namespace Swift {
Q_PROPERTY(bool editable READ isEditable WRITE setEditable)
public :
- explicit QtVCardWidget(QWidget* parent = 0);
+ explicit QtVCardWidget(QWidget* parent = nullptr);
~QtVCardWidget();
bool isEditable() const;