Some more kDebug->qDebug

This commit is contained in:
Frederik Gladhorn 2014-09-09 18:17:36 +02:00
parent 374592256a
commit 34fbdf8c85
77 changed files with 213 additions and 179 deletions

View file

@ -23,7 +23,7 @@
#include <KApplication>
#include <KAboutData>
#include <KCmdLineArgs>
#include <KDebug>
#include <QDebug>
#include <KDE/KLocale>
#include <KConfigGroup>
@ -52,7 +52,7 @@ int main(int argc, char **argv)
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
KGlobal::locale()->insertCatalog("org.kde.okular");
//kDebug() << "ARGS:" << args << args->count();
//qDebug() << "ARGS:" << args << args->count();
KDeclarativeMainWindow *mainWindow = new KDeclarativeMainWindow();
mainWindow->declarativeView()->setPackageName("org.kde.active.documentviewer");

View file

@ -338,7 +338,7 @@ void PageItem::pageHasChanged(int page, int flags)
if (m_viewPort.pageNumber == page) {
if (flags == 32) {
// skip bounding box updates
//kDebug() << "32" << m_page->boundingBox();
//qDebug() << "32" << m_page->boundingBox();
} else if (flags == Okular::DocumentObserver::Pixmap) {
// if pixmaps have updated, just repaint .. don't bother updating pixmaps AGAIN
update();

View file

@ -11,7 +11,7 @@
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <QDebug>
#include <kicon.h>
#include <klocalizedstring.h>
#include <klineedit.h>
@ -130,7 +130,7 @@ void WidgetAnnotTools::setTools(const QStringList& items)
QDomDocument entryParser;
if ( !entryParser.setContent( toolXml ) )
{
kWarning() << "Skipping malformed tool XML string";
qWarning() << "Skipping malformed tool XML string";
break;
}

View file

@ -11,7 +11,8 @@
#include <QtCore/QRect>
#include <QtGui/QPolygonF>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <math.h>

View file

@ -14,7 +14,7 @@
#include <QtGui/QColor>
#include <QtGui/QPainterPath>
#include <QtGui/QTransform>
#include <kdebug.h>
#include <QDebug>
#include <math.h>
#include "global.h"
@ -648,7 +648,7 @@ void RegularArea<NormalizedShape, Shape>::simplify()
}
}
#ifdef DEBUG_REGULARAREA
kDebug() << "from" << prev_end << "to" << this->count();
qDebug() << "from" << prev_end << "to" << this->count();
#endif
}

View file

@ -13,7 +13,8 @@
// qt/kde includes
#include <qbuffer.h>
#include <qdir.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <krandom.h>
#include <phonon/path.h>
#include <phonon/audiooutput.h>
@ -110,7 +111,7 @@ int AudioPlayerPrivate::newId() const
bool AudioPlayerPrivate::play( const SoundInfo& si )
{
kDebug() ;
qDebug() ;
PlayData * data = new PlayData();
data->m_output = new Phonon::AudioOutput( Phonon::NotificationCategory );
data->m_output->setVolume( si.volume );
@ -235,7 +236,7 @@ void AudioPlayer::playSound( const Sound * sound, const SoundAction * linksound
if ( sound->soundType() == Sound::External && !d->m_currentDocument.isLocalFile() )
return;
kDebug() ;
qDebug() ;
SoundInfo si( sound, linksound );
// if the mix flag of the new sound is false, then the currently playing

View file

@ -15,7 +15,7 @@
#include <kbookmarkaction.h>
#include <kbookmarkmanager.h>
#include <kbookmarkmenu.h>
#include <kdebug.h>
#include <QDebug>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kurl.h>

View file

@ -40,7 +40,8 @@
#include <k4aboutdata.h>
#include <kauthorized.h>
#include <kconfigdialog.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <klibloader.h>
#include <klocale.h>
#include <kmacroexpander.h>
@ -254,7 +255,7 @@ QString DocumentPrivate::namePaperSize(double inchesWidth, double inchesHeight)
return orientation == QPrinter::Landscape ? i18nc("paper size", "unknown landscape paper size") : i18nc("paper size", "unknown portrait paper size");
}
kWarning() << "PaperSize" << paperSize << "has not been covered";
qWarning() << "PaperSize" << paperSize << "has not been covered";
return QString();
}
@ -358,7 +359,7 @@ void DocumentPrivate::cleanupPixmapMemory( qulonglong memoryToFree )
if ( !p ) // No pixmap to remove
break;
kDebug().nospace() << "Evicting cache pixmap observer=" << p->observer << " page=" << p->page;
qDebug().nospace() << "Evicting cache pixmap observer=" << p->observer << " page=" << p->page;
// m_allocatedPixmapsTotalMemory can't underflow because we always add or remove
// the memory used by the AllocatedPixmap so at most it can reach zero
@ -946,7 +947,7 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KService::Ptr&
QApplication::setOverrideCursor( Qt::WaitCursor );
const QSizeF dpi = Utils::realDpi(m_widget);
kDebug() << "Output DPI:" << dpi;
qDebug() << "Output DPI:" << dpi;
m_generator->setDPI(dpi);
Document::OpenResult openResult = Document::OpenError;
@ -1360,7 +1361,7 @@ void DocumentPrivate::sendGeneratorPixmapRequest()
else if ( !r->d->mForce && r->preload() && qAbs( r->pageNumber() - currentViewportPage ) >= maxDistance )
{
m_pixmapRequestsStack.pop_back();
//kDebug() << "Ignoring request that doesn't fit in cache";
//qDebug() << "Ignoring request that doesn't fit in cache";
delete r;
}
// Ignore requests for pixmaps that are already being generated
@ -4772,7 +4773,7 @@ QString DocumentInfo::getKeyString( Key key ) //const
return "pageSize";
break;
default:
kWarning() << "Unknown" << key;
qWarning() << "Unknown" << key;
return QString();
break;
}

View file

@ -15,6 +15,7 @@
#include "form.h"
#include "utils_p.h"
#include "page.h"
#include <KDebug>
#include <KLocalizedString>

View file

@ -26,7 +26,8 @@
#include <KShell>
#include <kstandarddirs.h>
#include <ktempdir.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <kdeversion.h>
#include "debug_p.h"

View file

@ -15,7 +15,7 @@
#include <qeventloop.h>
#include <QtPrintSupport/QPrinter>
#include <kdebug.h>
#include <QDebug>
#include <kicon.h>
#include <klocale.h>
#include <kwallet.h>

View file

@ -9,7 +9,7 @@
#include "generator_p.h"
#include <kdebug.h>
#include <QDebug>
#include "fontinfo.h"
#include "generator.h"

View file

@ -9,7 +9,8 @@
#include "core/misc.h"
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include "debug_p.h"

View file

@ -16,7 +16,8 @@
#include <qstring.h>
#include <qtemporaryfile.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include "debug_p.h"

View file

@ -19,7 +19,8 @@
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
// local includes
#include "action.h"

View file

@ -15,7 +15,8 @@
#include <kjs/kjsprototype.h>
#include <kjs/kjsarguments.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include "../debug_p.h"
#include "../document_p.h"

View file

