Commit 42625ec3 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Compile autotools-plugin with QT_NO_CAST_FROM_ASCII.



Change-Id: If8928c5d2d878339aa3a7808655f8125e0a012cf
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 1348e929
......@@ -84,7 +84,7 @@ bool AutogenStepFactory::canCreate(BuildStepList *parent, const QString &id) con
if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
return false;
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
return QLatin1String(AUTOGEN_STEP_ID) == id;
......@@ -282,7 +282,7 @@ void AutogenStepConfigWidget::updateDetails()
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
param.setWorkingDirectory(bc->buildDirectory());
param.setCommand("autogen.sh");
param.setCommand(QLatin1String("autogen.sh"));
param.setArguments(m_autogenStep->additionalArguments());
m_summaryText = param.summary(displayName());
emit updateSummary();
......
......@@ -83,7 +83,7 @@ bool AutoreconfStepFactory::canCreate(BuildStepList *parent, const QString &id)
if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
return false;
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
return QLatin1String(AUTORECONF_STEP_ID) == id;
......@@ -166,7 +166,7 @@ bool AutoreconfStep::init()
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
pp->setWorkingDirectory(bc->buildDirectory());
pp->setCommand("autoreconf");
pp->setCommand(QLatin1String("autoreconf"));
pp->setArguments(additionalArguments());
return AbstractProcessStep::init();
......@@ -276,7 +276,7 @@ void AutoreconfStepConfigWidget::updateDetails()
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
param.setWorkingDirectory(bc->buildDirectory());
param.setCommand("autoreconf");
param.setCommand(QLatin1String("autoreconf"));
param.setArguments(m_autoreconfStep->additionalArguments());
m_summaryText = param.summary(displayName());
emit updateSummary();
......
......@@ -170,7 +170,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *
bc->setDisplayName(buildConfigurationName);
t->addBuildConfiguration(bc);
t->addDeployConfiguration(t->createDeployConfiguration(DEFAULT_DEPLOYCONFIGURATION_ID));
t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(DEFAULT_DEPLOYCONFIGURATION_ID)));
// User needs to choose where the executable file is.
// TODO: Parse the file in *Anjuta style* to be able to add custom RunConfigurations.
t->addRunConfiguration(new CustomExecutableRunConfiguration(t));
......@@ -181,7 +181,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultConfiguration(AutotoolsTarget *target) const
{
AutotoolsBuildConfiguration *bc = new AutotoolsBuildConfiguration(target);
BuildStepList *buildSteps = bc->stepList(BUILDSTEPS_BUILD);
BuildStepList *buildSteps = bc->stepList(QLatin1String(BUILDSTEPS_BUILD));
// ### Build Steps Build ###
// autogen.sh or autoreconf
......@@ -205,7 +205,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultCo
makeStep->setBuildTarget(QLatin1String("all"), /*on =*/ true);
// ### Build Steps Clean ###
BuildStepList *cleanSteps = bc->stepList(BUILDSTEPS_CLEAN);
BuildStepList *cleanSteps = bc->stepList(QLatin1String(BUILDSTEPS_CLEAN));
MakeStep *cleanMakeStep = new MakeStep(cleanSteps);
cleanMakeStep->setAdditionalArguments(QLatin1String("clean"));
cleanMakeStep->setClean(true);
......
......@@ -312,7 +312,7 @@ void AutotoolsProject::makefileParsingFinished()
// Add configure.ac file to project and watch for changes.
const QLatin1String configureAc(QLatin1String("configure.ac"));
const QFile configureAcFile(fileInfo.absolutePath() + QChar('/') + configureAc);
const QFile configureAcFile(fileInfo.absolutePath() + QLatin1Char('/') + configureAc);
if (configureAcFile.exists()) {
files.append(configureAc);
const QString configureAcFilePath = dir.absoluteFilePath(configureAc);
......@@ -363,13 +363,10 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory,
if (file.contains(QLatin1String(".moc")))
continue;
QString subDir = baseDir + QChar('/') + file;
for (int i = subDir.length() - 1; i >= 0; --i) {
if (subDir.at(i) == QChar('/')) {
subDir = subDir.left(i);
break;
}
}
QString subDir = baseDir + QLatin1Char('/') + file;
const int lastSlashPos = subDir.lastIndexOf(QLatin1Char('/'));
if (lastSlashPos != -1)
subDir.truncate(lastSlashPos);
// Add folder nodes, that are not already available
oldParentFolder = parentFolder;
......
TEMPLATE = lib
TARGET = AutotoolsProjectManager
#PROVIDER = Openismus
DEFINES += QT_NO_CAST_FROM_ASCII
include(../../qtcreatorplugin.pri)
include(autotoolsprojectmanager_dependencies.pri)
......
......@@ -146,10 +146,10 @@ AutotoolsTarget *AutotoolsTargetFactory::create(Project *parent, const QString &
// Add default build configuration:
AutotoolsBuildConfigurationFactory *bcf = t->buildConfigurationFactory();
AutotoolsBuildConfiguration *bc = bcf->createDefaultConfiguration(t);
bc->setDisplayName("Default Build");
bc->setDisplayName(tr("Default Build"));
t->addBuildConfiguration(bc);
t->addDeployConfiguration(t->createDeployConfiguration(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID));
t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
// User needs to choose where the executable file is.
// TODO: Parse the file in *Anjuta style* to be able to add custom RunConfigurations.
t->addRunConfiguration(new CustomExecutableRunConfiguration(t));
......
......@@ -84,7 +84,7 @@ bool ConfigureStepFactory::canCreate(BuildStepList *parent, const QString &id) c
if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
return false;
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
return QLatin1String(CONFIGURE_STEP_ID) == id;
......@@ -167,7 +167,7 @@ bool ConfigureStep::init()
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
pp->setWorkingDirectory(bc->buildDirectory());
pp->setCommand("configure");
pp->setCommand(QLatin1String("configure"));
pp->setArguments(additionalArguments());
return AbstractProcessStep::init();
......@@ -280,7 +280,7 @@ void ConfigureStepConfigWidget::updateDetails()
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
param.setWorkingDirectory(bc->buildDirectory());
param.setCommand("configure");
param.setCommand(QLatin1String("configure"));
param.setArguments(m_configureStep->additionalArguments());
m_summaryText = param.summary(displayName());
emit updateSummary();
......
......@@ -134,7 +134,7 @@ MakefileParser::TopTarget MakefileParser::topTarget() const
TopTarget topTarget = Undefined;
const QString line = m_line.simplified();
if (!line.isEmpty() && !line.startsWith(QChar('#'))) {
if (!line.isEmpty() && !line.startsWith(QLatin1Char('#'))) {
// TODO: Check how many fixed strings like AM_DEFAULT_SOURCE_EXT will
// be needed vs. variable strings like _SOURCES. Dependent on this a
// more clever way than this (expensive) if-cascading might be done.
......@@ -236,7 +236,7 @@ void MakefileParser::parseSubDirs()
QStringList::iterator it = subDirs.begin();
while (it != subDirs.end()) {
// Erase all entries that represent a '.'
if ((*it) == QChar('.')) {
if ((*it) == QLatin1String(".")) {
hasDotSubDir = true;
it = subDirs.erase(it);
} else {
......@@ -256,7 +256,7 @@ void MakefileParser::parseSubDirs()
// Delegate the parsing of all sub directories to a local
// makefile parser and merge the results
foreach (const QString& subDir, subDirs) {
const QChar slash('/');
const QChar slash = QLatin1Char('/');
const QString subDirMakefile = path + slash + subDir
+ slash + makefileName;
......@@ -317,7 +317,7 @@ QStringList MakefileParser::directorySources(const QString &directory,
extensions);
const QString dirPath = info.fileName();
foreach (const QString& subDirSource, subDirSources)
list.append(dirPath + QChar('/') + subDirSource);
list.append(dirPath + QLatin1Char('/') + subDirSource);
} else {
// Check whether the file matches to an extension
foreach (const QString& extension, extensions) {
......@@ -339,7 +339,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
if (hasVariables != 0)
*hasVariables = false;
const int index = m_line.indexOf(QChar('='));
const int index = m_line.indexOf(QLatin1Char('='));
if (index < 0) {
m_success = false;
return QStringList();
......@@ -354,7 +354,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
// Get all values of a line separated by spaces.
// Values representing a variable like $(value) get
// removed currently.
QStringList lineValues = m_line.split(QChar(' '));
QStringList lineValues = m_line.split(QLatin1Char(' '));
QStringList::iterator it = lineValues.begin();
while (it != lineValues.end()) {
if ((*it).startsWith(QLatin1String("$("))) {
......@@ -368,7 +368,7 @@ QStringList MakefileParser::targetValues(bool *hasVariables)
endReached = lineValues.isEmpty();
if (!endReached) {
const QChar backSlash('\\');
const QChar backSlash = QLatin1Char('\\');
QString last = lineValues.last();
if (last.endsWith(backSlash)) {
// The last value contains a backslash. Remove the
......
......@@ -87,7 +87,7 @@ bool MakeStepFactory::canCreate(BuildStepList *parent, const QString &id) const
if (parent->target()->project()->id() != QLatin1String(AUTOTOOLS_PROJECT_ID))
return false;
if (parent->id() != BUILDSTEPS_BUILD)
if (parent->id() != QLatin1String(BUILDSTEPS_BUILD))
return false;
return QLatin1String(MAKE_STEP_ID) == id;
......
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