From 01d4fe85208ff31b93c6495121107971ed99f7bf Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@digia.com>
Date: Tue, 26 Mar 2013 11:32:14 +0100
Subject: [PATCH] Remove internal class BaseTextMarkRegistry from exported
 header.

Change-Id: Ieeffe65be2d7c8f07f41f7211853d616a6aceb85
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
---
 .../autotoolsproject.cpp                      |  1 +
 src/plugins/debugger/breakhandler.cpp         |  1 +
 src/plugins/debugger/cdb/cdbengine.cpp        |  1 +
 src/plugins/debugger/debuggerengine.cpp       |  3 +
 src/plugins/debugger/gdb/gdbengine.cpp        |  1 +
 src/plugins/debugger/memoryagent.cpp          |  1 +
 src/plugins/debugger/qml/qmlcppengine.cpp     |  1 +
 src/plugins/debugger/qml/qmlengine.cpp        |  1 +
 .../projectexplorer/projectexplorer.cpp       |  1 +
 .../projectexplorer/runconfiguration.cpp      |  1 +
 src/plugins/qmlprofiler/qmlprofilertool.cpp   |  1 +
 src/plugins/texteditor/basetextmark.cpp       |  1 +
 src/plugins/texteditor/basetextmark.h         | 31 +--------
 src/plugins/texteditor/basetextmarkregistry.h | 67 +++++++++++++++++++
 src/plugins/texteditor/texteditor.pro         |  3 +-
 src/plugins/texteditor/texteditorplugin.cpp   |  1 +
 16 files changed, 85 insertions(+), 31 deletions(-)
 create mode 100644 src/plugins/texteditor/basetextmarkregistry.h

diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
index da58a141978..bf485f6148d 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
@@ -51,6 +51,7 @@
 #include <extensionsystem/pluginmanager.h>
 #include <cpptools/ModelManagerInterface.h>
 #include <coreplugin/icore.h>
+#include <coreplugin/icontext.h>
 #include <utils/qtcassert.h>
 #include <utils/filesystemwatcher.h>
 
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 5db94d13ddc..637c57ff5c2 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -43,6 +43,7 @@
 #include "modeltest.h"
 #endif
 
+#include <QTimerEvent>
 #include <QDir>
 #include <QDebug>
 
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 68d46621423..fb7ac6ad6a9 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -53,6 +53,7 @@
 
 #include <coreplugin/icore.h>
 #include <projectexplorer/taskhub.h>
+#include <texteditor/itexteditor.h>
 
 #include <utils/synchronousprocess.h>
 #include <utils/qtcprocess.h>
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index a37b2b6cd32..af4a9bc27e9 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -49,12 +49,15 @@
 
 #include <coreplugin/icore.h>
 #include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/editormanager/ieditor.h>
 #include <coreplugin/progressmanager/progressmanager.h>
 #include <coreplugin/progressmanager/futureprogress.h>
 
 #include <projectexplorer/projectexplorer.h>
 #include <projectexplorer/taskhub.h>
 
+#include <texteditor/itexteditor.h>
+
 #include <utils/savedaction.h>
 #include <utils/qtcassert.h>
 #include <utils/fileinprojectfinder.h>
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 6088620a51d..a5b12216901 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -65,6 +65,7 @@
 #include <coreplugin/icore.h>
 #include <projectexplorer/taskhub.h>
 #include <projectexplorer/itaskhandler.h>
+#include <texteditor/itexteditor.h>
 #include <utils/hostosinfo.h>
 #include <utils/qtcassert.h>
 #include <utils/qtcprocess.h>
diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp
index fe318ba61ff..0d045a4679a 100644
--- a/src/plugins/debugger/memoryagent.cpp
+++ b/src/plugins/debugger/memoryagent.cpp
@@ -37,6 +37,7 @@
 #include "debuggerinternalconstants.h"
 
 #include <coreplugin/coreconstants.h>
+#include <coreplugin/editormanager/ieditor.h>
 #include <coreplugin/editormanager/editormanager.h>
 
 #include <utils/qtcassert.h>
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp
index bcd329d2413..22768218f54 100644
--- a/src/plugins/debugger/qml/qmlcppengine.cpp
+++ b/src/plugins/debugger/qml/qmlcppengine.cpp
@@ -35,6 +35,7 @@
 #include "watchhandler.h"
 
 #include <utils/qtcassert.h>
+#include <texteditor/itexteditor.h>
 #include <qmljseditor/qmljseditorconstants.h>
 #include <cppeditor/cppeditorconstants.h>
 #include <qmljs/consolemanagerinterface.h>
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index e44cf92dab7..78c42430757 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -53,6 +53,7 @@
 
 #include <utils/qtcassert.h>
 
+#include <texteditor/itexteditor.h>
 #include <coreplugin/editormanager/editormanager.h>
 #include <coreplugin/helpmanager.h>
 #include <coreplugin/icore.h>
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 9b58fcc0e5f..e7828bbd52f 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -92,6 +92,7 @@
 
 #include <extensionsystem/pluginspec.h>
 #include <coreplugin/icore.h>
+#include <coreplugin/editormanager/ieditor.h>
 #include <coreplugin/id.h>
 #include <coreplugin/coreconstants.h>
 #include <coreplugin/documentmanager.h>
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index b23ccbd6f34..2179276e11a 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -42,6 +42,7 @@
 #include <utils/checkablemessagebox.h>
 
 #include <coreplugin/icore.h>
