Symbian is the term. Also unconditionally reset target names.

Since the target names are translated, we cannot use the saved
display name from the user file.

Reviewed-by: Tobias Hunger
This commit is contained in:
con
2010-02-10 12:16:01 +01:00
parent 8548da1c30
commit 686b21195d
8 changed files with 17 additions and 35 deletions

View File

@@ -86,11 +86,7 @@ bool CMakeTarget::fromMap(const QVariantMap &map)
if (!Target::fromMap(map))
return false;
if (displayName().isEmpty())
setDisplayName(displayNameForId(id()));
if (icon().isNull())
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
setDisplayName(displayNameForId(id()));
return true;
}

View File

@@ -83,13 +83,9 @@ bool GenericTarget::fromMap(const QVariantMap &map)
if (!Target::fromMap(map))
return false;
if (displayName().isEmpty())
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
"Generic desktop target display name"));
if (icon().isNull())
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
"Generic desktop target display name"));
return true;
}

View File

@@ -46,7 +46,6 @@ const char * const ACTIVE_RC_KEY("ProjectExplorer.Target.ActiveRunConfiguration"
const char * const RC_KEY_PREFIX("ProjectExplorer.Target.RunConfiguration.");
const char * const RC_COUNT_KEY("ProjectExplorer.Target.RunConfigurationCount");
const char * const ICON_KEY("ProjectExplorer.Target.Icon");
} // namespace
// -------------------------------------------------------------------------
@@ -241,8 +240,6 @@ QVariantMap Target::toMap() const
for (int i = 0; i < rcs.size(); ++i)
map.insert(QString::fromLatin1(RC_KEY_PREFIX) + QString::number(i), rcs.at(i)->toMap());
map.insert(QLatin1String(ICON_KEY), m_icon);
return map;
}
@@ -260,8 +257,6 @@ bool Target::fromMap(const QVariantMap &map)
if (!ProjectConfiguration::fromMap(map))
return false;
m_icon = map.value(QLatin1String(ICON_KEY)).value<QIcon>();
bool ok;
int bcCount(map.value(QLatin1String(BC_COUNT_KEY), 0).toInt(&ok));
if (!ok || bcCount < 0)

View File

@@ -734,12 +734,12 @@ QVariantMap Version1Handler::update(Project *project, const QVariantMap &map)
"Qt4 Desktop target display name"))
<< TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.S60EmulatorTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"S60 Emulator",
"Qt4 S60 Emulator target display name"))
"Symbian Emulator",
"Qt4 Symbian Emulator target display name"))
<< TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.S60DeviceTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"S60 Device",
"Qt4 S60 Device target display name"))
"Symbian Device",
"Qt4 Symbian Device target display name"))
<< TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.MaemoEmulatorTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Maemo Emulator",

View File

@@ -73,12 +73,9 @@ bool QmlTarget::fromMap(const QVariantMap &map)
if (!Target::fromMap(map))
return false;
if (displayName().isEmpty())
setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget",
VIEWER_TARGET_DISPLAY_NAME,
"Qml Viewer target display name"));
if (icon().isNull())
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget",
VIEWER_TARGET_DISPLAY_NAME,
"Qml Viewer target display name"));
return true;
}

View File

@@ -1,5 +1,5 @@
!isEmpty(SUPPORT_QT_S60) {
message("Adding experimental support for Qt/S60 applications.")
message("Adding experimental support for Qt Symbian applications.")
DEFINES += QTCREATOR_WITH_S60
}
SOURCES += $$PWD/s60devices.cpp \

View File

@@ -346,7 +346,7 @@ void S60DeviceRunConfiguration::updateTarget()
if (info.error != Qt4TargetInformation::NoError) {
if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(
tr("Could not parse %1. The QtS60 Device run configuration %2 can not be started.")
tr("Could not parse %1. The Qt Symbian Device run configuration %2 can not be started.")
.arg(m_proFilePath).arg(displayName()));
}
m_targetName.clear();

View File

@@ -57,9 +57,9 @@ QString displayNameForId(const QString &id) {
if (id == QLatin1String(DESKTOP_TARGET_ID))
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Desktop", "Qt4 Desktop target display name");
if (id == QLatin1String(S60_EMULATOR_TARGET_ID))
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "S60 Emulator", "Qt4 S60 Emulator target display name");
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Symbian Emulator", "Qt4 Symbian Emulator target display name");
if (id == QLatin1String(S60_DEVICE_TARGET_ID))
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "S60 Device", "Qt4 S60 Device target display name");
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Symbian Device", "Qt4 Symbian Device target display name");
if (id == QLatin1String(MAEMO_EMULATOR_TARGET_ID))
return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Maemo Emulator", "Qt4 Maemo Emulator target display name");
if (id == QLatin1String(MAEMO_DEVICE_TARGET_ID))
@@ -382,10 +382,8 @@ bool Qt4Target::fromMap(const QVariantMap &map)
if (!Target::fromMap(map))
return false;
if (displayName().isEmpty())
setDisplayName(displayNameForId(id()));
if (icon().isNull())
setIcon(iconForId(id()));
setDisplayName(displayNameForId(id()));
updateToolTipAndIcon();
return true;
}