Commit 9b28017b authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Port away from deprecated Qt5 methods

 – qSort → std::sort
 – toAscii → toLatin1
parent c27e4858
......@@ -70,7 +70,7 @@ void KMessageJabber::slotMessageReceived(const XMPP::Message &message)
{
if (message.from().full() == mPeerJid)
{
QByteArray msg = QByteArray::fromBase64(message.body().toAscii());
QByteArray msg = QByteArray::fromBase64(message.body().toLatin1());
qCDebug(JABBER_PROTOCOL_LOG) << mPeerJid << msg;
emit received (msg);
}
......
......@@ -17,6 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <algorithm>
#include <QDomElement>
#include <QString>
......@@ -32,7 +34,7 @@
PrivacyList::PrivacyList(const QString& name, const QList<PrivacyListItem>& items) : name_(name), items_(items)
{
qSort(items_);
std::sort(items_.begin(), items_.end());
}
PrivacyList::PrivacyList(const QDomElement& e)
......@@ -147,7 +149,7 @@ void PrivacyList::fromXml(const QDomElement& el)
items_.append(PrivacyListItem(e));
}
qSort(items_);
std::sort(items_.begin(), items_.end());
}
QString PrivacyList::toString() const
......
......@@ -59,9 +59,9 @@ DIGESTMD5Response::DIGESTMD5Response(const QByteArray& challenge, const QString&
QByteArray KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
QByteArray Z = QCA::Hash("md5").hashToString(KD).toLatin1();
//qDebug() << (QString("simplesasl.cpp: A1 = %1").arg(QString(A1)).toAscii());
//qDebug() << (QString("simplesasl.cpp: A2 = %1").arg(QString(A2)).toAscii());
//qDebug() << (QString("simplesasl.cpp: KD = %1").arg(QString(KD)).toAscii());
//qDebug() << (QString("simplesasl.cpp: A1 = %1").arg(QString(A1)).toLatin1());
//qDebug() << (QString("simplesasl.cpp: A2 = %1").arg(QString(A2)).toLatin1());
//qDebug() << (QString("simplesasl.cpp: KD = %1").arg(QString(KD)).toLatin1());
// build output
DIGESTMD5PropList out;
......
......@@ -24,7 +24,7 @@ CompressionHandler::~CompressionHandler()
void CompressionHandler::writeIncoming(const QByteArray& a)
{
//qDebug("CompressionHandler::writeIncoming");
//qDebug() << (QString("Incoming %1 bytes").arg(a.size()).toAscii());
//qDebug() << (QString("Incoming %1 bytes").arg(a.size()).toLatin1());
errorCode_ = decompressor_->write(a);
if (!errorCode_)
QTimer::singleShot(0, this, SIGNAL(readyRead()));
......@@ -34,7 +34,7 @@ void CompressionHandler::writeIncoming(const QByteArray& a)
void CompressionHandler::write(const QByteArray& a)
{
//qDebug() << (QString("CompressionHandler::write(%1)").arg(a.size()).toAscii());
//qDebug() << (QString("CompressionHandler::write(%1)").arg(a.size()).toLatin1());
errorCode_ = compressor_->write(a);
if (!errorCode_)
QTimer::singleShot(0, this, SIGNAL(readyReadOutgoing()));
......@@ -54,7 +54,7 @@ QByteArray CompressionHandler::read()
QByteArray CompressionHandler::readOutgoing(int* i)
{
//qDebug("CompressionHandler::readOutgoing");
//qDebug() << (QString("Outgoing %1 bytes").arg(outgoing_buffer_.size()).toAscii());
//qDebug() << (QString("Outgoing %1 bytes").arg(outgoing_buffer_.size()).toLatin1());
QByteArray b = outgoing_buffer_.buffer();
outgoing_buffer_.buffer().clear();
outgoing_buffer_.reset();
......
......@@ -60,7 +60,7 @@ QString image2type(const QByteArray &ba)
if ( format.toUpper() == "JPEG" )
return "image/jpeg";
const QByteArray formatAscii = format.toAscii();
const QByteArray formatAscii = format.toLatin1();
qWarning("WARNING! VCard::image2type: unknown format = '%s'", format.isNull() ? "UNKNOWN" : formatAscii.constData());
return "image/unknown";
......
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