@ -14,7 +14,8 @@
#include <kjs/kjsprototype.h>
#include <kjs/kjsarguments.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include "../debug_p.h"

View file

@ -16,7 +16,7 @@
#include <kjs/kjsprototype.h>
#include <kjs/kjsarguments.h>
#include <kdebug.h>
#include <QDebug>
#include <assert.h>
#include "../document_p.h"

View file

@ -16,7 +16,8 @@
#include <qhash.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <kglobal.h>
#include "../debug_p.h"

View file

@ -9,7 +9,8 @@
#include "scripter.h"
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include "debug_p.h"
#include "script/executor_kjs_p.h"

View file

@ -544,7 +544,7 @@ bool TextDocumentGenerator::reparseConfig()
void TextDocumentGenerator::addPages( KConfigDialog* /*dlg*/ )
{
kWarning() << "You forgot to reimplement addPages in your TextDocumentGenerator";
qWarning() << "You forgot to reimplement addPages in your TextDocumentGenerator";
return;
}

View file

@ -37,7 +37,7 @@ namespace TextDocumentUtils {
QTextLayout *startLayout = startBlock.layout();
QTextLayout *endLayout = endBlock.layout();
if (!startLayout || !endLayout) {
kWarning() << "Start or end layout not found" << startLayout << endLayout;
qWarning() << "Start or end layout not found" << startLayout << endLayout;
page = -1;
return;
}

View file

@ -10,7 +10,7 @@
#include "textpage.h"
#include "textpage_p.h"
#include <kdebug.h>
#include <QDebug>
#include "area.h"
#include "debug_p.h"
@ -371,7 +371,7 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
if ( sel->direction() == 1 || ( sel->itB() == -1 && sel->direction() == 0 ) )
{
#ifdef DEBUG_TEXTPAGE
kWarning() << "running first loop";
qWarning() << "running first loop";
#endif
const int count = d->m_words.count();
for ( it = 0; it < count; it++ )
@ -384,7 +384,7 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
/// we have found the (rx,ry)x(tx,ty)
itB = it;
#ifdef DEBUG_TEXTPAGE
kWarning() << "start is" << itB << "count is" << d->m_words.count();
qWarning() << "start is" << itB << "count is" << d->m_words.count();
#endif
break;
}
@ -393,13 +393,13 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
}
itB = sel->itB();
#ifdef DEBUG_TEXTPAGE
kWarning() << "direction is" << sel->direction();
kWarning() << "reloaded start is" << itB << "against" << sel->itB();
qWarning() << "direction is" << sel->direction();
qWarning() << "reloaded start is" << itB << "against" << sel->itB();
#endif
if ( sel->direction() == 0 || ( sel->itE() == -1 && sel->direction() == 1 ) )
{
#ifdef DEBUG_TEXTPAGE
kWarning() << "running second loop";
qWarning() << "running second loop";
#endif
for ( it = d->m_words.count() - 1; it >= itB; it-- )
{
@ -411,8 +411,8 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
/// we have found the (ux,uy)x(vx,vy)
itE = it;
#ifdef DEBUG_TEXTPAGE
kWarning() << "ending is" << itE << "count is" << d->m_words.count();
kWarning() << "conditions" << tmp.contains( endCx, endCy ) << " "
qWarning() << "ending is" << itE << "count is" << d->m_words.count();
qWarning() << "conditions" << tmp.contains( endCx, endCy ) << " "
<< ( tmp.top <= endCy && tmp.bottom >= endCy && tmp.right <= endCx ) << " " <<
( tmp.top >= endCy);
#endif
@ -422,7 +422,7 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
sel->itE( itE );
}
#ifdef DEBUG_TEXTPAGE
kWarning() << "reloaded ending is" << itE << "against" << sel->itE();
qWarning() << "reloaded ending is" << itE << "against" << sel->itE();
#endif
if ( sel->itB() != -1 && sel->itE() != -1 )

View file

@ -78,7 +78,7 @@ double Utils::realDpiX()
{
const QDesktopWidget* w = QApplication::desktop();
if (w->width() > 0 && w->widthMM() > 0) {
kDebug() << "Pix:" << w->width() << "MM:" << w->widthMM();
qDebug() << "Pix:" << w->width() << "MM:" << w->widthMM();
return (double(w->width()) * 25.4) / double(w->widthMM());
} else {
return dpiX();
@ -89,7 +89,7 @@ double Utils::realDpiY()
{
const QDesktopWidget* w = QApplication::desktop();
if (w->height() > 0 && w->heightMM() > 0) {
kDebug() << "Pix:" << w->height() << "MM:" << w->heightMM();
qDebug() << "Pix:" << w->height() << "MM:" << w->heightMM();
return (double(w->height()) * 25.4) / double(w->heightMM());
} else {
return dpiY();
@ -129,13 +129,13 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)
if (selectedOutput)
{
kDebug() << "Found widget at output #" << selectedOutput->id();
qDebug() << "Found widget at output #" << selectedOutput->id();
QRect outputRect(selectedOutput->pos(),selectedOutput->currentMode()->size());
QSize szMM = selectedOutput->sizeMm();
kDebug() << "Output size is (mm) " << szMM;
kDebug() << "Output rect is " << outputRect;
qDebug() << "Output size is (mm) " << szMM;
qDebug() << "Output rect is " << outputRect;
if (selectedOutput->edid()) {
kDebug() << "EDID WxH (cm): " << selectedOutput->edid()->width() << 'x' << selectedOutput->edid()->height();
qDebug() << "EDID WxH (cm): " << selectedOutput->edid()->width() << 'x' << selectedOutput->edid()->height();
}
if (szMM.width() > 0 && szMM.height() > 0 && outputRect.width() > 0 && outputRect.height() > 0
&& selectedOutput->edid()
@ -147,24 +147,24 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)
static_cast<qreal>(outputRect.height())*25.4/szMM.height());
if (!selectedOutput->isHorizontal())
{
kDebug() << "Output is vertical, transposing DPI rect";
qDebug() << "Output is vertical, transposing DPI rect";
res.transpose();
}
if (qAbs(res.width() - res.height()) / qMin(res.height(), res.width()) < 0.05) {
return res;
} else {
kDebug() << "KScreen calculation returned a non square dpi." << res << ". Falling back";
qDebug() << "KScreen calculation returned a non square dpi." << res << ". Falling back";
}
}
}
else
{
kDebug() << "Didn't find a KScreen selectedOutput to calculate DPI. Falling back";
qDebug() << "Didn't find a KScreen selectedOutput to calculate DPI. Falling back";
}
}
else
{
kDebug() << "Didn't find a KScreen config to calculate DPI. Falling back";
qDebug() << "Didn't find a KScreen config to calculate DPI. Falling back";
}
#endif
}
@ -174,14 +174,14 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)
if (qAbs(res.width() - res.height()) / qMin(res.height(), res.width()) < 0.05) {
return res;
} else {
kDebug() << "QDesktopWidget calculation returned a non square dpi." << res << ". Falling back";
qDebug() << "QDesktopWidget calculation returned a non square dpi." << res << ". Falling back";
}
res = QSizeF(dpiX(), dpiY());
if (qAbs(res.width() - res.height()) / qMin(res.height(), res.width()) < 0.05) {
return res;
} else {
kDebug() << "QX11Info returned a non square dpi." << res << ". Falling back";
qDebug() << "QX11Info returned a non square dpi." << res << ". Falling back";
}
res = QSizeF(72, 72);
@ -358,7 +358,7 @@ got_bottom:
image->width(), image->height() );
#ifdef BBOX_DEBUG
kDebug() << "Computed bounding box" << bbox << "in" << time.elapsed() << "ms";
qDebug() << "Computed bounding box" << bbox << "in" << time.elapsed() << "ms";
#endif
return bbox;

