-rw-r--r-- | noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp | 18 |
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 @@ -26,4 +26,4 @@ #include <kglobal.h> - - +#include <qpe/qpeapplication.h> +#include <qdir.h> @@ -56,3 +56,7 @@ void SyntaxDocument::setupModeList(bool force) - 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"); @@ -60,3 +64,3 @@ void SyntaxDocument::setupModeList(bool force) { - QString Group="Highlighting_Cache"+*it; + QString Group="Highlighting_Cache"+path+*it; @@ -75,4 +79,4 @@ void SyntaxDocument::setupModeList(bool force) { - qDebug("Found a description file:"+(*it)); - setIdentifier(*it); + qDebug("Found a description file:"+path+(*it)); + setIdentifier(path+(*it)); Opie::XMLElement *e=m_root; @@ -93,3 +97,3 @@ void SyntaxDocument::setupModeList(bool force) - mli->identifier = *it; + mli->identifier = path+(*it); #warning fixme |