diff options
Diffstat (limited to 'src/ciscocertificateenrollment.cpp')
-rw-r--r-- | src/ciscocertificateenrollment.cpp | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/src/ciscocertificateenrollment.cpp b/src/ciscocertificateenrollment.cpp index bb1d54c..02eb4af 100644 --- a/src/ciscocertificateenrollment.cpp +++ b/src/ciscocertificateenrollment.cpp @@ -29,13 +29,13 @@ #include <kdebug.h> #include <klineedit.h> #include <iostream> -#include <qradiobutton.h> -#include <qcursor.h> +#include <tqradiobutton.h> +#include <tqcursor.h> #include "utils.h" //END INCLUDES -CiscoCertificateEnrollment::CiscoCertificateEnrollment ( QWidget *, const char*, KVpncConfig *GlobalConfig ) +CiscoCertificateEnrollment::CiscoCertificateEnrollment ( TQWidget *, const char*, KVpncConfig *GlobalConfig ) { this->GlobalConfig = GlobalConfig; valuesOk=true; @@ -71,7 +71,7 @@ CiscoCertificateEnrollment::~CiscoCertificateEnrollment() void CiscoCertificateEnrollment::accept() { finished=true; - QWizard::accept(); + TQWizard::accept(); } void CiscoCertificateEnrollment::canAccept() @@ -79,7 +79,7 @@ void CiscoCertificateEnrollment::canAccept() - QDialog::accept(); + TQDialog::accept(); } void CiscoCertificateEnrollment::reject() @@ -90,48 +90,48 @@ void CiscoCertificateEnrollment::reject() if ( EnrollmentProcess != 0 && EnrollmentProcess->isRunning() ) { EnrollmentProcess->tryTerminate(); - QTimer::singleShot ( 2000, EnrollmentProcess, SLOT ( kill() ) ); + TQTimer::singleShot ( 2000, EnrollmentProcess, TQT_SLOT ( kill() ) ); if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( i18n ( "process %1 killed" ).arg ( "cisco_cert_mgr" ), GlobalConfig->debug ); } finished = false; - QWizard::reject(); + TQWizard::reject(); } void CiscoCertificateEnrollment::setupPages() { - GlobalConfig->appPointer->setOverrideCursor( QCursor(Qt::WaitCursor) ); + GlobalConfig->appPointer->setOverrideCursor( TQCursor(TQt::WaitCursor) ); selectionpage = new CiscoCertificateEnrollmentBase ( 0 ); - selectionpage->sizeHint(); + selectionpage->tqsizeHint(); addPage ( selectionpage, "<b>" + i18n ( "Select enrollment type..." ) + "</b>" ); - connect ( selectionpage->FileEnrollementRadioButton, SIGNAL ( toggled ( bool ) ), this, SLOT ( enrollmentToggled ( bool ) ) ); - connect ( selectionpage->OnlineEnrollementRadioButton, SIGNAL ( toggled ( bool ) ), this, SLOT ( enrollmentToggled ( bool ) ) ); + connect ( selectionpage->FileEnrollementRadioButton, TQT_SIGNAL ( toggled ( bool ) ), this, TQT_SLOT ( enrollmentToggled ( bool ) ) ); + connect ( selectionpage->OnlineEnrollementRadioButton, TQT_SIGNAL ( toggled ( bool ) ), this, TQT_SLOT ( enrollmentToggled ( bool ) ) ); GlobalConfig->slotStatusMsg(i18n("Collecting cisco CA certs from Cisco certificate store..."), ID_STATUS_MSG); if (GlobalConfig->KvpncDebugLevel > 2) GlobalConfig->appendLogEntry(i18n("Looking for CA certs in Cisco certificate store..."), GlobalConfig->debug); - QStringList CiscoCaCerts = Utils(GlobalConfig).getCertsFromCiscoCertStore("ca"); + TQStringList CiscoCaCerts = Utils(GlobalConfig).getCertsFromCiscoCertStore("ca"); if (GlobalConfig->KvpncDebugLevel > 2) GlobalConfig->appendLogEntry(i18n("Done."), GlobalConfig->debug); GlobalConfig->slotStatusMsg(i18n("Done."), ID_FLASH_MSG); GlobalConfig->slotStatusMsg(i18n("Ready."), ID_STATUS_MSG); - for ( QStringList::Iterator it = CiscoCaCerts.begin(); it != CiscoCaCerts.end(); ++it ) + for ( TQStringList::Iterator it = CiscoCaCerts.begin(); it != CiscoCaCerts.end(); ++it ) { if ( GlobalConfig->KvpncDebugLevel > 2 ) - std::cout << "insert item (cisco ca certs): " << QString ( *it ) << std::endl; + std::cout << "insert item (cisco ca certs): " << TQString ( *it ) << std::endl; selectionpage->CAComboBox->insertItem ( *it ); } datapage = new CiscoCertificateEnrollmentDataDialog ( 0, "datapage",GlobalConfig ); - datapage->sizeHint(); + datapage->tqsizeHint(); addPage ( datapage, "<b>" + i18n ( "Enter certificate data..." ) + "</b>" ); finishpage = new CiscoCertificateEnrollmentFinishWidgetBase ( 0 ); - finishpage->sizeHint(); + finishpage->tqsizeHint(); addPage ( finishpage, "<b>" + i18n ( "Finish" ) + "</b>" ); GlobalConfig->appPointer->restoreOverrideCursor(); @@ -141,7 +141,7 @@ void CiscoCertificateEnrollment::next () { // called at each finish of a page bool ok = true; - QString msg = i18n ( "Please fill in all fields!" ); + TQString msg = i18n ( "Please fill in all fields!" ); msg = i18n ( "These fields must be filled in:\n" ); if ( currentpage == selectionpage ) { @@ -177,7 +177,7 @@ void CiscoCertificateEnrollment::next () else if ( GlobalConfig->KvpncDebugLevel > 4 ) GlobalConfig->appendLogEntry ( i18n ( "Password (cleartext): %1" ).arg ( selectionpage->NewPasswordPasswordEdit->password() ), KVpncConfig::debug ); - ChallengePassword =QString(selectionpage->NewPasswordPasswordEdit->password()); + ChallengePassword =TQString(selectionpage->NewPasswordPasswordEdit->password()); } if ( GlobalConfig->KvpncDebugLevel > 2 ) @@ -224,7 +224,7 @@ void CiscoCertificateEnrollment::next () else if ( GlobalConfig->KvpncDebugLevel > 4 ) GlobalConfig->appendLogEntry ( i18n ( "Challenge password (cleartext): %1" ).arg ( selectionpage->ChallengePasswordPasswordEdit->password() ), KVpncConfig::debug ); - ChallengePassword =QString(selectionpage->ChallengePasswordPasswordEdit->password()); + ChallengePassword =TQString(selectionpage->ChallengePasswordPasswordEdit->password()); } } @@ -277,7 +277,7 @@ void CiscoCertificateEnrollment::next () // now do the work successmsg =i18n ( "Enrollment was sucessful." ); success=0; - QString bin="cisco_cert_mgr"; + TQString bin="cisco_cert_mgr"; ToolInfo *tool; //std::cout << "Tool (bin): " << bin << std::endl; if ( !GlobalConfig->ToolList->isEmpty() ) @@ -299,12 +299,12 @@ void CiscoCertificateEnrollment::next () } - GlobalConfig->appPointer->setOverrideCursor ( QCursor ( Qt::WaitCursor ) ); + GlobalConfig->appPointer->setOverrideCursor ( TQCursor ( TQt::WaitCursor ) ); - env = new QStringList(); + env = new TQStringList(); *env << "LC_ALL=C" << "LANG=C" << "PATH=/bin:/usr/bin:/usr/sbin:/sbin"; - EnrollmentProcess = new QProcess ( this ); + EnrollmentProcess = new TQProcess ( this ); EnrollmentProcess->addArgument ( GlobalConfig->pathToCiscoCertMgr ); if ( type == "file" ) @@ -372,18 +372,18 @@ void CiscoCertificateEnrollment::next () } - connect ( EnrollmentProcess, SIGNAL ( readyReadStdout() ), this, SLOT ( readFromStdout() ) ); - connect ( EnrollmentProcess, SIGNAL ( readyReadStderr() ), this, SLOT ( readFromStderr() ) ); - connect ( EnrollmentProcess, SIGNAL ( processExited()) , this, SLOT(enrollmentProcessFinished())); + connect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStdout() ), this, TQT_SLOT ( readFromStdout() ) ); + connect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStderr() ), this, TQT_SLOT ( readFromStderr() ) ); + connect ( EnrollmentProcess, TQT_SIGNAL ( processExited()) , this, TQT_SLOT(enrollmentProcessFinished())); // if ( GlobalConfig->KvpncDebugLevel > 3 ) { - QString args = ""; - QStringList list = EnrollmentProcess->arguments(); - QStringList::Iterator it2 = list.begin(); + TQString args = ""; + TQStringList list = EnrollmentProcess->arguments(); + TQStringList::Iterator it2 = list.begin(); while ( it2 != list.end() ) { - args += QString ( " " + *it2 ) ; + args += TQString ( " " + *it2 ) ; ++it2; } @@ -409,7 +409,7 @@ void CiscoCertificateEnrollment::next () ProgressDlg->show(); ProgressDlg->resize ( ProgressDlg->width() +100,ProgressDlg->height() ); - connect ( &CheckEnrollmentTimer, SIGNAL ( timeout() ), this, SLOT ( checkProgress() ) ); + connect ( &CheckEnrollmentTimer, TQT_SIGNAL ( timeout() ), this, TQT_SLOT ( checkProgress() ) ); CheckEnrollmentTimer.start ( 500, FALSE ); // we stupid have to send the password :( @@ -439,7 +439,7 @@ void CiscoCertificateEnrollment::next () if ( ok ) { previouspage = currentpage; - QWizard::next(); + TQWizard::next(); } else { @@ -460,13 +460,13 @@ void CiscoCertificateEnrollment::back() */ - QWizard::back(); + TQWizard::back(); } -void CiscoCertificateEnrollment::showPage ( QWidget* page ) +void CiscoCertificateEnrollment::showPage ( TQWidget* page ) { currentpage = page; - QWizard::showPage ( page ); + TQWizard::showPage ( page ); // FIXME set currentpage at back() @@ -482,9 +482,9 @@ void CiscoCertificateEnrollment::showPage ( QWidget* page ) void CiscoCertificateEnrollment::enrollmentProcessFinished() { - disconnect ( EnrollmentProcess, SIGNAL ( readyReadStdout() ), this, SLOT ( readFromStdout() ) ); - disconnect ( EnrollmentProcess, SIGNAL ( readyReadStderr() ), this, SLOT ( readFromStderr() ) ); - disconnect ( EnrollmentProcess, SIGNAL ( processExited()) , this, SLOT(enrollmentProcessFinished())); + disconnect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStdout() ), this, TQT_SLOT ( readFromStdout() ) ); + disconnect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStderr() ), this, TQT_SLOT ( readFromStderr() ) ); + disconnect ( EnrollmentProcess, TQT_SIGNAL ( processExited()) , this, TQT_SLOT(enrollmentProcessFinished())); if ( ProgressDlg!= 0 ) ProgressDlg->progressBar()->setValue ( 100 ); GlobalConfig->appPointer->restoreOverrideCursor(); @@ -541,13 +541,13 @@ void CiscoCertificateEnrollment::enrollmentToggled ( bool ) void CiscoCertificateEnrollment::readFromStdout() { - QString line2 = QString( EnrollmentProcess->readStdout() ); - QStringList lines = QStringList::split( '\n', line2 ); - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) + TQString line2 = TQString( EnrollmentProcess->readStdout() ); + TQStringList lines = TQStringList::split( '\n', line2 ); + for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) // while ( EnrollmentProcess->canReadLineStdout() ) { -// QString line = QString ( EnrollmentProcess->readLineStdout() ); - QString line = *it; +// TQString line = TQString ( EnrollmentProcess->readLineStdout() ); + TQString line = *it; if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( "[cisco_cert_mgr raw] "+line,GlobalConfig->debug ); @@ -591,13 +591,13 @@ void CiscoCertificateEnrollment::readFromStdout() void CiscoCertificateEnrollment::readFromStderr() { - QString line2 = QString( EnrollmentProcess->readStderr() ); - QStringList lines = QStringList::split( '\n', line2 ); - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) + TQString line2 = TQString( EnrollmentProcess->readStderr() ); + TQStringList lines = TQStringList::split( '\n', line2 ); + for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) // while ( EnrollmentProcess->canReadLineStderr() ) { -// QString line = QString ( EnrollmentProcess->readLineStderr() ); - QString line = *it; +// TQString line = TQString ( EnrollmentProcess->readLineStderr() ); + TQString line = *it; if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( "[cisco_cert_mgr err raw] "+line,GlobalConfig->debug ); @@ -632,18 +632,18 @@ void CiscoCertificateEnrollment::checkProgress() CheckEnrollmentTimer.stop(); // kill process - disconnect ( EnrollmentProcess, SIGNAL ( readyReadStdout() ), this, SLOT ( readFromStdout() ) ); - disconnect ( EnrollmentProcess, SIGNAL ( readyReadStderr() ), this, SLOT ( readFromStderr() ) ); + disconnect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStdout() ), this, TQT_SLOT ( readFromStdout() ) ); + disconnect ( EnrollmentProcess, TQT_SIGNAL ( readyReadStderr() ), this, TQT_SLOT ( readFromStderr() ) ); if ( EnrollmentProcess->isRunning() ) { EnrollmentProcess->tryTerminate(); - QTimer::singleShot ( 2000, EnrollmentProcess, SLOT ( kill() ) ); + TQTimer::singleShot ( 2000, EnrollmentProcess, TQT_SLOT ( kill() ) ); if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( i18n ( "process %1 killed" ).arg ( "cisco_cert_mgr" ), GlobalConfig->debug ); } - QStringList CiscoCertRequests = Utils ( GlobalConfig ).getCertsFromCiscoCertStore ( "enrollment" ); + TQStringList CiscoCertRequests = Utils ( GlobalConfig ).getCertsFromCiscoCertStore ( "enrollment" ); if ( !CiscoCertRequests.isEmpty() ) { if ( GlobalConfig->KvpncDebugLevel > 2 ) @@ -654,16 +654,16 @@ void CiscoCertificateEnrollment::checkProgress() if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( i18n ( "delete enrollment request..." ), GlobalConfig->debug ); - DeleteProcess = new QProcess ( 0 ); + DeleteProcess = new TQProcess ( 0 ); DeleteProcess->addArgument ( GlobalConfig->pathToCiscoCertMgr ); DeleteProcess->addArgument ( "-E" ); DeleteProcess->addArgument ( "-op" ); DeleteProcess->addArgument ( "delete" ); DeleteProcess->addArgument ( "-ct" ); DeleteProcess->addArgument ( 0 ); - connect ( DeleteProcess, SIGNAL ( processExited()) , this, SLOT(cancelProcessFinished())); - connect ( DeleteProcess, SIGNAL ( readyReadStdout() ), this, SLOT ( readFromStdout_cancel() ) ); - connect ( DeleteProcess, SIGNAL ( readyReadStderr() ), this, SLOT ( readFromStderr_cancel() ) ); + connect ( DeleteProcess, TQT_SIGNAL ( processExited()) , this, TQT_SLOT(cancelProcessFinished())); + connect ( DeleteProcess, TQT_SIGNAL ( readyReadStdout() ), this, TQT_SLOT ( readFromStdout_cancel() ) ); + connect ( DeleteProcess, TQT_SIGNAL ( readyReadStderr() ), this, TQT_SLOT ( readFromStderr_cancel() ) ); if ( !DeleteProcess->start ( env ) ) { @@ -684,9 +684,9 @@ void CiscoCertificateEnrollment::checkProgress() sleep(1); } } - disconnect ( DeleteProcess, SIGNAL ( processExited()) , this, SLOT(cancelProcessFinished())); - disconnect ( DeleteProcess, SIGNAL ( readyReadStdout() ), this, SLOT ( readFromStdout_cancel() ) ); - disconnect ( DeleteProcess, SIGNAL ( readyReadStderr() ), this, SLOT ( readFromStderr_cancel() ) ); + disconnect ( DeleteProcess, TQT_SIGNAL ( processExited()) , this, TQT_SLOT(cancelProcessFinished())); + disconnect ( DeleteProcess, TQT_SIGNAL ( readyReadStdout() ), this, TQT_SLOT ( readFromStdout_cancel() ) ); + disconnect ( DeleteProcess, TQT_SIGNAL ( readyReadStderr() ), this, TQT_SLOT ( readFromStderr_cancel() ) ); delete DeleteProcess; DeleteProcess=0L; @@ -714,10 +714,10 @@ void CiscoCertificateEnrollment::cancelProcessFinished() void CiscoCertificateEnrollment::readFromStdout_cancel() { - QString line = QString( DeleteProcess->readStdout() ); + TQString line = TQString( DeleteProcess->readStdout() ); // while ( DeleteProcess->canReadLineStdout() ) // { -// QString line = QString ( DeleteProcess->readLineStdout() ); +// TQString line = TQString ( DeleteProcess->readLineStdout() ); if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( "[cisco_cert_mgr raw] "+line,GlobalConfig->debug ); @@ -727,10 +727,10 @@ void CiscoCertificateEnrollment::readFromStdout_cancel() void CiscoCertificateEnrollment::readFromStderr_cancel() { - QString line = QString ( DeleteProcess->readStderr() ); + TQString line = TQString ( DeleteProcess->readStderr() ); // while ( DeleteProcess->canReadLineStderr() ) // { -// QString line = QString ( DeleteProcess->readLineStderr() ); +// TQString line = TQString ( DeleteProcess->readLineStderr() ); if ( GlobalConfig->KvpncDebugLevel > 2 ) GlobalConfig->appendLogEntry ( "[cisco_cert_mgr err raw] "+line,GlobalConfig->debug ); |