[Lprof-devel] lprof/src/reference_inst_qt installreffile.cpp, 1.57, 1.57.2.1 installreffile.h, 1.21
Brought to you by:
hvengel
From: Amit K. <ami...@us...> - 2009-06-30 00:00:56
|
Update of /cvsroot/lprof/lprof/src/reference_inst_qt In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20052/reference_inst_qt Modified Files: Tag: GSoC-2009 installreffile.cpp installreffile.h Log Message: Index: installreffile.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/reference_inst_qt/installreffile.h,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C2 -d -r1.21 -r1.21.2.1 *** installreffile.h 19 Feb 2008 21:03:02 -0000 1.21 --- installreffile.h 30 Jun 2009 00:00:10 -0000 1.21.2.1 *************** *** 34,40 **** #include <lprofmain.h> #include <ui_installreffilebase.h> ! #include <q3urloperator.h> ! class Q3NetworkOperation; enum TemplateType --- 34,41 ---- #include <lprofmain.h> #include <ui_installreffilebase.h> ! #include <QFile> ! //#include <q3urloperator.h> ! //class Q3NetworkOperation; enum TemplateType *************** *** 71,76 **** bool refNotToOld(); ! Q3UrlOperator urlOp; ! int copyNum; ref_file_parms dirs; targetTemplate files; --- 72,77 ---- bool refNotToOld(); ! //Q3UrlOperator urlOp; ! //int copyNum; ref_file_parms dirs; targetTemplate files; *************** *** 81,85 **** void slotCancel(); void slotHelpButton(); ! void slotFileCopied( Q3NetworkOperation * ); void slotTargetSelectorChanged(); --- 82,86 ---- void slotCancel(); void slotHelpButton(); ! //void slotFileCopied( Q3NetworkOperation * ); void slotTargetSelectorChanged(); Index: installreffile.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/reference_inst_qt/installreffile.cpp,v retrieving revision 1.57 retrieving revision 1.57.2.1 diff -C2 -d -r1.57 -r1.57.2.1 *** installreffile.cpp 18 May 2009 21:17:17 -0000 1.57 --- installreffile.cpp 30 Jun 2009 00:00:10 -0000 1.57.2.1 *************** *** 44,53 **** #include <q3textstream.h> #include <qfile.h> ! #include <q3urloperator.h> #include <qdir.h> #include <qdatetime.h> - #include <q3urloperator.h> #include <QTranslator> ! #if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32)) --- 44,52 ---- #include <q3textstream.h> #include <qfile.h> ! //#include <q3urloperator.h> #include <qdir.h> #include <qdatetime.h> #include <QTranslator> ! #include <QFile> #if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32)) *************** *** 145,149 **** InstallRefFile::InstallRefFile(QWidget *parent) ! : QDialog(parent, "", 0, Qt::WindowSystemMenuHint), urlOp(QString::fromLocal8Bit("/")) { setupUi(this); --- 144,148 ---- InstallRefFile::InstallRefFile(QWidget *parent) ! : QDialog(parent, "", 0, Qt::WindowSystemMenuHint) //, urlOp(QString::fromLocal8Bit("/")) { setupUi(this); *************** *** 174,182 **** TargetSelector->FillValues(); ! connect( &urlOp, SIGNAL( finished( Q3NetworkOperation *) ), this, SLOT( slotFileCopied( Q3NetworkOperation * ) ) ); ! connect(TargetSelector, SIGNAL(valueChanged()), this, SLOT(slotTargetSelectorChanged())); ! copyNum=0; slotTargetSelectorChanged(); --- 173,180 ---- TargetSelector->FillValues(); ! //connect( &urlOp, SIGNAL( finished( Q3NetworkOperation *) ), this, SLOT( slotFileCopied( Q3NetworkOperation * ) ) ); connect(TargetSelector, SIGNAL(valueChanged()), this, SLOT(slotTargetSelectorChanged())); ! //copyNum=0; slotTargetSelectorChanged(); *************** *** 197,201 **** } ! void InstallRefFile::slotFileCopied( Q3NetworkOperation *op ) { --- 195,199 ---- } ! /* void InstallRefFile::slotFileCopied( Q3NetworkOperation *op ) { *************** *** 219,223 **** mutex.unlock(); } ! TemplateType InstallRefFile::CheckTemplateType() { --- 217,221 ---- mutex.unlock(); } ! */ TemplateType InstallRefFile::CheckTemplateType() { *************** *** 724,734 **** TargetSelector->getFilename().mid(TargetSelector->getFilename().findRev(QString::fromLocal8Bit("/"), -1), TargetSelector->getFilename().length()); ! mutex.lock(); ! copyNum = copyNum + 1; // pull file names out of the dialog buttonCancel->setEnabled(false); // copy the reference file to ~/<lprofBaseDir>/target_refs ! urlOp.copy( TargetSelector->getFilename(), dirs.ref_dir + QString::fromLocal8Bit("/")); ! mutex.unlock(); } } --- 722,748 ---- TargetSelector->getFilename().mid(TargetSelector->getFilename().findRev(QString::fromLocal8Bit("/"), -1), TargetSelector->getFilename().length()); ! //mutex.lock(); ! //copyNum = copyNum + 1; // pull file names out of the dialog buttonCancel->setEnabled(false); // copy the reference file to ~/<lprofBaseDir>/target_refs ! //urlOp.copy( TargetSelector->getFilename(), dirs.ref_dir + QString::fromLocal8Bit("/")); ! ! QString ref_file_name = TargetSelector->getFilename().section(QString::fromLocal8Bit("/"), -1); ! if(QFile::exists(dirs.ref_dir + QString::fromLocal8Bit("/")+ref_file_name)) ! { ! if( !(QFile::remove(dirs.ref_dir + QString::fromLocal8Bit("/")+ref_file_name))) ! QMessageBox::information( this, tr( "Error " ), tr("The reference file can not be overwriten")); ! } ! ! bool ref_copied = QFile::copy(TargetSelector->getFilename(), dirs.ref_dir + QString::fromLocal8Bit("/")+ref_file_name); ! ! if(ref_copied) ! QMessageBox::information( this, tr( "Reference File Installed" ), tr("The reference file was succesfully installed")); ! else if(!ref_copied) ! QMessageBox::information( this, tr( "Reference File Not Installed" ), tr("The reference file could not be installed")); ! ! buttonCancel->setEnabled(true); ! //mutex.unlock(); } } |