View file

@ -19,7 +19,7 @@
#include <sys/stat.h>
#include <kapplication.h>
#include <kdebug.h>
#include <QDebug>
#include <kurl.h>
#include <kmimetype.h>
@ -37,20 +37,20 @@ extern "C"
{
int KDE_EXPORT kdemain( int argc, char **argv )
{
kDebug() << "*** kio_msits Init";
qDebug() << "*** kio_msits Init";
KComponentData instance( "kio_msits" );
if ( argc != 4 )
{
kDebug() << "Usage: kio_msits protocol domain-socket1 domain-socket2";
qDebug() << "Usage: kio_msits protocol domain-socket1 domain-socket2";
exit (-1);
}
ProtocolMSITS slave ( argv[2], argv[3] );
slave.dispatchLoop();
kDebug() << "*** kio_msits Done";
qDebug() << "*** kio_msits Done";
return 0;
}
}
@ -83,17 +83,17 @@ void ProtocolMSITS::get( const KUrl& url )
chmUnitInfo ui;
QByteArray buf;
kDebug() << "kio_msits::get() " << url.path();
qDebug() << "kio_msits::get() " << url.path();
if ( !parseLoadAndLookup ( url, fileName ) )
return; // error() has been called by parseLoadAndLookup
kDebug() << "kio_msits::get: parseLoadAndLookup returned " << fileName;
qDebug() << "kio_msits::get: parseLoadAndLookup returned " << fileName;
if ( LCHMUrlFactory::handleFileType( url.path(), htmdata ) )
{
buf = htmdata.toUtf8();
kDebug() << "Using special handling for image pages: " << htmdata;
qDebug() << "Using special handling for image pages: " << htmdata;
}
else
{
@ -105,7 +105,7 @@ void ProtocolMSITS::get( const KUrl& url )
if ( !ResolveObject ( fileName, &ui) )
{
kDebug() << "kio_msits::get: could not resolve filename " << fileName;
qDebug() << "kio_msits::get: could not resolve filename " << fileName;
error( KIO::ERR_DOES_NOT_EXIST, url.prettyUrl() );
return;
}
@ -114,7 +114,7 @@ void ProtocolMSITS::get( const KUrl& url )
if ( RetrieveObject (&ui, (unsigned char*) buf.data(), 0, ui.length) == 0 )
{
kDebug() << "kio_msits::get: could not retrieve filename " << fileName;
qDebug() << "kio_msits::get: could not retrieve filename " << fileName;
error( KIO::ERR_NO_CONTENT, url.prettyUrl() );
return;
}
@ -122,7 +122,7 @@ void ProtocolMSITS::get( const KUrl& url )
totalSize( buf.size() );
KMimeType::Ptr result = KMimeType::findByNameAndContent( fileName, buf );
kDebug() << "Emitting mimetype " << result->name();
qDebug() << "Emitting mimetype " << result->name();
mimeType( result->name() );
data( buf );
@ -134,7 +134,7 @@ void ProtocolMSITS::get( const KUrl& url )
bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath )
{
kDebug() << "ProtocolMSITS::parseLoadAndLookup (const KUrl&) " << url.path();
qDebug() << "ProtocolMSITS::parseLoadAndLookup (const KUrl&) " << url.path();
int pos = url.path().indexOf ("::");
@ -151,7 +151,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath )
if ( abspath.startsWith( "ms-its:" ) )
abspath = abspath.mid( 7 );
kDebug() << "ProtocolMSITS::parseLoadAndLookup: filename " << filename << ", path " << abspath;
qDebug() << "ProtocolMSITS::parseLoadAndLookup: filename " << filename << ", path " << abspath;
if ( filename.isEmpty() )
{
@ -163,7 +163,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath )
if ( m_chmFile && filename == m_openedFile )
return true;
kDebug() << "Opening a new CHM file " << QFile::encodeName( QDir::toNativeSeparators( filename ) );
qDebug() << "Opening a new CHM file " << QFile::encodeName( QDir::toNativeSeparators( filename ) );
// First try to open a temporary file
chmFile * tmpchm;
@ -181,7 +181,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath )
m_chmFile = tmpchm;
m_openedFile = filename;
kDebug() << "A CHM file " << filename << " has beed opened successfully";
qDebug() << "A CHM file " << filename << " has beed opened successfully";
return true;
}
@ -224,7 +224,7 @@ void ProtocolMSITS::stat (const KUrl & url)
QString fileName;
chmUnitInfo ui;
kDebug() << "kio_msits::stat (const KUrl& url) " << url.path();
qDebug() << "kio_msits::stat (const KUrl& url) " << url.path();
if ( !parseLoadAndLookup ( url, fileName ) )
return; // error() has been called by parseLoadAndLookup
@ -235,7 +235,7 @@ void ProtocolMSITS::stat (const KUrl & url)
return;
}
kDebug() << "kio_msits::stat: adding an entry for " << fileName;
qDebug() << "kio_msits::stat: adding an entry for " << fileName;
UDSEntry entry;
if ( isDirectory ( fileName ) )
@ -261,7 +261,7 @@ void ProtocolMSITS::listDir (const KUrl & url)
{
QString filepath;
kDebug() << "kio_msits::listDir (const KUrl& url) " << url.path();
qDebug() << "kio_msits::listDir (const KUrl& url) " << url.path();
if ( !parseLoadAndLookup ( url, filepath ) )
return; // error() has been called by parseLoadAndLookup
@ -274,7 +274,7 @@ void ProtocolMSITS::listDir (const KUrl & url)
return;
}
kDebug() << "kio_msits::listDir: enumerating directory " << filepath;
qDebug() << "kio_msits::listDir: enumerating directory " << filepath;
QVector<QString> listing;

View file

@ -194,7 +194,7 @@ void Document::pages( QVector<Okular::Page*> * pagesVector )
mPageMap.append(file);
count++;
} else {
kDebug() << "Ignoring" << file << "doesn't seem to be an image even if QImageReader::canRead returned true";
qDebug() << "Ignoring" << file << "doesn't seem to be an image even if QImageReader::canRead returned true";
}
}
}

View file

@ -14,7 +14,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QRegExp>
#include <kdebug.h>
#include <QDebug>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
@ -74,12 +74,12 @@ UnrarHelper::UnrarHelper()
if ( !kind )
{
// no luck, print that
kDebug() << "No unrar detected.";
qDebug() << "No unrar detected.";
}
else
{
unrarPath = path;
kDebug() << "detected:" << path << "(" << kind->name() << ")";
qDebug() << "detected:" << path << "(" << kind->name() << ")";
}
}

View file

