From 5615796c0a10d5068dfb61ecbfbb9ab048ae63cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 22 Oct 2018 04:14:01 +0200 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/scanwidget.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/scanwidget.cpp') 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( ))); -- cgit v1.2.3