diff --git a/saoriview.cpp b/saoriview.cpp index 790101e..7747366 100644 --- a/saoriview.cpp +++ b/saoriview.cpp @@ -164,16 +164,16 @@ int i = 0; SaoriViewEntry *entry = nullptr; for(;m_entries.count() > i;i ++) { - if (m_entries.at(i)->id() == j.toObject()["id"].toString().toLong()) { + if (m_entries.at(i)->id() == j.toObject()["id"].toString().toLongLong()) { entry = m_entries.at(i); qDebug() << "update"; break; } - if (m_entries.at(i)->id() < j.toObject()["id"].toString().toLong()) break; + if (m_entries.at(i)->id() < j.toObject()["id"].toString().toLongLong()) break; } if (entry == nullptr) { qDebug() << j.toObject()["id"].toString().toLong(); - entry = new SaoriViewEntry(j.toObject()["id"].toString().toLong(),ui->scrollAreaWidgetContents); + entry = new SaoriViewEntry(j.toObject()["id"].toString().toLongLong(),ui->scrollAreaWidgetContents); connect(entry,&SaoriViewEntry::anchorClicked,this,&SaoriView::linkClicked); m_entries.insert(i,entry); qobject_cast(ui->scrollAreaWidgetContents->layout())->insertWidget(i,entry); diff --git a/saoriviewentry.cpp b/saoriviewentry.cpp index d9a221a..1374cf8 100644 --- a/saoriviewentry.cpp +++ b/saoriviewentry.cpp @@ -30,7 +30,7 @@ #include #include -SaoriViewEntry::SaoriViewEntry(long id, QWidget *parent) : +SaoriViewEntry::SaoriViewEntry(qlonglong id, QWidget *parent) : QTextBrowser(parent) { setReadOnly(true); @@ -62,7 +62,7 @@ setFixedHeight(document()->size().height()); } -long SaoriViewEntry::id() +qlonglong SaoriViewEntry::id() { return m_id; } diff --git a/saoriviewentry.h b/saoriviewentry.h index c512150..89941de 100644 --- a/saoriviewentry.h +++ b/saoriviewentry.h @@ -36,9 +36,9 @@ Q_OBJECT public: - SaoriViewEntry(long id,QWidget *parent = nullptr); + SaoriViewEntry(qlonglong id,QWidget *parent = nullptr); void setContent(const QString content); - long id(); + qlonglong id(); protected: virtual void resizeEvent(QResizeEvent *e); @@ -46,7 +46,7 @@ const QString imageReplacer(); protected: - long m_id; + qlonglong m_id; QString m_original; QMap m_urlmap;