@ -26,7 +26,7 @@
#include <QtGui/QPrinter>
#include <kaboutdata.h>
#include <kdebug.h>
#include <QDebug>
#include <klocale.h>
#include <ktemporaryfile.h>

View file

@ -18,7 +18,7 @@
#include <qqueue.h>
#include <qstring.h>
#include <kdebug.h>
#include <QDebug>
#include <klocale.h>
#include <libdjvu/ddjvuapi.h>
@ -35,22 +35,22 @@ QDebug &operator<<( QDebug & s, const ddjvu_rect_t &r )
static void which_ddjvu_message( const ddjvu_message_t *msg )
{
#ifdef KDJVU_DEBUG
kDebug() << "which_djvu_message(...):" << msg->m_any.tag;
qDebug() << "which_djvu_message(...):" << msg->m_any.tag;
switch( msg->m_any.tag )
{
case DDJVU_ERROR:
kDebug().nospace() << "ERROR: file " << msg->m_error.filename << ", line " << msg->m_error.lineno;
kDebug().nospace() << "ERROR: function '" << msg->m_error.function << "'";
kDebug().nospace() << "ERROR: '" << msg->m_error.message << "'";
qDebug().nospace() << "ERROR: file " << msg->m_error.filename << ", line " << msg->m_error.lineno;
qDebug().nospace() << "ERROR: function '" << msg->m_error.function << "'";
qDebug().nospace() << "ERROR: '" << msg->m_error.message << "'";
break;
case DDJVU_INFO:
kDebug().nospace() << "INFO: '" << msg->m_info.message << "'";
qDebug().nospace() << "INFO: '" << msg->m_info.message << "'";
break;
case DDJVU_CHUNK:
kDebug().nospace() << "CHUNK: '" << QByteArray( msg->m_chunk.chunkid ) << "'";
qDebug().nospace() << "CHUNK: '" << QByteArray( msg->m_chunk.chunkid ) << "'";
break;
case DDJVU_PROGRESS:
kDebug().nospace() << "PROGRESS: '" << msg->m_progress.percent << "'";
qDebug().nospace() << "PROGRESS: '" << msg->m_progress.percent << "'";
break;
default: ;
}
@ -477,7 +477,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
renderrect.w = realwidth;
renderrect.h = realheight;
#ifdef KDJVU_DEBUG
kDebug() << "renderrect:" << renderrect;
qDebug() << "renderrect:" << renderrect;
#endif
ddjvu_rect_t pagerect;
pagerect.x = 0;
@ -485,7 +485,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
pagerect.w = width;
pagerect.h = height;
#ifdef KDJVU_DEBUG
kDebug() << "pagerect:" << pagerect;
qDebug() << "pagerect:" << pagerect;
#endif
handle_ddjvu_messages( m_djvu_cxt, false );
QImage res_img( realwidth, realheight, QImage::Format_RGB32 );
@ -495,7 +495,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
res = ddjvu_page_render( djvupage, DDJVU_RENDER_COLOR,
&pagerect, &renderrect, m_format, res_img.bytesPerLine(), (char *)res_img.bits() );
#ifdef KDJVU_DEBUG
kDebug() << "rendering result:" << res;
qDebug() << "rendering result:" << res;
#endif
handle_ddjvu_messages( m_djvu_cxt, false );
@ -678,7 +678,7 @@ bool KDjVu::openFile( const QString & fileName )
return false;
}
kDebug() << "# of pages:" << ddjvu_document_get_pagenum( d->m_djvu_document );
qDebug() << "# of pages:" << ddjvu_document_get_pagenum( d->m_djvu_document );
int numofpages = ddjvu_document_get_pagenum( d->m_djvu_document );
d->m_pages.clear();
d->m_pages.resize( numofpages );
@ -722,7 +722,7 @@ bool KDjVu::openFile( const QString & fileName )
handle_ddjvu_messages( d->m_djvu_cxt, true );
if ( sts >= DDJVU_JOB_FAILED )
{
kDebug().nospace() << "\t>>> page " << i << " failed: " << sts;
qDebug().nospace() << "\t>>> page " << i << " failed: " << sts;
return false;
}
@ -1048,7 +1048,7 @@ bool KDjVu::exportAsPostScript( QFile* file, const QList<int>& pageList ) const
FILE* f = fdopen( file->handle(), "w+" );
if ( !f )
{
kDebug() << "error while getting the FILE*";
qDebug() << "error while getting the FILE*";
return false;
}

View file

@ -12,6 +12,7 @@
#include "xdvi.h"
#include <klocale.h>
#include <KDebug>
#include <QFile>

View file

@ -18,6 +18,7 @@
#include "kvs_debug.h"
#include <klocale.h>
#include <KDebug>
#include <QImage>

View file

@ -58,6 +58,7 @@
#include "xdvi.h"
#include <klocale.h>
#include <KDebug>
#include <QFile>
#include <QImage>

View file

@ -10,6 +10,7 @@
#include "TeXFont_TFM.h"
#include "kvs_debug.h"
#include <KDebug>
#include <QDataStream>
#include <QFile>

View file

@ -59,6 +59,7 @@
#include "pageSize.h"
#include <klocale.h>
#include <KDebug>
#include <QProcess>
#include <QSysInfo>

View file

@ -29,6 +29,7 @@
#include <kmimetype.h>
#include <kstandarddirs.h>
#include <kvbox.h>
#include <KDebug>
#include <QApplication>
#include <QCheckBox>

View file

@ -68,7 +68,7 @@
#include <klocale.h>
#include <QPainter>
#include <KDebug>
/** Routine to print characters. */

View file

@ -31,6 +31,7 @@
#include <kmessagebox.h>
#include <kprocess.h>
#include <ktemporaryfile.h>
#include <KDebug>
#include <QEventLoop>
#include <QFileInfo>

View file

@ -12,6 +12,7 @@
#include "fontEncoding.h"
#include "kvs_debug.h"
#include <KDebug>
#include <QFile>
#include <QProcess>

View file

