QmakeProjectManager: Remove more unused code

Amends fd1956a91c.

Change-Id: If6a3b2369a94caba2724bea0b3fe8e214cd87f61
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2023-12-14 18:16:09 +01:00
parent 1deb31f295
commit aa53543fa3
4 changed files with 5 additions and 80 deletions

View File

@@ -35,7 +35,7 @@ add_qtc_plugin(QmakeProjectManager
qmakeprojectmanagerplugin.cpp qmakeprojectmanagerplugin.cpp
qmakesettings.cpp qmakesettings.h qmakesettings.cpp qmakesettings.h
qmakestep.cpp qmakestep.h qmakestep.cpp qmakestep.h
wizards/qtprojectparameters.cpp wizards/qtprojectparameters.h wizards/qtprojectparameters.h
wizards/qtwizard.cpp wizards/qtwizard.h wizards/qtwizard.cpp wizards/qtwizard.h
wizards/subdirsprojectwizard.cpp wizards/subdirsprojectwizard.h wizards/subdirsprojectwizard.cpp wizards/subdirsprojectwizard.h
wizards/subdirsprojectwizarddialog.cpp wizards/subdirsprojectwizarddialog.h wizards/subdirsprojectwizarddialog.cpp wizards/subdirsprojectwizarddialog.h

View File

@@ -61,7 +61,7 @@ QtcPlugin {
name: "Wizards" name: "Wizards"
prefix: "wizards/" prefix: "wizards/"
files: [ files: [
"qtprojectparameters.cpp", "qtprojectparameters.h", "qtprojectparameters.h",
"qtwizard.cpp", "qtwizard.h", "qtwizard.cpp", "qtwizard.h",
"subdirsprojectwizard.cpp", "subdirsprojectwizard.h", "subdirsprojectwizard.cpp", "subdirsprojectwizard.h",
"subdirsprojectwizarddialog.cpp", "subdirsprojectwizarddialog.h", "subdirsprojectwizarddialog.cpp", "subdirsprojectwizarddialog.h",

View File

@@ -1,58 +0,0 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "qtprojectparameters.h"
#include <utils/codegeneration.h>
#include <QTextStream>
#include <QDir>
#include <QCoreApplication>
#include <QDateTime>
#include <QDebug>
using namespace Utils;
namespace QmakeProjectManager {
namespace Internal {
// ----------- QtProjectParameters
QtProjectParameters::QtProjectParameters() = default;
FilePath QtProjectParameters::projectPath() const
{
return path / fileName;
}
// Write out a QT module line.
static inline void writeQtModulesList(QTextStream &str,
const QStringList &modules,
char op ='+')
{
if (const int size = modules.size()) {
str << "QT " << op << "= ";
for (int i =0; i < size; ++i) {
if (i)
str << ' ';
str << modules.at(i);
}
str << "\n\n";
}
}
QString createMacro(const QString &name, const QString &suffix)
{
QString rc = name.toUpper();
const int extensionPosition = rc.indexOf(QLatin1Char('.'));
if (extensionPosition != -1)
rc.truncate(extensionPosition);
rc += suffix;
return Utils::fileNameToCppIdentifier(rc);
}
QString QtProjectParameters::libraryMacro(const QString &projectName)
{
return createMacro(projectName, QLatin1String("_LIBRARY"));
}
} // namespace Internal
} // namespace QmakeProjectManager

View File

@@ -7,35 +7,19 @@
#include <QStringList> #include <QStringList>
QT_BEGIN_NAMESPACE namespace QmakeProjectManager::Internal {
class QTextStream;
QT_END_NAMESPACE
namespace QmakeProjectManager {
namespace Internal {
// Create a macro name by taking a file name, upper casing it and
// appending a suffix.
QString createMacro(const QString &name, const QString &suffix);
// Base parameters for application project generation with functionality to // Base parameters for application project generation with functionality to
// write a .pro-file section. // write a .pro-file section.
struct QtProjectParameters struct QtProjectParameters
{ {
enum Type { ConsoleApp, GuiApp, StaticLibrary, SharedLibrary, QtPlugin, EmptyProject }; enum Type { ConsoleApp, GuiApp, StaticLibrary, SharedLibrary, QtPlugin, EmptyProject };
enum QtVersionSupport { SupportQt4And5, SupportQt4Only, SupportQt5Only }; enum QtVersionSupport { SupportQt4And5, SupportQt4Only, SupportQt5Only };
enum Flags { WidgetsRequiredFlag = 0x1 };
QtProjectParameters();
// Return project path as "path/name" // Return project path as "path/name"
Utils::FilePath projectPath() const; Utils::FilePath projectPath() const { return path / fileName; }
// Shared library: name of #define indicating compilation within library
static QString libraryMacro(const QString &projectName);
Type type = ConsoleApp; Type type = ConsoleApp;
unsigned flags = 0;
QtVersionSupport qtVersionSupport = SupportQt4And5; QtVersionSupport qtVersionSupport = SupportQt4And5;
QString fileName; QString fileName;
QString target; QString target;
@@ -45,5 +29,4 @@ struct QtProjectParameters
QString targetDirectory; QString targetDirectory;
}; };
} // namespace Internal } // namespace QmakeProjectManager::Internal
} // namespace QmakeProjectManager