diff options
Diffstat (limited to 'desktop-utilities/lumina-textedit/syntaxSupport.h')
-rw-r--r-- | desktop-utilities/lumina-textedit/syntaxSupport.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop-utilities/lumina-textedit/syntaxSupport.h b/desktop-utilities/lumina-textedit/syntaxSupport.h index e258aafe..c96c404d 100644 --- a/desktop-utilities/lumina-textedit/syntaxSupport.h +++ b/desktop-utilities/lumina-textedit/syntaxSupport.h @@ -28,6 +28,7 @@ class Custom_Syntax : public QSyntaxHighlighter{ Q_OBJECT private: QSettings *settings; + QString lasttype; QVector<SyntaxRule> rules; QVector<SyntaxRuleSplit> splitrules; @@ -36,12 +37,16 @@ public: settings = set; } ~Custom_Syntax(){} - + static QStringList availableRules(); static QStringList knownColors(); static void SetupDefaultColors(QSettings *settings); static QString ruleForFile(QString filename); void loadRules(QString type); + + void reloadRules(){ + loadRules(lasttype); + } protected: void highlightBlock(const QString &text){ for(int i=0; i<rules.length(); i++){ |