Skip to content

Commit

Permalink
Merge branch 'master' of github.com:doxygen/doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Feb 21, 2024
2 parents edb8e9b + 6d05f80 commit 9b51550
Show file tree
Hide file tree
Showing 22 changed files with 117 additions and 118 deletions.
2 changes: 1 addition & 1 deletion addon/doxyparse/doxyparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void printNumberOfConditionalPaths(const MemberDef* md) {
}

static int isPartOfCStruct(const MemberDef * md) {
return is_c_code && md->getClassDef() != NULL;
return is_c_code && md->getClassDef() != nullptr;
}

std::string sanitizeString(std::string data) {
Expand Down
4 changes: 2 additions & 2 deletions addon/doxywizard/config_doxyw.l
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ static FILE *tryPath(const QString &path,const QString &fileName)
if (fi.exists() && fi.isFile())
{
FILE *f = fopen(absName.toLocal8Bit(),"r");
if (f==NULL)
if (f==nullptr)
config_err("could not open file %s for reading\n",qPrintable(absName));
else
return f;
}
return NULL;
return nullptr;
}

static FILE *findFile(const QString &fileName)
Expand Down
4 changes: 2 additions & 2 deletions addon/doxywizard/doxywizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ void MainWindow::showHtmlOutput()
// TODO: the following doesn't seem to work with IE
#ifdef _WIN32
//QString indexUrl(QString::fromLatin1("file:///"));
ShellExecute(NULL, L"open", (LPCWSTR)fi.absoluteFilePath().utf16(), NULL, NULL, SW_SHOWNORMAL);
ShellExecute(nullptr, L"open", (LPCWSTR)fi.absoluteFilePath().utf16(), nullptr, nullptr, SW_SHOWNORMAL);
#else
QString indexUrl(QString::fromLatin1("file://"));
indexUrl+=fi.absoluteFilePath();
Expand All @@ -693,7 +693,7 @@ void MainWindow::saveLog()
}
else
{
QMessageBox::warning(0,tr("Warning"),
QMessageBox::warning(nullptr,tr("Warning"),
tr("Cannot open file ")+fn+tr(" for writing. Nothing saved!"),tr("ok"));
}
}
Expand Down
8 changes: 4 additions & 4 deletions addon/doxywizard/expert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void Expert::createTopics(const QDomElement &rootElem)
QString setting = childElem.attribute(SA("setting"));
if (setting.isEmpty() || IS_SUPPORTED(setting.toLatin1()))
{
items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(name)));
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(name)));
QWidget *widget = createTopicWidget(childElem);
m_topics[name] = widget;
m_topicStack->addWidget(widget);
Expand Down Expand Up @@ -704,7 +704,7 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
(setting.isEmpty() || IS_SUPPORTED(setting.toLatin1())))
{
Input *parentOption = m_options[dependsOn];
if (parentOption==0)
if (parentOption==nullptr)
{
printf("%s has depends=%s that is not valid\n",
qPrintable(id),qPrintable(dependsOn));
Expand Down Expand Up @@ -940,15 +940,15 @@ static bool getBoolOption(
const QHash<QString,Input*>&model,const QString &name)
{
Input *option = model[name];
Q_ASSERT(option!=0);
Q_ASSERT(option!=nullptr);
return stringVariantToBool(option->value());
}

static QString getStringOption(
const QHash<QString,Input*>&model,const QString &name)
{
Input *option = model[name];
Q_ASSERT(option!=0);
Q_ASSERT(option!=nullptr);
return option->value().toString();
}

Expand Down
18 changes: 9 additions & 9 deletions addon/doxywizard/inputstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ InputString::InputString( QGridLayout *layout,int &row,
m_absPath(absPath==QString::fromLatin1("1"))
{
m_lab = new HelpLabel(id);
m_brFile = 0;
m_brDir = 0;
m_brFile = nullptr;
m_brDir = nullptr;
if (m==StringFixed)
{
layout->addWidget( m_lab, row, 0 );
m_com = new NoWheelComboBox;
layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft );
m_le=0;
m_br=0;
m_im=0;
m_le=nullptr;
m_br=nullptr;
m_im=nullptr;
row++;
}
else
{
layout->addWidget( m_lab, row, 0 );
m_le = new QLineEdit;
m_le->setText( s );
m_im = 0;
m_im = nullptr;
//layout->setColumnMinimumWidth(2,150);
if (m==StringFile || m==StringDir || m==StringImage || m==StringFileDir)
{
Expand Down Expand Up @@ -91,10 +91,10 @@ InputString::InputString( QGridLayout *layout,int &row,
else
{
layout->addWidget( m_le, row, 1, 1, 2 );
m_br=0;
m_im=0;
m_br=nullptr;
m_im=nullptr;
}
m_com=0;
m_com=nullptr;
row++;
}

Expand Down
4 changes: 2 additions & 2 deletions addon/doxywizard/inputstrlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ InputStrList::InputStrList( QGridLayout *layout,int &row,
//m_lb->setMinimumSize(400,100);
foreach (QString s, m_strList) m_lb->addItem(s);

m_brFile=0;
m_brDir=0;
m_brFile=nullptr;
m_brDir=nullptr;
if (lm!=ListString)
{
if (lm&ListFile)
Expand Down
8 changes: 4 additions & 4 deletions addon/doxywizard/wizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,10 +1323,10 @@ Wizard::Wizard(const QHash<QString,Input*> &modelData, QWidget *parent) :
m_treeWidget->setColumnCount(1);
m_treeWidget->setHeaderLabels(QStringList() << QString::fromLatin1("Topics"));
QList<QTreeWidgetItem*> items;
items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Project"))));
items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Mode"))));
items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Output"))));
items.append(new QTreeWidgetItem((QTreeWidget*)0,QStringList(tr("Diagrams"))));
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Project"))));
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Mode"))));
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Output"))));
items.append(new QTreeWidgetItem((QTreeWidget*)nullptr,QStringList(tr("Diagrams"))));
m_treeWidget->insertTopLevelItems(0,items);

m_topicStack = new QStackedWidget;
Expand Down
2 changes: 1 addition & 1 deletion src/clangparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ std::string ClangTUParser::lookup(uint32_t line,const char *symbol)
{
//printf("ClangParser::lookup(%d,%s)\n",line,symbol);
std::string result;
if (symbol==0) return result;
if (symbol==nullptr) return result;
bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return result;

Expand Down
2 changes: 1 addition & 1 deletion src/dirdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ void DirDefImpl::addUsesDependency(const DirDef *dir,const FileDef *srcFd,
if (usedDir) // dir dependency already present
{
const FilePair *usedPair = usedDir->findFilePair(FilePair::key(srcFd,dstFd));
if (usedPair==0) // new file dependency
if (usedPair==nullptr) // new file dependency
{
AUTO_TRACE_ADD("{} => {} new file dependency",srcFd->name(),dstFd->name());
usedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
Expand Down
2 changes: 1 addition & 1 deletion src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ static void findUsingDirectives(const Entry *root)
{
scopeOffset=0;
}
} while (scopeOffset>=0 && usingNd==0);
} while (scopeOffset>=0 && usingNd==nullptr);

if (usingNd==nullptr && nd) // not found, try used namespaces in this scope
// or in one of the parent namespace scopes
Expand Down
4 changes: 2 additions & 2 deletions src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4533,7 +4533,7 @@ static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
{
for (const auto &cd : *Doxygen::conceptLinkedMap)
{
if ((cd->getOuterScope()==0 ||
if ((cd->getOuterScope()==nullptr ||
cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
)
{
Expand Down Expand Up @@ -4861,7 +4861,7 @@ static void writeIndex(OutputList &ol)
if (!Config_getString(PROJECT_NUMBER).isEmpty())
{
ol.startProjectNumber();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,Config_getString(PROJECT_NUMBER),FALSE,FALSE,
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),FALSE,FALSE,
QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endProjectNumber();
}
Expand Down
12 changes: 6 additions & 6 deletions src/membergroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ void MemberGroup::insertMember(MemberDef *md)
// md->getSectionList(),
// md,qPrint(md->name()));

const MemberDef *firstMd = memberList->empty() ? 0 : memberList->front();
const MemberDef *firstMd = memberList->empty() ? nullptr : memberList->front();
if (inSameSection && firstMd &&
firstMd->getSectionList(m_container)!=md->getSectionList(m_container))
{
inSameSection=FALSE;
}
else if (inDeclSection==0)
else if (inDeclSection==nullptr)
{
inDeclSection = const_cast<MemberList*>(md->getSectionList(m_container));
//printf("inDeclSection=%p type=%d\n",inDeclSection,inDeclSection->listType());
Expand Down Expand Up @@ -139,7 +139,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
MemberList mml(lt,MemberListContainer::Class);
mml.push_back(md);
mml.countDecMembers();
mml.writePlainDeclarations(ol,false,cd,0,0,0,0,0,inheritedFrom,inheritId);
mml.writePlainDeclarations(ol,false,cd,nullptr,nullptr,nullptr,nullptr,0,inheritedFrom,inheritId);
}
}
}
Expand Down Expand Up @@ -200,10 +200,10 @@ const Definition *MemberGroup::memberContainer() const
{
const MemberDef *md = memberList->front();
ctx = md->getClassDef();
if (ctx==0) ctx = md->getNamespaceDef();
if (ctx==0) ctx = md->getFileDef();
if (ctx==nullptr) ctx = md->getNamespaceDef();
if (ctx==nullptr) ctx = md->getFileDef();
}
return ctx==0 ? m_container : ctx;
return ctx==nullptr ? m_container : ctx;
}

int MemberGroup::countInheritableMembers(const ClassDef *inheritedFrom) const
Expand Down
20 changes: 10 additions & 10 deletions src/memberlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, bool inGroup,
{
//printf(">>> Member '%s' type=%d visible=%d inheritedFrom=%p\n",
// qPrint(md->name()),md->memberType(),md->isBriefSectionVisible(),(void*)inheritedFrom);
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
if ((inheritedFrom==nullptr || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible())
{
//printf(">>> rendering\n");
Expand Down Expand Up @@ -451,7 +451,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, bool inGroup,
break;
}
case MemberType_Friend:
if (inheritedFrom==0)
if (inheritedFrom==nullptr)
{
if (first)
{
Expand Down Expand Up @@ -512,10 +512,10 @@ void MemberList::writeDeclarations(OutputList &ol,
QCString inheritId;

const Definition *ctx = cd;
if (ctx==0 && nd) ctx = nd;
if (ctx==0 && gd) ctx = gd;
if (ctx==0 && mod) ctx = mod;
if (ctx==0 && fd) ctx = fd;
if (ctx==nullptr && nd) ctx = nd;
if (ctx==nullptr && gd) ctx = gd;
if (ctx==nullptr && mod) ctx = mod;
if (ctx==nullptr && fd) ctx = fd;

//printf("%p: MemberList::writeDeclaration(title='%s',subtitle='%s')=%d inheritedFrom=%p\n",
// (void*)this,qPrint(title),qPrint(subtitle),numDecMembers(),(void*)inheritedFrom);
Expand Down Expand Up @@ -563,7 +563,7 @@ void MemberList::writeDeclarations(OutputList &ol,
if (!subtitle.stripWhiteSpace().isEmpty())
{
ol.startMemberSubtitle();
ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,
ol.generateDoc("[generated]",-1,ctx,nullptr,subtitle,FALSE,FALSE,
QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberSubtitle();
}
Expand All @@ -579,7 +579,7 @@ void MemberList::writeDeclarations(OutputList &ol,
// 2. This might need to be repeated below for memberGroupLists
if (optimizeVhdl) // use specific declarations function
{
VhdlDocGen::writeVhdlDeclarations(this,ol,0,cd,0,0,0);
VhdlDocGen::writeVhdlDeclarations(this,ol,nullptr,cd,nullptr,nullptr,nullptr);
}
else
{
Expand All @@ -603,7 +603,7 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc(mg->docFile(),mg->docLine(),mg->memberContainer(),0,mg->documentation()+"\n",FALSE,FALSE,
ol.generateDoc(mg->docFile(),mg->docLine(),mg->memberContainer(),nullptr,mg->documentation()+"\n",FALSE,FALSE,
QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberGroupDocs();
}
Expand Down Expand Up @@ -804,7 +804,7 @@ void MemberList::addListReferences(Definition *def)
for (const auto &imd : m_members)
{
MemberDefMutable *md = toMemberDefMutable(imd);
if (md && !md->isAlias() && (md->getGroupDef()==0 || def->definitionType()==Definition::TypeGroup))
if (md && !md->isAlias() && (md->getGroupDef()==nullptr || def->definitionType()==Definition::TypeGroup))
{
md->addListReference(def);
const MemberVector &enumFields = md->enumFieldList();
Expand Down
4 changes: 2 additions & 2 deletions src/perlmodgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void PerlModOutput::iaddFieldQuotedChar(const QCString &field, char content)

void PerlModOutput::iaddFieldQuotedString(const QCString &field, const QCString &content)
{
if (content == 0)
if (content == nullptr)
return;
iaddField(field);
m_stream->add('\'');
Expand All @@ -248,7 +248,7 @@ void PerlModOutput::iaddFieldQuotedString(const QCString &field, const QCString

void PerlModOutput::iopen(char c, const QCString &s)
{
if (s != 0)
if (s != nullptr)
iaddField(s);
else
continueBlock();
Expand Down
4 changes: 2 additions & 2 deletions src/portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int Portable::system(const QCString &command,const QCString &args,bool commandHa
(LPCWSTR)argsw, /* argument list */
nullptr, /* use current working dir */
SW_HIDE, /* minimize on start-up */
0, /* application instance handle */
nullptr, /* application instance handle */
nullptr, /* ignored: id list */
nullptr, /* ignored: class name */
nullptr, /* ignored: key class */
Expand Down Expand Up @@ -317,7 +317,7 @@ void Portable::setenv(const QCString &name,const QCString &value)
void Portable::unsetenv(const QCString &variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
SetEnvironmentVariable(variable.data(),0);
SetEnvironmentVariable(variable.data(),nullptr);
#else
/* Some systems don't have unsetenv(), so we do it ourselves */
if (variable.isEmpty() || variable.find('=')!=-1)
Expand Down
Loading

0 comments on commit 9b51550

Please sign in to comment.