summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp3
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h130
-rw-r--r--src/plugins/projectexplorer/gcctoolchainfactories.h157
-rw-r--r--src/plugins/projectexplorer/headerpath.h68
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp1
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.h1
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorer.pro4
-rw-r--r--src/plugins/projectexplorer/toolchain.h35
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.cpp4
10 files changed, 237 insertions, 168 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 37591518e0..4908dd7694 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -32,13 +32,16 @@
**************************************************************************/
#include "gcctoolchain.h"
+#include "gcctoolchainfactories.h"
#include "gccparser.h"
#include "linuxiccparser.h"
+#include "headerpath.h"
#include "projectexplorerconstants.h"
#include <utils/environment.h>
#include <utils/synchronousprocess.h>
#include <utils/qtcassert.h>
+#include <utils/pathchooser.h>
#include <QtCore/QBuffer>
#include <QtCore/QCoreApplication>
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index e350e85736..c0a79c16b7 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -37,14 +37,7 @@
#include "projectexplorer_export.h"
#include "toolchain.h"
-
-#include "toolchainconfigwidget.h"
-
-#include <utils/pathchooser.h>
-
-QT_BEGIN_NAMESPACE
-class QCheckBox;
-QT_END_NAMESPACE
+#include "abi.h"
namespace ProjectExplorer {
@@ -116,69 +109,6 @@ private:
friend class ToolChainFactory;
};
-
-// --------------------------------------------------------------------------
-// GccToolChainFactory
-// --------------------------------------------------------------------------
-
-namespace Internal {
-
-class GccToolChainFactory : public ToolChainFactory
-{
- Q_OBJECT
-
-public:
- // Name used to display the name of the toolchain that will be created.
- QString displayName() const;
- QString id() const;
-
- QList<ToolChain *> autoDetect();
-
- bool canCreate();
- ToolChain *create();
-
- // Used by the ToolChainManager to restore user-generated ToolChains
- bool canRestore(const QVariantMap &data);
- ToolChain *restore(const QVariantMap &data);
-
-protected:
- virtual GccToolChain *createToolChain(bool autoDetect);
- QList<ToolChain *> autoDetectToolchains(const QString &compiler,
- const QStringList &debuggers,
- const Abi &);
-};
-
-} // namespace Internal
-
-// --------------------------------------------------------------------------
-// GccToolChainConfigWidget
-// --------------------------------------------------------------------------
-
-namespace Internal {
-
-class GccToolChainConfigWidget : public ToolChainConfigWidget
-{
- Q_OBJECT
-
-public:
- GccToolChainConfigWidget(GccToolChain *);
- void apply();
- void discard() { setFromToolchain(); }
- bool isDirty() const;
-
-private slots:
- void handlePathChange();
- void handle32BitChange();
-
-private:
- void setFromToolchain();
-
- Utils::PathChooser *m_compilerPath;
- QCheckBox *m_force32BitCheckBox;
-};
-
-} // namespace Internal
-
// --------------------------------------------------------------------------
// MingwToolChain
// --------------------------------------------------------------------------
@@ -199,36 +129,6 @@ private:
};
// --------------------------------------------------------------------------
-// MingwToolChainFactory
-// --------------------------------------------------------------------------
-
-namespace Internal {
-
-class MingwToolChainFactory : public GccToolChainFactory
-{
- Q_OBJECT
-
-public:
- // Name used to display the name of the toolchain that will be created.
- QString displayName() const;
- QString id() const;
-
- QList<ToolChain *> autoDetect();
-
- bool canCreate();
- ToolChain *create();
-
- // Used by the ToolChainManager to restore user-generated ToolChains
- bool canRestore(const QVariantMap &data);
- ToolChain *restore(const QVariantMap &data);
-
-protected:
- GccToolChain *createToolChain(bool autoDetect);
-};
-
-} // namespace Internal
-
-// --------------------------------------------------------------------------
// LinuxIccToolChain
// --------------------------------------------------------------------------
@@ -249,34 +149,6 @@ private:
friend class ToolChainFactory;
};
-// --------------------------------------------------------------------------
-// LinuxIccToolChainFactory
-// --------------------------------------------------------------------------
-
-namespace Internal {
-
-class LinuxIccToolChainFactory : public GccToolChainFactory
-{
- Q_OBJECT
-
-public:
- // Name used to display the name of the toolchain that will be created.
- QString displayName() const;
- QString id() const;
-
- QList<ToolChain *> autoDetect();
-
- ToolChain *create();
-
- // Used by the ToolChainManager to restore user-generated ToolChains
- bool canRestore(const QVariantMap &data);
- ToolChain *restore(const QVariantMap &data);
-
-protected:
- GccToolChain *createToolChain(bool autoDetect);
-};
-
-} // namespace Internal
} // namespace ProjectExplorer
#endif // GCCTOOLCHAIN_H
diff --git a/src/plugins/projectexplorer/gcctoolchainfactories.h b/src/plugins/projectexplorer/gcctoolchainfactories.h
new file mode 100644
index 0000000000..852349537b
--- /dev/null
+++ b/src/plugins/projectexplorer/gcctoolchainfactories.h
@@ -0,0 +1,157 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef GCCTOOLCHAINFACTORIES_H
+#define GCCTOOLCHAINFACTORIES_H
+
+#include "toolchain.h"
+#include "toolchainconfigwidget.h"
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+QT_END_NAMESPACE
+
+namespace Utils {
+class PathChooser;
+}
+
+namespace ProjectExplorer {
+class GccToolChain;
+
+namespace Internal {
+
+class GccToolChainFactory : public ToolChainFactory
+{
+ Q_OBJECT
+
+public:
+ // Name used to display the name of the toolchain that will be created.
+ QString displayName() const;
+ QString id() const;
+
+ QList<ToolChain *> autoDetect();
+
+ bool canCreate();
+ ToolChain *create();
+
+ // Used by the ToolChainManager to restore user-generated ToolChains
+ bool canRestore(const QVariantMap &data);
+ ToolChain *restore(const QVariantMap &data);
+
+protected:
+ virtual GccToolChain *createToolChain(bool autoDetect);
+ QList<ToolChain *> autoDetectToolchains(const QString &compiler,
+ const QStringList &debuggers,
+ const Abi &);
+};
+
+// --------------------------------------------------------------------------
+// GccToolChainConfigWidget
+// --------------------------------------------------------------------------
+
+class GccToolChainConfigWidget : public ToolChainConfigWidget
+{
+ Q_OBJECT
+
+public:
+ GccToolChainConfigWidget(GccToolChain *);
+ void apply();
+ void discard() { setFromToolchain(); }
+ bool isDirty() const;
+
+private slots:
+ void handlePathChange();
+ void handle32BitChange();
+
+private:
+ void setFromToolchain();
+
+ Utils::PathChooser *m_compilerPath;
+ QCheckBox *m_force32BitCheckBox;
+};
+
+// --------------------------------------------------------------------------
+// MingwToolChainFactory
+// --------------------------------------------------------------------------
+
+class MingwToolChainFactory : public GccToolChainFactory
+{
+ Q_OBJECT
+
+public:
+ // Name used to display the name of the toolchain that will be created.
+ QString displayName() const;
+ QString id() const;
+
+ QList<ToolChain *> autoDetect();
+
+ bool canCreate();
+ ToolChain *create();
+
+ // Used by the ToolChainManager to restore user-generated ToolChains
+ bool canRestore(const QVariantMap &data);
+ ToolChain *restore(const QVariantMap &data);
+
+protected:
+ GccToolChain *createToolChain(bool autoDetect);
+};
+
+// --------------------------------------------------------------------------
+// LinuxIccToolChainFactory
+// --------------------------------------------------------------------------
+
+class LinuxIccToolChainFactory : public GccToolChainFactory
+{
+ Q_OBJECT
+
+public:
+ // Name used to display the name of the toolchain that will be created.
+ QString displayName() const;
+ QString id() const;
+
+ QList<ToolChain *> autoDetect();
+
+ ToolChain *create();
+
+ // Used by the ToolChainManager to restore user-generated ToolChains
+ bool canRestore(const QVariantMap &data);
+ ToolChain *restore(const QVariantMap &data);
+
+protected:
+ GccToolChain *createToolChain(bool autoDetect);
+};
+
+} // namespace Internal
+} // namespace ProjectExplorer
+
+#endif // GCCTOOLCHAINFACTORIES_H
diff --git a/src/plugins/projectexplorer/headerpath.h b/src/plugins/projectexplorer/headerpath.h
new file mode 100644
index 0000000000..44454ed9ec
--- /dev/null
+++ b/src/plugins/projectexplorer/headerpath.h
@@ -0,0 +1,68 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef HEADERPATH_H
+#define HEADERPATH_H
+
+#include "projectexplorer_export.h"
+
+namespace ProjectExplorer {
+
+class PROJECTEXPLORER_EXPORT HeaderPath
+{
+public:
+ enum Kind {
+ GlobalHeaderPath,
+ UserHeaderPath,
+ FrameworkHeaderPath
+ };
+
+ HeaderPath()
+ : m_kind(GlobalHeaderPath)
+ { }
+
+ HeaderPath(const QString &path, Kind kind)
+ : m_path(path), m_kind(kind)
+ { }
+
+ QString path() const { return m_path; }
+ Kind kind() const { return m_kind; }
+
+private:
+ QString m_path;
+ Kind m_kind;
+};
+
+} // namespace ProjectExplorer
+
+#endif // HEADERPATH_H
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 02872ec7d3..bc22bf9fc6 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -34,6 +34,7 @@
#include "msvctoolchain.h"
#include "msvcparser.h"
#include "projectexplorerconstants.h"
+#include "headerpath.h"
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorersettings.h>
diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h
index 385b028812..8c4cc9eb85 100644
--- a/src/plugins/projectexplorer/msvctoolchain.h
+++ b/src/plugins/projectexplorer/msvctoolchain.h
@@ -35,6 +35,7 @@
#define MSVCTOOLCHAIN_H
#include "toolchain.h"
+#include "abi.h"
#include "toolchainconfigwidget.h"
#include <utils/environment.h>
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 508e31ae0d..4c9caa9dab 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -35,7 +35,7 @@
#include "buildsteplist.h"
#include "deployconfiguration.h"
-#include "gcctoolchain.h"
+#include "gcctoolchainfactories.h"
#include "msvctoolchain.h"
#include "project.h"
#include "projectexplorersettings.h"
diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro
index 81618e6e57..f4616a76b4 100644
--- a/src/plugins/projectexplorer/projectexplorer.pro
+++ b/src/plugins/projectexplorer/projectexplorer.pro
@@ -105,7 +105,9 @@ HEADERS += projectexplorer.h \
sessionnodeimpl.h \
metatypedeclarations.h \
publishing/publishingwizardselectiondialog.h \
- publishing/ipublishingwizardfactory.h
+ publishing/ipublishingwizardfactory.h \
+ headerpath.h \
+ gcctoolchainfactories.h
SOURCES += projectexplorer.cpp \
abi.cpp \
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index d2e7b5dc3e..bc86ad7e05 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -36,12 +36,8 @@
#include "projectexplorer_export.h"
-#include "abi.h"
-
#include <QtCore/QObject>
#include <QtCore/QString>
-#include <QtCore/QPair>
-#include <QtCore/QMetaType>
#include <QtCore/QVariantMap>
namespace Utils {
@@ -54,38 +50,11 @@ namespace Internal {
class ToolChainPrivate;
}
+class Abi;
class IOutputParser;
class ToolChainConfigWidget;
class ToolChainFactory;
-
-// --------------------------------------------------------------------------
-// HeaderPath
-// --------------------------------------------------------------------------
-
-class PROJECTEXPLORER_EXPORT HeaderPath
-{
-public:
- enum Kind {
- GlobalHeaderPath,
- UserHeaderPath,
- FrameworkHeaderPath
- };
-
- HeaderPath()
- : m_kind(GlobalHeaderPath)
- { }
-
- HeaderPath(const QString &path, Kind kind)
- : m_path(path), m_kind(kind)
- { }
-
- QString path() const { return m_path; }
- Kind kind() const { return m_kind; }
-
-private:
- QString m_path;
- Kind m_kind;
-};
+class HeaderPath;
// --------------------------------------------------------------------------
// ToolChain
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.cpp b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
index 50ff46a0af..70a1c46023 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.cpp
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
@@ -32,7 +32,6 @@
**************************************************************************/
#include "toolchainconfigwidget.h"
-
#include "toolchain.h"
#include <utils/qtcassert.h>
@@ -58,8 +57,6 @@ public:
Q_ASSERT(tc);
}
-
-
ToolChain *m_toolChain;
Utils::PathChooser *m_debuggerPathChooser;
QLabel *m_errorLabel;
@@ -176,5 +173,4 @@ void ToolChainConfigWidget::clearErrorMessage()
m_d->m_errorLabel->setVisible(false);
}
-
} // namespace ProjectExplorer