aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/glsleditor/glsleditorplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-08-21 08:29:55 +0200
committerhjk <hjk121@nokiamail.com>2014-08-21 12:30:15 +0200
commitbb8575c60c89f84b0d7cb76cb8afff48e32c9027 (patch)
tree0e4ac81137d4b3b995fd5d7d6755d7f6e6f961e8 /src/plugins/glsleditor/glsleditorplugin.cpp
parent2481e71d1885561ff9af7091e88d9eb821dac008 (diff)
GlslEditor: Code cosmetics
Namespaces, CamelCase names. Change-Id: I6ced0dccb073bda0fc82fed1831886fb9f62bf65 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src/plugins/glsleditor/glsleditorplugin.cpp')
-rw-r--r--src/plugins/glsleditor/glsleditorplugin.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp
index aba368deceb..f1a5b4fc289 100644
--- a/src/plugins/glsleditor/glsleditorplugin.cpp
+++ b/src/plugins/glsleditor/glsleditorplugin.cpp
@@ -71,10 +71,10 @@ using namespace TextEditor;
namespace GLSLEditor {
namespace Internal {
-class GLSLEditorPluginPrivate
+class GlslEditorPluginPrivate
{
public:
- GLSLEditorPluginPrivate() :
+ GlslEditorPluginPrivate() :
m_glsl_120_frag(0),
m_glsl_120_vert(0),
m_glsl_120_common(0),
@@ -83,7 +83,7 @@ public:
m_glsl_es_100_common(0)
{}
- ~GLSLEditorPluginPrivate()
+ ~GlslEditorPluginPrivate()
{
delete m_glsl_120_frag;
delete m_glsl_120_vert;
@@ -93,44 +93,44 @@ public:
delete m_glsl_es_100_common;
}
- QPointer<TextEditor::BaseTextEditor> m_currentTextEditable;
+ QPointer<BaseTextEditor> m_currentTextEditable;
- GLSLEditorPlugin::InitFile *m_glsl_120_frag;
- GLSLEditorPlugin::InitFile *m_glsl_120_vert;
- GLSLEditorPlugin::InitFile *m_glsl_120_common;
- GLSLEditorPlugin::InitFile *m_glsl_es_100_frag;
- GLSLEditorPlugin::InitFile *m_glsl_es_100_vert;
- GLSLEditorPlugin::InitFile *m_glsl_es_100_common;
+ GlslEditorPlugin::InitFile *m_glsl_120_frag;
+ GlslEditorPlugin::InitFile *m_glsl_120_vert;
+ GlslEditorPlugin::InitFile *m_glsl_120_common;
+ GlslEditorPlugin::InitFile *m_glsl_es_100_frag;
+ GlslEditorPlugin::InitFile *m_glsl_es_100_vert;
+ GlslEditorPlugin::InitFile *m_glsl_es_100_common;
};
-static GLSLEditorPluginPrivate *dd = 0;
-static GLSLEditorPlugin *m_instance = 0;
+static GlslEditorPluginPrivate *dd = 0;
+static GlslEditorPlugin *m_instance = 0;
-GLSLEditorPlugin::InitFile::~InitFile()
+GlslEditorPlugin::InitFile::~InitFile()
{
delete engine;
}
-GLSLEditorPlugin::GLSLEditorPlugin()
+GlslEditorPlugin::GlslEditorPlugin()
{
m_instance = this;
- dd = new GLSLEditorPluginPrivate;
+ dd = new GlslEditorPluginPrivate;
}
-GLSLEditorPlugin::~GLSLEditorPlugin()
+GlslEditorPlugin::~GlslEditorPlugin()
{
delete dd;
m_instance = 0;
}
-bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
+bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
{
if (!MimeDatabase::addMimeTypes(QLatin1String(":/glsleditor/GLSLEditor.mimetypes.xml"), errorMessage))
return false;
- addAutoReleasedObject(new GLSLHoverHandler(this));
+ addAutoReleasedObject(new GlslHoverHandler(this));
addAutoReleasedObject(new GlslEditorFactory);
- addAutoReleasedObject(new GLSLCompletionAssistProvider);
+ addAutoReleasedObject(new GlslCompletionAssistProvider);
ActionContainer *contextMenu = ActionManager::createMenu(GLSLEditor::Constants::M_CONTEXT);
ActionContainer *glslToolsMenu = ActionManager::createMenu(Id(Constants::M_TOOLS_GLSL));
@@ -159,7 +159,7 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT_ES);
FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG_ES);
- IWizardFactory *wizard = new GLSLFileWizard(GLSLFileWizard::FragmentShaderES);
+ IWizardFactory *wizard = new GlslFileWizard(GlslFileWizard::FragmentShaderES);
wizard->setWizardKind(IWizardFactory::FileWizard);
wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL));
wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL));
@@ -172,7 +172,7 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
wizard->setId(QLatin1String("F.GLSL"));
addAutoReleasedObject(wizard);
- wizard = new GLSLFileWizard(GLSLFileWizard::VertexShaderES);
+ wizard = new GlslFileWizard(GlslFileWizard::VertexShaderES);
wizard->setWizardKind(IWizardFactory::FileWizard);
wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL));
wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL));
@@ -185,7 +185,7 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
wizard->setId(QLatin1String("G.GLSL"));
addAutoReleasedObject(wizard);
- wizard = new GLSLFileWizard(GLSLFileWizard::FragmentShaderDesktop);
+ wizard = new GlslFileWizard(GlslFileWizard::FragmentShaderDesktop);
wizard->setWizardKind(IWizardFactory::FileWizard);
wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL));
wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL));
@@ -198,7 +198,7 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
wizard->setId(QLatin1String("J.GLSL"));
addAutoReleasedObject(wizard);
- wizard = new GLSLFileWizard(GLSLFileWizard::VertexShaderDesktop);
+ wizard = new GlslFileWizard(GlslFileWizard::VertexShaderDesktop);
wizard->setWizardKind(IWizardFactory::FileWizard);
wizard->setCategory(QLatin1String(Constants::WIZARD_CATEGORY_GLSL));
wizard->setDisplayCategory(QCoreApplication::translate("GLSLEditor", Constants::WIZARD_TR_CATEGORY_GLSL));
@@ -211,7 +211,7 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
wizard->setId(QLatin1String("K.GLSL"));
addAutoReleasedObject(wizard);
- auto hf = new TextEditor::HighlighterFactory;
+ auto hf = new HighlighterFactory;
hf->setProductType<Highlighter>();
hf->setId(GLSLEditor::Constants::C_GLSLEDITOR_ID);
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE);
@@ -224,11 +224,11 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
return true;
}
-void GLSLEditorPlugin::extensionsInitialized()
+void GlslEditorPlugin::extensionsInitialized()
{
}
-ExtensionSystem::IPlugin::ShutdownFlag GLSLEditorPlugin::aboutToShutdown()
+ExtensionSystem::IPlugin::ShutdownFlag GlslEditorPlugin::aboutToShutdown()
{
// delete GLSL::Icons::instance(); // delete object held by singleton
return IPlugin::aboutToShutdown();
@@ -242,7 +242,7 @@ static QByteArray glslFile(const QString &fileName)
return QByteArray();
}
-static void parseGlslFile(const QString &fileName, GLSLEditorPlugin::InitFile *initFile)
+static void parseGlslFile(const QString &fileName, GlslEditorPlugin::InitFile *initFile)
{
// Parse the builtins for any langugage variant so we can use all keywords.
const int variant = GLSL::Lexer::Variant_All;
@@ -253,16 +253,16 @@ static void parseGlslFile(const QString &fileName, GLSLEditorPlugin::InitFile *i
initFile->ast = parser.parse();
}
-static GLSLEditorPlugin::InitFile *getInitFile(const char *fileName, GLSLEditorPlugin::InitFile **initFile)
+static GlslEditorPlugin::InitFile *getInitFile(const char *fileName, GlslEditorPlugin::InitFile **initFile)
{
if (*initFile)
return *initFile;
- *initFile = new GLSLEditorPlugin::InitFile;
+ *initFile = new GlslEditorPlugin::InitFile;
parseGlslFile(QLatin1String(fileName), *initFile);
return *initFile;
}
-const GLSLEditorPlugin::InitFile *GLSLEditorPlugin::fragmentShaderInit(int variant)
+const GlslEditorPlugin::InitFile *GlslEditorPlugin::fragmentShaderInit(int variant)
{
if (variant & GLSL::Lexer::Variant_GLSL_120)
return getInitFile("glsl_120.frag", &dd->m_glsl_120_frag);
@@ -270,7 +270,7 @@ const GLSLEditorPlugin::InitFile *GLSLEditorPlugin::fragmentShaderInit(int varia
return getInitFile("glsl_es_100.frag", &dd->m_glsl_es_100_frag);
}
-const GLSLEditorPlugin::InitFile *GLSLEditorPlugin::vertexShaderInit(int variant)
+const GlslEditorPlugin::InitFile *GlslEditorPlugin::vertexShaderInit(int variant)
{
if (variant & GLSL::Lexer::Variant_GLSL_120)
return getInitFile("glsl_120.vert", &dd->m_glsl_120_vert);
@@ -278,7 +278,7 @@ const GLSLEditorPlugin::InitFile *GLSLEditorPlugin::vertexShaderInit(int variant
return getInitFile("glsl_es_100.vert", &dd->m_glsl_es_100_vert);
}
-const GLSLEditorPlugin::InitFile *GLSLEditorPlugin::shaderInit(int variant)
+const GlslEditorPlugin::InitFile *GlslEditorPlugin::shaderInit(int variant)
{
if (variant & GLSL::Lexer::Variant_GLSL_120)
return getInitFile("glsl_120_common.glsl", &dd->m_glsl_120_common);