summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 844f27d..f90a5f8 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -62,25 +62,25 @@ void SyntaxDocument::setupModeList(bool force)
62 62
63 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) 63 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
64 { 64 {
65 QString Group="Highlighting_Cache"+path+*it; 65 QString Group="Highlighting_Cache"+path+*it;
66 if ((config->hasGroup(Group)) && (!force)) 66 if ((config->hasGroup(Group)) && (!force))
67 { 67 {
68 config->setGroup(Group); 68 config->setGroup(Group);
69 syntaxModeListItem *mli=new syntaxModeListItem; 69 syntaxModeListItem *mli=new syntaxModeListItem;
70 mli->name = config->readEntry("name",""); 70 mli->name = config->readEntry("name","");
71 mli->section = config->readEntry("section",""); 71 mli->section = config->readEntry("section","");
72 mli->mimetype = config->readEntry("mimetype",""); 72 mli->mimetype = config->readEntry("mimetype","");
73 mli->extension = config->readEntry("extension",""); 73 mli->extension = config->readEntry("extension","");
74 mli->identifier = *it; 74 mli->identifier = path+*it;
75 myModeList.append(mli); 75 myModeList.append(mli);
76 } 76 }
77 else 77 else
78 { 78 {
79 qDebug("Found a description file:"+path+(*it)); 79 qDebug("Found a description file:"+path+(*it));
80 setIdentifier(path+(*it)); 80 setIdentifier(path+(*it));
81 Opie::XMLElement *e=m_root; 81 Opie::XMLElement *e=m_root;
82 if (e) 82 if (e)
83 { 83 {
84 e=e->firstChild(); 84 e=e->firstChild();
85 qDebug(e->tagName()); 85 qDebug(e->tagName());
86 if (e->tagName()=="language") 86 if (e->tagName()=="language")
@@ -96,24 +96,25 @@ void SyntaxDocument::setupModeList(bool force)
96 96
97 mli->identifier = path+(*it); 97 mli->identifier = path+(*it);
98 config->setGroup(Group); 98 config->setGroup(Group);
99 config->writeEntry("name",mli->name); 99 config->writeEntry("name",mli->name);
100 config->writeEntry("section",mli->section); 100 config->writeEntry("section",mli->section);
101 config->writeEntry("mimetype",mli->mimetype); 101 config->writeEntry("mimetype",mli->mimetype);
102 config->writeEntry("extension",mli->extension); 102 config->writeEntry("extension",mli->extension);
103 myModeList.append(mli); 103 myModeList.append(mli);
104 } 104 }
105 } 105 }
106 } 106 }
107 } 107 }
108 config->write();
108// config->sync(); 109// config->sync();
109} 110}
110 111
111SyntaxModeList SyntaxDocument::modeList() 112SyntaxModeList SyntaxDocument::modeList()
112{ 113{
113 return myModeList; 114 return myModeList;
114} 115}
115 116
116bool SyntaxDocument::nextGroup( syntaxContextData* data) 117bool SyntaxDocument::nextGroup( syntaxContextData* data)
117{ 118{
118 if(!data) return false; 119 if(!data) return false;
119 120