work save

This commit is contained in:
royqh1979@gmail.com 2021-08-23 11:09:59 +08:00
parent efef9c35f4
commit 5bcb19805e
2 changed files with 27 additions and 1 deletions

View File

@ -277,7 +277,32 @@ void ClassBrowserModel::filterChildren(ClassBrowserNode *node, const StatementMa
// filtered.Sort(@CompareByAlpha); // filtered.Sort(@CompareByAlpha);
// end else if sortByType then begin // end else if sortByType then begin
// filtered.Sort(@CompareByType); // filtered.Sort(@CompareByType);
// end; // end;
}
PStatement ClassBrowserModel::createDummy(PStatement statement)
{
PStatement result = std::make_shared<Statement>();
result->parentScope = statement->parentScope;
result->command = statement->command;
result->args = statement->args;
result->noNameArgs = statement->noNameArgs;
result->fullName = statement->fullName;
result->kind = statement->kind;
result->type = statement->type;
result->value = statement->value;
result->scope = statement->scope;
result->classScope = statement->classScope;
result->inProject = statement->inProject;
result->inSystemHeader = statement->inSystemHeader;
result->isStatic = statement->isStatic;
result->isInherited = statement->isInherited;
result->fileName = mCurrentFile;
result->definitionFileName = mCurrentFile;
result->line = 0;
result->definitionLine = 0;
mDummyStatements.insert(result->fullName,result);
return result;
} }

View File

@ -37,6 +37,7 @@ private:
void addChild(ClassBrowserNode* node, PStatement statement); void addChild(ClassBrowserNode* node, PStatement statement);
void addMembers(const QSet<QString>& includedFiles); void addMembers(const QSet<QString>& includedFiles);
void filterChildren(ClassBrowserNode * node, const StatementMap& statements); void filterChildren(ClassBrowserNode * node, const StatementMap& statements);
PStatement createDummy(PStatement statement);
private: private:
ClassBrowserNode * mRoot; ClassBrowserNode * mRoot;
QHash<QString,PStatement> mDummyStatements; QHash<QString,PStatement> mDummyStatements;