summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index c51221b..3390bdb 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -25,6 +25,6 @@
#include <kconfig.h>
#include <kglobal.h>
-
-
+#include <qpe/qpeapplication.h>
+#include <qdir.h>
SyntaxDocument::SyntaxDocument()
@@ -55,9 +55,13 @@ void SyntaxDocument::setupModeList(bool force)
KStandardDirs *dirs = KGlobal::dirs();
- QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true);
+// QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true);
+ QString path=QPEApplication::qpeDir() +"share/tinykate/syntax/";
+
+ QDir dir(path);
+ QStringList list=dir.entryList("*.xml");
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString Group="Highlighting_Cache"+*it;
+ QString Group="Highlighting_Cache"+path+*it;
if ((config->hasGroup(Group)) && (!force))
@@ -74,6 +78,6 @@ void SyntaxDocument::setupModeList(bool force)
else
{
- qDebug("Found a description file:"+(*it));
- setIdentifier(*it);
+ qDebug("Found a description file:"+path+(*it));
+ setIdentifier(path+(*it));
Opie::XMLElement *e=m_root;
if (e)
@@ -92,5 +96,5 @@ void SyntaxDocument::setupModeList(bool force)
mli->section=i18n("Other");
- mli->identifier = *it;
+ mli->identifier = path+(*it);
#warning fixme
/*