Move Id from Core to Utils

And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.

This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.

Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Eike Ziller
2020-06-17 09:14:47 +02:00
parent 5ebe34a332
commit 1b431fe271
50 changed files with 169 additions and 135 deletions

View File

@@ -26,8 +26,8 @@ add_qtc_library(Utils
consoleprocess.cpp consoleprocess.h consoleprocess.cpp consoleprocess.h
cpplanguage_details.h cpplanguage_details.h
crumblepath.cpp crumblepath.h crumblepath.cpp crumblepath.h
delegates.cpp delegates.h
declarationmacros.h declarationmacros.h
delegates.cpp delegates.h
detailsbutton.cpp detailsbutton.h detailsbutton.cpp detailsbutton.h
detailswidget.cpp detailswidget.h detailswidget.cpp detailswidget.h
differ.cpp differ.h differ.cpp differ.h
@@ -36,14 +36,9 @@ add_qtc_library(Utils
elfreader.cpp elfreader.h elfreader.cpp elfreader.h
elidinglabel.cpp elidinglabel.h elidinglabel.cpp elidinglabel.h
environment.cpp environment.h environment.cpp environment.h
environmentfwd.h
environmentdialog.cpp environmentdialog.h environmentdialog.cpp environmentdialog.h
environmentfwd.h
environmentmodel.cpp environmentmodel.h environmentmodel.cpp environmentmodel.h
namevaluedictionary.cpp namevaluedictionary.h
namevalueitem.cpp namevalueitem.h
namevaluemodel.cpp namevaluemodel.h
namevaluesdialog.cpp namevaluesdialog.h
namevaluevalidator.cpp namevaluevalidator.h
execmenu.cpp execmenu.h execmenu.cpp execmenu.h
executeondestruction.h executeondestruction.h
fadingindicator.cpp fadingindicator.h fadingindicator.cpp fadingindicator.h
@@ -70,6 +65,7 @@ add_qtc_library(Utils
hostosinfo.cpp hostosinfo.h hostosinfo.cpp hostosinfo.h
htmldocextractor.cpp htmldocextractor.h htmldocextractor.cpp htmldocextractor.h
icon.cpp icon.h icon.cpp icon.h
id.cpp id.h
infolabel.cpp infolabel.h infolabel.cpp infolabel.h
itemviews.cpp itemviews.h itemviews.cpp itemviews.h
json.cpp json.h json.cpp json.h
@@ -88,9 +84,14 @@ add_qtc_library(Utils
mimetypes/mimetype.cpp mimetypes/mimetype.h mimetypes/mimetype_p.h mimetypes/mimetype.cpp mimetypes/mimetype.h mimetypes/mimetype_p.h
mimetypes/mimetypeparser.cpp mimetypes/mimetypeparser_p.h mimetypes/mimetypeparser.cpp mimetypes/mimetypeparser_p.h
namevaluedictionary.cpp namevaluedictionary.h namevaluedictionary.cpp namevaluedictionary.h
namevaluedictionary.cpp namevaluedictionary.h
namevalueitem.cpp namevalueitem.h
namevalueitem.cpp namevalueitem.h namevalueitem.cpp namevalueitem.h
namevaluemodel.cpp namevaluemodel.h namevaluemodel.cpp namevaluemodel.h
namevaluemodel.cpp namevaluemodel.h
namevaluesdialog.cpp namevaluesdialog.h namevaluesdialog.cpp namevaluesdialog.h
namevaluesdialog.cpp namevaluesdialog.h
namevaluevalidator.cpp namevaluevalidator.h
namevaluevalidator.cpp namevaluevalidator.h namevaluevalidator.cpp namevaluevalidator.h
navigationtreeview.cpp navigationtreeview.h navigationtreeview.cpp navigationtreeview.h
networkaccessmanager.cpp networkaccessmanager.h networkaccessmanager.cpp networkaccessmanager.h

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of Qt Creator. ** This file is part of Qt Creator.
@@ -25,8 +25,8 @@
#include "id.h" #include "id.h"
#include <utils/algorithm.h> #include "algorithm.h"
#include <utils/qtcassert.h> #include "qtcassert.h"
#include <QByteArray> #include <QByteArray>
#include <QDataStream> #include <QDataStream>
@@ -36,17 +36,17 @@
#include <string.h> #include <string.h>
namespace Core { namespace Utils {
/*! /*!
\class Core::Id \class Utils::Id
\inheaderfile coreplugin/id.h \inheaderfile utils/id.h
\inmodule QtCreator \inmodule QtCreator
\brief The Id class encapsulates an identifier that is unique \brief The Id class encapsulates an identifier that is unique
within a specific running \QC process. within a specific running \QC process.
\c{Core::Id} is used as facility to identify objects of interest \c{Utils::Id} is used as facility to identify objects of interest
in a more typesafe and faster manner than a plain QString or in a more typesafe and faster manner than a plain QString or
QByteArray would provide. QByteArray would provide.
@@ -125,7 +125,7 @@ static quintptr theId(const QByteArray &ba)
} }
/*! /*!
\fn Core::Id::Id(quintptr uid) \fn Utils::Id::Id(quintptr uid)
\internal \internal
Constructs an id given \a UID. Constructs an id given \a UID.
@@ -312,7 +312,7 @@ bool Id::operator==(const char *name) const
} }
// For debugging purposes // For debugging purposes
CORE_EXPORT const char *nameForId(quintptr id) QTCREATOR_UTILS_EXPORT const char *nameForId(quintptr id)
{ {
return stringFromId.value(id).str; return stringFromId.value(id).str;
} }
@@ -338,24 +338,24 @@ QString Id::suffixAfter(Id baseId) const
return n.startsWith(b) ? QString::fromUtf8(n.mid(b.size())) : QString(); return n.startsWith(b) ? QString::fromUtf8(n.mid(b.size())) : QString();
} }
} // namespace Core } // namespace Utils
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QDataStream &operator<<(QDataStream &ds, Core::Id id) QDataStream &operator<<(QDataStream &ds, Utils::Id id)
{ {
return ds << id.name(); return ds << id.name();
} }
QDataStream &operator>>(QDataStream &ds, Core::Id &id) QDataStream &operator>>(QDataStream &ds, Utils::Id &id)
{ {
QByteArray ba; QByteArray ba;
ds >> ba; ds >> ba;
id = Core::Id::fromName(ba); id = Utils::Id::fromName(ba);
return ds; return ds;
} }
QDebug operator<<(QDebug dbg, const Core::Id &id) QDebug operator<<(QDebug dbg, const Utils::Id &id)
{ {
return dbg << id.name(); return dbg << id.name();
} }

92
src/libs/utils/id.h Normal file
View File

@@ -0,0 +1,92 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file 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 file. 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.
**
****************************************************************************/
#pragma once
#include "utils_global.h"
#include <QMetaType>
#include <QString>
QT_BEGIN_NAMESPACE
class QDataStream;
class QVariant;
QT_END_NAMESPACE
namespace Utils {
class QTCREATOR_UTILS_EXPORT Id
{
public:
Id() = default;
Id(const char *name); // Good to use.
Id(const QLatin1String &) = delete;
Id withSuffix(int suffix) const;
Id withSuffix(const char *suffix) const;
Id withSuffix(const QString &suffix) const;
Id withPrefix(const char *prefix) const;
QByteArray name() const;
QString toString() const; // Avoid.
QVariant toSetting() const; // Good to use.
QString suffixAfter(Id baseId) const;
bool isValid() const { return m_id; }
bool operator==(Id id) const { return m_id == id.m_id; }
bool operator==(const char *name) const;
bool operator!=(Id id) const { return m_id != id.m_id; }
bool operator!=(const char *name) const { return !operator==(name); }
bool operator<(Id id) const { return m_id < id.m_id; }
bool operator>(Id id) const { return m_id > id.m_id; }
bool alphabeticallyBefore(Id other) const;
quintptr uniqueIdentifier() const { return m_id; } // Avoid.
static Id fromString(const QString &str); // FIXME: avoid.
static Id fromName(const QByteArray &ba); // FIXME: avoid.
static Id fromSetting(const QVariant &variant); // Good to use.
static Id versionedId(const QByteArray &prefix, int major, int minor = -1);
static QSet<Id> fromStringList(const QStringList &list);
static QStringList toStringList(const QSet<Id> &ids);
private:
explicit Id(quintptr uid) : m_id(uid) {}
quintptr m_id = 0;
};
inline uint qHash(Id id) { return static_cast<uint>(id.uniqueIdentifier()); }
} // namespace Utils
Q_DECLARE_METATYPE(Utils::Id)
Q_DECLARE_METATYPE(QList<Utils::Id>)
QT_BEGIN_NAMESPACE
QTCREATOR_UTILS_EXPORT QDataStream &operator<<(QDataStream &ds, Utils::Id id);
QTCREATOR_UTILS_EXPORT QDataStream &operator>>(QDataStream &ds, Utils::Id &id);
QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug dbg, const Utils::Id &id);
QT_END_NAMESPACE

View File

@@ -134,7 +134,8 @@ SOURCES += \
$$PWD/camelcasecursor.cpp \ $$PWD/camelcasecursor.cpp \
$$PWD/infolabel.cpp \ $$PWD/infolabel.cpp \
$$PWD/overlaywidget.cpp \ $$PWD/overlaywidget.cpp \
$$PWD/archive.cpp $$PWD/archive.cpp \
$$PWD/id.cpp
HEADERS += \ HEADERS += \
$$PWD/environmentfwd.h \ $$PWD/environmentfwd.h \
@@ -285,7 +286,8 @@ HEADERS += \
$$PWD/camelcasecursor.h \ $$PWD/camelcasecursor.h \
$$PWD/infolabel.h \ $$PWD/infolabel.h \
$$PWD/overlaywidget.h \ $$PWD/overlaywidget.h \
$$PWD/archive.h $$PWD/archive.h \
$$PWD/id.h
FORMS += $$PWD/filewizardpage.ui \ FORMS += $$PWD/filewizardpage.ui \
$$PWD/projectintropage.ui \ $$PWD/projectintropage.ui \

View File

@@ -143,6 +143,8 @@ Project {
"htmldocextractor.h", "htmldocextractor.h",
"icon.cpp", "icon.cpp",
"icon.h", "icon.h",
"id.cpp",
"id.h",
"infolabel.cpp", "infolabel.cpp",
"infolabel.h", "infolabel.h",
"itemviews.cpp", "itemviews.cpp",

View File

@@ -27,7 +27,6 @@
#include <QHash> #include <QHash>
namespace Core { class Id; }
namespace Utils { class Environment; } namespace Utils { class Environment; }
namespace Autotest { namespace Autotest {

View File

@@ -27,8 +27,6 @@
#include <QHash> #include <QHash>
namespace Core { class Id; }
namespace Autotest { namespace Autotest {
class ITestFramework; class ITestFramework;

View File

@@ -34,10 +34,6 @@
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QTimer> #include <QTimer>
namespace Core {
class Id;
}
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QThreadPool; class QThreadPool;
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@@ -31,8 +31,6 @@ QT_BEGIN_NAMESPACE
class QSettings; class QSettings;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class Id; }
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {
struct TestSettings; struct TestSettings;

View File

@@ -27,7 +27,9 @@
#include <QHash> #include <QHash>
namespace Core { class Id; } namespace Utils {
class Id;
}
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QSettings; class QSettings;
@@ -60,8 +62,8 @@ struct TestSettings
bool popupOnFinish = true; bool popupOnFinish = true;
bool popupOnFail = false; bool popupOnFail = false;
RunAfterBuildMode runAfterBuild = RunAfterBuildMode::None; RunAfterBuildMode runAfterBuild = RunAfterBuildMode::None;
QHash<Core::Id, bool> frameworks; QHash<Utils::Id, bool> frameworks;
QHash<Core::Id, bool> frameworksGrouping; QHash<Utils::Id, bool> frameworksGrouping;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -32,8 +32,6 @@ class QComboBox;
class QPushButton; class QPushButton;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class Id; }
namespace BareMetal { namespace BareMetal {
namespace Internal { namespace Internal {

View File

@@ -42,7 +42,6 @@ QT_END_NAMESPACE
namespace Core { namespace Core {
class IDocument; class IDocument;
class Id;
} // namespace Core } // namespace Core
namespace TextEditor { class TextEditorWidget; } namespace TextEditor { class TextEditorWidget; }
namespace CppTools { namespace CppTools {

View File

@@ -29,8 +29,6 @@
#include <coreplugin/id.h> #include <coreplugin/id.h>
namespace Core { class Id; }
namespace CMakeProjectManager { namespace CMakeProjectManager {
class CMakeTool; class CMakeTool;

View File

@@ -85,7 +85,7 @@ add_qtc_plugin(Core
helpmanager.cpp helpmanager.h helpmanager_implementation.h helpmanager.cpp helpmanager.h helpmanager_implementation.h
icontext.cpp icontext.h icontext.cpp icontext.h
icore.cpp icore.h icore.cpp icore.h
id.cpp id.h id.h
idocument.cpp idocument.h idocument.cpp idocument.h
idocumentfactory.cpp idocumentfactory.h idocumentfactory.cpp idocumentfactory.h
ifilewizardextension.h ifilewizardextension.h

View File

@@ -26,6 +26,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h> #include <coreplugin/core_global.h>
#include <coreplugin/id.h>
#include <QPointer> #include <QPointer>
#include <QString> #include <QString>
@@ -34,7 +35,6 @@
namespace Core { namespace Core {
class Command; class Command;
class Id;
class CORE_EXPORT CommandButton : public QToolButton class CORE_EXPORT CommandButton : public QToolButton
{ {

View File

@@ -20,7 +20,6 @@ SOURCES += corejsextensions.cpp \
fancytabwidget.cpp \ fancytabwidget.cpp \
generalsettings.cpp \ generalsettings.cpp \
themechooser.cpp \ themechooser.cpp \
id.cpp \
icontext.cpp \ icontext.cpp \
jsexpander.cpp \ jsexpander.cpp \
messagemanager.cpp \ messagemanager.cpp \

View File

@@ -92,7 +92,6 @@ Project {
"icontext.h", "icontext.h",
"icore.cpp", "icore.cpp",
"icore.h", "icore.h",
"id.cpp",
"id.h", "id.h",
"idocument.cpp", "idocument.cpp",
"idocument.h", "idocument.h",

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <utils/icon.h> #include <utils/icon.h>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <QObject> #include <QObject>

View File

@@ -26,6 +26,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h> #include <coreplugin/core_global.h>
#include <coreplugin/id.h>
#include <utils/mimetypes/mimetype.h> #include <utils/mimetypes/mimetype.h>
@@ -33,7 +34,6 @@
namespace Core { namespace Core {
class Id;
class IExternalEditor; class IExternalEditor;
using ExternalEditorList = QList<IExternalEditor *>; using ExternalEditorList = QList<IExternalEditor *>;

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <QMap> #include <QMap>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include "core_global.h"
#include "id.h" #include "id.h"
#include <QSharedDataPointer> #include <QSharedDataPointer>

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of Qt Creator. ** This file is part of Qt Creator.
@@ -25,68 +25,10 @@
#pragma once #pragma once
#include "core_global.h" #include <utils/id.h>
#include <QMetaType>
#include <QString>
QT_BEGIN_NAMESPACE
class QDataStream;
class QVariant;
QT_END_NAMESPACE
namespace Core { namespace Core {
class CORE_EXPORT Id using Id = Utils::Id;
{
public:
Id() = default;
Id(const char *name); // Good to use.
Id(const QLatin1String &) = delete;
Id withSuffix(int suffix) const;
Id withSuffix(const char *suffix) const;
Id withSuffix(const QString &suffix) const;
Id withPrefix(const char *prefix) const;
QByteArray name() const;
QString toString() const; // Avoid.
QVariant toSetting() const; // Good to use.
QString suffixAfter(Id baseId) const;
bool isValid() const { return m_id; }
bool operator==(Id id) const { return m_id == id.m_id; }
bool operator==(const char *name) const;
bool operator!=(Id id) const { return m_id != id.m_id; }
bool operator!=(const char *name) const { return !operator==(name); }
bool operator<(Id id) const { return m_id < id.m_id; }
bool operator>(Id id) const { return m_id > id.m_id; }
bool alphabeticallyBefore(Id other) const;
quintptr uniqueIdentifier() const { return m_id; } // Avoid.
static Id fromString(const QString &str); // FIXME: avoid.
static Id fromName(const QByteArray &ba); // FIXME: avoid.
static Id fromSetting(const QVariant &variant); // Good to use.
static Id versionedId(const QByteArray &prefix, int major, int minor = -1);
static QSet<Id> fromStringList(const QStringList &list);
static QStringList toStringList(const QSet<Id> &ids);
private:
explicit Id(quintptr uid) : m_id(uid) {}
quintptr m_id = 0;
};
inline uint qHash(Id id) { return static_cast<uint>(id.uniqueIdentifier()); }
} // namespace Core } // namespace Core
Q_DECLARE_METATYPE(Core::Id)
Q_DECLARE_METATYPE(QList<Core::Id>)
QT_BEGIN_NAMESPACE
QDataStream &operator<<(QDataStream &ds, Core::Id id);
QDataStream &operator>>(QDataStream &ds, Core::Id &id);
CORE_EXPORT QDebug operator<<(QDebug dbg, const Core::Id &id);
QT_END_NAMESPACE

View File

@@ -26,13 +26,13 @@
#pragma once #pragma once
#include "core_global.h" #include "core_global.h"
#include "id.h"
#include <QObject> #include <QObject>
namespace Utils { class FilePath; } namespace Utils { class FilePath; }
namespace Core { namespace Core {
class Id;
class InfoBar; class InfoBar;
namespace Internal { namespace Internal {

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include "core_global.h"
#include "id.h" #include "id.h"
#include <QObject> #include <QObject>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include "core_global.h"
#include "id.h" #include "id.h"
#include <QObject> #include <QObject>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <utils/optional.h> #include <utils/optional.h>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include <coreplugin/core_global.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <QObject> #include <QObject>

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include "core_global.h"
#include "id.h" #include "id.h"
#include <QWidget> #include <QWidget>

View File

@@ -26,13 +26,13 @@
#pragma once #pragma once
#include <coreplugin/core_global.h> #include <coreplugin/core_global.h>
#include <coreplugin/id.h>
#include <QString> #include <QString>
#include <QFuture> #include <QFuture>
#include <QWidget> #include <QWidget>
namespace Core { namespace Core {
class Id;
class FutureProgressPrivate; class FutureProgressPrivate;
class CORE_EXPORT FutureProgress : public QWidget class CORE_EXPORT FutureProgress : public QWidget

View File

@@ -25,6 +25,7 @@
#pragma once #pragma once
#include "core_global.h"
#include "id.h" #include "id.h"
#include <QWidget> #include <QWidget>

View File

@@ -26,13 +26,13 @@
#pragma once #pragma once
#include "core_global.h" #include "core_global.h"
#include "id.h"
#include <QString> #include <QString>
#include <QObject> #include <QObject>
namespace Core { namespace Core {
class Id;
class IVersionControl; class IVersionControl;
namespace Internal { class MainWindow; } namespace Internal { class MainWindow; }

View File

@@ -25,6 +25,8 @@
#pragma once #pragma once
#include <coreplugin/id.h>
#include <QAction> #include <QAction>
#include <QHash> #include <QHash>
#include <QObject> #include <QObject>
@@ -32,7 +34,6 @@
#include <functional> #include <functional>
namespace Core { namespace Core {
class Id;
class InfoBar; class InfoBar;
} }

View File

@@ -25,9 +25,10 @@
#pragma once #pragma once
#include <coreplugin/id.h>
#include <QDialog> #include <QDialog>
namespace Core { class Id; }
namespace ProjectExplorer { class Kit; } namespace ProjectExplorer { class Kit; }
namespace Utils { class FilePath; } namespace Utils { class FilePath; }

View File

@@ -26,6 +26,8 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <coreplugin/id.h>
#include <QTextCursor> #include <QTextCursor>
// forward declarations // forward declarations
@@ -33,7 +35,6 @@ QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QPlainTextEdit) QT_FORWARD_DECLARE_CLASS(QPlainTextEdit)
namespace Core { namespace Core {
class Id;
class IEditor; class IEditor;
} }
namespace TextEditor { namespace TextEditor {

View File

@@ -25,16 +25,14 @@
#pragma once #pragma once
#include <coreplugin/id.h>
#include <QObject> #include <QObject>
#include <QVector> #include <QVector>
#include <QVersionNumber> #include <QVersionNumber>
QT_FORWARD_DECLARE_CLASS(QWidget) QT_FORWARD_DECLARE_CLASS(QWidget)
namespace Core {
class Id;
}
namespace Utils { namespace Utils {
class FilePath; class FilePath;
class PathChooser; class PathChooser;

View File

@@ -25,9 +25,9 @@
#pragma once #pragma once
#include <QDialog> #include <coreplugin/id.h>
namespace Core { class Id; } #include <QDialog>
namespace ProjectExplorer { namespace ProjectExplorer {
class IDeviceFactory; class IDeviceFactory;

View File

@@ -27,6 +27,8 @@
#include "projectexplorer_export.h" #include "projectexplorer_export.h"
#include <coreplugin/id.h>
#include <QObject> #include <QObject>
#include <QVariantMap> #include <QVariantMap>
@@ -34,7 +36,6 @@
namespace Core { namespace Core {
class IEditor; class IEditor;
class Id;
} }
namespace TextEditor { namespace TextEditor {

View File

@@ -38,8 +38,6 @@ class QComboBox;
class QPushButton; class QPushButton;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class Id; }
namespace ProjectExplorer { namespace ProjectExplorer {
// Let the user pick a kit. // Let the user pick a kit.

View File

@@ -40,7 +40,6 @@ QT_END_NAMESPACE
namespace Core { namespace Core {
class IMode; class IMode;
class Id;
} // namespace Core } // namespace Core
namespace Utils { namespace Utils {

View File

@@ -27,12 +27,12 @@
#include "projectexplorer_export.h" #include "projectexplorer_export.h"
#include <coreplugin/id.h>
#include <utils/fancymainwindow.h> #include <utils/fancymainwindow.h>
#include <memory> #include <memory>
namespace Core { class Id; }
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Internal { namespace Internal {

View File

@@ -40,7 +40,6 @@
QT_FORWARD_DECLARE_CLASS(QSpacerItem) QT_FORWARD_DECLARE_CLASS(QSpacerItem)
namespace Core { class Id; }
namespace Utils { class FilePath; } namespace Utils { class FilePath; }
namespace ProjectExplorer { namespace ProjectExplorer {

View File

@@ -25,9 +25,10 @@
#pragma once #pragma once
#include <coreplugin/id.h>
#include <QDialog> #include <QDialog>
namespace Core { class Id; }
namespace ProjectExplorer { class Kit; } namespace ProjectExplorer { class Kit; }
namespace QmlProfiler { namespace QmlProfiler {

View File

@@ -29,7 +29,6 @@
#include <QObject> #include <QObject>
namespace Core { class Id; }
namespace TextEditor { namespace TextEditor {
class IAssistProcessor; class IAssistProcessor;

View File

@@ -29,9 +29,10 @@
#include "indenter.h" #include "indenter.h"
#include <coreplugin/id.h>
#include <QWidget> #include <QWidget>
namespace Core { class Id; }
namespace TextEditor { namespace TextEditor {
class ICodeStylePreferences; class ICodeStylePreferences;

View File

@@ -27,12 +27,12 @@
#include <texteditor/texteditor_global.h> #include <texteditor/texteditor_global.h>
#include <coreplugin/id.h>
#include <QChar> #include <QChar>
#include <QList> #include <QList>
#include <QString> #include <QString>
namespace Core { class Id; }
namespace TextEditor { namespace TextEditor {
class TEXTEDITOR_EXPORT NameMangler class TEXTEDITOR_EXPORT NameMangler

View File

@@ -27,12 +27,13 @@
#include "texteditor_global.h" #include "texteditor_global.h"
#include <coreplugin/id.h>
#include <QObject> #include <QObject>
#include <functional> #include <functional>
namespace Core { namespace Core {
class Id;
class IEditor; class IEditor;
} }

View File

@@ -27,6 +27,8 @@
#include "vcsbase_global.h" #include "vcsbase_global.h"
#include <coreplugin/id.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/synchronousprocess.h> #include <utils/synchronousprocess.h>
@@ -42,8 +44,6 @@ class QProcessEnvironment;
class QToolBar; class QToolBar;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class Id; }
namespace VcsBase { namespace VcsBase {
class VcsCommand; class VcsCommand;

View File

@@ -49,7 +49,6 @@ class SynchronousProcessResponse;
namespace Core { namespace Core {
class Context; class Context;
class IVersionControl; class IVersionControl;
class Id;
class IDocument; class IDocument;
} // namespace Core } // namespace Core

View File

@@ -349,7 +349,7 @@ extend_qtc_test(unittest
DEFINES CORE_STATIC_LIBRARY DEFINES CORE_STATIC_LIBRARY
SOURCES SOURCES
coreicons.cpp coreicons.h coreicons.cpp coreicons.h
id.cpp id.h id.h
find/ifindfilter.cpp find/ifindfilter.h find/ifindfilter.cpp find/ifindfilter.h
locator/ilocatorfilter.cpp locator/ilocatorfilter.h locator/ilocatorfilter.cpp locator/ilocatorfilter.h
) )