Code Blocks language syntax highlighting
Wiki Discussion
1
Posts
1
Posters
1.2k
Views
1
Watching
-
wrote on 7 Jul 2015, 13:42 last edited by SGaist 7 Jul 2015, 21:28
Wouldn't it be better to have the language ''cpp-qt'' to be close to ''cpp'', having the default cpp highlighting and a additional color for Q* keywords instead of having some kind of markup not recognizing all cpp keywords?
Some code for the Wiki Sandbox (Markdown won't work, sry...):
==Code Blocks Formatting==
===CPP===#include <test.h> #define CONSTANTVALUE 9 if(x==true) { QList< QList< QStringList > > multiStringList; callSomeOtherFunction(); switch(someVar) { default: case CONSTANTVALUE: { for(int i=0;i<CONSTANTVALUE;i++) { qDebug()<<"Text: "<< i; } } break; } } class Widget { ... private: Rect m_geometry; String m_stylesheet; // NEW in WidgetLib 1.1 }; class Label : public Widget { public: ... String text() const { return m_text; } private: String m_text; };
===CPP-QT===
#include <test.h> #define CONSTANTVALUE 9 if(x==true) { QList< QList< QStringList > > multiStringList; callSomeOtherFunction(); switch(someVar) { default: case CONSTANTVALUE: { for(int i=0;i<CONSTANTVALUE;i++) { qDebug()<<"Text: "<< i; } } break; } } class Widget { ... private: Rect m_geometry; String m_stylesheet; // NEW in WidgetLib 1.1 }; class Label : public Widget { public: ... String text() const { return m_text; } private: String m_text; };
===None===
#include <test.h> #define CONSTANTVALUE 9 if(x==true) { QList< QList< QStringList > > multiStringList; callSomeOtherFunction(); switch(someVar) { default: case CONSTANTVALUE: { for(int i=0;i<CONSTANTVALUE;i++) { qDebug()<<"Text: "<< i; } } break; } } class Widget { ... private: Rect m_geometry; String m_stylesheet; // NEW in WidgetLib 1.1 }; class Label : public Widget { public: ... String text() const { return m_text; } private: String m_text; };
===Error===
#include <test.h> #define CONSTANTVALUE 9 if(x==true) { QList< QList< QStringList > > multiStringList; callSomeOtherFunction(); switch(someVar) { default: case CONSTANTVALUE: { for(int i=0;i<CONSTANTVALUE;i++) { qDebug()<<"Text: "<< i; } } break; } } class Widget { ... private: Rect m_geometry; String m_stylesheet; // NEW in WidgetLib 1.1 }; class Label : public Widget { public: ... String text() const { return m_text; } private: String m_text; };
[edit: added missing codings tags``` SGaist]
1/1