Don't use endl at the end of qDebug as it already adds end line

remotes/origin/work/2004_421508
Laurent Montel 6 years ago
parent 932cec415e
commit cea7d0fa28
  1. 4
      generators/dvi/dviFile.cpp
  2. 10
      generators/dvi/dviRenderer.cpp
  3. 6
      generators/xps/generator_xps.cpp

@ -86,7 +86,7 @@ dvifile::dvifile(const dvifile *old, fontPool *fp)
size_of_file = old->size_of_file; size_of_file = old->size_of_file;
end_pointer = dvi_Data()+size_of_file; end_pointer = dvi_Data()+size_of_file;
if (dvi_Data() == nullptr) { if (dvi_Data() == nullptr) {
qCCritical(OkularDviDebug) << "Not enough memory to copy the DVI-file." << endl; qCCritical(OkularDviDebug) << "Not enough memory to copy the DVI-file.";
return; return;
} }
@ -242,7 +242,7 @@ void dvifile::prepare_pages()
page_offset.resize(total_pages+1); page_offset.resize(total_pages+1);
if (page_offset.size() < (total_pages+1)) { if (page_offset.size() < (total_pages+1)) {
qCCritical(OkularDviDebug) << "No memory for page list!" << endl; qCCritical(OkularDviDebug) << "No memory for page list!";
return; return;
} }
for(int i=0; i<=total_pages; i++) for(int i=0; i<=total_pages; i++)

@ -111,12 +111,12 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
// Paranoid safety checks // Paranoid safety checks
if (page == nullptr) { if (page == nullptr) {
qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called with argument == 0" << endl; qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called with argument == 0";
return; return;
} }
// Paranoid safety checks // Paranoid safety checks
if (page->pageNumber == 0) { if (page->pageNumber == 0) {
qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0" << endl; qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0";
return; return;
} }
@ -124,17 +124,17 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
if ( dviFile == nullptr ) { if ( dviFile == nullptr ) {
qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated." << endl; qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated.";
page->clear(); page->clear();
return; return;
} }
if (page->pageNumber > dviFile->total_pages) { if (page->pageNumber > dviFile->total_pages) {
qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number " << page->pageNumber qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number " << page->pageNumber
<< " but the current dviFile has only " << dviFile->total_pages << " pages." << endl; << " but the current dviFile has only " << dviFile->total_pages << " pages.";
return; return;
} }
if ( dviFile->dvi_Data() == nullptr ) { if ( dviFile->dvi_Data() == nullptr ) {
qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet." << endl; qCCritical(OkularDviDebug) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet.";
page->clear(); page->clear();
return; return;
} }

@ -1729,7 +1729,7 @@ void XpsDocument::parseDocumentStructure( const QString &documentStructureFileNa
synopsisElement.setAttribute( QStringLiteral("Viewport"), viewport.toString() ); synopsisElement.setAttribute( QStringLiteral("Viewport"), viewport.toString() );
if ( outlineLevel == 1 ) { if ( outlineLevel == 1 ) {
// qCWarning(OkularXpsDebug) << "Description: " // qCWarning(OkularXpsDebug) << "Description: "
// << outlineEntryElement.attribute( "Description" ) << endl; // << outlineEntryElement.attribute( "Description" );
m_docStructure->appendChild( synopsisElement ); m_docStructure->appendChild( synopsisElement );
} else { } else {
// find the last next highest element (so it this is level 3, we need // find the last next highest element (so it this is level 3, we need
@ -1827,14 +1827,14 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file),
} else { } else {
qCWarning(OkularXpsDebug) << "Unknown document relationships element: " qCWarning(OkularXpsDebug) << "Unknown document relationships element: "
<< attributes.value( QStringLiteral("Type") ).toString() << " : " << attributes.value( QStringLiteral("Type") ).toString() << " : "
<< attributes.value( QStringLiteral("Target") ).toString() << endl; << attributes.value( QStringLiteral("Target") ).toString();
} }
} }
} }
if ( xml.error() ) { if ( xml.error() ) {
qCWarning(OkularXpsDebug) << "Could not parse XPS page relationships file ( " qCWarning(OkularXpsDebug) << "Could not parse XPS page relationships file ( "
<< documentRelationshipFile << documentRelationshipFile
<< " ) - " << xml.errorString() << endl; << " ) - " << xml.errorString();
} }
} else { // the page relationship file didn't exist in the zipfile } else { // the page relationship file didn't exist in the zipfile
// this isn't fatal // this isn't fatal

Loading…
Cancel
Save