Commit 346a2557 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Qt4PM: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: Id6c19c0a2a982e7a9b11d7ef0740c0258dbdc7b7
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 73d60a58
......@@ -53,7 +53,7 @@ public:
if (dev.isNull() || dev->id() != ProjectExplorer::Constants::DESKTOP_DEVICE_ID)
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
return version && version->type() == QtSupport::Constants::DESKTOPQT;
return version && version->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
}
};
......@@ -79,7 +79,7 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName,
setIntroDescription(tr("This wizard generates a Qt Designer Custom Widget "
"or a Qt Designer Custom Widget Collection project."));
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage();
m_widgetPageId = addPage(m_widgetsPage);
m_pluginPageId = addPage(m_pluginPage);
......
......@@ -137,7 +137,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("Parse Error ('sth odd')"),
Utils::FileName::fromUserInput("e:\\project.pro"),
Utils::FileName::fromUserInput(QLatin1String("e:\\project.pro")),
14,
categoryBuildSystem))
<< QString();
......@@ -160,7 +160,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data()
<< (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("Unescaped backslashes are deprecated."),
Utils::FileName::fromUserInput("e:\\NokiaQtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl"), 1,
Utils::FileName::fromUserInput(QLatin1String("e:\\NokiaQtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl")), 1,
categoryBuildSystem))
<< QString();
}
......
......@@ -180,7 +180,7 @@ void Qt4RunConfiguration::ctor()
setDefaultDisplayName(defaultDisplayName());
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QtSupport::Constants::SIMULATORQT);
m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
connect(target(), SIGNAL(environmentChanged()),
this, SIGNAL(baseEnvironmentChanged()));
......@@ -193,7 +193,7 @@ void Qt4RunConfiguration::ctor()
void Qt4RunConfiguration::kitChanged()
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QtSupport::Constants::SIMULATORQT);
m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
emit runModeChanged(runMode()); // Always emit
}
......
......@@ -100,6 +100,6 @@ Core::FeatureSet SimulatorQtVersion::availableFeatures() const
bool SimulatorQtVersion::supportsPlatform(const QString &platformName) const
{
return (platformName == QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM
|| platformName.isEmpty());
return (platformName.isEmpty()
|| platformName == QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM));
}
......@@ -1919,7 +1919,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
newVarValues[DefinesVar] = m_readerExact->values(QLatin1String("DEFINES"));
newVarValues[IncludePathVar] = includePaths(m_readerExact);
newVarValues[CppFlagsVar] = m_readerExact->values("QMAKE_CXXFLAGS");
newVarValues[CppFlagsVar] = m_readerExact->values(QLatin1String("QMAKE_CXXFLAGS"));
newVarValues[CppHeaderVar] = fileListForVar(m_readerExact, m_readerCumulative,
QLatin1String("HEADERS"), m_projectDir,
ProjectExplorer::HeaderType);
......@@ -1948,8 +1948,8 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
newVarValues[VersionVar] = m_readerExact->values(QLatin1String("VERSION"));
newVarValues[TargetVersionExtVar]
= m_readerExact->values(QLatin1String("TARGET_VERSION_EXT"));
newVarValues[StaticLibExtensionVar] = m_readerExact->values("QMAKE_EXTENSION_STATICLIB");
newVarValues[ShLibExtensionVar] = m_readerExact->values("QMAKE_EXTENSION_SHLIB");
newVarValues[StaticLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_STATICLIB"));
newVarValues[ShLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_SHLIB"));
m_isDeployable = false;
if (m_projectType == ApplicationTemplate) {
......@@ -2113,19 +2113,19 @@ TargetInformation Qt4ProFileNode::targetInformation(QtSupport::ProFileReader *re
return result;
QtSupport::ProFileReader *readerBP = 0;
QStringList builds = reader->values("BUILDS");
QStringList builds = reader->values(QLatin1String("BUILDS"));
QString buildTarget;
if (!builds.isEmpty()) {
QString build = builds.first();
buildTarget = reader->value(build + ".target");
buildTarget = reader->value(build + QLatin1String(".target"));
QHash<QString, QStringList> basevars;
QStringList basecfgs = reader->values(build + QLatin1String(".CONFIG"));
basecfgs += build;
basecfgs += "build_pass";
basevars["BUILD_PASS"] = QStringList(build);
basecfgs += QLatin1String("build_pass");
basevars[QLatin1String("BUILD_PASS")] = QStringList(build);
QStringList buildname = reader->values(build + QLatin1String(".name"));
basevars["BUILD_NAME"] = (buildname.isEmpty() ? QStringList(build) : buildname);
basevars[QLatin1String("BUILD_NAME")] = (buildname.isEmpty() ? QStringList(build) : buildname);
readerBP = m_project->createProFileReader(this);
readerBP->setExtraVars(basevars);
......
......@@ -1580,7 +1580,7 @@ void Qt4Project::collectLibraryData(const Qt4ProFileNode *node, DeploymentData &
break;
}
case ProjectExplorer::Abi::MacOS:
if (config.contains("lib_bundle")) {
if (config.contains(QLatin1String("lib_bundle"))) {
ti.workingDir.append(QLatin1Char('/')).append(ti.target)
.append(QLatin1String(".framework"));
} else {
......
TEMPLATE = lib
TARGET = Qt4ProjectManager
DEFINES += QT_CREATOR QT4PROJECTMANAGER_LIBRARY
QT += network
include(../../qtcreatorplugin.pri)
include(qt4projectmanager_dependencies.pri)
DEFINES += \
QT_CREATOR \
QT4PROJECTMANAGER_LIBRARY \
QT_NO_CAST_FROM_ASCII
HEADERS += \
qmakekitinformation.h \
qmakekitconfigwidget.h \
......@@ -150,5 +154,4 @@ RESOURCES += qt4projectmanager.qrc \
include(qt-desktop/qt-desktop.pri)
include(customwidgetwizard/customwidgetwizard.pri)
DEFINES += QT_NO_CAST_TO_ASCII
OTHER_FILES += Qt4ProjectManager.mimetypes.xml
......@@ -20,7 +20,8 @@ QtcPlugin {
"PROPARSER_AS_LIBRARY",
"PROPARSER_THREAD_SAFE",
"PROEVALUATOR_THREAD_SAFE",
"PROEVALUATOR_CUMULATIVE"
"PROEVALUATOR_CUMULATIVE",
"QT_NO_CAST_FROM_ASCII"
])
cpp.includePaths: base.concat([
"customwidgetwizard",
......
......@@ -134,14 +134,14 @@ QStringList QtModulesInfo::modules()
{
QStringList result;
foreach (const item *i, staticQtModuleInfo()->items)
result.push_back(i->config);
result.push_back(QLatin1String(i->config));
return result;
}
static inline const item *itemForModule(const QString &module)
{
foreach (const item *i, staticQtModuleInfo()->items)
if (i->config == module)
if (QLatin1String(i->config) == module)
return i;
return 0;
}
......
......@@ -60,7 +60,7 @@ UnconfiguredProjectPanel::UnconfiguredProjectPanel()
QString Qt4ProjectManager::Internal::UnconfiguredProjectPanel::id() const
{
return Constants::UNCONFIGURED_PANEL_PAGE_ID;
return QLatin1String(Constants::UNCONFIGURED_PANEL_PAGE_ID);
}
QString Qt4ProjectManager::Internal::UnconfiguredProjectPanel::displayName() const
......@@ -84,7 +84,7 @@ ProjectExplorer::PropertiesPanel *Qt4ProjectManager::Internal::UnconfiguredProje
{
ProjectExplorer::PropertiesPanel *panel = new ProjectExplorer::PropertiesPanel;
panel->setDisplayName(displayName());
panel->setIcon(QIcon(":/projectexplorer/images/unconfigured.png"));
panel->setIcon(QIcon(QLatin1String(":/projectexplorer/images/unconfigured.png")));
TargetSetupPageWrapper *w = new TargetSetupPageWrapper(project);
panel->setWidget(w);
......
......@@ -63,9 +63,10 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent,
, m_genericItem(0)
, m_maemoItem(0)
, m_harmattanItem(0)
, m_kitIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
, m_kitIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
.value<QList<Core::Id> >())
{
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS)) {
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))) {
m_targetsPage = new TargetSetupPage;
m_targetsPage->setPreferredKitMatcher(new QtSupport::QtPlatformKitMatcher(selectedPlatform()));
m_targetsPage->setRequiredKitMatcher(new QtSupport::QtVersionKitMatcher(requiredFeatures(),
......@@ -87,11 +88,11 @@ void AbstractMobileAppWizardDialog::addMobilePages()
}
const bool shouldAddGenericPage = m_targetsPage
|| isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM);
|| isQtPlatformSelected(QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM));
const bool shouldAddMaemoPage = m_targetsPage
|| isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM);
|| isQtPlatformSelected(QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM));
const bool shouldAddHarmattanPage = m_targetsPage
|| isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM);
|| isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM));
if (shouldAddGenericPage) {
m_genericOptionsPageId = addPageWithTitle(m_genericOptionsPage,
......@@ -131,21 +132,21 @@ int AbstractMobileAppWizardDialog::nextId() const
{
if (m_targetsPage) {
if (currentPage() == m_targetsPage) {
if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM)))
return m_genericOptionsPageId;
else if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
else if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM)))
return m_harmattanOptionsPageId;
else
return idOfNextGenericPage();
} else if (currentPage() == m_genericOptionsPage) {
if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM)))
return m_maemoOptionsPageId;
else if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
else if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM)))
return m_harmattanOptionsPageId;
else
return idOfNextGenericPage();
} else if (currentPage() == m_maemoOptionsPage) {
if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM)))
return m_harmattanOptionsPageId;
else
return idOfNextGenericPage();
......@@ -168,9 +169,9 @@ void AbstractMobileAppWizardDialog::initializePage(int id)
|| id == m_maemoOptionsPageId) {
QList<Utils::WizardProgressItem *> order;
order << m_genericItem;
if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM)))
order << m_maemoItem;
if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
if (isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM)))
order << m_harmattanItem;
order << itemOfNextGenericPage();
......@@ -253,7 +254,7 @@ Core::GeneratedFiles AbstractMobileAppWizard::generateFiles(const QWizard *wizar
app()->setOrientation(wdlg->m_genericOptionsPage->orientation());
app()->setPngIcon64(wdlg->m_maemoOptionsPage->pngIcon());
app()->setPngIcon80(wdlg->m_harmattanOptionsPage->pngIcon());
if (wdlg->isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
if (wdlg->isQtPlatformSelected(QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM)))
app()->setSupportsMeegoBooster(wdlg->m_harmattanOptionsPage->supportsBooster());
prepareGenerateFiles(wizard, errorMessage);
return app()->generateFiles(errorMessage);
......
......@@ -53,7 +53,7 @@ ConsoleAppWizardDialog::ConsoleAppWizardDialog(const QString &templateName,
"provide a GUI."));
addModulesPage();
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
......
......@@ -45,7 +45,7 @@ EmptyProjectWizardDialog::EmptyProjectWizardDialog(const QString &templateName,
setIntroDescription(tr("This wizard generates an empty Qt project. "
"Add files to it later on by using the other wizards."));
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
......
......@@ -64,7 +64,7 @@ GuiAppWizardDialog::GuiAppWizardDialog(const QString &templateName,
"and includes an empty widget."));
addModulesPage();
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage(isMobile);
m_filesPage->setFormInputCheckable(true);
......
......@@ -152,7 +152,7 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
// Use the intro page instead, set up initially
setIntroDescription(tr("This wizard generates a C++ library project."));
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS)) {
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))) {
m_targetPageId = addTargetSetupPage();
m_mobilePageId = addPage(m_mobilePage);
}
......
......@@ -195,7 +195,7 @@ Core::BaseFileWizardParameters QtQuickAppWizard::baseParameters()
parameters.setIcon(QIcon(QLatin1String(Qt4ProjectManager::Constants::ICON_QTQUICK_APP)));
parameters.setId(QLatin1String("D.QMLA Application"));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY));
parameters.setDisplayCategory(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY_DISPLAY);
parameters.setDisplayCategory(QLatin1String(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY_DISPLAY));
return parameters;
}
......
......@@ -168,7 +168,7 @@ CustomQt4ProjectWizard::CustomQt4ProjectWizard(const Core::BaseFileWizardParamet
{
BaseQt4ProjectWizardDialog *wizard = new BaseQt4ProjectWizardDialog(false, parent, wizardDialogParameters);
if (!wizardDialogParameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!wizardDialogParameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
wizard->addTargetSetupPage(false, targetPageId);
initProjectWizardDialog(wizard, wizardDialogParameters.defaultPath(),
......@@ -192,7 +192,8 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, QWi
ProjectExplorer::BaseProjectWizardDialog(parent, parameters),
m_modulesPage(0),
m_targetSetupPage(0),
m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
.value<QList<Core::Id> >())
{
init(showModulesPage);
}
......@@ -204,7 +205,8 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage,
ProjectExplorer::BaseProjectWizardDialog(introPage, introId, parent, parameters),
m_modulesPage(0),
m_targetSetupPage(0),
m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
m_profileIds(parameters.extraValues().value(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))
.value<QList<Core::Id> >())
{
init(showModulesPage);
}
......
......@@ -46,7 +46,7 @@ SubdirsProjectWizardDialog::SubdirsProjectWizardDialog(const QString &templateNa
setIntroDescription(tr("This wizard generates a Qt subdirs project. "
"Add subprojects to it later on by using the other wizards."));
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
......
......@@ -61,7 +61,7 @@ TestWizardDialog::TestWizardDialog(const QString &templateName,
setWindowIcon(icon);
setWindowTitle(templateName);
setSelectedModules(QLatin1String("core testlib"), true);
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
if (!parameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS)))
addTargetSetupPage();
m_modulesPageId = addModulesPage();
m_testPageId = addPage(m_testPage);
......
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