Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/14/head
Michele Calgaro 7 months ago
parent c9260f2315
commit 988c8e0a88
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -118,7 +118,7 @@ void HTMLWidget::loadManPage( const bool localManPage )
// ============ // ============
void HTMLWidget::readSettings( ) void HTMLWidget::readSettings( )
{ TDEConfig* config = kapp->config( ); { TDEConfig* config = tdeApp->config( );
config->setGroup( "General" ); config->setGroup( "General" );
m_zoomFactor = config->readDoubleNumEntry( "zoomFactor", 100.0 ); m_zoomFactor = config->readDoubleNumEntry( "zoomFactor", 100.0 );
m_stylesheetURL.setPath( config->readPathEntry( "stylesheetURL" )); m_stylesheetURL.setPath( config->readPathEntry( "stylesheetURL" ));
@ -136,7 +136,7 @@ void HTMLWidget::resizeEvent( TQResizeEvent* event )
// ============ // ============
void HTMLWidget::saveSettings( ) void HTMLWidget::saveSettings( )
{ TDEConfig* config = kapp->config( ); { TDEConfig* config = tdeApp->config( );
config->setGroup( "General" ); config->setGroup( "General" );
config->writeEntry( "stylesheetURL", m_stylesheetURL.path( )); config->writeEntry( "stylesheetURL", m_stylesheetURL.path( ));
config->writeEntry( "zoomFactor", m_zoomFactor ); config->writeEntry( "zoomFactor", m_zoomFactor );

@ -83,7 +83,7 @@ Knmap::Knmap( )
void Knmap::createMenu( ) void Knmap::createMenu( )
{ KStdAction::configureToolbars( this, TQ_SLOT( slotConfigureToolbars( )), actionCollection( )); { KStdAction::configureToolbars( this, TQ_SLOT( slotConfigureToolbars( )), actionCollection( ));
KStdAction::keyBindings( this, TQ_SLOT( slotConfigureShortcuts( )), actionCollection( )); KStdAction::keyBindings( this, TQ_SLOT( slotConfigureShortcuts( )), actionCollection( ));
KStdAction::quit( kapp, TQ_SLOT( quit( )), actionCollection( )); KStdAction::quit( tdeApp, TQ_SLOT( quit( )), actionCollection( ));
m_fileSaveAction = KStdAction::save( m_mainWidget, m_fileSaveAction = KStdAction::save( m_mainWidget,
TQ_SLOT( slotFileSave( )), TQ_SLOT( slotFileSave( )),
@ -257,7 +257,7 @@ void Knmap::findNmap( )
{ KMessageBox::error( this, { KMessageBox::error( this,
i18n( "nmap is not installed on the computer - we cannot proceed without it. To download nmap go to \"http://www.insecure.org/nmap\"" ), i18n( "nmap is not installed on the computer - we cannot proceed without it. To download nmap go to \"http://www.insecure.org/nmap\"" ),
i18n( "nmap not found" )); i18n( "nmap not found" ));
kapp->quit( ); tdeApp->quit( );
} }
} }

@ -122,7 +122,7 @@ void MainWidget::loadManPage( )
void MainWidget::readSettings( ) void MainWidget::readSettings( )
{ m_htmlWidget->readSettings( ); { m_htmlWidget->readSettings( );
TDEConfig* config = kapp->config( ); TDEConfig* config = tdeApp->config( );
config->setGroup( "General" ); config->setGroup( "General" );
m_stylesheetURLs = config->readListEntry( "stylesheetURLs" ); m_stylesheetURLs = config->readListEntry( "stylesheetURLs" );
@ -151,7 +151,7 @@ void MainWidget::readSettings( )
if( visibleScanWidget == NULL ) if( visibleScanWidget == NULL )
{ KMessageBox::error( this, i18n( "Internal error - no ScanWidget to display!" ), i18n( "Internal error" )); { KMessageBox::error( this, i18n( "Internal error - no ScanWidget to display!" ), i18n( "Internal error" ));
kapp->quit( ); tdeApp->quit( );
} }
} }
@ -188,7 +188,7 @@ void MainWidget::saveSettings( )
} }
TQValueList<int> splitterSizes = sizes( ); TQValueList<int> splitterSizes = sizes( );
TDEConfig* config = kapp->config( ); TDEConfig* config = tdeApp->config( );
config->setGroup( "General" ); config->setGroup( "General" );
config->writeEntry( "scanNames", scanNames ); config->writeEntry( "scanNames", scanNames );

@ -65,7 +65,7 @@ ProfileDialog::ProfileDialog( Action action,
// ===================== // =====================
bool ProfileDialog::checkForDuplicateName( const TQString& profileName ) bool ProfileDialog::checkForDuplicateName( const TQString& profileName )
{ if( !kapp->config( )->hasGroup( PROFILE_PREFIX + profileName )) { if( !tdeApp->config( )->hasGroup( PROFILE_PREFIX + profileName ))
return true; return true;
KMessageBox::sorry( this, TQString( i18n( "Profile \"%1\" already exists, please choose another name or press 'Cancel'" )).arg( profileName ), i18n( "Duplicate profile name" )); KMessageBox::sorry( this, TQString( i18n( "Profile \"%1\" already exists, please choose another name or press 'Cancel'" )).arg( profileName ), i18n( "Duplicate profile name" ));
@ -78,7 +78,7 @@ bool ProfileDialog::checkForDuplicateName( const TQString& profileName )
TQString ProfileDialog::constructNewProfileName( const TQString& initialProfileName ) const TQString ProfileDialog::constructNewProfileName( const TQString& initialProfileName ) const
{ TQString profileName = PROFILE_PREFIX + initialProfileName + "_copy"; { TQString profileName = PROFILE_PREFIX + initialProfileName + "_copy";
while( kapp->config( )->hasGroup( profileName )) while( tdeApp->config( )->hasGroup( profileName ))
profileName += "_copy"; profileName += "_copy";
return stripPrefix( profileName ); return stripPrefix( profileName );
@ -88,11 +88,11 @@ TQString ProfileDialog::constructNewProfileName( const TQString& initialProfileN
// ==== // ====
void ProfileDialog::copy( const TQString& fromProfileName, const TQString& toProfileName ) void ProfileDialog::copy( const TQString& fromProfileName, const TQString& toProfileName )
{ TQMap<TQString, TQString> map = kapp->config( )->entryMap( PROFILE_PREFIX + fromProfileName ); { TQMap<TQString, TQString> map = tdeApp->config( )->entryMap( PROFILE_PREFIX + fromProfileName );
kapp->config( )->setGroup( PROFILE_PREFIX + toProfileName ); tdeApp->config( )->setGroup( PROFILE_PREFIX + toProfileName );
for( TQMap<TQString, TQString>::Iterator it = map.begin( ); it != map.end( ); ++it ) for( TQMap<TQString, TQString>::Iterator it = map.begin( ); it != map.end( ); ++it )
kapp->config( )->writeEntry( it.key( ), it.data( )); tdeApp->config( )->writeEntry( it.key( ), it.data( ));
m_profileListBox->insertItem( toProfileName ); m_profileListBox->insertItem( toProfileName );
m_profileListBox->sort( ); m_profileListBox->sort( );
@ -135,7 +135,7 @@ void ProfileDialog::createlayout( )
// ======= // =======
void ProfileDialog::deelete( const TQString& profileName, const bool ask ) void ProfileDialog::deelete( const TQString& profileName, const bool ask )
{ if( !kapp->config( )->hasGroup( PROFILE_PREFIX + profileName )) { if( !tdeApp->config( )->hasGroup( PROFILE_PREFIX + profileName ))
{ Q_ASSERT( false ); { Q_ASSERT( false );
return ; return ;
} }
@ -156,7 +156,7 @@ void ProfileDialog::deelete( TQListBoxItem* item, const bool ask )
i18n( "Confirm profile deletion" ))) i18n( "Confirm profile deletion" )))
return; return;
kapp->config( )->deleteGroup( PROFILE_PREFIX + item->text( )); tdeApp->config( )->deleteGroup( PROFILE_PREFIX + item->text( ));
m_profileListBox->takeItem( item ); m_profileListBox->takeItem( item );
delete item; delete item;
} }
@ -184,7 +184,7 @@ bool ProfileDialog::getNewProfileName( TQString& profileName )
void ProfileDialog::setInitialValues( const TQString& currentProfile ) void ProfileDialog::setInitialValues( const TQString& currentProfile )
{ ushort currentItem = ushort( -1 ); { ushort currentItem = ushort( -1 );
TQStringList profileList = kapp->config( )->groupList( ); TQStringList profileList = tdeApp->config( )->groupList( );
ushort i; ushort i;
TQStringList::Iterator it; TQStringList::Iterator it;

@ -651,9 +651,9 @@ void ScanWidget::profileLoad( )
// =========== // ===========
void ScanWidget::profileRead( ) void ScanWidget::profileRead( )
{ TDEConfig* config = kapp->config( ); { TDEConfig* config = tdeApp->config( );
kapp->config( )->setGroup( m_profileName ); tdeApp->config( )->setGroup( m_profileName );
m_commonWidget->readProfile( config ); m_commonWidget->readProfile( config );
m_compoundWidget->readProfile( config ); m_compoundWidget->readProfile( config );
m_loggingWidget->readProfile( config ); m_loggingWidget->readProfile( config );
@ -688,7 +688,7 @@ void ScanWidget::profileSave( )
if( KMessageBox::Yes != KMessageBox::questionYesNo( this, i18n( "Do you still want to save the profile? (It may be in an inconsistent state." ), i18n( "Save inconsistent profile" ))) if( KMessageBox::Yes != KMessageBox::questionYesNo( this, i18n( "Do you still want to save the profile? (It may be in an inconsistent state." ), i18n( "Save inconsistent profile" )))
return; return;
TDEConfig* config = kapp->config( ); TDEConfig* config = tdeApp->config( );
config->setGroup( m_profileName ); config->setGroup( m_profileName );
m_commonWidget->saveProfile( config ); m_commonWidget->saveProfile( config );
@ -729,7 +729,7 @@ void ScanWidget::profileSaveAs( )
// ============ // ============
void ScanWidget::readSettings( ) void ScanWidget::readSettings( )
{ TDEConfig* config = kapp->config( ); { TDEConfig* config = tdeApp->config( );
config->setGroup( m_scanName ); config->setGroup( m_scanName );
m_profileName = config->readEntry( "profileName", DEFAULT_PROFILE ); m_profileName = config->readEntry( "profileName", DEFAULT_PROFILE );
@ -740,7 +740,7 @@ void ScanWidget::readSettings( )
// ========== // ==========
void ScanWidget::renameScan( const TQString& newScanName ) void ScanWidget::renameScan( const TQString& newScanName )
{ kapp->config( )->deleteGroup( m_scanName ); { tdeApp->config( )->deleteGroup( m_scanName );
m_scanName = newScanName; m_scanName = newScanName;
} }
@ -748,7 +748,7 @@ void ScanWidget::renameScan( const TQString& newScanName )
// =============== // ===============
void ScanWidget::saveProfileName( ) void ScanWidget::saveProfileName( )
{ TDEConfig* config = kapp->config( ); { TDEConfig* config = tdeApp->config( );
config->setGroup( m_scanName ); config->setGroup( m_scanName );
config->writeEntry( "profileName", m_profileName ); config->writeEntry( "profileName", m_profileName );
} }

Loading…
Cancel
Save