diff options
author | Christian Kandeler <[email protected]> | 2012-09-21 13:54:38 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2012-09-21 21:03:48 +0200 |
commit | 3d9e49286091db22fe8b4cf3183cbcd69b4c3d84 (patch) | |
tree | b58f1a95b0094946355a3edbcda160115c02cd99 /src/libs | |
parent | 903281b3520693e1e116523c6690d07f420feca5 (diff) |
Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.
Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/ssh/sshconnection.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshkeygenerator.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshremoteprocess.cpp | 2 | ||||
-rw-r--r-- | src/libs/utils/consoleprocess.cpp | 2 | ||||
-rw-r--r-- | src/libs/utils/persistentsettings.cpp | 2 | ||||
-rw-r--r-- | src/libs/utils/portlist.cpp | 2 | ||||
-rw-r--r-- | src/libs/utils/qtcprocess.cpp | 2 | ||||
-rw-r--r-- | src/libs/zeroconf/embeddedLib.cpp | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp index 8dfd475dd5b..e9205d9caf6 100644 --- a/src/libs/ssh/sshconnection.cpp +++ b/src/libs/ssh/sshconnection.cpp @@ -339,7 +339,7 @@ void SshConnectionPrivate::handleIncomingData() e.errorString); } catch (Botan::Exception &e) { closeConnection(SSH_DISCONNECT_BY_APPLICATION, SshInternalError, "", - tr("Botan library exception: %1").arg(QString::fromAscii(e.what()))); + tr("Botan library exception: %1").arg(QString::fromLatin1(e.what()))); } } diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index ef28c05eebd..242cf085f7b 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -77,7 +77,7 @@ bool SshKeyGenerator::generateKeys(KeyType type, PrivateKeyFormat format, int ke } return true; } catch (Botan::Exception &e) { - m_error = tr("Error generating key: %1").arg(QString::fromAscii(e.what())); + m_error = tr("Error generating key: %1").arg(QString::fromLatin1(e.what())); return false; } } diff --git a/src/libs/ssh/sshremoteprocess.cpp b/src/libs/ssh/sshremoteprocess.cpp index a4f4ae76b5a..4c376035b61 100644 --- a/src/libs/ssh/sshremoteprocess.cpp +++ b/src/libs/ssh/sshremoteprocess.cpp @@ -207,7 +207,7 @@ void SshRemoteProcess::sendSignal(Signal signal) d->m_sendFacility.sendChannelSignalPacket(d->remoteChannel(), signalString); } } catch (Botan::Exception &e) { - setErrorString(QString::fromAscii(e.what())); + setErrorString(QString::fromLatin1(e.what())); d->closeChannel(); } } diff --git a/src/libs/utils/consoleprocess.cpp b/src/libs/utils/consoleprocess.cpp index 881194a04f7..fcc60cd20c7 100644 --- a/src/libs/utils/consoleprocess.cpp +++ b/src/libs/utils/consoleprocess.cpp @@ -125,7 +125,7 @@ QString ConsoleProcess::msgCannotCreateTempDir(const QString & dir, const QStrin QString ConsoleProcess::msgUnexpectedOutput(const QByteArray &what) { - return tr("Unexpected output from helper program (%1).").arg(QString::fromAscii(what)); + return tr("Unexpected output from helper program (%1).").arg(QString::fromLatin1(what)); } QString ConsoleProcess::msgCannotChangeToWorkDir(const QString & dir, const QString &why) diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp index f71c1f46ebe..ea82d3611aa 100644 --- a/src/libs/utils/persistentsettings.cpp +++ b/src/libs/utils/persistentsettings.cpp @@ -389,7 +389,7 @@ bool PersistentSettingsWriter::save(const QVariantMap &data, QWidget *parent) co w.setAutoFormattingIndent(1); // Historical, used to be QDom. w.writeStartDocument(); w.writeDTD(QLatin1String("<!DOCTYPE ") + m_docType + QLatin1Char('>')); - w.writeComment(QString::fromAscii(" Written by %1 %2, %3. "). + w.writeComment(QString::fromLatin1(" Written by %1 %2, %3. "). arg(QCoreApplication::applicationName(), QCoreApplication::applicationVersion(), QDateTime::currentDateTime().toString(Qt::ISODate))); diff --git a/src/libs/utils/portlist.cpp b/src/libs/utils/portlist.cpp index 39a258149d5..78e2c6940c6 100644 --- a/src/libs/utils/portlist.cpp +++ b/src/libs/utils/portlist.cpp @@ -117,7 +117,7 @@ private: } bool atEnd() const { return m_pos == m_portsSpec.length(); } - char nextChar() const { return m_portsSpec.at(m_pos).toAscii(); } + char nextChar() const { return m_portsSpec.at(m_pos).toLatin1(); } PortList m_portList; int m_pos; diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index 65d2d5507c0..0ce0a6755a7 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -279,7 +279,7 @@ QStringList QtcProcess::splitArgs(const QString &_args, bool abortOnMeta, SplitE inline static bool isQuoteMeta(QChar cUnicode) { - char c = cUnicode.toAscii(); + char c = cUnicode.toLatin1(); return c == '\\' || c == '\'' || c == '"' || c == '$'; } diff --git a/src/libs/zeroconf/embeddedLib.cpp b/src/libs/zeroconf/embeddedLib.cpp index cb0d5e4b769..fb369fb3586 100644 --- a/src/libs/zeroconf/embeddedLib.cpp +++ b/src/libs/zeroconf/embeddedLib.cpp @@ -129,7 +129,7 @@ public: logger->appendError(ErrorMessage::NoteLevel, ZConfLib::tr("%1: log of previous daemon run is: '%2'.\n") .arg(name()) - .arg(QString::fromAscii(logBA.constData(), logBA.size()))); + .arg(QString::fromLatin1(logBA.constData(), logBA.size()))); qDebug()<<logBA.size()<<oldLog.error()<<oldLog.errorString(); } oldLog.close(); |