diff options
author | David Schulz <david.schulz@qt.io> | 2019-07-15 12:50:29 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2019-07-17 06:21:23 +0000 |
commit | 3213e12ce7411efd05a544645aaa1ecd74e533a2 (patch) | |
tree | ae7187904453f530d4660832ff834371905cefaf /src | |
parent | 2778a5adab13a16f4a6b3cda0980fa3b4f2b3a5e (diff) |
rename PythonEditor plugin to Python
The plugin does not only contain a pure editor, but all kind of support
for a programming language like project and run support.
Change-Id: I1251367c8db2e7a54986415ffc5b860cb210de3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/plugins.pro | 2 | ||||
-rw-r--r-- | src/plugins/plugins.qbs | 2 | ||||
-rw-r--r-- | src/plugins/python/CMakeLists.txt (renamed from src/plugins/pythoneditor/CMakeLists.txt) | 6 | ||||
-rw-r--r-- | src/plugins/python/Python.json.in (renamed from src/plugins/pythoneditor/PythonEditor.json.in) | 4 | ||||
-rw-r--r-- | src/plugins/python/python.pro (renamed from src/plugins/pythoneditor/pythoneditor.pro) | 8 | ||||
-rw-r--r-- | src/plugins/python/python.qbs (renamed from src/plugins/pythoneditor/pythoneditor.qbs) | 6 | ||||
-rw-r--r-- | src/plugins/python/python_dependencies.pri (renamed from src/plugins/pythoneditor/pythoneditor_dependencies.pri) | 2 | ||||
-rw-r--r-- | src/plugins/python/pythonconstants.h (renamed from src/plugins/pythoneditor/pythoneditorconstants.h) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythoneditor.cpp (renamed from src/plugins/pythoneditor/pythoneditor.cpp) | 8 | ||||
-rw-r--r-- | src/plugins/python/pythoneditor.h (renamed from src/plugins/pythoneditor/pythoneditor.h) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonformattoken.h (renamed from src/plugins/pythoneditor/pythonformattoken.h) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonhighlighter.cpp (renamed from src/plugins/pythoneditor/pythonhighlighter.cpp) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonhighlighter.h (renamed from src/plugins/pythoneditor/pythonhighlighter.h) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonindenter.cpp (renamed from src/plugins/pythoneditor/pythonindenter.cpp) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonindenter.h (renamed from src/plugins/pythoneditor/pythonindenter.h) | 4 | ||||
-rw-r--r-- | src/plugins/python/pythonplugin.cpp (renamed from src/plugins/pythoneditor/pythoneditorplugin.cpp) | 24 | ||||
-rw-r--r-- | src/plugins/python/pythonplugin.h (renamed from src/plugins/pythoneditor/pythoneditorplugin.h) | 14 | ||||
-rw-r--r-- | src/plugins/python/pythonscanner.cpp (renamed from src/plugins/pythoneditor/pythonscanner.cpp) | 8 | ||||
-rw-r--r-- | src/plugins/python/pythonscanner.h (renamed from src/plugins/pythoneditor/pythonscanner.h) | 4 |
20 files changed, 59 insertions, 59 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 883151c678..d13ad4adf2 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -52,7 +52,7 @@ add_subdirectory(genericprojectmanager) add_subdirectory(git) add_subdirectory(mercurial) add_subdirectory(perforce) -add_subdirectory(pythoneditor) +add_subdirectory(python) add_subdirectory(qmakeprojectmanager) add_subdirectory(qmljstools) add_subdirectory(qmlprojectmanager) diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 4b9538565e..ac347f14da 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -34,7 +34,7 @@ SUBDIRS = \ qmljseditor \ qmlprojectmanager \ glsleditor \ - pythoneditor \ + python \ nim \ mercurial \ bazaar \ diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs index 3408bd4d16..d2adbb6449 100644 --- a/src/plugins/plugins.qbs +++ b/src/plugins/plugins.qbs @@ -52,7 +52,7 @@ Project { "perfprofiler/perfprofiler.qbs", "projectexplorer/projectexplorer.qbs", "qbsprojectmanager/qbsprojectmanager.qbs", - "pythoneditor/pythoneditor.qbs", + "python/python.qbs", "qmldesigner/qmldesigner.qbs", "qmljseditor/qmljseditor.qbs", "qmljstools/qmljstools.qbs", diff --git a/src/plugins/pythoneditor/CMakeLists.txt b/src/plugins/python/CMakeLists.txt index 1f0022ca15..4036e919b3 100644 --- a/src/plugins/pythoneditor/CMakeLists.txt +++ b/src/plugins/python/CMakeLists.txt @@ -1,9 +1,9 @@ -add_qtc_plugin(PythonEditor +add_qtc_plugin(Python PLUGIN_DEPENDS Core QtSupport ProjectExplorer TextEditor SOURCES pythoneditor.cpp pythoneditor.h - pythoneditorconstants.h - pythoneditorplugin.cpp pythoneditorplugin.h + pythonconstants.h + pythonplugin.cpp pythonplugin.h pythonformattoken.h pythonhighlighter.cpp pythonhighlighter.h pythonindenter.cpp pythonindenter.h diff --git a/src/plugins/pythoneditor/PythonEditor.json.in b/src/plugins/python/Python.json.in index 89269328b3..b74b0e4863 100644 --- a/src/plugins/pythoneditor/PythonEditor.json.in +++ b/src/plugins/python/Python.json.in @@ -1,5 +1,5 @@ { - \"Name\" : \"PythonEditor\", + \"Name\" : \"Python\", \"Version\" : \"$$QTCREATOR_VERSION\", \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\", \"Vendor\" : \"The Qt Company Ltd\", @@ -13,7 +13,7 @@ \"Alternatively, this plugin may be used under the terms of the GNU General Public License version 3 as published by the Free Software Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT included in the packaging of this plugin. Please review the following information to ensure the GNU General Public License requirements will be met: https://www.gnu.org/licenses/gpl-3.0.html.\" ], \"Category\" : \"Other Languages\", - \"Description\" : \"Editor and file creation wizards for Python. Example plugin for QtCreator API demonstration.\", + \"Description\" : \"Plugin for supporting the Python language.\", \"Url\" : \"http://www.qt.io\", $$dependencyList, diff --git a/src/plugins/pythoneditor/pythoneditor.pro b/src/plugins/python/python.pro index ba8fee6464..8e2b9c3d82 100644 --- a/src/plugins/pythoneditor/pythoneditor.pro +++ b/src/plugins/python/python.pro @@ -1,19 +1,19 @@ include(../../qtcreatorplugin.pri) DEFINES += \ - PYTHONEDITOR_LIBRARY + PYTHON_LIBRARY HEADERS += \ - pythoneditorplugin.h \ + pythonplugin.h \ pythoneditor.h \ - pythoneditorconstants.h \ + pythonconstants.h \ pythonhighlighter.h \ pythonindenter.h \ pythonformattoken.h \ pythonscanner.h \ SOURCES += \ - pythoneditorplugin.cpp \ + pythonplugin.cpp \ pythoneditor.cpp \ pythonhighlighter.cpp \ pythonindenter.cpp \ diff --git a/src/plugins/pythoneditor/pythoneditor.qbs b/src/plugins/python/python.qbs index e6b36ae262..d04b0dac43 100644 --- a/src/plugins/pythoneditor/pythoneditor.qbs +++ b/src/plugins/python/python.qbs @@ -1,7 +1,7 @@ import qbs 1.0 QtcPlugin { - name: "PythonEditor" + name: "Python" Depends { name: "Qt.widgets" } Depends { name: "Utils" } @@ -15,8 +15,8 @@ QtcPlugin { name: "General" files: [ "pythoneditor.cpp", "pythoneditor.h", - "pythoneditorconstants.h", - "pythoneditorplugin.cpp", "pythoneditorplugin.h", + "pythonconstants.h", + "pythonplugin.cpp", "pythonplugin.h", "pythonhighlighter.h", "pythonhighlighter.cpp", "pythonindenter.cpp", "pythonindenter.h", "pythonformattoken.h", diff --git a/src/plugins/pythoneditor/pythoneditor_dependencies.pri b/src/plugins/python/python_dependencies.pri index 81fbcab581..8ca62c74e7 100644 --- a/src/plugins/pythoneditor/pythoneditor_dependencies.pri +++ b/src/plugins/python/python_dependencies.pri @@ -1,4 +1,4 @@ -QTC_PLUGIN_NAME = PythonEditor +QTC_PLUGIN_NAME = Python QTC_LIB_DEPENDS += \ extensionsystem \ utils diff --git a/src/plugins/pythoneditor/pythoneditorconstants.h b/src/plugins/python/pythonconstants.h index a84281aaa5..fbea15eed4 100644 --- a/src/plugins/pythoneditor/pythoneditorconstants.h +++ b/src/plugins/python/pythonconstants.h @@ -27,7 +27,7 @@ #include <QtGlobal> -namespace PythonEditor { +namespace Python { namespace Constants { const char C_PYTHONEDITOR_ID[] = "PythonEditor.PythonEditor"; @@ -41,4 +41,4 @@ const char C_PY_MIMETYPE[] = "text/x-python"; const char C_PY_MIME_ICON[] = "text-x-python"; } // namespace Constants -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/python/pythoneditor.cpp index d0f27ae63c..145e88e137 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/python/pythoneditor.cpp @@ -24,8 +24,8 @@ ****************************************************************************/ #include "pythoneditor.h" -#include "pythoneditorconstants.h" -#include "pythoneditorplugin.h" +#include "pythonconstants.h" +#include "pythonplugin.h" #include "pythonindenter.h" #include "pythonhighlighter.h" @@ -39,7 +39,7 @@ using namespace TextEditor; -namespace PythonEditor { +namespace Python { namespace Internal { PythonEditorFactory::PythonEditorFactory() @@ -62,4 +62,4 @@ PythonEditorFactory::PythonEditorFactory() } } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythoneditor.h b/src/plugins/python/pythoneditor.h index 96bcc8c03b..7224008bd0 100644 --- a/src/plugins/pythoneditor/pythoneditor.h +++ b/src/plugins/python/pythoneditor.h @@ -27,7 +27,7 @@ #include <texteditor/texteditor.h> -namespace PythonEditor { +namespace Python { namespace Internal { class PythonEditorFactory : public TextEditor::TextEditorFactory @@ -37,4 +37,4 @@ public: }; } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonformattoken.h b/src/plugins/python/pythonformattoken.h index c98f3a1fef..8a7465d769 100644 --- a/src/plugins/pythoneditor/pythonformattoken.h +++ b/src/plugins/python/pythonformattoken.h @@ -25,7 +25,7 @@ #pragma once -namespace PythonEditor { +namespace Python { namespace Internal { enum Format { @@ -68,4 +68,4 @@ private: }; } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonhighlighter.cpp b/src/plugins/python/pythonhighlighter.cpp index b485c2a450..c809e25b84 100644 --- a/src/plugins/pythoneditor/pythonhighlighter.cpp +++ b/src/plugins/python/pythonhighlighter.cpp @@ -41,7 +41,7 @@ #include <texteditor/texteditorconstants.h> #include <utils/qtcassert.h> -namespace PythonEditor { +namespace Python { namespace Internal { /** @@ -198,4 +198,4 @@ void PythonHighlighter::highlightImport(Scanner &scanner) } } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonhighlighter.h b/src/plugins/python/pythonhighlighter.h index 63c35dfaf3..3c798d82d0 100644 --- a/src/plugins/pythoneditor/pythonhighlighter.h +++ b/src/plugins/python/pythonhighlighter.h @@ -27,7 +27,7 @@ #include <texteditor/syntaxhighlighter.h> -namespace PythonEditor { +namespace Python { namespace Internal { class Scanner; @@ -47,4 +47,4 @@ private: }; } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonindenter.cpp b/src/plugins/python/pythonindenter.cpp index a6fb880dcd..dff38907ee 100644 --- a/src/plugins/pythoneditor/pythonindenter.cpp +++ b/src/plugins/python/pythonindenter.cpp @@ -30,7 +30,7 @@ #include <algorithm> -namespace PythonEditor { +namespace Python { static bool isEmptyLine(const QString &t) { @@ -124,4 +124,4 @@ int PythonIndenter::getIndentDiff(const QString &previousLine, return 0; } -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonindenter.h b/src/plugins/python/pythonindenter.h index ff9378e007..243e6f178c 100644 --- a/src/plugins/pythoneditor/pythonindenter.h +++ b/src/plugins/python/pythonindenter.h @@ -27,7 +27,7 @@ #include <texteditor/textindenter.h> -namespace PythonEditor { +namespace Python { class PythonIndenter : public TextEditor::TextIndenter { @@ -44,4 +44,4 @@ private: const TextEditor::TabSettings &tabSettings) const; }; -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/python/pythonplugin.cpp index 00f5639eb8..97b0a7442c 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/python/pythonplugin.cpp @@ -23,9 +23,9 @@ ** ****************************************************************************/ -#include "pythoneditorplugin.h" +#include "pythonplugin.h" #include "pythoneditor.h" -#include "pythoneditorconstants.h" +#include "pythonconstants.h" #include "pythonhighlighter.h" #include <coreplugin/icore.h> @@ -69,10 +69,10 @@ using namespace Core; using namespace ProjectExplorer; -using namespace PythonEditor::Constants; +using namespace Python::Constants; using namespace Utils; -namespace PythonEditor { +namespace Python { namespace Internal { const char PythonMimeType[] = "text/x-python-project"; // ### FIXME @@ -711,11 +711,11 @@ bool PythonProjectNode::renameFile(const QString &filePath, const QString &newFi //////////////////////////////////////////////////////////////////////////////////// // -// PythonEditorPlugin +// PythonPlugin // //////////////////////////////////////////////////////////////////////////////////// -class PythonEditorPluginPrivate +class PythonPluginPrivate { public: PythonEditorFactory editorFactory; @@ -723,24 +723,24 @@ public: SimpleRunWorkerFactory<SimpleTargetRunner, PythonRunConfiguration> runWorkerFactory; }; -PythonEditorPlugin::~PythonEditorPlugin() +PythonPlugin::~PythonPlugin() { delete d; } -bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage) +bool PythonPlugin::initialize(const QStringList &arguments, QString *errorMessage) { Q_UNUSED(arguments) Q_UNUSED(errorMessage) - d = new PythonEditorPluginPrivate; + d = new PythonPluginPrivate; ProjectManager::registerProjectType<PythonProject>(PythonMimeType); return true; } -void PythonEditorPlugin::extensionsInitialized() +void PythonPlugin::extensionsInitialized() { // Add MIME overlay icons (these icons displayed at Project dock panel) QString imageFile = creatorTheme()->imageFile(Theme::IconOverlayPro, @@ -751,6 +751,6 @@ void PythonEditorPlugin::extensionsInitialized() } } // namespace Internal -} // namespace PythonEditor +} // namespace Python -#include "pythoneditorplugin.moc" +#include "pythonplugin.moc" diff --git a/src/plugins/pythoneditor/pythoneditorplugin.h b/src/plugins/python/pythonplugin.h index d5b9f05acc..5b2e395d91 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.h +++ b/src/plugins/python/pythonplugin.h @@ -27,24 +27,24 @@ #include <extensionsystem/iplugin.h> -namespace PythonEditor { +namespace Python { namespace Internal { -class PythonEditorPlugin : public ExtensionSystem::IPlugin +class PythonPlugin : public ExtensionSystem::IPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "PythonEditor.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Python.json") public: - PythonEditorPlugin() = default; - ~PythonEditorPlugin() final; + PythonPlugin() = default; + ~PythonPlugin() final; private: bool initialize(const QStringList &arguments, QString *errorMessage) final; void extensionsInitialized() final; - class PythonEditorPluginPrivate *d = nullptr; + class PythonPluginPrivate *d = nullptr; }; } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonscanner.cpp b/src/plugins/python/pythonscanner.cpp index 9e80f30e6f..abb6251e15 100644 --- a/src/plugins/pythoneditor/pythonscanner.cpp +++ b/src/plugins/python/pythonscanner.cpp @@ -25,10 +25,10 @@ #include "pythonscanner.h" -#include "pythoneditorconstants.h" -#include "pythoneditorplugin.h" +#include "pythonconstants.h" +#include "pythonplugin.h" -namespace PythonEditor { +namespace Python { namespace Internal { Scanner::Scanner(const QChar *text, const int length) @@ -389,4 +389,4 @@ void Scanner::parseState(State &state, QChar &savedData) const } } // namespace Internal -} // namespace PythonEditor +} // namespace Python diff --git a/src/plugins/pythoneditor/pythonscanner.h b/src/plugins/python/pythonscanner.h index c6844097de..5d37f3ba11 100644 --- a/src/plugins/pythoneditor/pythonscanner.h +++ b/src/plugins/python/pythonscanner.h @@ -29,7 +29,7 @@ #include <QString> -namespace PythonEditor { +namespace Python { namespace Internal { /** @@ -95,4 +95,4 @@ private: }; } // namespace Internal -} // namespace PythonEditor +} // namespace Python |