summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Krems <m.krems@software-vision.eu>2012-12-10 20:42:47 +0100
committerThiago Macieira <thiago.macieira@intel.com>2012-12-11 21:38:08 +0100
commitf99365139c672d423c68197c2afa352cebb74885 (patch)
tree30c4eb6e95e69c302048915995f2b154bb173e7b
parent448b65aeee3ba9a3e8a72f27868955b76b6aab75 (diff)
Replace deprecated methods.
QString::fromAscii -> QString::fromLatin1 QDate::setYMD -> QDate::setDate Change-Id: I5c488b00225508104cb6e1667e5c43a5584936a2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/qftp/qftp.cpp6
-rw-r--r--src/qftp/qftp.pro1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/qftp/qftp.cpp b/src/qftp/qftp.cpp
index db6151e..2b48e5f 100644
--- a/src/qftp/qftp.cpp
+++ b/src/qftp/qftp.cpp
@@ -472,7 +472,7 @@ static void _q_fixupDateTime(QDateTime *dateTime)
const int futureTolerance = 86400;
if (dateTime->secsTo(QDateTime::currentDateTime()) < -futureTolerance) {
QDate d = dateTime->date();
- d.setYMD(d.year() - 1, d.month(), d.day());
+ d.setDate(d.year() - 1, d.month(), d.day());
dateTime->setDate(d);
}
}
@@ -925,7 +925,7 @@ void QFtpPI::readyRead()
while (commandSocket.canReadLine()) {
// read line with respect to line continuation
- QString line = QString::fromAscii(commandSocket.readLine());
+ QString line = QString::fromLatin1(commandSocket.readLine());
if (replyText.isEmpty()) {
if (line.length() < 3) {
// protocol error
@@ -957,7 +957,7 @@ void QFtpPI::readyRead()
replyText += line;
if (!commandSocket.canReadLine())
return;
- line = QString::fromAscii(commandSocket.readLine());
+ line = QString::fromLatin1(commandSocket.readLine());
lineLeft4 = line.left(4);
}
replyText += line.mid(4); // strip reply code 'xyz '
diff --git a/src/qftp/qftp.pro b/src/qftp/qftp.pro
index bb377b5..d625fed 100644
--- a/src/qftp/qftp.pro
+++ b/src/qftp/qftp.pro
@@ -13,4 +13,3 @@ load(qt_module)
# Input
HEADERS += qftp.h qurlinfo.h
SOURCES += qftp.cpp qurlinfo.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0