summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 3390bdb..e45daa4 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -203,108 +203,109 @@ syntaxContextData* SyntaxDocument::getConfig(const QString& mainGroupName, const
203 Opie::XMLElement *e = m_root->firstChild()->firstChild(); 203 Opie::XMLElement *e = m_root->firstChild()->firstChild();
204 204
205 while (e) 205 while (e)
206 { 206 {
207 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl; 207 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl;
208 208
209 if (e->tagName().compare(mainGroupName)==0 ) 209 if (e->tagName().compare(mainGroupName)==0 )
210 { 210 {
211 Opie::XMLElement *e1=e->firstChild(); 211 Opie::XMLElement *e1=e->firstChild();
212 212
213 while (e1) 213 while (e1)
214 { 214 {
215 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl; 215 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl;
216 216
217 if (e1->tagName()==Config) 217 if (e1->tagName()==Config)
218 { 218 {
219 syntaxContextData *data=new ( syntaxContextData); 219 syntaxContextData *data=new ( syntaxContextData);
220 data->currentGroup=0; 220 data->currentGroup=0;
221 data->parent=0; 221 data->parent=0;
222 data->item=e1; 222 data->item=e1;
223 return data; 223 return data;
224 } 224 }
225 225
226 e1=e1->nextChild(); 226 e1=e1->nextChild();
227 } 227 }
228 228
229 kdDebug(13010) << "WARNING :returning null 3"<< endl; 229 kdDebug(13010) << "WARNING :returning null 3"<< endl;
230 return 0; 230 return 0;
231 } 231 }
232 232
233 e=e->nextChild(); 233 e=e->nextChild();
234 } 234 }
235 235
236 kdDebug(13010) << "WARNING :returning null 4" << endl; 236 kdDebug(13010) << "WARNING :returning null 4" << endl;
237 return 0; 237 return 0;
238} 238}
239 239
240 240
241 241
242syntaxContextData* SyntaxDocument::getGroupInfo(const QString& mainGroupName, const QString &group) 242syntaxContextData* SyntaxDocument::getGroupInfo(const QString& mainGroupName, const QString &group)
243{ 243{
244 244
245 Opie::XMLElement *e=m_root->firstChild()->firstChild(); 245 Opie::XMLElement *e=m_root->firstChild()->firstChild();
246 246
247 while (e) 247 while (e)
248 { 248 {
249 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl; 249 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl;
250 250
251 if (e->tagName().compare(mainGroupName)==0 ) 251 if (e->tagName().compare(mainGroupName)==0 )
252 { 252 {
253 Opie::XMLElement *e1=e->firstChild(); 253 Opie::XMLElement *e1=e->firstChild();
254 254
255 while (e1) 255 while (e1)
256 { 256 {
257 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl; 257 kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl;
258 if (e1->tagName()==group+"s") 258 if (e1->tagName()==group+"s")
259 { 259 {
260 syntaxContextData *data=new ( syntaxContextData); 260 syntaxContextData *data=new ( syntaxContextData);
261 data->parent=e1; 261 data->parent=e1;
262 data->currentGroup=0; 262 data->currentGroup=0;
263 data->item=0; 263 data->item=0;
264 return data; 264 return data;
265 } 265 }
266 266
267 e1=e1->nextChild(); 267 e1=e1->nextChild();
268 } 268 }
269 269
270 kdDebug(13010) << "WARNING : getGroupInfo returning null :1 " << endl; 270 kdDebug(13010) << "WARNING : getGroupInfo returning null :1 " << endl;
271 return 0; 271 return 0;
272 } 272 }
273 273
274 e=e->nextChild(); 274 e=e->nextChild();
275 } 275 }
276 276
277 kdDebug(13010) << "WARNING : getGroupInfo returning null :2" << endl; 277 kdDebug(13010) << "WARNING : getGroupInfo returning null :2" << endl;
278 return 0; 278 return 0;
279} 279}
280 280
281 281
282QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& type,bool clearList) 282QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& type,bool clearList)
283{ 283{
284 Opie::XMLElement *e = m_root->firstChild(); 284 Opie::XMLElement *e = m_root->firstChild();
285 if (clearList) 285 if (clearList)
286 m_data.clear(); 286 m_data.clear();
287 287
288 for(e=e->firstChild(); e; e=e->nextChild()) 288 for(e=e->firstChild(); e; e=e->nextChild())
289 { 289 {
290 if (e->tagName()==mainGroup) 290 if (e->tagName()==mainGroup)
291 { 291 {
292 for (Opie::XMLElement *e1=e->firstChild();e1;e1=e1->nextChild()) 292 for (Opie::XMLElement *e1=e->firstChild();e1;e1=e1->nextChild())
293 { 293 {
294 if (e1->tagName()!="list") continue; 294 if (e1->tagName()!="list") continue;
295 295
296 if (e1->attribute("name")==type) 296 if (e1->attribute("name")==type)
297 { 297 {
298 for (Opie::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild()) 298 for (Opie::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild())
299 qDebug("FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->value()); 299 {
300 m_data+="TEST";//e2->value().stripWhiteSpace(); 300 qDebug("FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value());
301 301 m_data+=e2->firstChild()->value().stripWhiteSpace();
302 }
302 break; 303 break;
303 } 304 }
304 } 305 }
305 break; 306 break;
306 } 307 }
307 } 308 }
308 309
309 return m_data; 310 return m_data;
310} 311}