aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-08-20 11:33:04 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-08-20 12:05:40 +0200
commit9525a821b37837d90cc7d61770aecc3cf6c2c441 (patch)
tree90f5775fc315c73e9449b43296428750c3bbcd8c /src/app
parent065d89fa2c1483dbe7309d36cff377adc654064b (diff)
Remove "showProperties" command.
Firstly, it's more of a debugging thing than something that should be exposed as a command to users. Secondly, it's not very useful, as all the groups and artifacts can have different properties. Change-Id: I4aec83550c2f8e597752a181437e580622a6a587 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qbs/commandlinefrontend.cpp13
-rw-r--r--src/app/qbs/parser/command.cpp29
-rw-r--r--src/app/qbs/parser/command.h13
-rw-r--r--src/app/qbs/parser/commandlineparser.cpp1
-rw-r--r--src/app/qbs/parser/commandpool.cpp3
-rw-r--r--src/app/qbs/parser/commandtype.h2
-rw-r--r--src/app/qbs/qbs.pro2
-rw-r--r--src/app/qbs/qbs.qbs2
-rw-r--r--src/app/qbs/showproperties.cpp51
-rw-r--r--src/app/qbs/showproperties.h42
10 files changed, 2 insertions, 156 deletions
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp
index 02768aa21..d3cedb93f 100644
--- a/src/app/qbs/commandlinefrontend.cpp
+++ b/src/app/qbs/commandlinefrontend.cpp
@@ -30,7 +30,6 @@
#include "application.h"
#include "consoleprogressobserver.h"
-#include "showproperties.h"
#include "status.h"
#include "../shared/logging/consolelogger.h"
@@ -80,7 +79,6 @@ void CommandLineFrontend::start()
.arg(m_parser.commandName(), m_parser.commandDescription()));
}
// Fall-through intended.
- case PropertiesCommandType:
case StatusCommandType:
case InstallCommandType:
if (m_parser.buildConfigurations().count() > 1) {
@@ -298,18 +296,9 @@ void CommandLineFrontend::handleProjectsResolved()
checkForExactlyOneProduct();
qApp->exit(runShell());
break;
- case StatusCommandType: {
+ case StatusCommandType:
qApp->exit(printStatus(m_projects.first().projectData()));
break;
- }
- case PropertiesCommandType: {
- QList<ProductData> products;
- const ProductMap &p = productsToUse();
- foreach (const QList<ProductData> &pProducts, p)
- products << pProducts;
- qApp->exit(showProperties(products));
- break;
- }
case BuildCommandType:
build();
break;
diff --git a/src/app/qbs/parser/command.cpp b/src/app/qbs/parser/command.cpp
index a29d8957f..c9f24a36a 100644
--- a/src/app/qbs/parser/command.cpp
+++ b/src/app/qbs/parser/command.cpp
@@ -352,35 +352,6 @@ QList<CommandLineOption::Type> ShellCommand::supportedOptions() const
<< CommandLineOption::ProductsOptionType;
}
-QString PropertiesCommand::shortDescription() const
-{
- return Tr::tr("Show the project properties for a configuration.");
-}
-
-QString PropertiesCommand::longDescription() const
-{
- QString description = Tr::tr("qbs %1 [options] [variant] [property:value] ...\n")
- .arg(representation());
- description += Tr::tr("Shows all properties of the project in the given configuration.\n");
- return description += supportedOptionsDescription();
-}
-
-QString PropertiesCommand::representation() const
-{
- return QLatin1String("properties");
-}
-
-QList<CommandLineOption::Type> PropertiesCommand::supportedOptions() const
-{
- return QList<CommandLineOption::Type>()
- << CommandLineOption::FileOptionType
- << CommandLineOption::LogLevelOptionType
- << CommandLineOption::VerboseOptionType
- << CommandLineOption::QuietOptionType
- << CommandLineOption::ShowProgressOptionType
- << CommandLineOption::ProductsOptionType;
-}
-
QString StatusCommand::shortDescription() const
{
return Tr::tr("Show the status of files in the project directory.");
diff --git a/src/app/qbs/parser/command.h b/src/app/qbs/parser/command.h
index b5446c04f..eff05591a 100644
--- a/src/app/qbs/parser/command.h
+++ b/src/app/qbs/parser/command.h
@@ -149,19 +149,6 @@ private:
QList<CommandLineOption::Type> supportedOptions() const;
};
-class PropertiesCommand : public Command
-{
-public:
- PropertiesCommand(CommandLineOptionPool &optionPool) : Command(optionPool) {}
-
-private:
- CommandType type() const { return PropertiesCommandType; }
- QString shortDescription() const;
- QString longDescription() const;
- QString representation() const;
- QList<CommandLineOption::Type> supportedOptions() const;
-};
-
// TODO: It seems wrong that a configuration has to be given here. Ideally, this command would just track *all* files regardless of conditions. Is that possible?
class StatusCommand : public Command
{
diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp
index 083339042..40c0fa3e2 100644
--- a/src/app/qbs/parser/commandlineparser.cpp
+++ b/src/app/qbs/parser/commandlineparser.cpp
@@ -374,7 +374,6 @@ QList<Command *> CommandLineParser::CommandLineParserPrivate::allCommands() cons
<< commandPool.getCommand(CleanCommandType)
<< commandPool.getCommand(RunCommandType)
<< commandPool.getCommand(ShellCommandType)
- << commandPool.getCommand(PropertiesCommandType)
<< commandPool.getCommand(StatusCommandType)
<< commandPool.getCommand(UpdateTimestampsCommandType)
<< commandPool.getCommand(InstallCommandType)
diff --git a/src/app/qbs/parser/commandpool.cpp b/src/app/qbs/parser/commandpool.cpp
index 9b626124e..ac1d37eb1 100644
--- a/src/app/qbs/parser/commandpool.cpp
+++ b/src/app/qbs/parser/commandpool.cpp
@@ -61,9 +61,6 @@ qbs::Command *CommandPool::getCommand(CommandType type) const
case ShellCommandType:
command = new ShellCommand(m_optionPool);
break;
- case PropertiesCommandType:
- command = new PropertiesCommand(m_optionPool);
- break;
case StatusCommandType:
command = new StatusCommand(m_optionPool);
break;
diff --git a/src/app/qbs/parser/commandtype.h b/src/app/qbs/parser/commandtype.h
index 58e5f7bbb..fa8d90133 100644
--- a/src/app/qbs/parser/commandtype.h
+++ b/src/app/qbs/parser/commandtype.h
@@ -33,7 +33,7 @@ namespace qbs {
enum CommandType {
ResolveCommandType, BuildCommandType, CleanCommandType, RunCommandType, ShellCommandType,
- PropertiesCommandType, StatusCommandType, UpdateTimestampsCommandType,
+ StatusCommandType, UpdateTimestampsCommandType,
InstallCommandType, HelpCommandType
};
diff --git a/src/app/qbs/qbs.pro b/src/app/qbs/qbs.pro
index b6e064d7d..9e4553c53 100644
--- a/src/app/qbs/qbs.pro
+++ b/src/app/qbs/qbs.pro
@@ -6,7 +6,6 @@ TARGET = qbs
SOURCES += main.cpp \
ctrlchandler.cpp \
application.cpp \
- showproperties.cpp \
status.cpp \
consoleprogressobserver.cpp \
commandlinefrontend.cpp \
@@ -15,7 +14,6 @@ SOURCES += main.cpp \
HEADERS += \
ctrlchandler.h \
application.h \
- showproperties.h \
status.h \
consoleprogressobserver.h \
commandlinefrontend.h \
diff --git a/src/app/qbs/qbs.qbs b/src/app/qbs/qbs.qbs
index 8c0e26a93..8aba24492 100644
--- a/src/app/qbs/qbs.qbs
+++ b/src/app/qbs/qbs.qbs
@@ -18,8 +18,6 @@ QbsApp {
"main.cpp",
"qbstool.cpp",
"qbstool.h",
- "showproperties.cpp",
- "showproperties.h",
"status.cpp",
"status.h",
]
diff --git a/src/app/qbs/showproperties.cpp b/src/app/qbs/showproperties.cpp
deleted file mode 100644
index ec4754ef5..000000000
--- a/src/app/qbs/showproperties.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Build Suite.
-**
-** 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.
-**
-****************************************************************************/
-
-#include "showproperties.h"
-
-#include <qbs.h>
-
-#include <cstdio>
-
-namespace qbs {
-
-static void dumpProperties(const ProductData &product)
-{
- printf("--------%s--------\n", qPrintable(product.name()));
- printf("%s", qPrintable(product.properties().toString()));
-}
-
-int showProperties(const QList<ProductData> &products)
-{
- foreach (const ProductData &product, products)
- dumpProperties(product);
- return 0;
-}
-
-} // namespace qbs
diff --git a/src/app/qbs/showproperties.h b/src/app/qbs/showproperties.h
deleted file mode 100644
index 46826ef21..000000000
--- a/src/app/qbs/showproperties.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Build Suite.
-**
-** 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 SHOWPROPERTIES_H
-#define SHOWPROPERTIES_H
-
-#include <QList>
-
-namespace qbs {
-class ProductData;
-
-int showProperties(const QList<ProductData> &products);
-
-} // namespace qbs
-
-#endif // SHOWPROPERTIES_H