mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: When inserting new code item to T++, qualification are removed (e.g. Upp::String -> String)
This commit is contained in:
parent
162be7b332
commit
1babe51b5e
1 changed files with 23 additions and 1 deletions
|
|
@ -208,6 +208,27 @@ String DecoratedItem(const String& name, const String& pretty)
|
|||
return qtf + "]";
|
||||
}
|
||||
|
||||
String RemoveQualifications(const char *s)
|
||||
{
|
||||
String r;
|
||||
const char *s0 = s;
|
||||
while(*s) {
|
||||
if(iscib(*s)) {
|
||||
r.Cat(s0, s);
|
||||
s0 = s;
|
||||
while(iscid(*s) || *s == ':') {
|
||||
if(*s == ':')
|
||||
s0 = s + 1;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
else
|
||||
s++;
|
||||
}
|
||||
r.Cat(s0, s);
|
||||
return r;
|
||||
}
|
||||
|
||||
String CreateQtf(const AnnotationItem& m, const String& lang, bool onlyhdr = false)
|
||||
{
|
||||
String qtf;
|
||||
|
|
@ -216,7 +237,8 @@ String CreateQtf(const AnnotationItem& m, const String& lang, bool onlyhdr = fal
|
|||
qtf << "[s4 &]";
|
||||
String st = str ? "[s2;" : "[s1;";
|
||||
String k = st + ":" + DeQtf(m.id) + ": ";
|
||||
String pretty = m.pretty;
|
||||
String pretty = RemoveQualifications(m.pretty);
|
||||
|
||||
if(IsStruct(m.kind)) {
|
||||
pretty = m.pretty0; // because otherwise it is just a name
|
||||
int q = pretty.ReverseFind("{");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue