Commit 4ed43e23 authored by Kurt Hindenburg's avatar Kurt Hindenburg

More changes to QLatin1String, QLatin1Char and QStringLiteral

parent 4db5fb89
......@@ -30,25 +30,25 @@
using namespace Konsole;
const TabTitleFormatButton::Element TabTitleFormatButton::_localElements[] = {
{ "%n" , I18N_NOOP("Program Name: %n") },
{ "%d" , I18N_NOOP("Current Directory (Short): %d") },
{ "%D" , I18N_NOOP("Current Directory (Long): %D") },
{ "%w" , I18N_NOOP("Window Title Set by Shell: %w") },
{ "%#" , I18N_NOOP("Session Number: %#") },
{ "%u" , I18N_NOOP("User Name: %u") },
{ "%h" , I18N_NOOP("Local Host: %h") }
{ QStringLiteral("%n") , I18N_NOOP("Program Name: %n") },
{ QStringLiteral("%d") , I18N_NOOP("Current Directory (Short): %d") },
{ QStringLiteral("%D") , I18N_NOOP("Current Directory (Long): %D") },
{ QStringLiteral("%w") , I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#") , I18N_NOOP("Session Number: %#") },
{ QStringLiteral("%u") , I18N_NOOP("User Name: %u") },
{ QStringLiteral("%h") , I18N_NOOP("Local Host: %h") }
};
const int TabTitleFormatButton::_localElementCount =
sizeof(_localElements) / sizeof(TabTitleFormatButton::Element);
const TabTitleFormatButton::Element TabTitleFormatButton::_remoteElements[] = {
{ "%u" , I18N_NOOP("User Name: %u") },
{ "%U" , I18N_NOOP("User Name@ (if given): %U") },
{ "%h" , I18N_NOOP("Remote Host (Short): %h") },
{ "%H" , I18N_NOOP("Remote Host (Long): %H") },
{ "%c" , I18N_NOOP("Command and arguments: %c") },
{ "%w" , I18N_NOOP("Window Title Set by Shell: %w") },
{ "%#" , I18N_NOOP("Session Number: %#") }
{ QStringLiteral("%u") , I18N_NOOP("User Name: %u") },
{ QStringLiteral("%U") , I18N_NOOP("User Name@ (if given): %U") },
{ QStringLiteral("%h") , I18N_NOOP("Remote Host (Short): %h") },
{ QStringLiteral("%H") , I18N_NOOP("Remote Host (Long): %H") },
{ QStringLiteral("%c") , I18N_NOOP("Command and arguments: %c") },
{ QStringLiteral("%w") , I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#") , I18N_NOOP("Session Number: %#") }
};
const int TabTitleFormatButton::_remoteElementCount =
sizeof(_remoteElements) / sizeof(TabTitleFormatButton::Element);
......
......@@ -413,7 +413,7 @@ void Vt102Emulation::processWindowAttributeRequest()
for (int j = 0; j < tokenBufferPos-i-2; j++)
value[j] = tokenBuffer[i+1+j];
if (value == "?") {
if (value == QLatin1String("?")) {
emit sessionAttributeRequest(attribute);
return;
}
......@@ -1377,7 +1377,7 @@ static QString hexdump2(int* s, int len)
snprintf(dump, sizeof(dump), "%c", s[i]);
else
snprintf(dump, sizeof(dump), "\\%04x(hex)", s[i]);
returnDump.append(QString(dump));
returnDump.append(QLatin1String(dump));
}
return returnDump;
}
......@@ -1391,7 +1391,7 @@ void Vt102Emulation::reportDecodingError()
// hexdump(tokenBuffer, tokenBufferPos);
// printf("\n");
QString outputError = QString("Undecodable sequence: ");
QString outputError = QStringLiteral("Undecodable sequence: ");
outputError.append(hexdump2(tokenBuffer, tokenBufferPos));
//qDebug() << outputError;
}
......
......@@ -243,7 +243,7 @@ void ProfileSettings::updateDefaultItem()
bool isDefault = (defaultProfile == item->data().value<Profile::Ptr>());
if (isDefault && !itemFont.bold()) {
QIcon icon(KIconLoader::global()->loadIcon(defaultProfile->icon(), KIconLoader::Small, 0, KIconLoader::DefaultState, QStringList("emblem-favorite")));
QIcon icon(KIconLoader::global()->loadIcon(defaultProfile->icon(), KIconLoader::Small, 0, KIconLoader::DefaultState, QStringList(QStringLiteral("emblem-favorite"))));
item->setIcon(icon);
itemFont.setBold(true);
item->setFont(itemFont);
......@@ -324,8 +324,8 @@ void ProfileSettings::createProfile()
Profile::Ptr newProfile = Profile::Ptr(new Profile(ProfileManager::instance()->fallbackProfile()));
newProfile->clone(sourceProfile, true);
newProfile->setProperty(Profile::Name, i18nc("@item This will be used as part of the file name", "New Profile"));
newProfile->setProperty(Profile::UntranslatedName, "New Profile");
newProfile->setProperty(Profile::MenuIndex, QString("0"));
newProfile->setProperty(Profile::UntranslatedName, QStringLiteral("New Profile"));
newProfile->setProperty(Profile::MenuIndex, QStringLiteral("0"));
QPointer<EditProfileDialog> dialog = new EditProfileDialog(this);
dialog.data()->setProfile(newProfile);
......
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