@ -60,7 +60,7 @@ class fontEncoding {
// The constructor takes the name of an encoding file, such as
// '8r.enc', locate the file on the hard disk using the 'kpsewhich'
// command, reads it in and parses it. If the file cannot be
// located, opened or parsed, errors are printed using the kError()
// located, opened or parsed, errors are printed using the qCritical()
// channel, and the array glyphNameVector will contain empty
// strings.
fontEncoding(const QString &encName);

View file

@ -12,6 +12,7 @@
#include "fontMap.h"
#include "kvs_debug.h"
#include <KDebug>
#include <QFile>
#include <QProcess>

View file

@ -87,7 +87,7 @@ class fontMap {
and read its contents. If the file 'ps2pk.map' cannot be found
using the kpsewhich command, or if it cannot be read, or is
(partially) in an improper format, an error message is printed
to stderr using the kDebug() stream. */
to stderr using the qDebug() stream. */
fontMap( void );
/** find the name of a font file (e.g. 'ubkd8a.pfb') from a TeX font

View file

@ -12,6 +12,7 @@
#include "TeXFont.h"
#include <klocale.h>
#include <KDebug>
#include <QApplication>
#include <QPainter>

View file

@ -31,7 +31,8 @@
#include <qmutex.h>
#include <kaboutdata.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <klocale.h>
#include <ktemporaryfile.h>

View file

@ -10,7 +10,7 @@
#ifndef _KDVI_DEBUG_H_
#define _KDVI_DEBUG_H_
#include <kdebug.h>
#include <QDebug>
namespace kvs
{

View file

@ -11,7 +11,7 @@
#include "length.h"
#include "kvs_debug.h"
#include <KDebug>
class unitOfDistance
{

View file

@ -14,7 +14,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <KDebug>
struct pageSizeItem

View file

@ -83,7 +83,7 @@ public:
recognized
If the name is not of these types, and error message is printed to
stderr using kError() and a default value, which depends on the
stderr using qCritical() and a default value, which depends on the
locale, is set.
In any case, the values will be trimmed so as not to exceed the
@ -104,7 +104,7 @@ public:
Sets the page size to "width" and "height", given in the associated
units. Currently, "mm", "cm" and "in" are supported. If a unit is
not recognized, "mm" is siliently assumed, and error message is
printed to stderr using kError(). If the page size set matches one
printed to stderr using qCritical(). If the page size set matches one
of the standard sizes by an error of no more than 2mm, the standard
page size will be set. If width or height does not contain a
number, the result is an undefined value. However, it is guaranteed
@ -214,7 +214,7 @@ public:
If the pageSize is one of the standard sizes, i.e. formatNumber() !=
-1, this method can be used to get the orientation. If the pageSize
is not a standard size, this method prints an error message stderr
using kError().
using qCritical().
@returns 0 for 'portrait', or 1 for 'landscape'. If the size is none
of the standard sizes, an undefined value is returned.
@ -238,7 +238,7 @@ public slots:
If the pageSize is one of the standard sizes, i.e. formatNumber() !=
-1, this method can be used to set the orientation. If the pageSize
is not a standard size, this method prints an error message stderr
using kError() and does nothing.
using qCritical() and does nothing.
@param orient 0 sets 'portrait orientation', 1 sets 'landscape'
*/

View file

@ -19,6 +19,7 @@
#include <kprocess.h>
#include <ktemporaryfile.h>
#include <kurl.h>
#include <KDebug>
#include <QDir>
#include <QPainter>

View file

@ -10,6 +10,7 @@
#include "simplePageSize.h"
#include "kvs_debug.h"
#include <KDebug>
#include <QPaintDevice>

View file

@ -18,6 +18,7 @@
#include <klocale.h>
#include <kmimetype.h>
#include <KDebug>
#include <QFile>
#include <QImage>

View file

@ -57,6 +57,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <KDebug>
#include <cstdlib>

View file

@ -32,6 +32,7 @@
#include "xdvi.h"
#include <klocale.h>
#include <KDebug>
#include <cstdio>
#include <cstdlib>

View file

@ -16,7 +16,7 @@
#include <QFileInfo>
#include <QApplication> // Because of the HACK
#include <kdebug.h>
#include <QDebug>
#include <klocale.h>
#include <KStandardDirs>
@ -148,7 +148,7 @@ static QPoint calculateXYPosition( QTextDocument *document, int startPosition )
QTextLayout *startLayout = startBlock.layout();
if (!startLayout) {
kWarning() << "Start layout not found" << startLayout;
qWarning() << "Start layout not found" << startLayout;
return QPoint();
}
@ -412,7 +412,7 @@ QTextDocument* Converter::convert( const QString &fileName )
QString::fromUtf8(label),
block);
} else {
kDebug() << "Error: no block found for"<< link;
qDebug() << "Error: no block found for"<< link;
}
if (clink)
@ -424,7 +424,7 @@ QTextDocument* Converter::convert( const QString &fileName )
epub_free_titerator(tit);
} else {
kDebug() << "no toc found";
qDebug() << "no toc found";
}
// adding link actions
@ -443,7 +443,7 @@ QTextDocument* Converter::convert( const QString &fileName )
emit addAction(action, hit.value()[i].first, hit.value()[i].second);
} else {
kDebug() << "Error: no block found for "<< hit.key();
qDebug() << "Error: no block found for "<< hit.key();
}
}
}

View file

