diff --git a/src/dict/aard.cc b/src/dict/aard.cc index 72597ee5..a87f3469 100644 --- a/src/dict/aard.cc +++ b/src/dict/aard.cc @@ -560,11 +560,11 @@ QString const& AardDictionary::getDescription() { map< string, string >::const_iterator iter = meta.find( "copyright" ); if( iter != meta.end() ) - dictionaryDescription = QString( QObject::tr( "Copyright: %1%2" ) ).arg( QString::fromUtf8( iter->second.c_str() ) ).arg( "\n\n" ); + dictionaryDescription = QObject::tr( "Copyright: %1%2" ).arg( QString::fromUtf8( iter->second.c_str() ) ).arg( "\n\n" ); iter = meta.find( "version" ); if( iter != meta.end() ) - dictionaryDescription = QString( QObject::tr( "Version: %1%2" ) ).arg( QString::fromUtf8( iter->second.c_str() ) ).arg( "\n\n" ); + dictionaryDescription = QObject::tr( "Version: %1%2" ).arg( QString::fromUtf8( iter->second.c_str() ) ).arg( "\n\n" ); iter = meta.find( "description" ); if( iter != meta.end() ) diff --git a/src/dict/bgl.cc b/src/dict/bgl.cc index 2c358ff1..a3ad4342 100644 --- a/src/dict/bgl.cc +++ b/src/dict/bgl.cc @@ -391,21 +391,21 @@ namespace char * dictDescription = chunks.getBlock( idxHeader.descriptionAddress, chunk ); string str( dictDescription ); if( !str.empty() ) - dictionaryDescription += QString( QObject::tr( "Copyright: %1%2" ) ) + dictionaryDescription += QObject::tr( "Copyright: %1%2" ) .arg( Html::unescape( QString::fromUtf8( str.data(), str.size() ) ) ) .arg( "\n\n" ); dictDescription += str.size() + 1; str = string( dictDescription ); if( !str.empty() ) - dictionaryDescription += QString( QObject::tr( "Author: %1%2" ) ) + dictionaryDescription += QObject::tr( "Author: %1%2" ) .arg( QString::fromUtf8( str.data(), str.size() ) ) .arg( "\n\n" ); dictDescription += str.size() + 1; str = string( dictDescription ); if( !str.empty() ) - dictionaryDescription += QString( QObject::tr( "E-mail: %1%2" ) ) + dictionaryDescription += QObject::tr( "E-mail: %1%2" ) .arg( QString::fromUtf8( str.data(), str.size() ) ) .arg( "\n\n" ); dictDescription += str.size() + 1; diff --git a/src/dict/gls.cc b/src/dict/gls.cc index eab4bf6f..d849192e 100644 --- a/src/dict/gls.cc +++ b/src/dict/gls.cc @@ -547,7 +547,7 @@ QString const& GlsDictionary::getDescription() GlsScanner scanner( getDictionaryFilenames()[ 0 ] ); string str = Utf8::encode( scanner.getDictionaryAuthor() ); if( !str.empty() ) - dictionaryDescription = QString( QObject::tr( "Author: %1%2" ) ) + dictionaryDescription = QObject::tr( "Author: %1%2" ) .arg( QString::fromUtf8( str.c_str() ) ) .arg( "\n\n" ); str = Utf8::encode( scanner.getDictionaryDescription() ); diff --git a/src/dict/sdict.cc b/src/dict/sdict.cc index aeaeec5b..41653357 100644 --- a/src/dict/sdict.cc +++ b/src/dict/sdict.cc @@ -650,7 +650,7 @@ QString const& SdictDictionary::getDescription() if( !dictionaryDescription.isEmpty() ) return dictionaryDescription; - dictionaryDescription = QString( QObject::tr( "Title: %1%2" ) ) + dictionaryDescription = QObject::tr( "Title: %1%2" ) .arg( QString::fromUtf8( getName().c_str() ) ) .arg( "\n\n" ); @@ -682,7 +682,7 @@ QString const& SdictDictionary::getDescription() else str = string( data.data(), size ); - dictionaryDescription += QString( QObject::tr( "Copyright: %1%2" ) ) + dictionaryDescription += QObject::tr( "Copyright: %1%2" ) .arg( QString::fromUtf8( str.c_str(), str.size() ) ) .arg( "\n\n" ); @@ -698,7 +698,7 @@ QString const& SdictDictionary::getDescription() else str = string( data.data(), size ); - dictionaryDescription += QString( QObject::tr( "Version: %1%2" ) ) + dictionaryDescription += QObject::tr( "Version: %1%2" ) .arg( QString::fromUtf8( str.c_str(), str.size() ) ) .arg( "\n\n" ); } diff --git a/src/dict/stardict.cc b/src/dict/stardict.cc index 305f6312..f5862d54 100644 --- a/src/dict/stardict.cc +++ b/src/dict/stardict.cc @@ -1107,7 +1107,7 @@ QString const& StardictDictionary::getDescription() { QString copyright = QString::fromUtf8( ifo.copyright.c_str() ) .replace( "
", "\n", Qt::CaseInsensitive ); - dictionaryDescription += QString( QObject::tr( "Copyright: %1%2" ) ) + dictionaryDescription += QObject::tr( "Copyright: %1%2" ) .arg( copyright ) .arg( "\n\n" ); } @@ -1115,7 +1115,7 @@ QString const& StardictDictionary::getDescription() if( !ifo.author.empty() ) { QString author = QString::fromUtf8( ifo.author.c_str() ); - dictionaryDescription += QString( QObject::tr( "Author: %1%2" ) ) + dictionaryDescription += QObject::tr( "Author: %1%2" ) .arg( author ) .arg( "\n\n" ); } @@ -1123,7 +1123,7 @@ QString const& StardictDictionary::getDescription() if( !ifo.email.empty() ) { QString email = QString::fromUtf8( ifo.email.c_str() ); - dictionaryDescription += QString( QObject::tr( "E-mail: %1%2" ) ) + dictionaryDescription += QObject::tr( "E-mail: %1%2" ) .arg( email ) .arg( "\n\n" ); } @@ -1131,7 +1131,7 @@ QString const& StardictDictionary::getDescription() if( !ifo.website.empty() ) { QString website = QString::fromUtf8( ifo.website.c_str() ); - dictionaryDescription += QString( QObject::tr( "Website: %1%2" ) ) + dictionaryDescription += QObject::tr( "Website: %1%2" ) .arg( website ) .arg( "\n\n" ); } @@ -1139,7 +1139,7 @@ QString const& StardictDictionary::getDescription() if( !ifo.date.empty() ) { QString date = QString::fromUtf8( ifo.date.c_str() ); - dictionaryDescription += QString( QObject::tr( "Date: %1%2" ) ) + dictionaryDescription += QObject::tr( "Date: %1%2" ) .arg( date ) .arg( "\n\n" ); } diff --git a/src/ffmpegaudio.cc b/src/ffmpegaudio.cc index 8fcdc524..d26ea1ea 100644 --- a/src/ffmpegaudio.cc +++ b/src/ffmpegaudio.cc @@ -154,7 +154,7 @@ bool DecoderContext::openCodec( QString & errorString ) formatContext_ = avformat_alloc_context(); if ( !formatContext_ ) { - errorString = QObject::tr( "avformat_alloc_context() failed." ); + errorString = "avformat_alloc_context() failed."; return false; } @@ -162,7 +162,7 @@ bool DecoderContext::openCodec( QString & errorString ) if ( !avioBuffer ) { - errorString = QObject::tr( "av_malloc() failed." ); + errorString = "av_malloc() failed."; return false; } @@ -171,7 +171,7 @@ bool DecoderContext::openCodec( QString & errorString ) if ( !avioContext_ ) { av_free( avioBuffer ); - errorString = QObject::tr( "avio_alloc_context() failed." ); + errorString = "avio_alloc_context() failed."; return false; } @@ -188,14 +188,14 @@ bool DecoderContext::openCodec( QString & errorString ) ret = avformat_open_input( &formatContext_, NULL, NULL, NULL ); if ( ret < 0 ) { - errorString = QObject::tr( "avformat_open_input() failed: %1." ).arg( avErrorString( ret ) ); + errorString = QString( "avformat_open_input() failed: %1." ).arg( avErrorString( ret ) ); return false; } ret = avformat_find_stream_info( formatContext_, NULL ); if ( ret < 0 ) { - errorString = QObject::tr( "avformat_find_stream_info() failed: %1." ).arg( avErrorString( ret ) ); + errorString = QString( "avformat_find_stream_info() failed: %1." ).arg( avErrorString( ret ) ); return false; } @@ -210,20 +210,20 @@ bool DecoderContext::openCodec( QString & errorString ) } if ( !audioStream_ ) { - errorString = QObject::tr( "Could not find audio stream." ); + errorString = QString( "Could not find audio stream." ); return false; } codec_ = avcodec_find_decoder( audioStream_->codecpar->codec_id ); if ( !codec_ ) { - errorString = QObject::tr( "Codec [id: %1] not found." ).arg( audioStream_->codecpar->codec_id ); + errorString = QString( "Codec [id: %1] not found." ).arg( audioStream_->codecpar->codec_id ); return false; } codecContext_ = avcodec_alloc_context3( codec_ ); if ( !codecContext_ ) { - errorString = QObject::tr( "avcodec_alloc_context3() failed." ); + errorString = QString( "avcodec_alloc_context3() failed." ); return false; } avcodec_parameters_to_context( codecContext_, audioStream_->codecpar ); @@ -231,7 +231,7 @@ bool DecoderContext::openCodec( QString & errorString ) ret = avcodec_open2( codecContext_, codec_, NULL ); if ( ret < 0 ) { - errorString = QObject::tr( "avcodec_open2() failed: %1." ).arg( avErrorString( ret ) ); + errorString = QString( "avcodec_open2() failed: %1." ).arg( avErrorString( ret ) ); return false; } @@ -321,7 +321,7 @@ bool DecoderContext::openOutputDevice( QString & errorString ) #if (QT_VERSION >= QT_VERSION_CHECK(6,2,0)) QAudioDevice m_outputDevice = QMediaDevices::defaultAudioOutput(); if(m_outputDevice.isNull()){ - errorString += QObject::tr( "Can not found default audio output device" ); + errorString += QString( "Can not found default audio output device" ); return false; } #endif @@ -340,7 +340,7 @@ bool DecoderContext::play( QString & errorString ) AVFrame * frame = av_frame_alloc(); if ( !frame ) { - errorString = QObject::tr( "avcodec_alloc_frame() failed." ); + errorString = QString( "avcodec_alloc_frame() failed." ); return false; }