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 18:43:15 +0200 |
commit | 43addd52a72ee12615d4aa64774d94c0e37566dd (patch) | |
tree | e960b66daedbd0ff69a4ee0a4a1a20cfabbdaa81 /src/scanwidget.cpp | |
parent | 83fb5c2a160acd743fe6beab0dca68a5ad8faf21 (diff) | |
download | knmap-43addd52a72ee12615d4aa64774d94c0e37566dd.tar.gz knmap-43addd52a72ee12615d4aa64774d94c0e37566dd.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>
(cherry picked from commit 5615796c0a10d5068dfb61ecbfbb9ab048ae63cd)
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( ))); |