|
@@ -27,6 +27,8 @@
|
|
|
#include <kapplication.h>
|
|
|
#include <kcmdlineargs.h>
|
|
|
#include <kaboutdata.h>
|
|
|
+#include <kglobal.h>
|
|
|
+#include <kstandarddirs.h>
|
|
|
#include <QTextCodec>
|
|
|
#include <QColor>
|
|
|
#include <QFont>
|
|
@@ -417,8 +419,8 @@ static void writeSyntaxXML(const Syn_SettingsForDoc &synprefs,
|
|
|
#undef CHILD_NODE
|
|
|
|
|
|
// Write it to disk.
|
|
|
- QString xmlFileName=QString("%1/.kde/share/apps/katepart/syntax/ktigcc%2.xml")
|
|
|
- .arg(QDir::homePath()).arg(internalName);
|
|
|
+ QString xmlFileName=QString("%1/share/apps/katepart/syntax/ktigcc%2.xml")
|
|
|
+ .arg(KGlobal::dirs()->localkdedir()).arg(internalName);
|
|
|
mkdir_multi(xmlFileName);
|
|
|
std::FILE *f=std::fopen(xmlFileName,"w");
|
|
|
if (f) {
|
|
@@ -459,8 +461,8 @@ static bool isNewerVersion(const QString &version1, const QString &version2)
|
|
|
|
|
|
static bool checkSynHighlightVersion(const QString &internalName)
|
|
|
{
|
|
|
- QString xmlFileName=QString("%1/.kde/share/apps/katepart/syntax/ktigcc%2.xml")
|
|
|
- .arg(QDir::homePath()).arg(internalName);
|
|
|
+ QString xmlFileName=QString("%1/share/apps/katepart/syntax/ktigcc%2.xml")
|
|
|
+ .arg(KGlobal::dirs()->localkdedir()).arg(internalName);
|
|
|
QDomDocument doc("language");
|
|
|
QFile file(xmlFileName);
|
|
|
if (!file.open(QIODevice::ReadOnly))
|