Bug#2118: still problems with '++' in pathnames [21:25,07.10.99]
Armin L. Schneider
armin at uumail.de.uu.net
Thu Oct 7 19:33:53 UTC 1999
Package: kdevelop
Version: 1.0-19991003
Severity: normal
Bugreport ID : 21:25,07.10.99
Originator : Armin L. Schneider
E-Mail : armin at mingotronic.de
Subject : still problems with '++' in pathnames
Error Class : software bug
Error Location: dialog editor
Priority : low
Bug Description ---------------------------
Create a project in a directory containing '++', e.g '/home/armin/C++/blabla'.
Then create a new dialog and try to generate the sources.
You won't get sources though...
The reason for this is a Regexp-Replacement in '....kdevelop/kdlgedit/kdlgedit.cpp':
abs_filename.replace(QRegExp(prj->getProjectDir()),"");
Please, don't use 'QRegExp' to replace strings in pathnames!!!
How to repeat the error -------------------
See description.
Bugfix or Workaround ----------------------
Apply this little patch:
*** kdlgedit.cpp.old Wed Oct 6 12:02:44 1999
--- kdlgedit.cpp Wed Oct 6 12:06:38 1999
***************
*** 413,419 ****
// normalize it a little bit
abs_filename.replace(QRegExp("///"),"/"); // remove ///
abs_filename.replace(QRegExp("//"),"/"); // remove //
! abs_filename.replace(QRegExp(prj->getProjectDir()),"");
return abs_filename;
}
--- 413,421 ----
// normalize it a little bit
abs_filename.replace(QRegExp("///"),"/"); // remove ///
abs_filename.replace(QRegExp("//"),"/"); // remove //
! abs_filename.remove (0, prj->getProjectDir().length());
! // abs_filename.replace(QRegExp(prj->getProjectDir()),"");
!
return abs_filename;
}
System Information ------------------------
KDevelop version : 1.0-19991003
KDE version : 1.1.1
QT version : 1.44
OS/Distribution : SuSE Linux 6.1
Compiler : gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
More information about the KDevelop-devel
mailing list