Commit e9dae735 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ProjectExplorer: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I84d9526449b8ca6cdcf8296e353c5d892d5f942d
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 5f10acd5
......@@ -155,7 +155,7 @@ Utils::FileName AbstractMsvcToolChain::compilerCommand() const
{
Utils::Environment env;
addToEnvironment(env);
return Utils::FileName::fromString(env.searchInPath("cl.exe"));
return Utils::FileName::fromString(env.searchInPath(QLatin1String("cl.exe")));
}
IOutputParser *AbstractMsvcToolChain::outputParser() const
......
......@@ -197,13 +197,13 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"),
Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h"), 45,
Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n"
"class Q_CORE_EXPORT QSysInfo {\n"
" ^"),
Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1425,
Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1425,
categoryCompile))
<< QString();
QTest::newRow("note")
......@@ -217,7 +217,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\n"
" ^"),
Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1289,
Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1289,
categoryCompile))
<< QString();
QTest::newRow("fatal error")
......@@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\n"
" ^"),
Utils::FileName::fromUserInput("/usr/include/c++/4.6/utility"), 68,
Utils::FileName::fromUserInput(QLatin1String("/usr/include/c++/4.6/utility")), 68,
categoryCompile))
<< QString();
......@@ -246,7 +246,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\n"
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^"),
Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp"), 567,
Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp")), 567,
categoryCompile))
<< QString();
}
......
......@@ -303,18 +303,18 @@ void IDevice::fromMap(const QVariantMap &map)
d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray());
d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt());
d->sshParameters.host = map.value(HostKey).toString();
d->sshParameters.port = map.value(SshPortKey, 22).toInt();
d->sshParameters.userName = map.value(UserNameKey).toString();
d->sshParameters.host = map.value(QLatin1String(HostKey)).toString();
d->sshParameters.port = map.value(QLatin1String(SshPortKey), 22).toInt();
d->sshParameters.userName = map.value(QLatin1String(UserNameKey)).toString();
d->sshParameters.authenticationType
= static_cast<AuthType>(map.value(AuthKey, DefaultAuthType).toInt());
d->sshParameters.password = map.value(PasswordKey).toString();
d->sshParameters.privateKeyFile = map.value(KeyFileKey, defaultPrivateKeyFilePath()).toString();
d->sshParameters.timeout = map.value(TimeoutKey, DefaultTimeout).toInt();
= static_cast<AuthType>(map.value(QLatin1String(AuthKey), DefaultAuthType).toInt());
d->sshParameters.password = map.value(QLatin1String(PasswordKey)).toString();
d->sshParameters.privateKeyFile = map.value(QLatin1String(KeyFileKey), defaultPrivateKeyFilePath()).toString();
d->sshParameters.timeout = map.value(QLatin1String(TimeoutKey), DefaultTimeout).toInt();
d->freePorts = Utils::PortList::fromString(map.value(PortsSpecKey,
d->freePorts = Utils::PortList::fromString(map.value(QLatin1String(PortsSpecKey),
QLatin1String("10000-10100")).toString());
d->machineType = static_cast<MachineType>(map.value(MachineTypeKey, DefaultMachineType).toInt());
d->machineType = static_cast<MachineType>(map.value(QLatin1String(MachineTypeKey), DefaultMachineType).toInt());
}
QVariantMap IDevice::toMap() const
......@@ -325,16 +325,16 @@ QVariantMap IDevice::toMap() const
map.insert(QLatin1String(IdKey), d->id.name());
map.insert(QLatin1String(OriginKey), d->origin);
map.insert(MachineTypeKey, d->machineType);
map.insert(HostKey, d->sshParameters.host);
map.insert(SshPortKey, d->sshParameters.port);
map.insert(UserNameKey, d->sshParameters.userName);
map.insert(AuthKey, d->sshParameters.authenticationType);
map.insert(PasswordKey, d->sshParameters.password);
map.insert(KeyFileKey, d->sshParameters.privateKeyFile);
map.insert(TimeoutKey, d->sshParameters.timeout);
map.insert(QLatin1String(MachineTypeKey), d->machineType);
map.insert(QLatin1String(HostKey), d->sshParameters.host);
map.insert(QLatin1String(SshPortKey), d->sshParameters.port);
map.insert(QLatin1String(UserNameKey), d->sshParameters.userName);
map.insert(QLatin1String(AuthKey), d->sshParameters.authenticationType);
map.insert(QLatin1String(PasswordKey), d->sshParameters.password);
map.insert(QLatin1String(KeyFileKey), d->sshParameters.privateKeyFile);
map.insert(QLatin1String(TimeoutKey), d->sshParameters.timeout);
map.insert(PortsSpecKey, d->freePorts.toString());
map.insert(QLatin1String(PortsSpecKey), d->freePorts.toString());
return map;
}
......
This diff is collapsed.
......@@ -394,8 +394,8 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const
ToolChain::CompilerFlags GccToolChain::compilerFlags(const QStringList &cxxflags) const
{
if (cxxflags.contains("-std=c++0x") || cxxflags.contains("-std=gnu++0x") ||
cxxflags.contains("-std=c++11") || cxxflags.contains("-std=gnu++11"))
if (cxxflags.contains(QLatin1String("-std=c++0x")) || cxxflags.contains(QLatin1String("-std=gnu++0x")) ||
cxxflags.contains(QLatin1String("-std=c++11")) || cxxflags.contains(QLatin1String("-std=gnu++11")))
return STD_CXX11;
return NO_FLAGS;
}
......@@ -621,7 +621,7 @@ ToolChain *Internal::GccToolChainFactory::restore(const QVariantMap &data)
// Updating from 2.5:
QVariantMap updated = data;
QString id = idFromMap(updated);
if (id.startsWith(LEGACY_MAEMO_ID)) {
if (id.startsWith(QLatin1String(LEGACY_MAEMO_ID))) {
id = QString::fromLatin1(Constants::GCC_TOOLCHAIN_ID).append(id.mid(id.indexOf(QLatin1Char(':'))));
idToMap(updated, id);
autoDetectionToMap(updated, false);
......@@ -888,7 +888,7 @@ QList<FileName> MingwToolChain::suggestedMkspecList() const
if (Utils::HostOsInfo::isWindowsHost())
return QList<FileName>() << FileName::fromString(QLatin1String("win32-g++"));
if (Utils::HostOsInfo::isLinuxHost()) {
if (version().startsWith("4.6."))
if (version().startsWith(QLatin1String("4.6.")))
return QList<FileName>()
<< FileName::fromString(QLatin1String("win32-g++-4.6-cross"))
<< FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross"));
......
......@@ -284,7 +284,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>()
<< Task(Task::Error,
QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."),
Utils::FileName::fromUserInput("Makefile"), 360,
Utils::FileName::fromUserInput(QLatin1String("Makefile")), 360,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
......@@ -417,12 +417,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList()
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput("some/path/unknown.cpp"),
Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1,
Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput("some/path/unknown.cpp"),
Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1,
Core::Id(Constants::TASK_CATEGORY_COMPILE));
QTest::newRow("find file")
......@@ -430,12 +430,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< (QStringList(QLatin1String("test")))
<< Task(Task::Error,
QLatin1String("mangling"),
Utils::FileName::fromUserInput("file.cpp"),
Utils::FileName::fromUserInput(QLatin1String("file.cpp")),
10,
Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error,
QLatin1String("mangling"),
Utils::FileName::fromUserInput("$TMPDIR/test/file.cpp"),
Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
10,
Core::Id(Constants::TASK_CATEGORY_COMPILE));
}
......
......@@ -63,10 +63,10 @@ namespace ProjectExplorer {
static QString cleanName(const QString &name)
{
QString result = name;
result.replace(QRegExp("\\W"), QLatin1String("_"));
result.replace(QRegExp("_+"), "_"); // compact _
result.remove(QRegExp("^_*")); // remove leading _
result.remove(QRegExp("_+$")); // remove trailing _
result.replace(QRegExp(QLatin1String("\\W")), QLatin1String("_"));
result.replace(QRegExp(QLatin1String("_+")), QLatin1String("_")); // compact _
result.remove(QRegExp(QLatin1String("^_*"))); // remove leading _
result.remove(QRegExp(QLatin1String("_+$"))); // remove trailing _
if (result.isEmpty())
result = QLatin1String("unknown");
return result;
......
......@@ -153,7 +153,7 @@ int KitModel::columnCount(const QModelIndex &parent) const
QVariant KitModel::data(const QModelIndex &index, int role) const
{
static QIcon warningIcon(":/projectexplorer/images/compile_warning.png");
static QIcon warningIcon(QLatin1String(":/projectexplorer/images/compile_warning.png"));
if (!index.isValid() || index.column() != 0)
return QVariant();
......
......@@ -55,7 +55,7 @@ namespace ProjectExplorer {
KitOptionsPage::KitOptionsPage() :
m_model(0), m_selectionModel(0), m_currentWidget(0), m_toShow(0)
{
setId(Constants::KITS_SETTINGS_PAGE_ID);
setId(QLatin1String(Constants::KITS_SETTINGS_PAGE_ID));
setDisplayName(tr("Kits"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
......
......@@ -144,7 +144,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"),
Utils::FileName::fromUserInput("main.cpp"), 13,
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13,
Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
......@@ -158,7 +158,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"),
Utils::FileName::fromUserInput("main.cpp"), 53,
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 53,
Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
......@@ -172,7 +172,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"),
Utils::FileName::fromUserInput("main.cpp"), 41,
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 41,
Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString();
}
......
......@@ -1451,13 +1451,13 @@ void MiniProjectTargetSelector::updateSummary()
.arg(startupProject->displayName());
} else {
if (!m_listWidgets[TARGET]->isVisibleTo(this))
summary.append("<br/>");
summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[BUILD]->isVisibleTo(this))
summary.append("<br/>");
summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[DEPLOY]->isVisibleTo(this))
summary.append("<br/>");
summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[RUN]->isVisibleTo(this))
summary.append("<br/>");
summary.append(QLatin1String("<br/>"));
}
}
m_summaryLabel->setText(summary);
......
......@@ -105,7 +105,7 @@ void MsvcParser::stdOutput(const QString &line)
if (processCompileLine(line))
return;
if (line.startsWith("Error:")) {
if (line.startsWith(QLatin1String("Error:"))) {
m_lastTask = Task(Task::Error,
line.mid(6).trimmed(), /* description */
Utils::FileName(), /* fileName */
......@@ -113,7 +113,7 @@ void MsvcParser::stdOutput(const QString &line)
Core::Id(Constants::TASK_CATEGORY_COMPILE));
return;
}
if (line.startsWith("Warning:")) {
if (line.startsWith(QLatin1String("Warning:"))) {
m_lastTask = Task(Task::Warning,
line.mid(8).trimmed(), /* description */
Utils::FileName(), /* fileName */
......@@ -203,19 +203,21 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
QTest::newRow("labeled error")
<< QString::fromLatin1("qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value") << OutputParserTester::STDOUT
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Error,
QLatin1String("C4716: 'findUnresolvedModule' : must return a value"),
Utils::FileName::fromUserInput("qmlstandalone\\main.cpp"), 54,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("C4716: 'findUnresolvedModule' : must return a value"),
Utils::FileName::fromUserInput(QLatin1String("qmlstandalone\\main.cpp")), 54,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("labeled warning")
<< QString::fromLatin1("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter") << OutputParserTester::STDOUT
<< QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("C4100: 'something' : unreferenced formal parameter"),
Utils::FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4100: 'something' : unreferenced formal parameter"),
Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp")), 69,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("additional information")
......@@ -226,11 +228,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'"),
Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\texteditor\\icompletioncollector.h")), 50,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see declaration of 'TextEditor::CompletionItem'"),
Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\texteditor\\completionsupport.h")), 39,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
......@@ -273,7 +275,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _Traits=std::_Tmap_traits<int,double,std::less<int>,std::allocator<std::pair<const int,double>>,false>\n"
"]\n"
"No constructor could take the source type, or constructor overload resolution was ambiguous"),
Utils::FileName::fromUserInput("..\\untitled\\main.cpp"), 19,
Utils::FileName::fromUserInput(QLatin1String("..\\untitled\\main.cpp")), 19,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Linker error 1")
......@@ -283,7 +285,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main"),
Utils::FileName::fromUserInput("main.obj"), -1,
Utils::FileName::fromUserInput(QLatin1String("main.obj")), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Linker error 2")
......@@ -293,7 +295,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("LNK1120: 1 unresolved externals"),
Utils::FileName::fromUserInput("debug\\Experimentation.exe"), -1,
Utils::FileName::fromUserInput(QLatin1String("debug\\Experimentation.exe")), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
QTest::newRow("Linker error 3")
......@@ -321,11 +323,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'"),
Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227,
Utils::FileName::fromUserInput(QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility")), 2227,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see declaration of 'std::_Copy_impl'"),
Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212,
Utils::FileName::fromUserInput(QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility")), 2212,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown,
QLatin1String("see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned short*>(_InIt,_InIt,_OutIt)' being compiled\n"
......@@ -334,7 +336,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _OutIt=unsigned short *,\n"
" _InIt=const unsigned char *\n"
"]"),
Utils::FileName::fromUserInput("symbolgroupvalue.cpp"), 2314,
Utils::FileName::fromUserInput(QLatin1String("symbolgroupvalue.cpp")), 2314,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString();
}
......
......@@ -528,7 +528,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
vcvarsAllbat, QLatin1String("ia64"), true));
results.append(new MsvcToolChain(generateDisplayName(vsName, MsvcToolChain::VS, MsvcToolChain::x86_ia64),
findAbiOfMsvc(MsvcToolChain::VS, MsvcToolChain::x86_ia64, vsName),
vcvarsAllbat, QString("x86_ia64"), true));
vcvarsAllbat, QLatin1String("x86_ia64"), true));
} else {
qWarning("Unable to find MSVC setup script %s in version %d", qPrintable(vcvarsAllbat), version);
}
......
......@@ -1942,7 +1942,7 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Core::Id> step
foreach (const Project *p, projects)
projectNames << p->displayName();
foreach (const Core::Id id, stepIds)
stepNames << id.name();
stepNames << id.toString();
qDebug() << "Building" << stepNames << "for projects" << projectNames;
}
......
......@@ -285,4 +285,4 @@ RESOURCES += projectexplorer.qrc
DEFINES += QTC_CPU=X86Architecture
}
DEFINES += PROJECTEXPLORER_LIBRARY
DEFINES += PROJECTEXPLORER_LIBRARY QT_NO_CAST_FROM_ASCII
......@@ -14,7 +14,7 @@ QtcPlugin {
Depends { name: "QtcSsh" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QTC_CPU=X86Architecture"])
cpp.defines: base.concat(["QTC_CPU=X86Architecture", "QT_NO_CAST_FROM_ASCII"])
cpp.includePaths: base.concat([
"customwizard",
"publishing"
......
......@@ -266,7 +266,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
const QString vcsTopic = node->vcsTopic();
if (!vcsTopic.isEmpty())
name += " (" + vcsTopic + ")";
name += QLatin1String(" (") + vcsTopic + QLatin1Char(')');
}
result = name;
......
......@@ -2364,7 +2364,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
tcId.replace(QLatin1String("Qt4ProjectManager.ToolChain.Maemo:"),
QLatin1String("ProjectExplorer.ToolChain.Gcc:")); // convert Maemo to GCC
QString data = tcId.mid(tcId.indexOf(QLatin1Char(':')) + 1);
QStringList split = data.split('.', QString::KeepEmptyParts);
QStringList split = data.split(QLatin1Char('.'), QString::KeepEmptyParts);
QString compilerPath;
QString debuggerPath;
Abi compilerAbi;
......@@ -2423,7 +2423,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
int dcPos = deployIt.key();
const QVariantMap &dc = deployIt.value();
// Device
QString devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toString();
QByteArray devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toByteArray();
if (devId.isEmpty())
devId = QByteArray("Desktop Device");
if (!devId.isEmpty() && !DeviceManager::instance()->find(Core::Id(devId))) // We do not know that device
......
......@@ -782,7 +782,7 @@ bool Target::fromMap(const QVariantMap &map)
if (!factory) {
Core::Id id = idFromMap(valueMap);
qWarning("No factory found to restore deployment configuration of id '%s'!",
qPrintable(id.isValid() ? id.toString() : "UNKNOWN"));
id.isValid() ? qPrintable(id.toString()) : "UNKNOWN");
continue;
}
DeployConfiguration *dc = factory->restore(this, valueMap);
......
......@@ -60,7 +60,7 @@ public:
static QString createId(const QString &id)
{
QString newId = id.left(id.indexOf(':'));
QString newId = id.left(id.indexOf(QLatin1Char(':')));
newId.append(QLatin1Char(':') + QUuid::createUuid().toString());
return newId;
}
......
......@@ -189,7 +189,7 @@ static bool parseSDK(QXmlStreamReader& theReader,
if (theReader.isEndElement()) {
// Got to the end element so return...
if (theReader.name() == "Platform")
if (theReader.name() == QLatin1String("Platform"))
return (sdkArch!=Abi::UnknownArchitecture && !sdkName.isEmpty());
} else if (theReader.isStartElement()) {
const QStringRef elemName = theReader.name();
......
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