diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2018-10-22 04:14:01 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2018-10-22 04:15:35 +0200 |
commit | 5615796c0a10d5068dfb61ecbfbb9ab048ae63cd (patch) | |
tree | b56f944df027ed4bbb0531a85e57986382cb79bd /src/scanwidget.cpp | |
parent | 45e95597267482ddb1023b33ebeeb50597d91508 (diff) | |
download | knmap-5615796c0a10d5068dfb61ecbfbb9ab048ae63cd.tar.gz knmap-5615796c0a10d5068dfb61ecbfbb9ab048ae63cd.zip |
Fix incorrect use of TQString() inside i18n().
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/scanwidget.cpp')
-rw-r--r-- | src/scanwidget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/scanwidget.cpp b/src/scanwidget.cpp index a704c2a..80a7536 100644 --- a/src/scanwidget.cpp +++ b/src/scanwidget.cpp @@ -479,23 +479,23 @@ bool ScanWidget::createPipe( const TQString type, const TQString& tempDir, TQFil delete pipe; } - if( mkfifo( pipe->name( ), 0600 )) + if( mkfifo( pipe->name( ).local8Bit(), 0600 )) { TQString text = TQString( i18n( "Couldn't create the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( )).arg( strerror( errno )); - m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( )); + m_outputWidget->addOutput( OutputWidget::Stderr, text.local8Bit(), text.local8Bit().length( )); delete pipe; pipe = NULL; return false; } - pipeFD = ::open( pipe->name( ), O_RDONLY | O_NONBLOCK ); + pipeFD = ::open( pipe->name( ).local8Bit(), O_RDONLY | O_NONBLOCK ); if( pipeFD != -1 ) return true; TQString text = TQString( i18n( "Couldn't open the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( )) .arg( strerror( errno )); - m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( )); + m_outputWidget->addOutput( OutputWidget::Stderr, text.local8Bit(), text.local8Bit().length( )); delete pipe; pipe = NULL; @@ -514,7 +514,7 @@ bool ScanWidget::createPipes( ) if( tempDir.isEmpty( )) { TQString text = TQString( i18n( "Couldn't create the named pipe for nmap output: no temp file dir\n" )); - m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( )); + m_outputWidget->addOutput( OutputWidget::Stderr, text.local8Bit(), text.local8Bit().length( )); return false; } @@ -593,7 +593,7 @@ bool ScanWidget::getOptions( ) return false; if( m_commonWidget->host( ).isEmpty( ) && !m_compoundWidget->targetFileState( )) - { KMessageBox::error( this, i18n( TQString( "Target host(s) not specified by \"Target host(s)\" or \"Target hosts file\" options" )), i18n( "Target host(s) error" )); + { KMessageBox::error( this, i18n( "Target host(s) not specified by \"Target host(s)\" or \"Target hosts file\" options" ), i18n( "Target host(s) error" )); return false; } @@ -983,7 +983,7 @@ void ScanWidget::slotStartClicked( ) cmd.stripWhiteSpace( ); m_clearOutputButton->setEnabled( true ); - m_outputWidget->addOutput( OutputWidget::Stdin, cmd, cmd.length( )); + m_outputWidget->addOutput( OutputWidget::Stdin, cmd.local8Bit(), cmd.local8Bit().length( )); emit( outputAvailable( true, true )); connect( m_nmapProcess, SIGNAL( processExited( TDEProcess* )), SLOT( slotProcessExited( ))); |