2020-02-25 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'Q3ProgressDialog' dependency from rdadmin(1).
This commit is contained in:
Fred Gleason 2020-02-25 17:52:57 -05:00
parent 42691d70aa
commit a8497097c0
10 changed files with 46 additions and 16 deletions

View File

@ -19710,3 +19710,5 @@
2020-02-25 Fred Gleason <fredg@paravelsystems.com> 2020-02-25 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3ProgressDialog' dependency from the 'Select Cut' * Removed the 'Q3ProgressDialog' dependency from the 'Select Cut'
dialog. dialog.
2020-02-25 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3ProgressDialog' dependency from rdadmin(1).

View File

@ -18,11 +18,11 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <q3progressdialog.h>
#include <qapplication.h> #include <qapplication.h>
#include <qfiledialog.h> #include <qfiledialog.h>
#include <qmessagebox.h> #include <qmessagebox.h>
#include <qprogressdialog.h>
#include <rdconf.h> #include <rdconf.h>
#include <rddb.h> #include <rddb.h>
@ -307,7 +307,8 @@ void EditSettings::okData()
if(edit_duplicate_carts_box->isChecked()!= if(edit_duplicate_carts_box->isChecked()!=
edit_system->allowDuplicateCartTitles()) { edit_system->allowDuplicateCartTitles()) {
QLabel *msg=new QLabel(this); QLabel *msg=new QLabel(this);
Q3ProgressDialog *pd=new Q3ProgressDialog(this); QProgressDialog *pd=new QProgressDialog(this);
pd->setWindowTitle("RDAdmin - "+tr("Progress"));
pd->setLabel(msg); pd->setLabel(msg);
pd->setCancelButton(NULL); pd->setCancelButton(NULL);
pd->setMinimumDuration(2); pd->setMinimumDuration(2);
@ -321,7 +322,8 @@ void EditSettings::okData()
int count=0; int count=0;
int step=0; int step=0;
int step_size=q->size()/10; int step_size=q->size()/10;
pd->setProgress(0,10); pd->setMaximum(10);
pd->setValue(0);
while(q->next()) { while(q->next()) {
sql=QString("select NUMBER from CART where ")+ sql=QString("select NUMBER from CART where ")+
"(TITLE=\""+RDEscapeString(q->value(1).toString())+"\")&&"+ "(TITLE=\""+RDEscapeString(q->value(1).toString())+"\")&&"+
@ -333,7 +335,7 @@ void EditSettings::okData()
delete q1; delete q1;
count++; count++;
if(count>=step_size) { if(count>=step_size) {
pd->setProgress(++step); pd->setValue(++step);
count=0; count=0;
qApp->processEvents(); qApp->processEvents();
} }
@ -372,7 +374,7 @@ void EditSettings::okData()
sql="alter table CART drop index TITLE_IDX"; sql="alter table CART drop index TITLE_IDX";
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
delete q; delete q;
sql="alter table CART modify column TITLE char(255) unique"; sql="alter table CART modify column TITLE varchar(191) unique";
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
delete q; delete q;
edit_system->setAllowDuplicateCartTitles(false); edit_system->setAllowDuplicateCartTitles(false);
@ -381,7 +383,7 @@ void EditSettings::okData()
sql="alter table CART drop index TITLE"; sql="alter table CART drop index TITLE";
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
delete q; delete q;
sql="alter table CART modify column TITLE char(255)"; sql="alter table CART modify column TITLE varchar(191)";
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
delete q; delete q;
sql="alter table CART add index TITLE_IDX(TITLE)"; sql="alter table CART add index TITLE_IDX(TITLE)";

View File

@ -2,7 +2,7 @@
// //
// List Rivendell Feeds // List Rivendell Feeds
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2020 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
@ -22,11 +22,10 @@
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <q3progressdialog.h> #include <qapplication.h>
#include <qlabel.h> #include <qlabel.h>
#include <qmessagebox.h> #include <qmessagebox.h>
#include <qapplication.h> #include <qprogressdialog.h>
#include <rdapplication.h> #include <rdapplication.h>
#include <rddb.h> #include <rddb.h>
@ -221,15 +220,14 @@ void ListFeeds::deleteData()
RDPodcast *cast; RDPodcast *cast;
sql=QString().sprintf("select ID from PODCASTS where FEED_ID=%d",item->id()); sql=QString().sprintf("select ID from PODCASTS where FEED_ID=%d",item->id());
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
Q3ProgressDialog *pd= QProgressDialog *pd=new QProgressDialog(tr("Deleting Audio..."),tr("Cancel"),
new Q3ProgressDialog(tr("Deleting Audio..."),tr("Cancel"),q->size()+1,this, 0,q->size()+1,this);
NULL); pd->setWindowTitle("RDAdmin - "+tr("Deleting"));
pd->setCaption(tr("Deleting")); pd->setValue(0);
pd->setProgress(0);
qApp->processEvents(); qApp->processEvents();
sleep(1); sleep(1);
while(q->next()) { while(q->next()) {
pd->setProgress(pd->progress()+1); pd->setValue(pd->value()+1);
qApp->processEvents(); qApp->processEvents();
cast=new RDPodcast(rda->config(),q->value(0).toUInt()); cast=new RDPodcast(rda->config(),q->value(0).toUInt());
cast->removeAudio(feed,&errs,rda->config()->logXloadDebugData()); cast->removeAudio(feed,&errs,rda->config()->logXloadDebugData());

View File

@ -3684,6 +3684,10 @@ Přepsat?</translation>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -3560,6 +3560,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -3695,6 +3695,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -2974,6 +2974,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -3498,6 +3498,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -3498,6 +3498,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>

View File

@ -3547,6 +3547,10 @@ Overwrite?</source>
<source>Save text file</source> <source>Save text file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Progress</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditStation</name> <name>EditStation</name>