[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdewebdev/quanta
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-06-12 16:15:24
Message-ID: 1118592924.920321.21920.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 424648 by amantia:

Fix entity autocompletion. Still not 100% perfect as I couldn't find the real reason, \
but this should be at least usable.

CCMAIL: carloswoelz@imap-mail.com

 M  +10 -10    quanta.kdevelop  
 M  +18 -7     src/document.cpp  


--- trunk/KDE/kdewebdev/quanta/quanta.kdevelop #424647:424648
@@ -18,7 +18,7 @@
     <projectdirectory>.</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
     <secondaryLanguages/>
-    <versioncontrol>kdevsubversion</versioncontrol>
+    <versioncontrol/>
   </general>
   <kdevautoproject>
     <general>
@@ -166,7 +166,7 @@
     </groups>
     <tree>
       <hidenonprojectfiles>false</hidenonprojectfiles>
-      <hidepatterns/>
+      <hidepatterns></hidepatterns>
       <showvcsfields>true</showvcsfields>
     </tree>
   </kdevfileview>
@@ -189,16 +189,16 @@
   </kdevdoctreeview>
   <kdevdebugger>
     <general>
-      <dbgshell></dbgshell>
-      <programargs></programargs>
+      <dbgshell/>
+      <programargs/>
       <gdbpath>/usr/bin/</gdbpath>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
       <floatingtoolbar>false</floatingtoolbar>
       <runappinappdirectory>true</runappinappdirectory>
-      <configGdbScript></configGdbScript>
-      <runShellScript></runShellScript>
-      <runGdbScript></runGdbScript>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
     </general>
     <display>
       <staticmembers>false</staticmembers>
@@ -241,10 +241,10 @@
   </kdevcvs>
   <kdevfilecreate>
     <filetypes>
-      <type icon="" ext="h" name="C++ header" create="template" >
+      <type icon="" ext="h" create="template" name="C++ header" >
         <descr>Quanta speicfic header</descr>
       </type>
-      <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
+      <type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
         <descr>A new empty C++ file.</descr>
       </type>
     </filetypes>
@@ -268,7 +268,7 @@
       <pcs>KDElibs</pcs>
     </references>
     <creategettersetter>
-      <prefixGet></prefixGet>
+      <prefixGet/>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
       <parameterName>theValue</parameterName>
--- trunk/KDE/kdewebdev/quanta/src/document.cpp #424647:424648
@@ -738,6 +738,15 @@
   if (completion->type == "charCompletion")
   {
     *string = completion->userdata;
+    uint line, col;
+    viewCursorIf->cursorPositionReal(&line, &col);
+    QString s2 = editIf->textLine(line).left(col);
+    int pos = s2.findRev('&');
+    if (pos != -1)
+    {
+      s2 = s2.mid(pos + 1);
+      string->remove(s2);
+    }
     string->append(";");
   } else
   if ( completion->type == "attributeValue")
@@ -984,13 +993,15 @@
   if (!handled)
   {
     QString s = editIf->textLine(line).left(column + 1);
-    if (s.endsWith("&"))
+    int pos = s.findRev('&');
+    if (pos != -1)
     {
-        //complete character codes
-        showCodeCompletions( getCharacterCompletions("") );
-        handled = true;
+      //complete character codes
+      s = s.mid(pos + 1);
+      showCodeCompletions(getCharacterCompletions(s));
+      handled = true;
     }
-  }
+  } 
  return handled;
 }
 
@@ -1427,7 +1438,7 @@
     if (tag->type == "entity")
     {
       QString tagName = tag->name(true);
-      if (tagName.upper().startsWith(startsWith) || startsWith.isEmpty())
+      if (tagName.upper().startsWith(startsWith.upper()) || startsWith.isEmpty())
       {
         completion.text = tagName;
         completion.userdata = tagName;
@@ -1456,7 +1467,7 @@
     completion.text = s + " : " + completion.text.left(begin -2) + " - " + \
completion.text.mid(begin + length + 1);  if (s.startsWith(startsWith))
     {
-      completion.userdata = startsWith + "|" + s.mid(startsWith.length());
+      completion.userdata = s.mid(startsWith.length());
       completions->append( completion );
     }
   }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic