コード例 #1
0
ファイル: branchmodel.cpp プロジェクト: Gardenya/qtcreator
 void insert(const QStringList &path, BranchNode *n)
 {
     BranchNode *current = this;
     for (int i = 0; i < path.count(); ++i) {
         BranchNode *c = current->childOfName(path.at(i));
         if (c)
             current = c;
         else
             current = current->append(new BranchNode(path.at(i)));
     }
     current->append(n);
 }