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

List:       kde-commits
Subject:    kdelibs
From:       Anders Lund <anders () alweb ! dk>
Date:       2005-01-11 11:58:40
Message-ID: 20050111115840.89DF91BA78 () office ! kde ! org
[Download RAW message or body]

CVS commit by alund: 

Allow any character but "}" and whitespace in macro words


  M +1 -1      interfaces/ktexteditor/templateinterface.cpp   1.6
  M +2 -1      interfaces/ktexteditor/templateinterface.h   1.8
  M +1 -1      kate/part/katetemplatehandler.cpp   1.9


--- kdelibs/kate/part/katetemplatehandler.cpp  #1.8:1.9
@@ -55,5 +55,5 @@ KateTemplateHandler::KateTemplateHandler
   l->append(hlr);*/
   QValueList<KateTemplateHandlerPlaceHolderInfo> buildList;
-  QRegExp rx( "([$%])\\{([a-zA-Z0-9_]+)\\}" );
+  QRegExp rx( "([$%])\\{([^}\\s]+)\\}" );
   rx.setMinimal( true );
   int pos = 0;

--- kdelibs/interfaces/ktexteditor/templateinterface.cpp  #1.5:1.6
@@ -143,5 +143,5 @@ bool TemplateInterface::insertTemplateTe
   QMap<QString, QString> enhancedInitValues( initialValues );
 
-  QRegExp rx( "[$%]\\{([a-zA-Z0-9_]+)\\}" );
+  QRegExp rx( "[$%]\\{([^}\\s]+)\\}" );
   rx.setMinimal( true );
   int pos = 0;

--- kdelibs/interfaces/ktexteditor/templateinterface.h  #1.7:1.8
@@ -45,5 +45,6 @@ class KTEXTEDITOR_EXPORT TemplateInterfa
     /**
      * Parses @p templateString for macros in the form [$%]{NAME} and finds
-     * the value corresponding to NAME if any.
+     * the value corresponding to NAME if any. The NAME string may contain
+     * any non-whitespace character execpt '}'
      * @param map a map with the keys for the macros to expand. keys with a value
      * are ignored.


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

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