forked from qt-creator/qt-creator
CppTools: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr. Change-Id: I951627ba3543faa357f67ee76527518290efe3f1 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -37,7 +37,7 @@ class CPPTOOLS_EXPORT AbstractEditorSupport : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AbstractEditorSupport(CppModelManager *modelmanager, QObject *parent = 0);
|
||||
explicit AbstractEditorSupport(CppModelManager *modelmanager, QObject *parent = nullptr);
|
||||
~AbstractEditorSupport() override;
|
||||
|
||||
/// \returns the contents, encoded as UTF-8
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
explicit ClangDiagnosticConfigsWidget(
|
||||
const ClangDiagnosticConfigsModel &diagnosticConfigsModel = ClangDiagnosticConfigsModel(),
|
||||
const Core::Id &configToSelect = Core::Id(),
|
||||
QWidget *parent = 0);
|
||||
QWidget *parent = nullptr);
|
||||
~ClangDiagnosticConfigsWidget() override;
|
||||
|
||||
Core::Id currentConfigId() const;
|
||||
|
||||
@@ -118,7 +118,7 @@ protected:
|
||||
bool maybeFunction(const CPlusPlus::Name *name) const;
|
||||
|
||||
void checkNamespace(CPlusPlus::NameAST *name);
|
||||
void checkName(CPlusPlus::NameAST *ast, CPlusPlus::Scope *scope = 0);
|
||||
void checkName(CPlusPlus::NameAST *ast, CPlusPlus::Scope *scope = nullptr);
|
||||
CPlusPlus::ClassOrNamespace *checkNestedName(CPlusPlus::QualifiedNameAST *ast);
|
||||
|
||||
void addUse(const Result &use);
|
||||
|
||||
@@ -217,7 +217,7 @@ private:
|
||||
|
||||
QStringRef currentTokenText() const;
|
||||
|
||||
int tokenizeBlock(const QTextBlock &block, bool *endedJoined = 0);
|
||||
int tokenizeBlock(const QTextBlock &block, bool *endedJoined = nullptr);
|
||||
|
||||
void turnInto(int newState);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class CPPTOOLS_EXPORT CppCodeStylePreferences : public TextEditor::ICodeStylePre
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CppCodeStylePreferences(
|
||||
QObject *parent = 0);
|
||||
QObject *parent = nullptr);
|
||||
|
||||
QVariant value() const override;
|
||||
void setValue(const QVariant &) override;
|
||||
|
||||
@@ -48,7 +48,7 @@ class CPPTOOLS_EXPORT CppCompletionAssistProvider : public TextEditor::Completio
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CppCompletionAssistProvider(QObject *parent = 0);
|
||||
CppCompletionAssistProvider(QObject *parent = nullptr);
|
||||
int activationCharSequenceLength() const override;
|
||||
bool isActivationCharSequence(const QString &sequence) const override;
|
||||
bool isContinuationChar(const QChar &c) const override;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
|
||||
public:
|
||||
SymbolSearcher(QObject *parent = 0);
|
||||
SymbolSearcher(QObject *parent = nullptr);
|
||||
~SymbolSearcher() override = 0;
|
||||
virtual void runSearch(QFutureInterface<Core::SearchResultItem> &future) = 0;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
ASTNodePositions(CPlusPlus::AST *_ast) : ast(_ast) {}
|
||||
operator bool() const { return ast; }
|
||||
|
||||
CPlusPlus::AST *ast = 0;
|
||||
CPlusPlus::AST *ast = nullptr;
|
||||
unsigned firstTokenIndex = 0;
|
||||
unsigned lastTokenIndex = 0;
|
||||
unsigned secondToLastTokenIndex = 0;
|
||||
@@ -54,7 +54,7 @@ class CPPTOOLS_EXPORT CppSelectionChanger : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CppSelectionChanger(QObject *parent = 0);
|
||||
explicit CppSelectionChanger(QObject *parent = nullptr);
|
||||
|
||||
enum Direction {
|
||||
ExpandSelection,
|
||||
|
||||
@@ -68,7 +68,7 @@ const CPlusPlus::Macro CPPTOOLS_EXPORT *findCanonicalMacro(const QTextCursor &cu
|
||||
|
||||
enum class CacheUsage { ReadWrite, ReadOnly };
|
||||
|
||||
QString CPPTOOLS_EXPORT correspondingHeaderOrSource(const QString &fileName, bool *wasHeader = 0,
|
||||
QString CPPTOOLS_EXPORT correspondingHeaderOrSource(const QString &fileName, bool *wasHeader = nullptr,
|
||||
CacheUsage cacheUsage = CacheUsage::ReadWrite);
|
||||
void CPPTOOLS_EXPORT switchHeaderSource();
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ class CPPTOOLS_EXPORT FunctionUtils
|
||||
public:
|
||||
static bool isVirtualFunction(const CPlusPlus::Function *function,
|
||||
const CPlusPlus::LookupContext &context,
|
||||
const CPlusPlus::Function **firstVirtual = 0);
|
||||
const CPlusPlus::Function **firstVirtual = nullptr);
|
||||
|
||||
static bool isPureVirtualFunction(const CPlusPlus::Function *function,
|
||||
const CPlusPlus::LookupContext &context,
|
||||
const CPlusPlus::Function **firstVirtual = 0);
|
||||
const CPlusPlus::Function **firstVirtual = nullptr);
|
||||
|
||||
static QList<CPlusPlus::Function *> overrides(CPlusPlus::Function *function,
|
||||
CPlusPlus::Class *functionsClass,
|
||||
|
||||
@@ -90,8 +90,8 @@ public:
|
||||
|
||||
/// Returns the line (1-based) at which the include directive should be inserted.
|
||||
/// On error, -1 is returned.
|
||||
int operator()(const QString &newIncludeFileName, unsigned *newLinesToPrepend = 0,
|
||||
unsigned *newLinesToAppend = 0);
|
||||
int operator()(const QString &newIncludeFileName, unsigned *newLinesToPrepend = nullptr,
|
||||
unsigned *newLinesToAppend = nullptr);
|
||||
|
||||
private:
|
||||
int findInsertLineForVeryFirstInclude(unsigned *newLinesToPrepend, unsigned *newLinesToAppend);
|
||||
|
||||
@@ -55,7 +55,7 @@ class CPPTOOLS_EXPORT ModelManagerTestHelper: public QObject
|
||||
public:
|
||||
typedef ProjectExplorer::Project Project;
|
||||
|
||||
explicit ModelManagerTestHelper(QObject *parent = 0,
|
||||
explicit ModelManagerTestHelper(QObject *parent = nullptr,
|
||||
bool testOnlyForCleanedProjects = true);
|
||||
~ModelManagerTestHelper() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user