summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-03 08:13:46 +0200
committerMontel Laurent <[email protected]>2017-05-03 08:13:46 +0200
commited62439e5b1c00f7364a13a2d61dc790e24f8e44 (patch)
tree32b0dc23fbadd97efcd31bde3c057193098e54bf
parent1b488f753407eac7d6afbd88b2e1735a44154b3a (diff)
Port some deprecated method
-rw-r--r--CMakeLists.txt1
-rw-r--r--export/akregatorstorageexporter.cpp2
-rw-r--r--src/article.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12a6dbb..ade4209 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,7 @@ find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
+#add_definitions( -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 )
include_directories(${akregator_SOURCE_DIR} ${akregator_BINARY_DIR})
include(CheckTypeSize)
check_type_size("long" SIZEOF_LONG)
diff --git a/export/akregatorstorageexporter.cpp b/export/akregatorstorageexporter.cpp
index dd81b13..ba4c851 100644
--- a/export/akregatorstorageexporter.cpp
+++ b/export/akregatorstorageexporter.cpp
@@ -228,7 +228,7 @@ static void writeItem(FeedStorage *storage, const QString &guid, QXmlStreamWrite
const uint published = storage->pubDate(guid);
if (published > 0) {
- const QString pdStr = QDateTime::fromTime_t(published).toString(Qt::ISODate);
+ const QString pdStr = QDateTime::fromSecsSinceEpoch(published).toString(Qt::ISODate);
Elements::instance.published.write(pdStr, writer);
}
diff --git a/src/article.cpp b/src/article.cpp
index 533a106..0d91aa6 100644
--- a/src/article.cpp
+++ b/src/article.cpp
@@ -155,7 +155,7 @@ Article::Private::Private()
archive(0),
status(0),
hash(0),
- pubDate(QDateTime::fromTime_t(1))
+ pubDate(QDateTime::fromSecsSinceEpoch(1))
{
}
@@ -165,7 +165,7 @@ Article::Private::Private(const QString &guid_, Feed *feed_, Backend::FeedStorag
archive(archive_),
status(archive->status(guid)),
hash(archive->hash(guid)),
- pubDate(QDateTime::fromTime_t(archive->pubDate(guid)))
+ pubDate(QDateTime::fromSecsSinceEpoch(archive->pubDate(guid)))
{
}