+#include <coreplugin/icontext.h>
 
 #include <QTimer>
 #include <QPushButton>
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index e9c5835e0cb..14a8750f941 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -53,6 +53,7 @@
 #include <projectexplorer/target.h>
 #include <projectexplorer/session.h>
 #include <projectexplorer/localapplicationrunconfiguration.h>
+#include <texteditor/itexteditor.h>
 
 #include <remotelinux/remotelinuxrunconfiguration.h>
 #include <remotelinux/linuxdevice.h>
diff --git a/src/plugins/texteditor/basetextmark.cpp b/src/plugins/texteditor/basetextmark.cpp
index d8a377d9547..23622a48932 100644
--- a/src/plugins/texteditor/basetextmark.cpp
+++ b/src/plugins/texteditor/basetextmark.cpp
@@ -27,6 +27,7 @@
 **
 ****************************************************************************/
 
+#include "basetextmarkregistry.h"
 #include "basetextmark.h"
 #include "itexteditor.h"
 #include "basetextdocument.h"
diff --git a/src/plugins/texteditor/basetextmark.h b/src/plugins/texteditor/basetextmark.h
index a6e3994bfe9..7b31e061d5f 100644
--- a/src/plugins/texteditor/basetextmark.h
+++ b/src/plugins/texteditor/basetextmark.h
@@ -31,18 +31,7 @@
 #define BASETEXTMARK_H
 
 #include "texteditor_global.h"
-#include "itexteditor.h"
-
-#include <utils/fileutils.h>
-
-#include <QWeakPointer>
-#include <QHash>
-#include <QSet>
-
-QT_BEGIN_NAMESPACE
-class QTextBlock;
-class QPainter;
-QT_END_NAMESPACE
+#include "itextmark.h"
 
 namespace TextEditor {
 namespace Internal {
@@ -70,24 +59,6 @@ private:
     QString m_fileName;
 };
 
-namespace Internal {
-class BaseTextMarkRegistry : public QObject
-{
-    Q_OBJECT
-public:
-    BaseTextMarkRegistry(QObject *parent);
-
-    void add(BaseTextMark *mark);
-    bool remove(BaseTextMark *mark);
-private slots:
-    void editorOpened(Core::IEditor *editor);
-    void documentRenamed(Core::IDocument *document, const QString &oldName, const QString &newName);
-    void allDocumentsRenamed(const QString &oldName, const QString &newName);
-private:
-    QHash<Utils::FileName, QSet<BaseTextMark *> > m_marks;
-};
-}
-
 } // namespace TextEditor
 
 #endif // BASETEXTMARK_H
diff --git a/src/plugins/texteditor/basetextmarkregistry.h b/src/plugins/texteditor/basetextmarkregistry.h
new file mode 100644
index 00000000000..0b3978055dd
--- /dev/null
+++ b/src/plugins/texteditor/basetextmarkregistry.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 BASETEXTMARKREGISTRY_H
+#define BASETEXTMARKREGISTRY_H
+
+#include <utils/fileutils.h>
+
+#include <QObject>
+#include <QHash>
+#include <QSet>
+
+namespace Core {
+class IEditor;
+class IDocument;
+}
+
+namespace TextEditor {
+class BaseTextMark;
+namespace Internal {
+
+class BaseTextMarkRegistry : public QObject
+{
+    Q_OBJECT
+public:
+    BaseTextMarkRegistry(QObject *parent);
+
+    void add(BaseTextMark *mark);
+    bool remove(BaseTextMark *mark);
+private slots:
+    void editorOpened(Core::IEditor *editor);
+    void documentRenamed(Core::IDocument *document, const QString &oldName, const QString &newName);
+    void allDocumentsRenamed(const QString &oldName, const QString &newName);
+private:
+    QHash<Utils::FileName, QSet<BaseTextMark *> > m_marks;
+};
+
+} // namespace Internal
+} // namespace TextEditor
+
+#endif // BASETEXTMARKREGISTRY_H
diff --git a/src/plugins/texteditor/texteditor.pro b/src/plugins/texteditor/texteditor.pro
index e4e9be0c667..19f62afaf06 100644
--- a/src/plugins/texteditor/texteditor.pro
+++ b/src/plugins/texteditor/texteditor.pro
@@ -226,7 +226,8 @@ HEADERS += texteditorplugin.h \
     circularclipboard.h \
     circularclipboardassist.h \
     itextmark.h \
-    codeassist/keywordscompletionassist.h
+    codeassist/keywordscompletionassist.h \
+    basetextmarkregistry.h
 
 FORMS += \
     displaysettingspage.ui \
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp
index ab26fca731b..0384ae2bc76 100644
--- a/src/plugins/texteditor/texteditorplugin.cpp
+++ b/src/plugins/texteditor/texteditorplugin.cpp
@@ -44,6 +44,7 @@
 #include "snippets/plaintextsnippetprovider.h"
 #include "codeassist/assistenums.h"
 #include "basetextmark.h"
+#include "basetextmarkregistry.h"
 
 #include <coreplugin/icore.h>
 #include <coreplugin/coreconstants.h>
-- 
GitLab