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

List:       kwrite-devel
Subject:    KTextEditor::SearchInterface
From:       Mihai Cosmin <yonutix.mc () gmail ! com>
Date:       2011-12-19 20:27:21
Message-ID: CANnCrX3FiZgkFemFqiqW8vp5WE+2ETqQ+W48b_Xb2qk-d9gk6g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I don't really understand how KTextEditor::SearchInterface::searchText
 method is used when it searches for regular expressions.When I use it, it
always returns a QVector with only one element(KTextEditor::Range(-1, -1,
-1, -1) or the range of the first match).I need it to return a QVector with
all matching ranges in the document.I don't think I'm using it right, some
help would be more than welcomed, or is there another search interface that
i can use?Here is how i use it:
KTextEditor::SearchInterface *sface=
qobject_cast<KTextEditor::SearchInterface*>(kd);
    sface->searchText(KTextEditor::Range(from,
to), regexExpression,  KTextEditor::Search::Regex);
I want to make a good XML Edit plugin and I'm facing this problem every
time I want to advance.

Thank you,
Cosmin Mihai

[Attachment #5 (text/html)]

Hi,<div><br></div><div>I don&#39;t really understand how \
KTextEditor::SearchInterface::searchText  method is used when it searches for regular \
expressions.When I use it, it always returns a QVector with only one \
element(KTextEditor::Range(-1, -1, -1, -1) or the range of the first match).I need it \
to return a QVector with all matching ranges in the document.I don&#39;t think \
I&#39;m using it right, some help would be more than welcomed, or is there another \
search interface that i can use?Here is how i use it:</div> \
<div><div>KTextEditor::SearchInterface *sface= \
qobject_cast&lt;KTextEditor::SearchInterface*&gt;(kd);</div><div>    \
sface-&gt;searchText(KTextEditor::Range(from, to), regexExpression,  \
KTextEditor::Search::Regex);</div></div> <div>I want to make a good XML Edit plugin \
and I&#39;m facing this problem every time I want to \
advance.</div><div><br></div><div>Thank you,</div><div>Cosmin Mihai</div>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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