[mythtv] Fwd: [PATCH] Add profile groups
Geoffrey Hausheer
ou401cru02 at sneakemail.com
Tue Sep 16 12:01:17 EDT 2003
On Tue, 16 Sep 2003 01:21:18 -0500, "Geoffrey Hausheer
ou401cru02-at-sneakemail.com |mythtv/1.0-Allow|"
<khm9hhqgzu0t at sneakemail.com> said:
> Okay, this is likely to be the last patch I make for the profile-groups,
> assuming no bugs crop up.
>
> This patch implements the ability to delete profile groups (hit 'D').
> You can't delete default groups, of course.
> It will also prevent creating duplicate profile groups.
>
Grr. I forgot to delete the codecparams when deleting profile groups.
Here is a minor patch to be applied on top of the big one
(profile1f.patch)
.Geoff
---
--- profilegroup.cpp 2003-09-15 22:26:09.000000000 -0500
+++ profilegroup.cpp.new 2003-09-16 10:54:19.000000000 -0500
@@ -243,11 +243,16 @@
delete dlg;
if (value == 1)
{
- query = QString("DELETE FROM profilegroups WHERE id =
%1;").arg(id);
+ query = QString("DELETE codecparams FROM codecparams, "
+ "recordingprofiles WHERE "
+ "codecparams.profile = recordingprofiles.id
"
+ "AND recordingprofiles.profilegroup =
%1").arg(id);
db->exec(query);
query = QString("DELETE FROM recordingprofiles WHERE "
"profilegroup = %1").arg(id);
db->exec(query);
+ query = QString("DELETE FROM profilegroups WHERE id =
%1;").arg(id);
+ db->exec(query);
redraw = true;
dialog->done(QDialog::Rejected);
}
More information about the mythtv-dev
mailing list