[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kate/part
From: Christoph Cullmann <cullmann () kde ! org>
Date: 2007-05-06 15:40:11
Message-ID: 1178466011.587816.28145.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 661781 by cullmann:
reuse the same config object...
M +2 -1 katedialogs.cpp
M +3 -3 syntax/katesyntaxdocument.cpp
M +8 -1 syntax/katesyntaxdocument.h
M +1 -1 syntax/katesyntaxmanager.cpp
--- trunk/KDE/kdelibs/kate/part/katedialogs.cpp #661780:661781
@@ -1051,7 +1051,8 @@
}
// update Config !!
- KateSyntaxDocument doc (true);
+ // this rewrites the cache....
+ KateSyntaxDocument doc (KateHlManager::self()->getKConfig(), true);
}
//END KateHlDownloadDialog
--- trunk/KDE/kdelibs/kate/part/syntax/katesyntaxdocument.cpp #661780:661781
@@ -33,8 +33,9 @@
#include <QtCore/QFile>
-KateSyntaxDocument::KateSyntaxDocument(bool force)
+KateSyntaxDocument::KateSyntaxDocument(KConfig *config, bool force)
: QDomDocument()
+ , m_config (config)
{
// Let's build the Mode List (katesyntaxhighlightingrc)
setupModeList(force);
@@ -342,8 +343,7 @@
return;
// We'll store the ModeList in katesyntaxhighlightingrc
- KConfig _config("katesyntaxhighlightingrc", KConfig::NoGlobals);
- KConfigGroup config(&_config, "General");
+ KConfigGroup config(m_config, "General");
// figure our if the kate install is too new
if (config.readEntry ("Version",0) > config.readEntry ("CachedVersion",0))
--- trunk/KDE/kdelibs/kate/part/syntax/katesyntaxdocument.h #661780:661781
@@ -24,6 +24,8 @@
#include <QtCore/QList>
#include <QtCore/QStringList>
+class KConfig;
+
/**
* Information about each syntax hl Mode. This is documented in Kate's
* <a href="http://docs.kde.org/stable/en/kdebase/kate/katehighlight-xml-format.html">user guide</a>
@@ -74,7 +76,7 @@
* Sets the current file to nothing and build the ModeList (katesyntaxhighlightingrc)
* @param force fore the update of the hl cache
*/
- KateSyntaxDocument(bool force = false);
+ KateSyntaxDocument(KConfig *config, bool force = false);
/**
* Desctructor
@@ -162,6 +164,11 @@
* last found data out of the xml
*/
QStringList m_data;
+
+ /**
+ * global config, deleted by hlmanager...
+ */
+ KConfig *m_config;
};
#endif
--- trunk/KDE/kdelibs/kate/part/syntax/katesyntaxmanager.cpp #661780:661781
@@ -57,7 +57,7 @@
: QObject()
, m_config ("katesyntaxhighlightingrc", KConfig::NoGlobals)
, commonSuffixes (QString(".orig;.new;~;.bak;.BAK").split(';'))
- , syntax (new KateSyntaxDocument())
+ , syntax (new KateSyntaxDocument(&m_config))
, dynamicCtxsCount(0)
, forceNoDCReset(false)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic