2022-09-14 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdadmin(1) that could cause segfaults when adding
	a new RSS feed.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-09-14 14:29:45 -04:00
parent 2085e08324
commit 30e649413d
2 changed files with 7 additions and 1 deletions

View File

@ -23307,3 +23307,6 @@
* Fixed a bug in rdadmin(1) that caused the value of the * Fixed a bug in rdadmin(1) that caused the value of the
'SSH Ident. File' on the 'Edit Host' dialog to fail to be 'SSH Ident. File' on the 'Edit Host' dialog to fail to be
propagated when cloning a new host. propagated when cloning a new host.
2022-09-14 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that could cause segfaults when adding
a new RSS feed.

View File

@ -2,7 +2,7 @@
// //
// Data model for Rivendell RSS feeds // Data model for Rivendell RSS feeds
// //
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -357,6 +357,7 @@ QModelIndex RDFeedListModel::addFeed(const QString &keyname)
d_cast_ids.insert(offset,ids_list); d_cast_ids.insert(offset,ids_list);
d_cast_icons.insert(offset,list); d_cast_icons.insert(offset,list);
d_key_names.insert(offset,keyname); d_key_names.insert(offset,keyname);
d_cast_texts.insert(offset,list_list);
QString sql=sqlFields()+ QString sql=sqlFields()+
"where "+ "where "+
@ -385,6 +386,7 @@ void RDFeedListModel::removeFeed(const QString &keyname)
d_cast_ids.removeAt(i); d_cast_ids.removeAt(i);
d_cast_icons.removeAt(i); d_cast_icons.removeAt(i);
d_key_names.removeAt(i); d_key_names.removeAt(i);
d_cast_texts.removeAt(i);
endRemoveRows(); endRemoveRows();
emit rowCountChanged(d_texts.size()); emit rowCountChanged(d_texts.size());
@ -495,6 +497,7 @@ void RDFeedListModel::updateModel(const QString &filter_sql)
d_cast_ids.clear(); d_cast_ids.clear();
d_cast_icons.clear(); d_cast_icons.clear();
d_key_names.clear(); d_key_names.clear();
d_cast_texts.clear();
if(d_include_none) { if(d_include_none) {
d_feed_ids.push_back(0); d_feed_ids.push_back(0);