dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
vlp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version
[vlp.git]
/
src
/
help
/
help.cpp
diff --git
a/src/help/help.cpp
b/src/help/help.cpp
index 714589266c167de22ab98d6b6e9a653731118c1e..9645f411e9559827b554d7e5020b70c330e72b80 100644
(file)
--- a/
src/help/help.cpp
+++ b/
src/help/help.cpp
@@
-233,11
+233,12
@@
void HTMLAnalyzer::AnalyzeTag(QString *t)
void HTMLAnalyzer::DumpList()
{
Tag *pom;
void HTMLAnalyzer::DumpList()
{
Tag *pom;
- pom = tags.first();
- while (pom != NULL) {
+ QListIterator<Tag *> tagsIterator(tags);
+
+ while (tagsIterator.hasNext()) {
+ pom = tagsIterator.next();
fprintf(stderr, "%s:%s,%s,%s\n", names[pom->tag_type],
pom->tag_text, pom->tag_link, pom->tag_label);
fprintf(stderr, "%s:%s,%s,%s\n", names[pom->tag_type],
pom->tag_text, pom->tag_link, pom->tag_label);
- pom=tags.takeFirst();
}
}
}
}
@@
-245,12
+246,13
@@
void HTMLAnalyzer::PackLinks()
{
Tag *pom,*pom1;
char s[255];
{
Tag *pom,*pom1;
char s[255];
+ QListIterator<Tag *> tagsIterator(tags);
- pom = tags.first();
- while (pom!=NULL) {
+ while (tagsIterator.hasNext()) {
+ pom = tagsIterator.next();
if ((pom->tag_type == TAG_LINK) ||
(pom->tag_type == TAG_ANCHOR)) {
if ((pom->tag_type == TAG_LINK) ||
(pom->tag_type == TAG_ANCHOR)) {
- pom1 = tags
.takeFirs
t();
+ pom1 = tags
Iterator.nex
t();
strcpy(s, "");
while ((pom1 != NULL) &&
(pom1->tag_type != TAG_LINK_END)) {
strcpy(s, "");
while ((pom1 != NULL) &&
(pom1->tag_type != TAG_LINK_END)) {
@@
-263,7
+265,7
@@
void HTMLAnalyzer::PackLinks()
tags.removeOne(pom1);
pom = tags.current();
} else {
tags.removeOne(pom1);
pom = tags.current();
} else {
- pom = tags
.takeFirs
t();
+ pom = tags
Iterator.nex
t();
}
}
}
}
}
}
@@
-272,14
+274,15
@@
void HTMLAnalyzer::PackLinks()
Tag *HTMLAnalyzer::CheckTag(int x,int y)
{
Tag *pom;
Tag *HTMLAnalyzer::CheckTag(int x,int y)
{
Tag *pom;
- pom=tags.first();
- while (pom != NULL) {
+ QListIterator<Tag *> tagsIterator(tags);
+
+ while (tagsIterator.hasNext()) {
+ pom = tagsIterator.next();
if (pom->tag_type==TAG_LINK)
if ((x >= pom->x) && (x <= pom->x + pom->w) &&
(y >= pom->y) && (y <= pom->y + pom->h)) {
return pom;
}
if (pom->tag_type==TAG_LINK)
if ((x >= pom->x) && (x <= pom->x + pom->w) &&
(y >= pom->y) && (y <= pom->y + pom->h)) {
return pom;
}
- pom=tags.takeFirst();
}
return NULL;
}
}
return NULL;
}
@@
-287,13
+290,14
@@
Tag *HTMLAnalyzer::CheckTag(int x,int y)
Tag *HTMLAnalyzer::FindAnchor(char *name)
{
Tag *pom;
Tag *HTMLAnalyzer::FindAnchor(char *name)
{
Tag *pom;
- pom = tags.first();
- while (pom != NULL) {
+ QListIterator<Tag *> tagsIterator(tags);
+
+ while (tagsIterator.hasNext()) {
+ pom = tagsIterator.next();
if ((pom->tag_type == TAG_ANCHOR) &&
(strcmp(pom->tag_label, name) == 0)) {
return(pom);
}
if ((pom->tag_type == TAG_ANCHOR) &&
(strcmp(pom->tag_label, name) == 0)) {
return(pom);
}
- pom=tags.takeFirst();
}
return pom;
}
}
return pom;
}
@@
-473,8
+477,10
@@
void QHTML::DrawList()
map->fill(backgroundColor());
p.begin(map);
map->fill(backgroundColor());
p.begin(map);
- pom = analyzer->tags.first();
- while (pom != NULL) {
+ QListIterator<Tag *> tagsIterator(tags);
+
+ while (tagsIterator.hasNext()) {
+ pom = tagsIterator.next();
switch(pom->tag_type) {
case TAG_TEXT:
p.setFont(*actual_font);
switch(pom->tag_type) {
case TAG_TEXT:
p.setFont(*actual_font);
@@
-576,7
+582,6
@@
void QHTML::DrawList()
cy = cy + p.fontMetrics().height();
break;
}
cy = cy + p.fontMetrics().height();
break;
}
- pom = analyzer->tags.takeFirst();
}
p.end();
repaint();
}
p.end();
repaint();