Correct some log messages

This commit is contained in:
Abs62 2017-06-22 18:02:04 +03:00
parent 375a3c258b
commit af0a6f42cc
6 changed files with 11 additions and 11 deletions

6
dsl.cc
View file

@ -2100,7 +2100,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
if ( !abrvScanner.readNextLineWithoutComments( curString, curOffset ) || curString.empty() ) if ( !abrvScanner.readNextLineWithoutComments( curString, curOffset ) || curString.empty() )
{ {
gdWarning( "Warning: premature end of file %s\n", abrvFileName.c_str() ); gdWarning( "Premature end of file %s\n", abrvFileName.c_str() );
eof = true; eof = true;
break; break;
} }
@ -2186,7 +2186,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
{ {
if ( !isDslWs( curString[ x ] ) ) if ( !isDslWs( curString[ x ] ) )
{ {
gdWarning( "Warning: garbage string in %s at offset 0x%lX\n", i->c_str(), (unsigned long) curOffset ); gdWarning( "Garbage string in %s at offset 0x%lX\n", i->c_str(), (unsigned long) curOffset );
break; break;
} }
} }
@ -2210,7 +2210,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
{ {
if ( ! ( hasString = scanner.readNextLineWithoutComments( curString, curOffset ) ) ) if ( ! ( hasString = scanner.readNextLineWithoutComments( curString, curOffset ) ) )
{ {
gdWarning( "Warning: premature end of file %s\n", i->c_str() ); gdWarning( "Premature end of file %s\n", i->c_str() );
break; break;
} }

View file

@ -724,11 +724,11 @@ void ArticleDom::closeTag( wstring const & name,
if ( warn ) if ( warn )
{ {
if( !dictionaryName.empty() ) if( !dictionaryName.empty() )
gdWarning( "Warning: no corresponding opening tag for closing tag \"%s\" found in \"%s\", article \"%s\".", gdWarning( "No corresponding opening tag for closing tag \"%s\" found in \"%s\", article \"%s\".",
gd::toQString( name ).toUtf8().data(), dictionaryName.c_str(), gd::toQString( name ).toUtf8().data(), dictionaryName.c_str(),
gd::toQString( headword ).toUtf8().data() ); gd::toQString( headword ).toUtf8().data() );
else else
gdWarning( "Warning: no corresponding opening tag for closing tag \"%s\" found.", gdWarning( "No corresponding opening tag for closing tag \"%s\" found.",
gd::toQString( name ).toUtf8().data() ); gd::toQString( name ).toUtf8().data() );
} }
} }

View file

@ -717,7 +717,7 @@ HotkeyWrapper::GrabbedKeys::iterator HotkeyWrapper::grabKey( quint32 keyCode,
if ( errorHandler.isError() ) if ( errorHandler.isError() )
{ {
qDebug() << "Warning: Possible hotkeys conflict. Check your hotkeys options."; gdWarning( "Possible hotkeys conflict. Check your hotkeys options." );
ungrabKey( result.first ); ungrabKey( result.first );
} }
} }
@ -734,7 +734,7 @@ void HotkeyWrapper::ungrabKey( GrabbedKeys::iterator i )
if ( errorHandler.isError() ) if ( errorHandler.isError() )
{ {
qDebug() << "Warning: Cannot ungrab the hotkey"; gdWarning( "Cannot ungrab the hotkey" );
} }
} }

2
lsa.cc
View file

@ -471,7 +471,7 @@ sptr< Dictionary::DataRequest > LsaDictionary::getResource( string const & name
if ( result <= 0 ) if ( result <= 0 )
{ {
qWarning( "Warning: failed to read Vorbis data (code = %ld)\n", result ); gdWarning( "Failed to read Vorbis data (code = %ld)\n", result );
memset( ptr, 0, left ); memset( ptr, 0, left );
break; break;
} }

2
mdx.cc
View file

@ -1259,7 +1259,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
sptr< MdictParser > mddParser = new MdictParser(); sptr< MdictParser > mddParser = new MdictParser();
if ( !mddParser->open( mddIter->c_str() ) ) if ( !mddParser->open( mddIter->c_str() ) )
{ {
gdWarning( "Warning: Broken mdd (resource) file: %s\n", mddIter->c_str() ); gdWarning( "Broken mdd (resource) file: %s\n", mddIter->c_str() );
continue; continue;
} }
mddParsers.push_back( mddParser ); mddParsers.push_back( mddParser );

View file

@ -908,7 +908,7 @@ void indexArticle( GzippedFile & gzFile,
if ( words.empty() ) if ( words.empty() )
{ {
// Nothing to index, this article didn't have any tags // Nothing to index, this article didn't have any tags
qWarning( "Warning: no <k> tags found in an article at offset 0x%x, article skipped.\n", gdWarning( "No <k> tags found in an article at offset 0x%x, article skipped.\n",
(unsigned) articleOffset ); (unsigned) articleOffset );
} }
else else
@ -1462,7 +1462,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
if ( stream.hasError() ) if ( stream.hasError() )
{ {
gdWarning( "Warning: %s had a parse error %s at line %lu, and therefore was indexed only up to the point of error.", gdWarning( "%s had a parse error %s at line %lu, and therefore was indexed only up to the point of error.",
dictFiles[ 0 ].c_str(), stream.errorString().toUtf8().data(), dictFiles[ 0 ].c_str(), stream.errorString().toUtf8().data(),
(unsigned long) stream.lineNumber() ); (unsigned long) stream.lineNumber() );
} }