Mercurial > hg > forks > UniversalIndentGUI
changeset 157:8d850bcdf368
[fix] Bug ID 1729026: The syntax highlighting style was not applied again after toggling the highlighting. Needed to reload the settings.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@360 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Fri, 01 Jun 2007 11:46:41 +0000 |
parents | 7e6d43bb7043 |
children | c5113939ca0b |
files | src/highlighter.cpp |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/highlighter.cpp Fri Jun 01 10:12:09 2007 +0000 +++ b/src/highlighter.cpp Fri Jun 01 11:46:41 2007 +0000 @@ -33,6 +33,7 @@ : QObject(parent) { this->parent = parent; + // If a settings file/object is given along with the constructor parameters, use it... if (settings) { this->settings = settings; @@ -41,6 +42,7 @@ else { this->settings = new QSettings("./data/highlighter.ini", QSettings::IniFormat, this); } + highlightningIsOn = true; mapHighlighternameToExtension["Bash"] = QStringList() << "sh"; @@ -66,7 +68,12 @@ createHighlighterMenu(); - lexer = 0; + lexer = 0; + + foreach(QStringList extensionList, mapHighlighternameToExtension.values() ) { + setLexerForExtension( extensionList.at(0) ); + } + // Set default highlighter to C++ highlighter. setLexerForExtension( "cpp" ); } @@ -137,6 +144,7 @@ void Highlighter::turnHighlightOn() { highlightningIsOn = true; parent->setLexer(lexer); + readCurrentSettings(""); } /*! @@ -431,5 +439,6 @@ if ( highlightningIsOn ) { parent->setLexer(lexer); } + readCurrentSettings(""); }