@ -11,7 +11,7 @@
#include <QTemporaryFile>
#include <QDir>
#include <KDebug>
#include <QDebug>
#include <QRegExp>
@ -107,8 +107,8 @@ QVariant EpubDocument::loadResource(int type, const QUrl &name)
}
case EpubDocument::MovieResource: {
QTemporaryFile *tmp = new QTemporaryFile(QString("%1/okrXXXXXX").arg(QDir::tempPath()),this);
if(!tmp->open()) kWarning() << "EPUB : error creating temporary video file";
if(tmp->write(data,size) == -1) kWarning() << "EPUB : error writing data" << tmp->errorString();
if(!tmp->open()) qWarning() << "EPUB : error creating temporary video file";
if(tmp->write(data,size) == -1) qWarning() << "EPUB : error writing data" << tmp->errorString();
tmp->flush();
resource.setValue(tmp->fileName());
break;

View file

@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
#include <stdio.h>
#include <sys/types.h>
#include <kdebug.h>
#include <QDebug>
#include "faxexpand.h"
@ -300,14 +300,14 @@ const char *StateNames[] = {
case S_Ext: \
*pa++ = lastx - a0; \
if (verbose) \
kDebug() << "Line " << LineNum << ": extension code\n";\
qDebug() << "Line " << LineNum << ": extension code\n";\
SKIP_EOL; \
break; \
case S_EOL: \
*pa++ = lastx - a0; \
NeedBits(4); \
if (GetBits(4) && verbose) /* already seen 7 zeros */ \
kDebug() << "Line " << LineNum << ": Bad EOL\n"; \
qDebug() << "Line " << LineNum << ": Bad EOL\n"; \
ClrBits(4); \
EOLcnt = 1; \
goto eolab; \
@ -337,7 +337,7 @@ static void
unexpected(const char *what, int LineNum)
{
if (verbose)
kError() << "Line " << LineNum << ": Unexpected state in "
qCritical() << "Line " << LineNum << ": Unexpected state in "
<< what << endl;
}
@ -379,7 +379,7 @@ MHexpand(struct pagenode *pn, drawfunc df)
SETVAL(0);
if (a0 != lastx) {
if (verbose)
kWarning() << "Line " << LineNum << ": length is "
qWarning() << "Line " << LineNum << ": length is "
<< a0 << " (expected "<< lastx << ")\n";
while (a0 > lastx)
a0 -= *--pa;
@ -448,7 +448,7 @@ g31expand(struct pagenode *pn, drawfunc df)
ClrBits(11);
}
if (EOLcnt > 1 && EOLcnt != 6 && verbose) {
kError() << "Line " << LineNum << ": bad RTC (" << EOLcnt << " EOLs)\n";
qCritical() << "Line " << LineNum << ": bad RTC (" << EOLcnt << " EOLs)\n";
}
if (EOLcnt >= 6 || EndOfData(pn)) {
free(runs);
@ -463,7 +463,7 @@ g31expand(struct pagenode *pn, drawfunc df)
SETVAL(0);
if (a0 != lastx) {
if (verbose)
kWarning() << "Line " << LineNum << ": length is "
qWarning() << "Line " << LineNum << ": length is "
<< a0 << " (expected "<< lastx << ")\n";
while (a0 > lastx)
a0 -= *--pa;
@ -539,13 +539,13 @@ g32expand(struct pagenode *pn, drawfunc df)
ClrBits(11);
}
if (EOLcnt > 1 && EOLcnt != 6 && verbose)
kError() << "Line " << LineNum << ": bad RTC (" << EOLcnt << " EOLs)\n";
qCritical() << "Line " << LineNum << ": bad RTC (" << EOLcnt << " EOLs)\n";
if (EOLcnt >= 6 || EndOfData(pn)) {
free(run0);
return;
}
if (LineNum == 0 && refline == 0 && verbose)
kDebug() << "First line is 2-D encoded\n";
qDebug() << "First line is 2-D encoded\n";
RunLength = 0;
if (LineNum & 1) {
pa = run1;
@ -570,7 +570,7 @@ g32expand(struct pagenode *pn, drawfunc df)
SETVAL(0);
if (a0 != lastx) {
if (verbose)
kWarning() << "Line " << LineNum << ": length is "
qWarning() << "Line " << LineNum << ": length is "
<< a0 << " (expected "<< lastx << ")\n";
while (a0 > lastx)
a0 -= *--pa;
@ -592,7 +592,7 @@ g32expand(struct pagenode *pn, drawfunc df)
#undef eol2lab
#define SKIP_EOL do { \
if (verbose) \
kError() << "Line " << LineNum << ": G4 coding error\n"; \
qCritical() << "Line " << LineNum << ": G4 coding error\n"; \
free(run0); \
return; \
} while (0)
@ -654,7 +654,7 @@ g4expand(struct pagenode *pn, drawfunc df)
EOFB:
NeedBits(13);
if (GetBits(13) != 0x1001 && verbose)
kError() << "Bad RTC\n";
qCritical() << "Bad RTC\n";
break;
}
free(run0);

View file

@ -12,7 +12,7 @@
#include <QtGui/QColor>
#include <QtCore/QFile>
#include <QtCore/QRegExp>
#include <kdebug.h>
#include <QDebug>
#include <QApplication> // Because of the HACK
#include <QPalette> // Because of the HACK

View file

@ -10,7 +10,7 @@
#ifndef OOO_DEBUG_H
#define OOO_DEBUG_H
#include <KDebug>
#include <QDebug>
const int OooDebug = 4715;
#endif

View file

@ -12,6 +12,7 @@
// qt/kde includes
#include <qvariant.h>
#include <KDebug>
#include <core/annotations.h>
#include <core/area.h>
@ -232,7 +233,7 @@ void PopplerAnnotationProxy::notifyModification( const Okular::Annotation *okl_a
break;
}
default:
kDebug() << "Type-specific property modification is not implemented for this annotation type";
qDebug() << "Type-specific property modification is not implemented for this annotation type";
break;
}

View file

@ -29,7 +29,8 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <ktemporaryfile.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <kglobal.h>
#include <core/action.h>
@ -396,7 +397,7 @@ OKULAR_EXPORT_PLUGIN(PDFGenerator, createAboutData())
static void PDFGeneratorPopplerDebugFunction(const QString &message, const QVariant &closure)
{
Q_UNUSED(closure);
kDebug() << "[Poppler]" << message;
qDebug() << "[Poppler]" << message;
}
PDFGenerator::PDFGenerator( QObject *parent, const QVariantList &args )

View file

@ -19,7 +19,7 @@
#include <kaboutdata.h>
#include <kconfigdialog.h>
#include <kdebug.h>
#include <QDebug>
#include <kmimetype.h>
#include <ktemporaryfile.h>

View file

@ -11,7 +11,7 @@
#include <qimage.h>
#include <kdebug.h>
#include <QDebug>
#include "core/generator.h"
#include "core/page.h"

View file

@ -19,7 +19,8 @@
#include <QtPrintSupport/QPrinter>
#include <kaboutdata.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
#include <kglobal.h>
#include <klocale.h>

View file

@ -13,7 +13,7 @@
#include <QTextCodec>
#include <kencodingprober.h>
#include <kdebug.h>
#include <QDebug>
#include "document.h"
@ -22,13 +22,13 @@ using namespace Txt;
Document::Document( const QString &fileName )
{
#ifdef TXT_DEBUG
kDebug() << "Opening file" << fileName;
qDebug() << "Opening file" << fileName;
#endif
QFile plainFile( fileName );
if ( !plainFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
{
kDebug() << "Can't open file" << plainFile.fileName();
qDebug() << "Can't open file" << plainFile.fileName();
return;
}
@ -65,7 +65,7 @@ QString Document::toUnicode( const QByteArray &array )
return QString();
}
kDebug() << "Detected" << prober.encoding() << "encoding"
qDebug() << "Detected" << prober.encoding() << "encoding"
<< "based on" << charsFeeded << "chars";
return QTextCodec::codecForName( encoding )->toUnicode( array );
}

View file

@ -28,6 +28,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kurl.h>
#include <KDebug>
#include <QBuffer>
#include <QImageReader>
#include <QMutex>

View file

@ -2150,7 +2150,7 @@ void Part::slotFindPrev()
bool Part::saveFile()
{
kDebug() << "Okular part doesn't support saving the file in the location from which it was opened";
qDebug() << "Okular part doesn't support saving the file in the location from which it was opened";
return false;
}

View file

@ -95,9 +95,9 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
//END
#if 0
kDebug() << "Annotation details:";
kDebug().nospace() << " => unique name: '" << ann->uniqueName() << "'";
kDebug() << " => flags:" << QString::number( m_annot->flags(), 2 );
qDebug() << "Annotation details:";
qDebug().nospace() << " => unique name: '" << ann->uniqueName() << "'";
qDebug() << " => flags:" << QString::number( m_annot->flags(), 2 );
#endif
resize( sizeHint() );

View file

@ -23,7 +23,7 @@
#include <kiconloader.h>
#include <klocale.h>
#include <knuminput.h>
#include <kdebug.h>
#include <QDebug>
#include "core/document.h"
#include "guiutils.h"

View file

@ -27,7 +27,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <ktextedit.h>
#include <kdebug.h>
#include <QDebug>
#include <kaction.h>
#include <kstandardaction.h>
#include <qmenu.h>

View file

@ -17,7 +17,7 @@
#include <qtoolbar.h>
#include <qtreewidget.h>
#include <kdebug.h>
#include <QDebug>
#include <kicon.h>
#include <klocale.h>
#include <kmenu.h>
@ -321,8 +321,8 @@ QList<QTreeWidgetItem*> createItems( const KUrl& baseurl, const KBookmark::List&
QList<QTreeWidgetItem*> ret;
foreach ( const KBookmark& bm, bmlist )
{
// kDebug().nospace() << "checking '" << tmp << "'";
// kDebug().nospace() << " vs '" << baseurl << "'";
// qDebug().nospace() << "checking '" << tmp << "'";
// qDebug().nospace() << " vs '" << baseurl << "'";
// TODO check that bm and baseurl are the same (#ref excluded)
QTreeWidgetItem * item = new BookmarkItem( bm );
ret.append( item );

View file

@ -26,7 +26,8 @@
#include <kpushbutton.h>
#include <kservice.h>
#include <ksharedconfig.h>
#include <kdebug.h>
#include <QDebug>
#include <KDebug>
using namespace Okular;
@ -99,14 +100,14 @@ void FilePrinterPreviewPrivate::getPart()
bool FilePrinterPreviewPrivate::doPreview()
{
if (!QFile::exists(filename)) {
kWarning() << "Nothing was produced to be previewed";
qWarning() << "Nothing was produced to be previewed";
return false;
}
getPart();
if (!previewPart) {
//TODO: error dialog
kWarning() << "Could not find a PS viewer for the preview dialog";
qWarning() << "Could not find a PS viewer for the preview dialog";
fail();
return false;
} else {

View file

@ -19,6 +19,7 @@
#include <kstandardaction.h>
#include <kaction.h>
#include <kurl.h>
#include <KDebug>
// local includes
#include "core/form.h"

View file

@ -33,7 +33,7 @@
#include <QtWidgets/QToolButton>
#include <QtWidgets/QTreeView>
#include <kdebug.h>
#include <QDebug>
#include <kiconloader.h>
#include <klocale.h>
#include <ktoolbar.h>

View file

@ -12,7 +12,7 @@
#include "latexrenderer.h"
#include <kdebug.h>
#include <QDebug>
#include <kstandarddirs.h>
#include <kprocess.h>
#include <ktemporaryfile.h>
@ -143,7 +143,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin
QString latexExecutable = KStandardDirs::findExe("latex");
if (latexExecutable.isEmpty())
{
kDebug() << "Could not find latex!";
qDebug() << "Could not find latex!";
delete tempFile;
fileName = QString();
return LatexNotFound;
@ -167,7 +167,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin
QString dvipngExecutable = KStandardDirs::findExe("dvipng");
if (dvipngExecutable.isEmpty())
{
kDebug() << "Could not find dvipng!";
qDebug() << "Could not find dvipng!";
fileName = QString();
return DvipngNotFound;
}

View file

@ -16,7 +16,7 @@
#include <qpixmap.h>
#include <qvarlengtharray.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <QDebug>
#include <QApplication>
// TODO KF5 #include <qimageblitz.h>

View file

@ -43,7 +43,7 @@
#include <kinputdialog.h>
#include <kselectaction.h>
#include <ktoggleaction.h>
#include <kdebug.h>
#include <QDebug>
#include <kdeversion.h>
#include <kmessagebox.h>
#include <kicon.h>
@ -911,7 +911,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
PageViewItem * item = new PageViewItem( *setIt );
d->items.push_back( item );
#ifdef PAGEVIEW_DEBUG
kDebug().nospace() << "cropped geom for " << d->items.last()->pageNumber() << " is " << d->items.last()->croppedGeometry();
qDebug().nospace() << "cropped geom for " << d->items.last()->pageNumber() << " is " << d->items.last()->croppedGeometry();
#endif
const QLinkedList< Okular::FormField * > pageFields = (*setIt)->formFields();
QLinkedList< Okular::FormField * >::const_iterator ffIt = pageFields.constBegin(), ffEnd = pageFields.constEnd();
@ -1143,12 +1143,12 @@ void PageView::slotRealNotifyViewportChanged( bool smoothMove )
}
if ( !item )
{
kWarning() << "viewport for page" << vp.pageNumber << "has no matching item!";
qWarning() << "viewport for page" << vp.pageNumber << "has no matching item!";
d->blockViewport = false;
return;
}
#ifdef PAGEVIEW_DEBUG
kDebug() << "document viewport changed";
qDebug() << "document viewport changed";
#endif
// relayout in "Single Pages" mode or if a relayout is pending
d->blockPixmapsRequest = true;
@ -1253,7 +1253,7 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags )
if ( changedFlags & DocumentObserver::BoundingBox )
{
#ifdef PAGEVIEW_DEBUG
kDebug() << "BoundingBox change on page" << pageNumber;
qDebug() << "BoundingBox change on page" << pageNumber;
#endif
slotRelayoutPages();
slotRequestVisiblePixmaps(); // TODO: slotRelayoutPages() may have done this already!
@ -1427,7 +1427,7 @@ void PageView::paintEvent(QPaintEvent *pe)
return;
#ifdef PAGEVIEW_DEBUG
kDebug() << "paintevent" << contentsRect;
qDebug() << "paintevent" << contentsRect;
#endif
// create the screen painter. a pixel painted at contentsX,contentsY
@ -1474,7 +1474,7 @@ void PageView::paintEvent(QPaintEvent *pe)
continue;
}
#ifdef PAGEVIEW_DEBUG
kDebug() << contentsRect;
qDebug() << contentsRect;
#endif
// note: this check will take care of all things requiring alpha blending (not only selection)
@ -2560,7 +2560,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
{
// request the textpage if there isn't one
okularPage= item->page();
kWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
qWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
if ( !okularPage->hasTextPage() )
d->document->requestTextPage( okularPage->number() );
// grab text in the rect that intersects itemRect
@ -2706,7 +2706,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
{
// request the textpage if there isn't one
okularPage= item->page();
kWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
qWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
if ( !okularPage->hasTextPage() )
d->document->requestTextPage( okularPage->number() );
// grab text in the rect that intersects itemRect
@ -3165,7 +3165,7 @@ QList< Okular::RegularAreaRect * > PageView::textSelections( const QPoint& start
affectedItemsSet.insert( item->pageNumber() );
}
#ifdef PAGEVIEW_DEBUG
kDebug() << ">>>> item selected by mouse:" << affectedItemsSet.count();
qDebug() << ">>>> item selected by mouse:" << affectedItemsSet.count();
#endif
if ( !affectedItemsSet.isEmpty() )
@ -3190,7 +3190,7 @@ QList< Okular::RegularAreaRect * > PageView::textSelections( const QPoint& start
for ( int i = min; i <= max; ++i )
affectedItemsIds.append( i );
#ifdef PAGEVIEW_DEBUG
kDebug() << ">>>> pages:" << affectedItemsIds;
qDebug() << ">>>> pages:" << affectedItemsIds;
#endif
firstpage = affectedItemsIds.first();
@ -3369,7 +3369,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight
width *= ( crop.right - crop.left );
height *= ( crop.bottom - crop.top );
#ifdef PAGEVIEW_DEBUG
kDebug() << "Cropped page" << okularPage->number() << "to" << crop
qDebug() << "Cropped page" << okularPage->number() << "to" << crop
<< "width" << width << "height" << height << "by bbox" << okularPage->boundingBox();
#endif
}
@ -3425,7 +3425,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight
}
#ifndef NDEBUG
else
kDebug() << "calling updateItemSize with unrecognized d->zoomMode!";
qDebug() << "calling updateItemSize with unrecognized d->zoomMode!";
#endif
}
@ -3571,7 +3571,7 @@ Okular::RegularAreaRect * PageView::textSelectionForItem( PageViewItem * item, c
Okular::RegularAreaRect * selectionArea = okularPage->textArea( &mouseTextSelectionInfo );
#ifdef PAGEVIEW_DEBUG
kDebug().nospace() << "text areas (" << okularPage->number() << "): " << ( selectionArea ? QString::number( selectionArea->count() ) : "(none)" );
qDebug().nospace() << "text areas (" << okularPage->number() << "): " << ( selectionArea ? QString::number( selectionArea->count() ) : "(none)" );
#endif
return selectionArea;
}
@ -4215,7 +4215,7 @@ void PageView::slotRelayoutPages()
insertY += rHeight;
}
#ifdef PAGEVIEW_DEBUG
kWarning() << "updating size for pageno" << item->pageNumber() << "cropped" << item->croppedGeometry() << "uncropped" << item->uncroppedGeometry();
qWarning() << "updating size for pageno" << item->pageNumber() << "cropped" << item->croppedGeometry() << "uncropped" << item->uncroppedGeometry();
#endif
}
@ -4356,8 +4356,8 @@ void PageView::slotRequestVisiblePixmaps( int newValue )
if ( !i->isVisible() )
continue;
#ifdef PAGEVIEW_DEBUG
kWarning() << "checking page" << i->pageNumber();
kWarning().nospace() << "viewportRect is " << viewportRect << ", page item is " << i->croppedGeometry() << " intersect : " << viewportRect.intersects( i->croppedGeometry() );
qWarning() << "checking page" << i->pageNumber();
qWarning().nospace() << "viewportRect is " << viewportRect << ", page item is " << i->croppedGeometry() << " intersect : " << viewportRect.intersects( i->croppedGeometry() );
#endif
// if the item doesn't intersect the viewport, skip it
QRect intersectionRect = viewportRect.intersect( i->croppedGeometry() );
@ -4371,8 +4371,8 @@ void PageView::slotRequestVisiblePixmaps( int newValue )
Okular::VisiblePageRect * vItem = new Okular::VisiblePageRect( i->pageNumber(), Okular::NormalizedRect( intersectionRect.translated( -i->uncroppedGeometry().topLeft() ), i->uncroppedWidth(), i->uncroppedHeight() ) );
visibleRects.push_back( vItem );
#ifdef PAGEVIEW_DEBUG
kWarning() << "checking for pixmap for page" << i->pageNumber() << "=" << i->page()->hasPixmap( this, i->uncroppedWidth(), i->uncroppedHeight() );
kWarning() << "checking for text for page" << i->pageNumber() << "=" << i->page()->hasTextPage();
qWarning() << "checking for pixmap for page" << i->pageNumber() << "=" << i->page()->hasPixmap( this, i->uncroppedWidth(), i->uncroppedHeight() );
qWarning() << "checking for text for page" << i->pageNumber() << "=" << i->page()->hasTextPage();
#endif
Okular::NormalizedRect expandedVisibleRect = vItem->rect;
@ -4389,7 +4389,7 @@ void PageView::slotRequestVisiblePixmaps( int newValue )
if ( !i->page()->hasPixmap( this, i->uncroppedWidth(), i->uncroppedHeight(), expandedVisibleRect ) )
{
#ifdef PAGEVIEW_DEBUG
kWarning() << "rerequesting visible pixmaps for page" << i->pageNumber() << "!";
qWarning() << "rerequesting visible pixmaps for page" << i->pageNumber() << "!";
#endif
Okular::PixmapRequest * p = new Okular::PixmapRequest( this, i->pageNumber(), i->uncroppedWidth(), i->uncroppedHeight(), PAGEVIEW_PRIO, Okular::PixmapRequest::Asynchronous );
requestedPixmaps.push_back( p );

View file

@ -23,7 +23,7 @@
#include <kstandarddirs.h>
#include <kinputdialog.h>
#include <kuser.h>
#include <kdebug.h>
#include <QDebug>
#include <kmenu.h>
// system includes
@ -185,7 +185,7 @@ class PickPointEngine : public AnnotatorEngine
rect.top = qMin(startpoint.y,point.y);
rect.right = qMax(startpoint.x,point.x);
rect.bottom = qMax(startpoint.y,point.y);
kDebug().nospace() << "xyScale=" << xscale << "," << yscale;
qDebug().nospace() << "xyScale=" << xscale << "," << yscale;
static int padding = 2;
const QFontMetricsF mf(ta->textFont());
const QRectF rcf = mf.boundingRect( Okular::NormalizedRect( rect.left, rect.top, 1.0, 1.0 ).geometry( (int)pagewidth, (int)pageheight ).adjusted( padding, padding, -padding, -padding ),
@ -671,7 +671,7 @@ void PageViewAnnotator::reparseConfig()
if ( entryParser.setContent( toolXml ) )
m_toolsDefinition.appendChild( doc.importNode( entryParser.documentElement(), true ) );
else
kWarning() << "Skipping malformed tool XML in AnnotationTools setting";
qWarning() << "Skipping malformed tool XML in AnnotationTools setting";
}
// Create the AnnotationToolItems from the XML dom tree
@ -1008,7 +1008,7 @@ void PageViewAnnotator::slotToolSelected( int toolID )
else if ( type == "TextSelector" )
m_engine = new TextSelectorEngine( toolSubElement, m_pageView );
else
kWarning().nospace() << "tools.xml: engine type:'" << type << "' is not defined!";
qWarning().nospace() << "tools.xml: engine type:'" << type << "' is not defined!";
}
// display the tooltip
@ -1047,7 +1047,7 @@ void PageViewAnnotator::slotToolSelected( int toolID )
// consistancy warning
if ( !m_engine )
{
kWarning() << "tools.xml: couldn't find good engine description. check xml.";
qWarning() << "tools.xml: couldn't find good engine description. check xml.";
}
m_pageView->updateCursor();

View file

@ -313,7 +313,7 @@ void PresentationWidget::notifySetup( const QVector< Okular::Page * > & pageSet,
for ( ; fIt != fEnd; ++fIt )
delete *fIt;
if ( !m_frames.isEmpty() )
kWarning() << "Frames setup changed while a Presentation is in progress.";
qWarning() << "Frames setup changed while a Presentation is in progress.";
m_frames.clear();
// create the new frames
@ -818,7 +818,7 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
void PresentationWidget::resizeEvent( QResizeEvent *re )
{
// kDebug() << re->oldSize() << "=>" << re->size();
// qDebug() << re->oldSize() << "=>" << re->size();
if ( re->oldSize() == QSize( -1, -1 ) )
return;
@ -1246,7 +1246,7 @@ void PresentationWidget::recalcGeometry()
Okular::Settings::setSlidesScreen( -2 );
}
const QRect screenGeom = desktop->screenGeometry( screen );
// kDebug() << screen << "=>" << screenGeom;
// qDebug() << screen << "=>" << screenGeom;
m_screen = screen;
setGeometry( screenGeom );
}
@ -1502,7 +1502,7 @@ void PresentationWidget::setScreen( int newScreen )
{
const QRect screenGeom = QApplication::desktop()->screenGeometry( newScreen );
const QSize oldSize = size();
// kDebug() << newScreen << "=>" << screenGeom;
// qDebug() << newScreen << "=>" << screenGeom;
m_screen = newScreen;
setGeometry( screenGeom );