Save work.

This commit is contained in:
martinrotter 2017-05-05 08:25:32 +02:00
parent 0773db7b5a
commit 6776d3809d
2 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,8 @@ MessagesModel::MessagesModel(QObject *parent)
// via model, but via DIRECT SQL calls are used to do persistent messages.
setEditStrategy(QSqlTableModel::OnManualSubmit);
setTable(QSL("Messages"));
//setRelation(MSG_DB_FEED_INDEX, QSqlRelation("Feeds", "custom_id", "title"));
loadMessages(nullptr);
}

View File

@ -44,14 +44,13 @@ class MessagesModel : public QSqlRelationalTableModel {
explicit MessagesModel(QObject *parent = 0);
virtual ~MessagesModel();
QString orderByClause() const;
// Model implementation.
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(int row, int column, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
QString orderByClause() const;
QString selectStatement() const;
// Returns message at given index.