summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-01 12:53:08 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-01 12:53:08 (GMT)
commit01fe91f537380c7eed85a874dfa7ee52ef48c3bb (patch)
treef4cd52c67b443b41ad0befa024566c9a232b5b03
parent65514177e6b9d096b5f6a822a1699e474d791f03 (diff)
replace usage of QString::toAscii() with QString::toLatin1()
-rw-r--r--editor/kgpgeditor.cpp6
-rw-r--r--model/kgpgsearchresultmodel.cpp2
-rw-r--r--transactions/kgpgadduid.cpp2
-rw-r--r--transactions/kgpgexport.cpp2
-rw-r--r--transactions/kgpggeneratekey.cpp4
-rw-r--r--transactions/kgpgtextorfiletransaction.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/editor/kgpgeditor.cpp b/editor/kgpgeditor.cpp
index 180bd44..5c10f3b 100644
--- a/editor/kgpgeditor.cpp
+++ b/editor/kgpgeditor.cpp
@@ -122,7 +122,7 @@ void KgpgEditor::openDocumentFile(const QUrl &url, const QString &encoding)
if(!downloadJob->error())
{
QTextStream t(downloadJob->data());
- t.setCodec(encoding.toAscii());
+ t.setCodec(encoding.toLatin1());
m_editor->setPlainText(t.readAll());
m_docname = url;
m_textchanged = false;
@@ -285,7 +285,7 @@ bool KgpgEditor::slotFileSave()
if (filn.isEmpty())
return slotFileSaveAs();
- QTextCodec *cod = QTextCodec::codecForName(m_textencoding.toAscii());
+ QTextCodec *cod = QTextCodec::codecForName(m_textencoding.toLatin1());
if (cod == Q_NULLPTR) {
KMessageBox::sorry(this, i18n("The document could not been saved, as the selected codec is not supported."));
@@ -597,7 +597,7 @@ void KgpgEditor::slotSelectAll()
void KgpgEditor::slotSetCharset()
{
if (!m_encodingaction->isChecked())
- m_editor->setPlainText(QString::fromUtf8(m_editor->toPlainText().toAscii()));
+ m_editor->setPlainText(QString::fromUtf8(m_editor->toPlainText().toLatin1()));
else
{
if (checkEncoding(QTextCodec::codecForLocale()))
diff --git a/model/kgpgsearchresultmodel.cpp b/model/kgpgsearchresultmodel.cpp
index ad416e7..f1e15e3 100644
--- a/model/kgpgsearchresultmodel.cpp
+++ b/model/kgpgsearchresultmodel.cpp
@@ -177,7 +177,7 @@ KGpgSearchResultModelPrivate::urlDecode(const QString &line)
if (!line.contains(QLatin1Char( '%' )))
return line;
- QByteArray tmp(line.toAscii());
+ QByteArray tmp(line.toLatin1());
const QRegExp hex( QLatin1String( "[A-F0-9]{2}" )); // URL-encoding uses only uppercase
int pos = -1; // avoid error if '%' is URL-encoded
diff --git a/transactions/kgpgadduid.cpp b/transactions/kgpgadduid.cpp
index f3c9dfa..0bac192 100644
--- a/transactions/kgpgadduid.cpp
+++ b/transactions/kgpgadduid.cpp
@@ -52,7 +52,7 @@ KGpgAddUid::nextLine(const QString &line)
} else if (line.contains(QLatin1String( "keygen.name" ))) {
write(m_name.toUtf8());
} else if (line.contains(QLatin1String( "keygen.email" ))) {
- write(m_email.toAscii());
+ write(m_email.toLatin1());
} else if (line.contains(QLatin1String( "keygen.comment" ))) {
write(m_comment.toUtf8());
} else {
diff --git a/transactions/kgpgexport.cpp b/transactions/kgpgexport.cpp
index b7cded6..ea0bd07 100644
--- a/transactions/kgpgexport.cpp
+++ b/transactions/kgpgexport.cpp
@@ -170,7 +170,7 @@ KGpgExport::nextLine(const QString &line)
{
// key exporting does not send any messages
- m_data.append(line.toAscii() + '\n');
+ m_data.append(line.toLatin1() + '\n');
if (m_outputmode != 2)
setSuccess(TS_MSG_SEQUENCE);
diff --git a/transactions/kgpggeneratekey.cpp b/transactions/kgpggeneratekey.cpp
index 1dc2052..214cfd3 100644
--- a/transactions/kgpggeneratekey.cpp
+++ b/transactions/kgpggeneratekey.cpp
@@ -96,7 +96,7 @@ KGpgGenerateKey::postStart()
if (!m_email.isEmpty()) {
keymessage.append("\nName-Email: ");
- keymessage.append(m_email.toAscii());
+ keymessage.append(m_email.toLatin1());
}
if (!m_comment.isEmpty()) {
@@ -125,7 +125,7 @@ KGpgGenerateKey::postStart()
usage << QLatin1String("encrypt");
if (m_capabilities & KgpgCore::SKT_SIGNATURE)
usage << QLatin1String("sign");
- keymessage.append(usage.join(QLatin1String(" ")).toAscii());
+ keymessage.append(usage.join(QLatin1String(" ")).toLatin1());
}
keymessage.append("\nPassphrase: ");
diff --git a/transactions/kgpgtextorfiletransaction.cpp b/transactions/kgpgtextorfiletransaction.cpp
index ce7c3fc..f97bdef 100644
--- a/transactions/kgpgtextorfiletransaction.cpp
+++ b/transactions/kgpgtextorfiletransaction.cpp
@@ -67,7 +67,7 @@ KGpgTextOrFileTransaction::setText(const QString &text)
const QString charset = QLatin1String("Charset: ");
if (text.mid(begin, charset.length()) == charset) {
QString cs = text.mid(begin + charset.length(), nextlf - begin - charset.length());
- if (!getProcess()->setCodec(cs.toAscii()))
+ if (!getProcess()->setCodec(cs.toLatin1()))
qCDebug(KGPG_LOG_GENERAL) << "unsupported charset found in header" << cs;
break;
}