Version: 3.0.0 (using KDE 3.2.90 (CVS >= 20040117), compiled sources) Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.4.21-99-athlon On the Code Snippets configuration page, selecting another delimiter than the predefined 'S' has no effect. The code snippets tool still only tries to resolve $-delimited text as variables. I tested this on snippets which already contained $-delimited text, existing snippets as well as new added ones.
*** Bug has been marked as fixed ***.
Sorry, this was the wrong one closed. Reopening.
Created attachment 5947 [details] fixes bug in getting the delimiter from the configuration hi, this patch fixes the bug#75340. The problem was that I'd forgotten to retrieve the current delimiter from the configuration. That's why the default '$' was used all the time. Can someone please commit it to CVS, thank. Greets Robert
CVS commit by dagerbo: Applied Robert Gruber's patch. Thanks! CCMAIL: 75340-done@bugs.kde.org M +6 -6 snippet_widget.cpp 1.6 M +1 -1 snippet_widget.h 1.3 --- kdevelop/parts/snippet/snippet_widget.cpp #1.5:1.6 @@ -148,5 +148,5 @@ void SnippetWidget::slotEdit() /*! On a DoubleClick the clicked snippet gets inserted at the - aktual cursor position of the active view + current cursor position of the active view */ void SnippetWidget::slotListDblClicked(QListViewItem * item, const QPoint &, int) @@ -167,6 +167,6 @@ void SnippetWidget::slotListDblClicked(Q //OK, now we've got the clicked snippet - //process variables if any and then insert into the active view - insertIntoActivView( parseText(pSnippet->getText()) ); + //process variables if any, then insert into the active view + insertIntoActiveView( parseText(pSnippet->getText(), _SnippetConfig.getDelimiter()) ); } @@ -190,8 +190,8 @@ SnippetItem * SnippetWidget::pFindByName /*! - \fn SnippetWidget::insertIntoActivView(QString text) + \fn SnippetWidget::insertIntoActiveView(QString text) Inserts the parameter text into the activ view */ -void SnippetWidget::insertIntoActivView(QString text) +void SnippetWidget::insertIntoActiveView(QString text) { //get the interfaces for the KTexteditor parts @@ -371,5 +371,5 @@ void SnippetWidget::showPopupMenu( QList -// fn SnippetWidget::parseText(QString text) +// fn SnippetWidget::parseText(QString text, QString del) /*! This function is used to parse the given QString for variables. If found the user will be prompted --- kdevelop/parts/snippet/snippet_widget.h #1.2:1.3 @@ -59,5 +59,5 @@ protected: private: - void insertIntoActivView(QString text); + void insertIntoActiveView(QString text); QString parseText(QString text, QString del="$"); bool showMultiVarDialog(QMap<QString, QString> * map, QMap<QString, QString> * mapSave,