From 4da06735dcc7d9c93bd0ec3c71cde16227dfce09 Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@digia.com> Date: Fri, 23 Aug 2013 13:41:17 +0200 Subject: [PATCH] Python: Do not export symbols Nothing depends on this plugin, so these exports are not needed. Change-Id: I7a6c1c6fd1dd355c904d2dcb6d3f0522cf30adcd Reviewed-by: hjk <hjk121@nokiamail.com> --- src/plugins/pythoneditor/pythoneditor.cpp | 2 + src/plugins/pythoneditor/pythoneditor.h | 5 ++- src/plugins/pythoneditor/pythoneditor.pro | 1 - src/plugins/pythoneditor/pythoneditor.qbs | 1 - .../pythoneditor/pythoneditor_global.h | 41 ------------------- .../pythoneditor/pythoneditorfactory.cpp | 2 + .../pythoneditor/pythoneditorfactory.h | 5 ++- .../pythoneditor/pythoneditorplugin.cpp | 5 ++- src/plugins/pythoneditor/pythoneditorplugin.h | 2 + .../pythoneditor/pythoneditorwidget.cpp | 2 + src/plugins/pythoneditor/pythoneditorwidget.h | 6 +-- .../pythoneditor/tools/pythonhighlighter.h | 3 +- .../pythoneditor/tools/pythonindenter.h | 3 +- .../wizard/pythonclassnamepage.cpp | 2 + .../pythoneditor/wizard/pythonclassnamepage.h | 2 + .../pythoneditor/wizard/pythonclasswizard.cpp | 2 + .../pythoneditor/wizard/pythonclasswizard.h | 3 ++ .../wizard/pythonclasswizarddialog.cpp | 2 + .../wizard/pythonclasswizarddialog.h | 2 + .../wizard/pythonsourcegenerator.cpp | 2 + .../wizard/pythonsourcegenerator.h | 5 ++- 21 files changed, 40 insertions(+), 58 deletions(-) delete mode 100644 src/plugins/pythoneditor/pythoneditor_global.h diff --git a/src/plugins/pythoneditor/pythoneditor.cpp b/src/plugins/pythoneditor/pythoneditor.cpp index 629e326e2f8..d00cb871822 100644 --- a/src/plugins/pythoneditor/pythoneditor.cpp +++ b/src/plugins/pythoneditor/pythoneditor.cpp @@ -45,6 +45,7 @@ #include <QFileInfo> namespace PythonEditor { +namespace Internal { PythonEditor::PythonEditor(EditorWidget *editorWidget) :BaseTextEditor(editorWidget) @@ -90,4 +91,5 @@ bool PythonEditor::open(QString *errorString, return status; } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/pythoneditor.h b/src/plugins/pythoneditor/pythoneditor.h index f7bf8e33b4c..f56802ea8a1 100644 --- a/src/plugins/pythoneditor/pythoneditor.h +++ b/src/plugins/pythoneditor/pythoneditor.h @@ -30,14 +30,14 @@ #ifndef PYTHONEDITOR_EDITOR_H #define PYTHONEDITOR_EDITOR_H -#include "pythoneditor_global.h" #include <texteditor/basetexteditor.h> namespace PythonEditor { +namespace Internal { class EditorWidget; -class PYEDITOR_EXPORT PythonEditor : public TextEditor::BaseTextEditor +class PythonEditor : public TextEditor::BaseTextEditor { Q_OBJECT @@ -58,6 +58,7 @@ public: const QString &realFileName); }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITOR_EDITOR_H diff --git a/src/plugins/pythoneditor/pythoneditor.pro b/src/plugins/pythoneditor/pythoneditor.pro index a4e0c55675a..0e7e02672fd 100644 --- a/src/plugins/pythoneditor/pythoneditor.pro +++ b/src/plugins/pythoneditor/pythoneditor.pro @@ -7,7 +7,6 @@ RESOURCES += \ pythoneditorplugin.qrc HEADERS += \ - pythoneditor_global.h \ pythoneditorplugin.h \ pythoneditorfactory.h \ pythoneditor.h \ diff --git a/src/plugins/pythoneditor/pythoneditor.qbs b/src/plugins/pythoneditor/pythoneditor.qbs index 1a032f7d456..5637b891b1a 100644 --- a/src/plugins/pythoneditor/pythoneditor.qbs +++ b/src/plugins/pythoneditor/pythoneditor.qbs @@ -16,7 +16,6 @@ QtcPlugin { name: "General" files: [ "pythoneditor.cpp", "pythoneditor.h", - "pythoneditor_global.h", "pythoneditorconstants.h", "pythoneditorfactory.cpp", "pythoneditorfactory.h", "pythoneditorplugin.cpp", "pythoneditorplugin.h", diff --git a/src/plugins/pythoneditor/pythoneditor_global.h b/src/plugins/pythoneditor/pythoneditor_global.h deleted file mode 100644 index 307700db417..00000000000 --- a/src/plugins/pythoneditor/pythoneditor_global.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef PYTHONEDITOR_GLOBAL_H -#define PYTHONEDITOR_GLOBAL_H - -#include <QtGlobal> - -#if defined(PYTHONEDITOR_LIBRARY) -# define PYEDITOR_EXPORT Q_DECL_EXPORT -#else -# define PYEDITOR_EXPORT Q_DECL_IMPORT -#endif - -#endif // PYTHONEDITOR_GLOBAL_H diff --git a/src/plugins/pythoneditor/pythoneditorfactory.cpp b/src/plugins/pythoneditor/pythoneditorfactory.cpp index e0b36e18993..2851d611af9 100644 --- a/src/plugins/pythoneditor/pythoneditorfactory.cpp +++ b/src/plugins/pythoneditor/pythoneditorfactory.cpp @@ -39,6 +39,7 @@ #include <QDebug> namespace PythonEditor { +namespace Internal { EditorFactory::EditorFactory(QObject *parent) : Core::IEditorFactory(parent) @@ -56,4 +57,5 @@ Core::IEditor *EditorFactory::createEditor(QWidget *parent) return widget->editor(); } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/pythoneditorfactory.h b/src/plugins/pythoneditor/pythoneditorfactory.h index 33400212127..79e4d54e4ec 100644 --- a/src/plugins/pythoneditor/pythoneditorfactory.h +++ b/src/plugins/pythoneditor/pythoneditorfactory.h @@ -30,12 +30,12 @@ #ifndef PYTHONEDITORFACTORY_H #define PYTHONEDITORFACTORY_H -#include "pythoneditor_global.h" #include <coreplugin/editormanager/ieditorfactory.h> namespace PythonEditor { +namespace Internal { -class PYEDITOR_EXPORT EditorFactory : public Core::IEditorFactory +class EditorFactory : public Core::IEditorFactory { Q_OBJECT @@ -48,6 +48,7 @@ public: Core::IEditor *createEditor(QWidget *parent); }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITORFACTORY_H diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index d027bf986da..b49ae92f48a 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -183,6 +183,7 @@ static const char *const LIST_OF_PYTHON_BUILTINS[] = { }; namespace PythonEditor { +namespace Internal { PythonEditorPlugin *PythonEditorPlugin::m_instance = 0; @@ -280,7 +281,7 @@ QSet<QString> PythonEditorPlugin::builtins() return instance()->m_builtins; } +} // namespace Internal } // namespace PythonEditor -Q_EXPORT_PLUGIN(PythonEditor::PythonEditorPlugin) - +Q_EXPORT_PLUGIN(PythonEditor::Internal::PythonEditorPlugin) diff --git a/src/plugins/pythoneditor/pythoneditorplugin.h b/src/plugins/pythoneditor/pythoneditorplugin.h index 093536dddbc..f6c730cb69b 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.h +++ b/src/plugins/pythoneditor/pythoneditorplugin.h @@ -36,6 +36,7 @@ #include <QScopedPointer> namespace PythonEditor { +namespace Internal { class EditorFactory; class EditorWidget; @@ -71,6 +72,7 @@ private: QSet<QString> m_builtins; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITOR_PLUGIN_H diff --git a/src/plugins/pythoneditor/pythoneditorwidget.cpp b/src/plugins/pythoneditor/pythoneditorwidget.cpp index 15010ffa52a..a8588e3e070 100644 --- a/src/plugins/pythoneditor/pythoneditorwidget.cpp +++ b/src/plugins/pythoneditor/pythoneditorwidget.cpp @@ -45,6 +45,7 @@ #include <texteditor/autocompleter.h> namespace PythonEditor { +namespace Internal { EditorWidget::EditorWidget(QWidget *parent) :TextEditor::BaseTextEditorWidget(parent) @@ -92,4 +93,5 @@ TextEditor::BaseTextEditor *EditorWidget::createEditor() return new PythonEditor(this); } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/pythoneditorwidget.h b/src/plugins/pythoneditor/pythoneditorwidget.h index 63f646b79f0..24258dfa5c1 100644 --- a/src/plugins/pythoneditor/pythoneditorwidget.h +++ b/src/plugins/pythoneditor/pythoneditorwidget.h @@ -30,14 +30,13 @@ #ifndef PYTHONEDITORWIDGET_H #define PYTHONEDITORWIDGET_H -#include "pythoneditor_global.h" - #include <texteditor/basetexteditor.h> #include <utils/uncommentselection.h> namespace PythonEditor { +namespace Internal { -class PYEDITOR_EXPORT EditorWidget : public TextEditor::BaseTextEditorWidget +class EditorWidget : public TextEditor::BaseTextEditorWidget { Q_OBJECT @@ -57,6 +56,7 @@ private: Utils::CommentDefinition m_commentDefinition; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITORWIDGET_H diff --git a/src/plugins/pythoneditor/tools/pythonhighlighter.h b/src/plugins/pythoneditor/tools/pythonhighlighter.h index 801f55e0668..41b7eb6c717 100644 --- a/src/plugins/pythoneditor/tools/pythonhighlighter.h +++ b/src/plugins/pythoneditor/tools/pythonhighlighter.h @@ -30,14 +30,13 @@ #ifndef PYTHONHIGHLIGHTER_H #define PYTHONHIGHLIGHTER_H -#include "../pythoneditor_global.h" #include <texteditor/syntaxhighlighter.h> namespace PythonEditor { namespace Internal { class Scanner; } -class PYEDITOR_EXPORT PythonHighlighter : public TextEditor::SyntaxHighlighter +class PythonHighlighter : public TextEditor::SyntaxHighlighter { Q_OBJECT public: diff --git a/src/plugins/pythoneditor/tools/pythonindenter.h b/src/plugins/pythoneditor/tools/pythonindenter.h index 3e0fc043196..10bf4d809bc 100644 --- a/src/plugins/pythoneditor/tools/pythonindenter.h +++ b/src/plugins/pythoneditor/tools/pythonindenter.h @@ -30,13 +30,12 @@ #ifndef PYTHONINDENTER_H #define PYTHONINDENTER_H -#include "../pythoneditor_global.h" #include <texteditor/indenter.h> #include <QStringList> namespace PythonEditor { -class PYEDITOR_EXPORT PythonIndenter : public TextEditor::Indenter +class PythonIndenter : public TextEditor::Indenter { public: PythonIndenter(); diff --git a/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp b/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp index 96548386e3c..33024396a04 100644 --- a/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp +++ b/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp @@ -37,6 +37,7 @@ #include <QVBoxLayout> namespace PythonEditor { +namespace Internal { ClassNamePage::ClassNamePage(QWidget *parent) : QWizardPage(parent) @@ -91,4 +92,5 @@ void ClassNamePage::slotValidChanged() } } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/wizard/pythonclassnamepage.h b/src/plugins/pythoneditor/wizard/pythonclassnamepage.h index ca8c98a35a8..55d542f11b3 100644 --- a/src/plugins/pythoneditor/wizard/pythonclassnamepage.h +++ b/src/plugins/pythoneditor/wizard/pythonclassnamepage.h @@ -36,6 +36,7 @@ namespace Utils { class NewClassWidget; } namespace PythonEditor { +namespace Internal { class ClassNamePage : public QWizardPage { @@ -58,6 +59,7 @@ private: bool m_isValid; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITOR_CLASSNAMEPAGE_H diff --git a/src/plugins/pythoneditor/wizard/pythonclasswizard.cpp b/src/plugins/pythoneditor/wizard/pythonclasswizard.cpp index 262d178efc0..34297f1743a 100644 --- a/src/plugins/pythoneditor/wizard/pythonclasswizard.cpp +++ b/src/plugins/pythoneditor/wizard/pythonclasswizard.cpp @@ -43,6 +43,7 @@ using namespace ProjectExplorer; namespace PythonEditor { +namespace Internal { static Core::BaseFileWizardParameters getDefaultParams() { @@ -120,4 +121,5 @@ Kit *ClassWizard::kitForWizard(const ClassWizardDialog *wizard) const return KitManager::defaultKit(); } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/wizard/pythonclasswizard.h b/src/plugins/pythoneditor/wizard/pythonclasswizard.h index 763be1b9f67..22ca710ddbe 100644 --- a/src/plugins/pythoneditor/wizard/pythonclasswizard.h +++ b/src/plugins/pythoneditor/wizard/pythonclasswizard.h @@ -37,6 +37,8 @@ namespace Utils { class NewClassWidget; } namespace ProjectExplorer { class Kit; } namespace PythonEditor { +namespace Internal { + class ClassWizardDialog; class ClassWizard : public Core::BaseFileWizard @@ -56,6 +58,7 @@ protected: ProjectExplorer::Kit *kitForWizard(const ClassWizardDialog *wizard) const; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITOR_CLASSWIZARD_H diff --git a/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.cpp b/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.cpp index 80d5f0e4b5d..040a9c222b8 100644 --- a/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.cpp +++ b/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.cpp @@ -34,6 +34,7 @@ #include <coreplugin/basefilewizard.h> namespace PythonEditor { +namespace Internal { ClassWizardDialog::ClassWizardDialog(QWidget *parent) : Utils::Wizard(parent) @@ -77,4 +78,5 @@ void ClassWizardDialog::setPath(const QString &path) m_classNamePage->newClassWidget()->setPath(path); } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.h b/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.h index 5e9d011f5fa..5743f86be5b 100644 --- a/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.h +++ b/src/plugins/pythoneditor/wizard/pythonclasswizarddialog.h @@ -36,6 +36,7 @@ #include <QVariantMap> namespace PythonEditor { +namespace Internal { class ClassNamePage; @@ -67,6 +68,7 @@ private: QVariantMap m_extraValues; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHONEDITOR_CLASSWIZARDDIALOG_H diff --git a/src/plugins/pythoneditor/wizard/pythonsourcegenerator.cpp b/src/plugins/pythoneditor/wizard/pythonsourcegenerator.cpp index d1407a06ec3..87f2e04c13c 100644 --- a/src/plugins/pythoneditor/wizard/pythonsourcegenerator.cpp +++ b/src/plugins/pythoneditor/wizard/pythonsourcegenerator.cpp @@ -31,6 +31,7 @@ #include <QSet> namespace PythonEditor { +namespace Internal { static const char BASH_RUN_HEADER[] = "#!/usr/bin/env python\n"; static const char ENCODING_HEADER[] = "# -*- coding: utf-8 -*-\n"; @@ -207,4 +208,5 @@ QString SourceGenerator::moduleForQWidget() const return QLatin1String("QtWidgets"); } +} // namespace Internal } // namespace PythonEditor diff --git a/src/plugins/pythoneditor/wizard/pythonsourcegenerator.h b/src/plugins/pythoneditor/wizard/pythonsourcegenerator.h index ef82955351f..d638ac8d871 100644 --- a/src/plugins/pythoneditor/wizard/pythonsourcegenerator.h +++ b/src/plugins/pythoneditor/wizard/pythonsourcegenerator.h @@ -30,14 +30,14 @@ #ifndef PYTHON_SOURCEGENERATOR_H #define PYTHON_SOURCEGENERATOR_H -#include "../pythoneditor_global.h" #include <utils/newclasswidget.h> #include <QSet> #include <QString> namespace PythonEditor { +namespace Internal { -class PYEDITOR_EXPORT SourceGenerator +class SourceGenerator { public: enum QtBinding { @@ -70,6 +70,7 @@ private: QtVersion m_pythonQtVersion; }; +} // namespace Internal } // namespace PythonEditor #endif // PYTHON_SOURCEGENERATOR_H -- GitLab