diff options
author | Zhang Hao <zhanghao@uniontech.com> | 2021-10-18 17:28:39 +0800 |
---|---|---|
committer | Zhang Hao <zhanghao@uniontech.com> | 2021-10-18 19:08:25 +0800 |
commit | 74ca5ebec9bf10289393553c2a591977c9268b07 (patch) | |
tree | 346a41903bbf55055e8b76f3b9c7ab5533b40528 /src/linguist/linguist | |
parent | 0099481761e8c52236aaa3f71d10dad34391e86f (diff) | |
download | qttools-74ca5ebec9bf10289393553c2a591977c9268b07.tar.gz |
Replace 0 with nullptr
We know that c++11 uses nullptr to replace 0,
so we replace 0 with nullptr in the project.
Change-Id: I52e3b70f58c477414ad8187e3d3cdae25408ecc7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/linguist/linguist')
-rw-r--r-- | src/linguist/linguist/mainwindow.cpp | 4 | ||||
-rw-r--r-- | src/linguist/linguist/messageeditor.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp index 2dd2b7615..e0b214a3e 100644 --- a/src/linguist/linguist/mainwindow.cpp +++ b/src/linguist/linguist/mainwindow.cpp @@ -1501,7 +1501,7 @@ void MainWindow::selectedMessageChanged(const QModelIndex &sortedIndex, const QM } int model = -1; - MessageItem *m = 0; + MessageItem *m = nullptr; QModelIndex index = m_sortedMessagesModel->mapToSource(sortedIndex); if (index.isValid()) { model = (index.column() && (index.column() - 1 < m_dataModel->modelCount())) ? @@ -2029,7 +2029,7 @@ void MainWindow::doUpdateLatestModel(int model) m_currentIndex = MultiDataIndex(model, m_currentIndex.context(), m_currentIndex.message()); bool enable = false; bool enableRw = false; - MessageItem *item = 0; + MessageItem *item = nullptr; if (model >= 0) { enable = true; if (m_dataModel->isModelWritable(model)) diff --git a/src/linguist/linguist/messageeditor.cpp b/src/linguist/linguist/messageeditor.cpp index 1a126da7a..03659ad9b 100644 --- a/src/linguist/linguist/messageeditor.cpp +++ b/src/linguist/linguist/messageeditor.cpp @@ -386,7 +386,7 @@ void MessageEditor::resetSelection() disconnect(fte, &FormatTextEdit::editorDestroyed, this, &MessageEditor::editorDestroyed); } - m_selectionHolder = 0; + m_selectionHolder = nullptr; #ifndef QT_NO_CLIPBOARD updateCanCutCopy(); #endif |