mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-29 16:08:50 +01:00
2020-02-25 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3ProgressDialog' dependency from rdadmin(1).
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <q3progressdialog.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qprogressdialog.h>
|
||||
|
||||
#include <rdconf.h>
|
||||
#include <rddb.h>
|
||||
@@ -307,7 +307,8 @@ void EditSettings::okData()
|
||||
if(edit_duplicate_carts_box->isChecked()!=
|
||||
edit_system->allowDuplicateCartTitles()) {
|
||||
QLabel *msg=new QLabel(this);
|
||||
Q3ProgressDialog *pd=new Q3ProgressDialog(this);
|
||||
QProgressDialog *pd=new QProgressDialog(this);
|
||||
pd->setWindowTitle("RDAdmin - "+tr("Progress"));
|
||||
pd->setLabel(msg);
|
||||
pd->setCancelButton(NULL);
|
||||
pd->setMinimumDuration(2);
|
||||
@@ -321,7 +322,8 @@ void EditSettings::okData()
|
||||
int count=0;
|
||||
int step=0;
|
||||
int step_size=q->size()/10;
|
||||
pd->setProgress(0,10);
|
||||
pd->setMaximum(10);
|
||||
pd->setValue(0);
|
||||
while(q->next()) {
|
||||
sql=QString("select NUMBER from CART where ")+
|
||||
"(TITLE=\""+RDEscapeString(q->value(1).toString())+"\")&&"+
|
||||
@@ -333,7 +335,7 @@ void EditSettings::okData()
|
||||
delete q1;
|
||||
count++;
|
||||
if(count>=step_size) {
|
||||
pd->setProgress(++step);
|
||||
pd->setValue(++step);
|
||||
count=0;
|
||||
qApp->processEvents();
|
||||
}
|
||||
@@ -372,7 +374,7 @@ void EditSettings::okData()
|
||||
sql="alter table CART drop index TITLE_IDX";
|
||||
q=new RDSqlQuery(sql);
|
||||
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);
|
||||
delete q;
|
||||
edit_system->setAllowDuplicateCartTitles(false);
|
||||
@@ -381,7 +383,7 @@ void EditSettings::okData()
|
||||
sql="alter table CART drop index TITLE";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql="alter table CART modify column TITLE char(255)";
|
||||
sql="alter table CART modify column TITLE varchar(191)";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql="alter table CART add index TITLE_IDX(TITLE)";
|
||||
|
||||
Reference in New Issue
Block a user