From 1cc6550ea24abfd0acd8b2a5f627e4ff0b53dce7 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:40:12 -0600 Subject: Remove additional unneeded tq method conversions --- src/preferencesdialog.cpp | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/preferencesdialog.cpp') diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp index 26e842a..d371011 100644 --- a/src/preferencesdialog.cpp +++ b/src/preferencesdialog.cpp @@ -527,12 +527,12 @@ PreferencesDialog::PreferencesDialog( TQWidget *parent, TQApplication *app, TQTe // TODO read types from list ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "Cisco (vpnc)" ), VpnAccountData::cisco ); - ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "IPSec (%1)" ).tqarg("racoon"), VpnAccountData::racoon ); - ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "IPSec (%1)" ).tqarg("Openswan/strongSwan"), VpnAccountData::freeswan ); + ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "IPSec (%1)" ).arg("racoon"), VpnAccountData::racoon ); + ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "IPSec (%1)" ).arg("Openswan/strongSwan"), VpnAccountData::freeswan ); ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "PPTP" ), VpnAccountData::pptp ); ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "OpenVPN" ), VpnAccountData::openvpn ); - ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "L2TP (%1)" ).tqarg("racoon"), VpnAccountData::l2tpd_racoon ); - ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "L2TP (%1)" ).tqarg("Openswan/strongSwan"), VpnAccountData::l2tpd_freeswan ); + ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "L2TP (%1)" ).arg("racoon"), VpnAccountData::l2tpd_racoon ); + ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "L2TP (%1)" ).arg("Openswan/strongSwan"), VpnAccountData::l2tpd_freeswan ); ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "Cisco (proprietary)" ), VpnAccountData::ciscoorig ); ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "Vtun" ), VpnAccountData::vtun ); ProfileGeneralOptionsWidget->ConnectionTypeComboBox->insertItem( i18n( "SSH" ), VpnAccountData::ssh ); @@ -1471,7 +1471,7 @@ void PreferencesDialog::setupGui() //if (GlobalConfig->KvpncDebugLevel > 2) //{ - // GlobalConfig->appendLogEntry(i18n("SSH files: %1").tqarg(KeyFiles.join(",")),GlobalConfig->debug); + // GlobalConfig->appendLogEntry(i18n("SSH files: %1").arg(KeyFiles.join(",")),GlobalConfig->debug); //} if (KeyFiles.size() > 1) @@ -1481,13 +1481,13 @@ void PreferencesDialog::setupGui() TQString item = TQString(*it); if (GlobalConfig->KvpncDebugLevel > 2) { - GlobalConfig->appendLogEntry(i18n("processing entry: %1").tqarg(item),GlobalConfig->debug); + GlobalConfig->appendLogEntry(i18n("processing entry: %1").arg(item),GlobalConfig->debug); } if (!item.contains (".pub", false) && !item.contains ("authorized_keys", false) && !item.contains ("known_hosts", false) && !item.contains (".", false) && !item.contains ("..", false) && !item.contains ("config", false) ) { if (GlobalConfig->KvpncDebugLevel > 2) { - GlobalConfig->appendLogEntry(i18n("SSH key found: %1").tqarg(*it),GlobalConfig->debug); + GlobalConfig->appendLogEntry(i18n("SSH key found: %1").arg(*it),GlobalConfig->debug); } ProfileSshOptionsWidget->SshKeyComboBox->insertItem(*it); } @@ -1760,7 +1760,7 @@ void PreferencesDialog::connectionTypeChanged( int type ) if ( GlobalConfig->KvpncDebugLevel > 1 ) - GlobalConfig->appendLogEntry( i18n( "connectionTypeChanged(): %1" ).tqarg( TQString().setNum( type ) ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "connectionTypeChanged(): %1" ).arg( TQString().setNum( type ) ), GlobalConfig->debug ); // KMessageBox::information(0,"connection type changed: "+TQString().setNum(type),TQString("type set")); @@ -1832,27 +1832,27 @@ void PreferencesDialog::connectionTypeChanged( int type ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "New type: %1" ).tqarg( "racoon" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New type: %1" ).arg( "racoon" ), GlobalConfig->debug ); } else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::l2tpd_racoon ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "New type: %1" ).tqarg( "l2tpd (racoon)" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New type: %1" ).arg( "l2tpd (racoon)" ), GlobalConfig->debug ); } else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::freeswan ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "New type: %1" ).tqarg( "ipsec (openswan/strongswan)" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New type: %1" ).arg( "ipsec (openswan/strongswan)" ), GlobalConfig->debug ); } else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::l2tpd_freeswan ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "New type: %1" ).tqarg( "l2tpd (openswan/strongswan)" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New type: %1" ).arg( "l2tpd (openswan/strongswan)" ), GlobalConfig->debug ); } else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::pptp ) { @@ -1862,7 +1862,7 @@ void PreferencesDialog::connectionTypeChanged( int type ) else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::openvpn ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "new type: %1" ).tqarg( "openvpn" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "new type: %1" ).arg( "openvpn" ), GlobalConfig->debug ); ProfileNetworkGeneralOptionsWidget->RemoteNetAddrLineEdit->setEnabled( false ); ProfileNetworkGeneralOptionsWidget->LabelRemoteNetwork->setEnabled( false ); @@ -1884,7 +1884,7 @@ void PreferencesDialog::connectionTypeChanged( int type ) else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::vtun ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "new type: %1" ).tqarg( "Vtun" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "new type: %1" ).arg( "Vtun" ), GlobalConfig->debug ); ProfileNetworkGeneralOptionsWidget->RemoteNetAddrLineEdit->setEnabled( false ); ProfileNetworkGeneralOptionsWidget->LabelRemoteNetwork->setEnabled( false ); @@ -1906,7 +1906,7 @@ void PreferencesDialog::connectionTypeChanged( int type ) else if ( GlobalConfig->currentProfile->getConnectionType() == VpnAccountData::ssh ) { if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "new type: %1" ).tqarg( "SSH" ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "new type: %1" ).arg( "SSH" ), GlobalConfig->debug ); ProfileNetworkGeneralOptionsWidget->RemoteNetAddrLineEdit->setEnabled( false ); ProfileNetworkGeneralOptionsWidget->LabelRemoteNetwork->setEnabled( false ); @@ -2004,7 +2004,7 @@ void PreferencesDialog::authTypeChanged( int authtype ) authtype = VpnAccountData::hybrid; } } - GlobalConfig->appendLogEntry( i18n( "authtype changed by %1." ).tqarg( "ProfileCertOptionsWidget" ) , GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "authtype changed by %1." ).arg( "ProfileCertOptionsWidget" ) , GlobalConfig->debug ); if ( ProfileCertOptionsWidget->AuthTypeComboBox->currentText() == i18n( "X.509 Certificate" )) GlobalConfig->currentProfile->setAuthType(VpnAccountData::cert); else if ( ProfileCertOptionsWidget->AuthTypeComboBox->currentText() == i18n( "Pre Shared Key" )) @@ -2027,7 +2027,7 @@ void PreferencesDialog::authTypeChanged( int authtype ) authtype = VpnAccountData::hybrid; } } - GlobalConfig->appendLogEntry( i18n( "authtype changed by %1." ).tqarg( "ProfilePskOptionsWidget" ) , GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "authtype changed by %1." ).arg( "ProfilePskOptionsWidget" ) , GlobalConfig->debug ); if ( ProfilePskOptionsWidget->AuthTypeComboBox->currentText() == i18n( "X.509 Certificate" )) GlobalConfig->currentProfile->setAuthType(VpnAccountData::cert); else if ( ProfilePskOptionsWidget->AuthTypeComboBox->currentText() == i18n( "Pre Shared Key" )) @@ -2055,7 +2055,7 @@ void PreferencesDialog::authTypeChanged( int authtype ) type ="unknown auth"; - GlobalConfig->appendLogEntry( i18n( "New authtype: \"%1\"." ).tqarg( type ) , GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New authtype: \"%1\"." ).arg( type ) , GlobalConfig->debug ); } ProfilePskOptionsWidget->PskGroupBox->setEnabled( false ); @@ -2471,7 +2471,7 @@ void PreferencesDialog::profileChanged( const TQString& itemtext ) ProfileCmdExecAfterDisconnectSelector->setCurrentText( lastProfileName ); if ( GlobalConfig->KvpncDebugLevel > 0 ) - GlobalConfig->appendLogEntry( i18n( "New profile: %1" ).tqarg( Name ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "New profile: %1" ).arg( Name ), GlobalConfig->debug ); profileHasChanged=true; NewProfileName = Name; @@ -2541,14 +2541,14 @@ void PreferencesDialog::profileChanged( const TQString& itemtext ) ProfileNetworkGeneralOptionsWidget->NetworkDeviceComboBox->setCurrentText( "default" ); if ( GlobalConfig->KvpncDebugLevel > 2 ) - GlobalConfig->appendLogEntry( i18n( "profile \"%1\": no network device defined, using \"default\"." ).tqarg( it->getName() ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "profile \"%1\": no network device defined, using \"default\"." ).arg( it->getName() ), GlobalConfig->debug ); } else { ProfileNetworkGeneralOptionsWidget->NetworkDeviceComboBox->setCurrentText( it->getNetworkDevice() ); if ( GlobalConfig->KvpncDebugLevel > 2 ) - GlobalConfig->appendLogEntry( i18n( "profile \"%1\": network device defined, using \"%2\"." ).tqarg( it->getName() ).tqarg( it->getNetworkDevice() ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry( i18n( "profile \"%1\": network device defined, using \"%2\"." ).arg( it->getName() ).arg( it->getNetworkDevice() ), GlobalConfig->debug ); } ProfileGeneralOptionsWidget->ConnectionTypeComboBox->setCurrentItem( it->getConnectionType() ); @@ -2886,7 +2886,7 @@ void PreferencesDialog::profileChanged( const TQString& itemtext ) if ( vpnc_version_major ==0 && vpnc_version_minor < 3 ) { - GlobalConfig->appendLogEntry( i18n( "%1 is too old. Minimum requirement is %2, disabling Xauth interactive option." ).tqarg( "vpnc" ).tqarg( "0.3.x" ), GlobalConfig->error ); + GlobalConfig->appendLogEntry( i18n( "%1 is too old. Minimum requirement is %2, disabling Xauth interactive option." ).arg( "vpnc" ).arg( "0.3.x" ), GlobalConfig->error ); ProfileCiscoOptionsWidget->UseXauthInteractiveCheckBox->setEnabled( false ); } @@ -5714,7 +5714,7 @@ void PreferencesDialog::saveSessionClicked() if (ProfileSshOptionsWidget->UseSshConfigRemoteScriptCheckBox->isChecked() && ProfileSshOptionsWidget->SshConfigRemoteScriptLineEdit->text().isEmpty()) { - KMessageBox::error ( this, i18n( "%1 cant be empty!" ).tqarg(i18n("ssh config remote script")), i18n( "%1 empty" ).tqarg(i18n("ssh config remote script")) ); + KMessageBox::error ( this, i18n( "%1 cant be empty!" ).arg(i18n("ssh config remote script")), i18n( "%1 empty" ).arg(i18n("ssh config remote script")) ); IPOk=false; } @@ -5996,7 +5996,7 @@ void PreferencesDialog::saveSessionClicked() GlobalConfig->config->sync(); GlobalConfig->appPointer->restoreOverrideCursor(); - //GlobalConfig->appendLogEntry( i18n( "Profile \"%1\" saved." ).tqarg( newName ),GlobalConfig->debug); + //GlobalConfig->appendLogEntry( i18n( "Profile \"%1\" saved." ).arg( newName ),GlobalConfig->debug); // enableButtonApply(false); } @@ -6049,7 +6049,7 @@ void PreferencesDialog::deleteSessionClicked() if ( !ProfileGeneralSelector->currentText().isEmpty() ) { - int result = KMessageBox::questionYesNo ( this, i18n ( "Really delete profile \"%1\" (type: %2, Server: %3)?" ).arg ( GlobalConfig->currentProfile->getName() ).tqarg(TypeString).tqarg(GlobalConfig->currentProfile->getGateway()), i18n ( "Delete?" ), KStdGuiItem::del(), KStdGuiItem::cancel() ); + int result = KMessageBox::questionYesNo ( this, i18n ( "Really delete profile \"%1\" (type: %2, Server: %3)?" ).arg ( GlobalConfig->currentProfile->getName() ).arg(TypeString).arg(GlobalConfig->currentProfile->getGateway()), i18n ( "Delete?" ), KStdGuiItem::del(), KStdGuiItem::cancel() ); //LogOutput->append( "Result: "+ TQString().setNum(result) ) ; if ( result == 3 ) // Yes { @@ -6122,12 +6122,12 @@ void PreferencesDialog::deleteSessionClicked() // CommandExecutionGroupBox->setEnabled( false ); } - // slotStatusMsg ( i18n( "Profile \"%1\" deleted." ).tqarg( Name ), ID_FLASH_MSG ); + // slotStatusMsg ( i18n( "Profile \"%1\" deleted." ).arg( Name ), ID_FLASH_MSG ); profileAddedOrDeleted = true; saveSessionClicked(); GlobalConfig->removeEntry( Name ); - GlobalConfig->appendLogEntry ( i18n( "Profile \"%1\" deleted." ).tqarg( Name ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry ( i18n( "Profile \"%1\" deleted." ).arg( Name ), GlobalConfig->debug ); //saveOptions(); // TODO save, currently after closing dialog @@ -6160,7 +6160,7 @@ void PreferencesDialog::newSessionClicked() if ( ( it != GlobalConfig->currentProfile ) && ( it->getName() == newName ) ) { //account->setName( TQString( account->getName() + "_2" ) ); - // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).tqarg( account->getName() ), i18n( "Name exist, renamed" ) ); + // KMessageBox::information ( this, i18n( "Profile name exists!\n It will be renamed to \"%1\"." ).arg( account->getName() ), i18n( "Name exist, renamed" ) ); KMessageBox::error ( this, i18n ( "Profile name exists!" ), i18n ( "Name Exists" ) ); newName = KInputDialog::getText ( i18n ( "New Name" ), i18n ( "New name for profile:" ), TQString ( Oldname + "_2" ), &ok ); @@ -6190,7 +6190,7 @@ void PreferencesDialog::newSessionClicked() if ( it->getName() == newName ) { if (GlobalConfig->KvpncDebugLevel > 3) - GlobalConfig->appendLogEntry ( i18n( "New created profile \"%1\" found in profile list." ).tqarg( newName ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry ( i18n( "New created profile \"%1\" found in profile list." ).arg( newName ), GlobalConfig->debug ); profileAddedOrDeleted=true; ProfileGeneralSelector->insertItem( newName ); ProfileNetworkRouteSelector->insertItem( newName ); @@ -6230,10 +6230,10 @@ void PreferencesDialog::newSessionClicked() // GeneralGroupbox->setEnabled( true ); // CommandExecutionGroupBox->setEnabled( true ); - KMessageBox::information ( this, i18n( "Profile \"%1\" added.\nNow set the right type,\n fill in the fields\nand press \"Save\" to complete the profile." ).tqarg( newName ), i18n( "Complete Profile" ) ); - //slotStatusMsg ( i18n( "Profile \"%1\" added." ).tqarg( Name ), ID_FLASH_MSG ); + KMessageBox::information ( this, i18n( "Profile \"%1\" added.\nNow set the right type,\n fill in the fields\nand press \"Save\" to complete the profile." ).arg( newName ), i18n( "Complete Profile" ) ); + //slotStatusMsg ( i18n( "Profile \"%1\" added." ).arg( Name ), ID_FLASH_MSG ); - GlobalConfig->appendLogEntry ( i18n( "Profile \"%1\" added." ).tqarg( newName ), GlobalConfig->debug ); + GlobalConfig->appendLogEntry ( i18n( "Profile \"%1\" added." ).arg( newName ), GlobalConfig->debug ); profileAddedOrDeleted = true; configChanged=true; NewProfileName = newName; @@ -6357,8 +6357,8 @@ void PreferencesDialog::renameSessionClicked() saveSessionClicked(); GlobalConfig->removeEntry( oldName ); - KMessageBox::information ( 0, i18n ( "Rename of \"%1\" to \"%2\" was successful." ).arg ( oldName ).tqarg(GlobalConfig->currentProfile->getName()) ); - GlobalConfig->appendLogEntry ( i18n ( "Rename of \"%1\" to \"%2\" was successful." ).arg ( oldName ).tqarg(GlobalConfig->currentProfile->getName()), GlobalConfig->info ); + KMessageBox::information ( 0, i18n ( "Rename of \"%1\" to \"%2\" was successful." ).arg ( oldName ).arg(GlobalConfig->currentProfile->getName()) ); + GlobalConfig->appendLogEntry ( i18n ( "Rename of \"%1\" to \"%2\" was successful." ).arg ( oldName ).arg(GlobalConfig->currentProfile->getName()), GlobalConfig->info ); } @@ -6863,19 +6863,19 @@ void PreferencesDialog::detectPkcs11Ids() Pkcs11IdTypeTmp="id"; if (KvpncDebugLevel > 1) - GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").tqarg(Pkcs11IdTypeTmp),KVpncConfig::debug); + GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").arg(Pkcs11IdTypeTmp),KVpncConfig::debug); } else if (Pkcs11IdType == 1) { Pkcs11IdTypeTmp="label"; if (KvpncDebugLevel > 1) - GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").tqarg(Pkcs11IdTypeTmp),KVpncConfig::debug); + GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").arg(Pkcs11IdTypeTmp),KVpncConfig::debug); } else { Pkcs11IdTypeTmp="subject"; if (KvpncDebugLevel > 1) - GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").tqarg(Pkcs11IdTypeTmp),KVpncConfig::debug); + GlobalConfig->appendLogEntry(i18n("Pkcs11IdType: %1").arg(Pkcs11IdTypeTmp),KVpncConfig::debug); } TQString ProviderLib=""; @@ -7092,7 +7092,7 @@ bool PreferencesDialog::getVpncHasHybridSupport() { if (tool->Name == "vpnc") { - GlobalConfig->appendLogEntry ( i18n ( "vpnc capabilities: %1" ).tqarg( tool->Capabilities),GlobalConfig->debug ); + GlobalConfig->appendLogEntry ( i18n ( "vpnc capabilities: %1" ).arg( tool->Capabilities),GlobalConfig->debug ); if( tool->Capabilities.find(i18n("openssl (certificate) support"),0,-1) > -1 ) { hasHybridSupport = true; -- cgit v1.2.1