Commit f7e7fc4e authored by hjk's avatar hjk Committed by hjk
Browse files

Nim: Inline NimBuildInfo into nimbuildconfigurationfactory.cpp



It's only used there. Less code, less disk space.

This code is likely to be copied over and over into future language
plugins.
We cannot afford to spend 1 MB of disk space per build for every 12
lines
of trivial code, so remove this precedent.

Before:

1006824 ./.obj/debug-shared/nimbuildinfo.o
1509784 ./.obj/debug-shared/nimbuildconfigurationfactory.o

After:

1520840 ./.obj/debug-shared/nimbuildconfigurationfactory.o

Change-Id: I8e82b73e50595089d270e52b34cf8bd80ec7e965
Reviewed-by: default avatarFilippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 2847e248
......@@ -20,7 +20,6 @@ HEADERS += \
project/nimprojectnode.h \
project/nimbuildconfiguration.h \
project/nimbuildconfigurationfactory.h \
project/nimbuildinfo.h \
project/nimcompilerbuildstep.h \
project/nimcompilerbuildstepconfigwidget.h \
project/nimcompilercleanstep.h \
......@@ -50,7 +49,6 @@ SOURCES += \
project/nimprojectnode.cpp \
project/nimbuildconfiguration.cpp \
project/nimbuildconfigurationfactory.cpp \
project/nimbuildinfo.cpp \
project/nimcompilerbuildstep.cpp \
project/nimcompilerbuildstepconfigwidget.cpp \
project/nimcompilercleanstep.cpp \
......
......@@ -36,7 +36,6 @@ QtcPlugin {
"nimbuildconfiguration.h", "nimbuildconfiguration.cpp",
"nimbuildconfigurationfactory.h", "nimbuildconfigurationfactory.cpp",
"nimbuildconfigurationwidget.h", "nimbuildconfigurationwidget.cpp",
"nimbuildinfo.h", "nimbuildinfo.cpp",
"nimcompilerbuildstep.h", "nimcompilerbuildstep.cpp",
"nimcompilerbuildstepconfigwidget.h", "nimcompilerbuildstepconfigwidget.cpp", "nimcompilerbuildstepconfigwidget.ui",
"nimcompilerbuildstepfactory.h", "nimcompilerbuildstepfactory.cpp",
......
......@@ -25,7 +25,6 @@
#include "nimbuildconfigurationfactory.h"
#include "nimbuildconfiguration.h"
#include "nimbuildinfo.h"
#include "nimcompilerbuildstep.h"
#include "nimcompilercleanstep.h"
#include "nimproject.h"
......@@ -33,6 +32,7 @@
#include "../nimconstants.h"
#include <coreplugin/documentmanager.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildstep.h>
......@@ -49,6 +49,21 @@ using namespace Utils;
namespace Nim {
class NimBuildInfo : public BuildInfo
{
public:
NimBuildInfo(BuildConfiguration::BuildType buildType,
const NimBuildConfigurationFactory *factory)
: BuildInfo(factory), m_buildType(buildType)
{}
BuildConfiguration::BuildType buildType() const { return m_buildType; }
private:
BuildConfiguration::BuildType m_buildType;
};
NimBuildConfigurationFactory::NimBuildConfigurationFactory(QObject *parent)
: IBuildConfigurationFactory(parent)
{}
......
/****************************************************************************
**
** Copyright (C) Filippo Cucchetto <filippocucchetto@gmail.com>
** Contact: http://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.
**
****************************************************************************/
#include "nimbuildinfo.h"
#include "nimbuildconfigurationfactory.h"
using namespace ProjectExplorer;
namespace Nim {
NimBuildInfo::NimBuildInfo(BuildConfiguration::BuildType buildType,
const NimBuildConfigurationFactory *factory)
: BuildInfo(factory)
, m_buildType(buildType)
{}
BuildConfiguration::BuildType NimBuildInfo::buildType() const
{
return m_buildType;
}
}
/****************************************************************************
**
** Copyright (C) Filippo Cucchetto <filippocucchetto@gmail.com>
** Contact: http://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 <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildinfo.h>
namespace Nim {
class NimBuildConfigurationFactory;
class NimBuildInfo : public ProjectExplorer::BuildInfo
{
public:
NimBuildInfo(ProjectExplorer::BuildConfiguration::BuildType buildType,
const NimBuildConfigurationFactory *factory);
ProjectExplorer::BuildConfiguration::BuildType buildType() const;
private:
ProjectExplorer::BuildConfiguration::BuildType m_buildType;
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment