KNewStuff
core/commentsmodel.cpp
46 // Sanity checks, because we need a few things to be correct before we can actually fetch comments...
48 qCWarning(KNEWSTUFFCORE) << "CommentsModel must be parented on a KNSCore::EngineBase instance to be able to fetch comments";
51 qCWarning(KNEWSTUFFCORE) << "Without an entry to fetch comments for, CommentsModel cannot fetch comments for it";
60 q->connect(provider.data(), &Provider::commentsLoaded, q, [this](const QList<std::shared_ptr<KNSCore::Comment>> &newComments) {
76 q->beginInsertRows(QModelIndex(), comments.count(), comments.count() + actualNewComments.count() - 1);
86 qCDebug(KNEWSTUFFCORE) << "Loading comments, page" << pageToLoad << "with current comment count" << comments.count() << "out of a total of"
154 return i18nc("The value returned for an unknown role when requesting data from the model.", "Unknown CommentsModel role");
KNSCore::Entry entry
The Entry for which this model should handle comments.
Definition core/commentsmodel.h:51
CommentsModel(EngineBase *parent=nullptr)
Construct a new CommentsModel instance.
Definition core/commentsmodel.cpp:94
void commentsLoaded(const QList< std::shared_ptr< KNSCore::Comment > > comments)
Fired when new comments have been loaded.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void clear()
qsizetype count() const const
bool isValid() const const
int row() const const
QObject * parent() const const
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:20:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:20:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.