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

List:       kwrite-devel
Subject:    XML Edit issues
From:       Mihai Cosmin <yonutix.mc () gmail ! com>
Date:       2011-12-15 9:22:27
Message-ID: CANnCrX0r9PVWiso4V8MSdkpWeh+Az7NYKCSfduFfiJnjPBggog () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

i'm working on XML edit plugin and i have some problems:

1.In the API says that KTextEditor::SearchInterface::searchText returns a
Qvector with all apeareances of a word, still, when i' m using it, it
returns a vector with only one element.
I'm worried that the function searches every time until the end of the
document and i have to search the same thing for many times.

2.I searched for the signal that is emitted when a file is opened, but i
didn't found it.I would need  some help here.

3.When i create a Qvector<KTextEditor::MovingRanges*>, set an attribute to
an element and try to append another element, Kate crashes.Is there
something i should know about that?

For example(Highlight):
    KTextEditor::Attribute::Ptr attr(new KTextEditor::Attribute());
    attr->setBackground(QColor(1, 1, 1, 1));
    mv->setAttribute(attr);
    mv->setZDepth(-10000.0);
    mv->setAttributeOnlyForViews(true);
    m_hilightedRanges.append(mv);//mv is a KTextEditor::MovingRange*, an
element of vec which is Qvector<KTextEditor::MovingRanges*>

and then when i try vec.append(element) it crashes.

Thank you in advance,
Mihai Cosmin

[Attachment #5 (text/html)]

Hello,<br><br>i&#39;m working on XML edit plugin and i have some problems:<=
br><br>1.In the API says that KTextEditor::SearchInterface::searchText retu=
rns a Qvector with all apeareances of a word, still, when i&#39; m using it=
, it returns a vector with only one element.<br>
I&#39;m worried that the function searches every time until the end of the =
document and i have to search the same thing for many times.<br><br>2.I sea=
rched for the signal that is emitted when a file is opened, but i didn&#39;=
t found it.I would need=A0 some help here.<br>
<br>3.When i create a Qvector&lt;KTextEditor::MovingRanges*&gt;, set an att=
ribute to an element and try to append another element, Kate crashes.Is the=
re something i should know about that?<br><br>For example(Highlight):<br>
=A0=A0=A0 KTextEditor::Attribute::Ptr attr(new KTextEditor::Attribute());<b=
r>=A0=A0=A0 attr-&gt;setBackground(QColor(1, 1, 1, 1));<br>=A0=A0=A0 mv-&gt=
;setAttribute(attr);<br>=A0=A0=A0 mv-&gt;setZDepth(-10000.0);<br>=A0=A0=A0 =
mv-&gt;setAttributeOnlyForViews(true);<br>
=A0=A0=A0 m_hilightedRanges.append(mv);//mv is a KTextEditor::MovingRange*,=
 an element of vec which is Qvector&lt;KTextEditor::MovingRanges*&gt;<br><b=
r>and then when i try vec.append(element) it crashes.<br><br>Thank you in a=
dvance,<br>
Mihai Cosmin<br>


_______________________________________________
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