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/QtChatWindow.cpp
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/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 95d643c..6cb2292 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -65,11 +65,11 @@ QtChatWindow::QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventSt
settings_ = settings;
unreadCount_ = 0;
isOnline_ = true;
- completer_ = NULL;
- affiliationEditor_ = NULL;
+ completer_ = nullptr;
+ affiliationEditor_ = nullptr;
theme_ = theme;
isCorrection_ = false;
- labelModel_ = NULL;
+ labelModel_ = nullptr;
correctionEnabled_ = Maybe;
fileTransferEnabled_ = Maybe;
updateTitleWithUnreadCount();
@@ -559,7 +559,7 @@ void QtChatWindow::handleCursorPositionChanged() {
}
void QtChatWindow::show() {
- if (parentWidget() == NULL) {
+ if (parentWidget() == nullptr) {
QWidget::show();
}
emit windowOpening();
@@ -685,14 +685,14 @@ void QtChatWindow::handleTextInputLostFocus() {
void QtChatWindow::handleActionButtonClicked() {
QMenu contextMenu;
- QAction* changeSubject = NULL;
- QAction* configure = NULL;
- QAction* affiliations = NULL;
- QAction* destroy = NULL;
- QAction* invite = NULL;
+ QAction* changeSubject = nullptr;
+ QAction* configure = nullptr;
+ QAction* affiliations = nullptr;
+ QAction* destroy = nullptr;
+ QAction* invite = nullptr;
- QAction* block = NULL;
- QAction* unblock = NULL;
+ QAction* block = nullptr;
+ QAction* unblock = nullptr;
if (availableRoomActions_.empty()) {
if (blockingState_ == IsBlocked) {
@@ -748,7 +748,7 @@ void QtChatWindow::handleActionButtonClicked() {
}
}
- QAction* bookmark = NULL;
+ QAction* bookmark = nullptr;
if (isMUC_) {
if (roomBookmarkState_ == RoomNotBookmarked) {
bookmark = contextMenu.addAction(tr("Bookmark this room..."));
@@ -760,7 +760,7 @@ void QtChatWindow::handleActionButtonClicked() {
}
QAction* result = contextMenu.exec(QCursor::pos());
- if (result == NULL) {
+ if (result == nullptr) {
/* Skip processing. Note that otherwise, because the actions could be null they could match */
}
else if (result == changeSubject) {