redirect all the debug output of core to the debug area

svn path=/trunk/KDE/kdegraphics/okular/; revision=763941
remotes/origin/KDE/4.1
Pino Toscano 18 years ago
parent a0a3c239e2
commit 1f43811f61
  1. 3
      core/area.cpp
  2. 11
      core/audioplayer.cpp
  3. 11
      core/fileprinter.cpp
  4. 4
      core/misc.cpp
  5. 13
      core/page.cpp

@ -18,6 +18,7 @@
#include "action.h"
#include "annotations.h"
#include "annotations_p.h"
#include "debug_p.h"
#include "sourcereference.h"
using namespace Okular;
@ -286,7 +287,7 @@ ObjectRect::~ObjectRect()
else if ( m_objectType == SourceRef )
delete static_cast<Okular::SourceReference*>( m_object );
else
kDebug().nospace() << "Object deletion not implemented for type '" << m_objectType << "' .";
kDebug(OkularDebug).nospace() << "Object deletion not implemented for type '" << m_objectType << "'.";
}
/** class AnnotationObjectRect **/

@ -22,6 +22,7 @@
// local includes
#include "action.h"
#include "debug_p.h"
#include "sound.h"
using namespace Okular;
@ -123,7 +124,7 @@ bool AudioPlayerPrivate::play( const SoundInfo& si )
case Sound::External:
{
QString url = si.sound->url();
kDebug() << "External," << url;
kDebug(OkularDebug) << "External," << url;
if ( !url.isEmpty() )
{
int newid = newId();
@ -147,10 +148,10 @@ bool AudioPlayerPrivate::play( const SoundInfo& si )
case Sound::Embedded:
{
QByteArray filedata = si.sound->data();
kDebug() << "Embedded," << filedata.length();
kDebug(OkularDebug) << "Embedded," << filedata.length();
if ( !filedata.isEmpty() )
{
kDebug() << "Mediaobject:" << data->m_mediaobject;
kDebug(OkularDebug) << "Mediaobject:" << data->m_mediaobject;
int newid = newId();
m_mapper.setMapping( data->m_mediaobject, newid );
data->m_buffer = new QBuffer();
@ -170,7 +171,7 @@ bool AudioPlayerPrivate::play( const SoundInfo& si )
if ( data )
{
QObject::connect( data->m_mediaobject, SIGNAL( finished() ), &m_mapper, SLOT( map() ) );
kDebug() << "PLAY";
kDebug(OkularDebug) << "PLAY";
data->play();
}
return valid;
@ -200,7 +201,7 @@ void AudioPlayerPrivate::finished( int id )
delete it.value();
m_playing.erase( it );
}
kDebug() << "finished," << m_playing.count();
kDebug(OkularDebug) << "finished," << m_playing.count();
}

@ -28,6 +28,7 @@
#include <ktempdir.h>
#include <kdebug.h>
#include "debug_p.h"
using namespace Okular;
@ -91,7 +92,7 @@ int FilePrinter::doPrintFiles( QPrinter &printer, QStringList fileList, FileDele
bool useCupsOptions = cupsAvailable();
QStringList argList = printArguments( printer, fileDeletePolicy, pageSelectPolicy, useCupsOptions, pageRange, exe )
<< fileList;
kDebug() << "Executing " << exe << " with arguments" << argList;
kDebug(OkularDebug) << "Executing" << exe << "with arguments" << argList;
int ret = KProcess::execute( exe, argList );
@ -102,7 +103,7 @@ int FilePrinter::doPrintFiles( QPrinter &printer, QStringList fileList, FileDele
argList = printArguments( printer, fileDeletePolicy, pageSelectPolicy, useCupsOptions, pageRange, exe )
<< fileList;
kDebug() << "Retrying " << exe << " without cups arguments" << argList;
kDebug(OkularDebug) << "Retrying" << exe << "without CUPS arguments" << argList;
ret = KProcess::execute( exe, argList );
}
@ -192,9 +193,9 @@ bool FilePrinter::detectCupsService()
// original license LGPL
KLocalSocket sock;
sock.connectToPath("/ipp");
kDebug() << "socket wait = " << sock.waitForConnected();
kDebug() << "socket error = " << sock.error();
kDebug() << "socket isOpen() = " << sock.isOpen();
kDebug(OkularDebug) << "socket wait =" << sock.waitForConnected();
kDebug(OkularDebug) << "socket error =" << sock.error();
kDebug(OkularDebug) << "socket isOpen() =" << sock.isOpen();
return sock.isOpen();
}

@ -11,6 +11,8 @@
#include <kdebug.h>
#include "debug_p.h"
using namespace Okular;
class TextSelection::Private
@ -46,7 +48,7 @@ void TextSelection::end( const NormalizedPoint & p )
int dir1 = d->direction;
d->direction = (p.y - d->cur[0].y < 0 || (p.y - d->cur[0].y == 0 && p.x - d->cur[0].x < 0));
if (d->direction != dir1)
kDebug() << "changing direction in selection";
kDebug(OkularDebug) << "changing direction in selection";
d->cur[1] = p;
}

@ -25,6 +25,7 @@
#include "annotations.h"
#include "annotations_p.h"
#include "area.h"
#include "debug_p.h"
#include "form.h"
#include "form_p.h"
#include "pagecontroller_p.h"
@ -484,7 +485,7 @@ void Page::addAnnotation( Annotation * annotation )
QString uniqueName = "okular-";
uniqueName += ( QString::number(d->m_number) + '-' + QString::number(++(d->m_maxuniqueNum)) );
kDebug().nospace() << "inc m_maxuniqueNum=" << d->m_maxuniqueNum;
kDebug(OkularDebug).nospace() << "inc m_maxuniqueNum=" << d->m_maxuniqueNum;
annotation->setUniqueName( uniqueName );
}
@ -548,7 +549,7 @@ bool Page::removeAnnotation( Annotation * annotation )
it = m_rects.erase( it );
rectfound = true;
}
kDebug() << "removed annotation:" << annotation->uniqueName();
kDebug(OkularDebug) << "removed annotation:" << annotation->uniqueName();
delete *aIt;
m_annotations.erase( aIt );
break;
@ -696,13 +697,13 @@ void PagePrivate::restoreLocalContents( const QDomNode & pageNode )
m_maxuniqueNum = uniqID;
}
kDebug() << "restored annot:" << annotation->uniqueName();
kDebug(OkularDebug) << "restored annot:" << annotation->uniqueName();
}
else
kWarning().nospace() << "page (" << m_number << "): can't restore an annotation from XML.";
kWarning(OkularDebug).nospace() << "page (" << m_number << "): can't restore an annotation from XML.";
}
#ifdef PAGE_PROFILE
kDebug().nospace() << "annots: XML Load time: " << time.elapsed() << "ms";
kDebug(OkularDebug).nospace() << "annots: XML Load time: " << time.elapsed() << "ms";
#endif
}
// parse formList child element
@ -787,7 +788,7 @@ void PagePrivate::saveLocalContents( QDomNode & parentNode, QDomDocument & docum
QDomElement annElement = document.createElement( "annotation" );
AnnotationUtils::storeAnnotation( a, annElement, document );
annotListElement.appendChild( annElement );
kDebug() << "save annotation:" << a->uniqueName();
kDebug(OkularDebug) << "save annotation:" << a->uniqueName();
}
}

Loading…
Cancel
Save