| Summary: | tags generation with ctags does not works for large file count | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Ralf Habacker <ralf.habacker> |
| Component: | CTags | Assignee: | KDevelop Developers <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | roberto |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Cygwin | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Ralf Habacker
2003-10-16 08:36:30 UTC
The following patch fixes this by using a temporay file list in the same location of the created tags file.
cvs server: Diffing parts/ctags
Index: parts/ctags/ctagspart.cpp
===================================================================
RCS file: /home/kde/kdevelop/parts/ctags/ctagspart.cpp,v
retrieving revision 1.23
diff -u -b -r1.23 ctagspart.cpp
--- parts/ctags/ctagspart.cpp 20 Sep 2003 11:03:46 -0000 1.23
+++ parts/ctags/ctagspart.cpp 16 Oct 2003 06:32:58 -0000
@@ -295,24 +295,37 @@
{
kdDebug(9022) << "create tags file" << endl;
+ QString tagFilesListName = project()->projectDirectory() + "/tags.files";
+
KProcess proc;
proc.setWorkingDirectory( project()->projectDirectory() );
proc << "ctags";
proc << "-n";
proc << "--c++-types=+px";
+ proc << "-L " << tagFilesListName;
+
+ QFile f(tagFilesListName);
+ if (!f.open(IO_WriteOnly)) {
+ return false;
+ }
+
+ QTextStream stream(&f);
QStringList l = project()->allFiles();
QStringList::ConstIterator it;
for (it = l.begin(); it != l.end(); ++it)
{
- proc << *it;
+ stream << *it << endl;
}
+ f.close();
QApplication::setOverrideCursor(Qt::waitCursor);
bool success = proc.start(KProcess::Block);
QApplication::restoreOverrideCursor();
+ f.remove();
+
return success;
}
Roberto Raggi recently changed this behaviour in a similar way the patch does. Indeed he did. Closing as fixed. |