summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2014-09-09 16:17:36 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2014-09-09 16:17:36 (GMT)
commit34fbdf8c85a75fb6666f07323625e38bbaabd4ba (patch)
tree377efd989ed383a1f51fb79627a0d05c099fa075
parent374592256a91f657008ff2eb5f7fb66cba12ce23 (diff)
Some more kDebug->qDebug
-rw-r--r--active/app/src/main.cpp4
-rw-r--r--active/components/pageitem.cpp2
-rw-r--r--conf/widgetannottools.cpp4
-rw-r--r--core/area.cpp3
-rw-r--r--core/area.h4
-rw-r--r--core/audioplayer.cpp7
-rw-r--r--core/bookmarkmanager.cpp2
-rw-r--r--core/document.cpp13
-rw-r--r--core/documentcommands.cpp1
-rw-r--r--core/fileprinter.cpp3
-rw-r--r--core/generator.cpp2
-rw-r--r--core/generator_p.cpp2
-rw-r--r--core/misc.cpp3
-rw-r--r--core/movie.cpp3
-rw-r--r--core/page.cpp3
-rw-r--r--core/script/executor_kjs.cpp3
-rw-r--r--core/script/kjs_console.cpp3
-rw-r--r--core/script/kjs_document.cpp2
-rw-r--r--core/script/kjs_field.cpp3
-rw-r--r--core/scripter.cpp3
-rw-r--r--core/textdocumentgenerator.cpp2
-rw-r--r--core/textdocumentgenerator_p.h2
-rw-r--r--core/textpage.cpp18
-rw-r--r--core/utils.cpp26
-rw-r--r--generators/chm/kio-msits/msits.cpp36
-rw-r--r--generators/comicbook/document.cpp2
-rw-r--r--generators/comicbook/unrar.cpp6
-rw-r--r--generators/djvu/generator_djvu.cpp2
-rw-r--r--generators/djvu/kdjvu.cpp28
-rw-r--r--generators/dvi/TeXFontDefinition.cpp1
-rw-r--r--generators/dvi/TeXFont_PFB.cpp1
-rw-r--r--generators/dvi/TeXFont_PK.cpp1
-rw-r--r--generators/dvi/TeXFont_TFM.cpp1
-rw-r--r--generators/dvi/dviFile.cpp1
-rw-r--r--generators/dvi/dviRenderer.cpp1
-rw-r--r--generators/dvi/dviRenderer_draw.cpp2
-rw-r--r--generators/dvi/dviexport.cpp1
-rw-r--r--generators/dvi/fontEncoding.cpp1
-rw-r--r--generators/dvi/fontEncoding.h2
-rw-r--r--generators/dvi/fontMap.cpp1
-rw-r--r--generators/dvi/fontMap.h2
-rw-r--r--generators/dvi/fontpool.cpp1
-rw-r--r--generators/dvi/generator_dvi.cpp3
-rw-r--r--generators/dvi/kvs_debug.h2
-rw-r--r--generators/dvi/length.cpp2
-rw-r--r--generators/dvi/pageSize.cpp2
-rw-r--r--generators/dvi/pageSize.h8
-rw-r--r--generators/dvi/psgs.cpp1
-rw-r--r--generators/dvi/simplePageSize.cpp1
-rw-r--r--generators/dvi/special.cpp1
-rw-r--r--generators/dvi/util.cpp1
-rw-r--r--generators/dvi/vf.cpp1
-rw-r--r--generators/epub/converter.cpp10
-rw-r--r--generators/epub/epubdocument.cpp6
-rw-r--r--generators/fax/faxexpand.cpp24
-rw-r--r--generators/mobipocket/mobidocument.cpp2
-rw-r--r--generators/ooo/debug.h2
-rw-r--r--generators/poppler/annots.cpp3
-rw-r--r--generators/poppler/generator_pdf.cpp5
-rw-r--r--generators/spectre/generator_ghostview.cpp2
-rw-r--r--generators/spectre/rendererthread.cpp2
-rw-r--r--generators/tiff/generator_tiff.cpp3
-rw-r--r--generators/txt/document.cpp8
-rw-r--r--generators/xps/generator_xps.cpp1
-rw-r--r--part.cpp2
-rw-r--r--ui/annotationpropertiesdialog.cpp6
-rw-r--r--ui/annotationwidgets.cpp2
-rw-r--r--ui/annotwindow.cpp2
-rw-r--r--ui/bookmarklist.cpp6
-rw-r--r--ui/fileprinterpreview.cpp7
-rw-r--r--ui/formwidgets.cpp1
-rw-r--r--ui/ktreeviewsearchline.cpp2
-rw-r--r--ui/latexrenderer.cpp6
-rw-r--r--ui/pagepainter.cpp2
-rw-r--r--ui/pageview.cpp40
-rw-r--r--ui/pageviewannotator.cpp10
-rw-r--r--ui/presentationwidget.cpp8
77 files changed, 213 insertions, 179 deletions
diff --git a/active/app/src/main.cpp b/active/app/src/main.cpp
index 8d1c62c..7a8357d 100644
--- a/active/app/src/main.cpp
+++ b/active/app/src/main.cpp
@@ -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");
diff --git a/active/components/pageitem.cpp b/active/components/pageitem.cpp
index f9d48f0..a9933b1 100644
--- a/active/components/pageitem.cpp
+++ b/active/components/pageitem.cpp
@@ -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();
diff --git a/conf/widgetannottools.cpp b/conf/widgetannottools.cpp
index 4b5a29f..8ce8885 100644
--- a/conf/widgetannottools.cpp
+++ b/conf/widgetannottools.cpp
@@ -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;
}
diff --git a/core/area.cpp b/core/area.cpp
index bf2eb70..afb00ee 100644
--- a/core/area.cpp
+++ b/core/area.cpp
@@ -11,7 +11,8 @@
#include <QtCore/QRect>
#include <QtGui/QPolygonF>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include <math.h>
diff --git a/core/area.h b/core/area.h
index 1f7b10d..a74b799 100644
--- a/core/area.h
+++ b/core/area.h
@@ -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
}
diff --git a/core/audioplayer.cpp b/core/audioplayer.cpp
index a63f907..54e9c9a 100644
--- a/core/audioplayer.cpp
+++ b/core/audioplayer.cpp
@@ -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
diff --git a/core/bookmarkmanager.cpp b/core/bookmarkmanager.cpp
index b17d2cd..7f36b06 100644
--- a/core/bookmarkmanager.cpp
+++ b/core/bookmarkmanager.cpp
@@ -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>
diff --git a/core/document.cpp b/core/document.cpp
index bbec703..7d970b1 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -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;
}
diff --git a/core/documentcommands.cpp b/core/documentcommands.cpp
index 95aded5..5c22224 100644
--- a/core/documentcommands.cpp
+++ b/core/documentcommands.cpp
@@ -15,6 +15,7 @@
#include "form.h"
#include "utils_p.h"
#include "page.h"
+#include <KDebug>
#include <KLocalizedString>
diff --git a/core/fileprinter.cpp b/core/fileprinter.cpp
index 08e05bd..b5972bd 100644
--- a/core/fileprinter.cpp
+++ b/core/fileprinter.cpp
@@ -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"
diff --git a/core/generator.cpp b/core/generator.cpp
index 1d0ada1..ba1323c 100644
--- a/core/generator.cpp
+++ b/core/generator.cpp
@@ -15,7 +15,7 @@
#include <qeventloop.h>
#include <QtPrintSupport/QPrinter>
-#include <kdebug.h>
+#include <QDebug>
#include <kicon.h>
#include <klocale.h>
#include <kwallet.h>
diff --git a/core/generator_p.cpp b/core/generator_p.cpp
index 3915dda..498ae19 100644
--- a/core/generator_p.cpp
+++ b/core/generator_p.cpp
@@ -9,7 +9,7 @@
#include "generator_p.h"
-#include <kdebug.h>
+#include <QDebug>
#include "fontinfo.h"
#include "generator.h"
diff --git a/core/misc.cpp b/core/misc.cpp
index 34812c4..281301b 100644
--- a/core/misc.cpp
+++ b/core/misc.cpp
@@ -9,7 +9,8 @@
#include "core/misc.h"
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include "debug_p.h"
diff --git a/core/movie.cpp b/core/movie.cpp
index dd780eb..f792752 100644
--- a/core/movie.cpp
+++ b/core/movie.cpp
@@ -16,7 +16,8 @@
#include <qstring.h>
#include <qtemporaryfile.h>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include "debug_p.h"
diff --git a/core/page.cpp b/core/page.cpp
index b48f210..fcbab7c 100644
--- a/core/page.cpp
+++ b/core/page.cpp
@@ -19,7 +19,8 @@
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
// local includes
#include "action.h"
diff --git a/core/script/executor_kjs.cpp b/core/script/executor_kjs.cpp
index 071da7a..b428524 100644
--- a/core/script/executor_kjs.cpp
+++ b/core/script/executor_kjs.cpp
@@ -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"
diff --git a/core/script/kjs_console.cpp b/core/script/kjs_console.cpp
index 8944d73..f2e554e 100644
--- a/core/script/kjs_console.cpp
+++ b/core/script/kjs_console.cpp
@@ -14,7 +14,8 @@
#include <kjs/kjsprototype.h>
#include <kjs/kjsarguments.h>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include "../debug_p.h"
diff --git a/core/script/kjs_document.cpp b/core/script/kjs_document.cpp
index 4422953..d278977 100644
--- a/core/script/kjs_document.cpp
+++ b/core/script/kjs_document.cpp
@@ -16,7 +16,7 @@
#include <kjs/kjsprototype.h>
#include <kjs/kjsarguments.h>
-#include <kdebug.h>
+#include <QDebug>
#include <assert.h>
#include "../document_p.h"
diff --git a/core/script/kjs_field.cpp b/core/script/kjs_field.cpp
index 9bdb73b..4e528ee 100644
--- a/core/script/kjs_field.cpp
+++ b/core/script/kjs_field.cpp
@@ -16,7 +16,8 @@
#include <qhash.h>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include <kglobal.h>
#include "../debug_p.h"
diff --git a/core/scripter.cpp b/core/scripter.cpp
index 3285035..ee8a879 100644
--- a/core/scripter.cpp
+++ b/core/scripter.cpp
@@ -9,7 +9,8 @@
#include "scripter.h"
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include "debug_p.h"
#include "script/executor_kjs_p.h"
diff --git a/core/textdocumentgenerator.cpp b/core/textdocumentgenerator.cpp
index 17b65e6..168f695 100644
--- a/core/textdocumentgenerator.cpp
+++ b/core/textdocumentgenerator.cpp
@@ -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;
}
diff --git a/core/textdocumentgenerator_p.h b/core/textdocumentgenerator_p.h
index fba73ff..1ceeeec 100644
--- a/core/textdocumentgenerator_p.h
+++ b/core/textdocumentgenerator_p.h
@@ -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;
}
diff --git a/core/textpage.cpp b/core/textpage.cpp
index 348dea0..a5b9a62 100644
--- a/core/textpage.cpp
+++ b/core/textpage.cpp
@@ -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 )
diff --git a/core/utils.cpp b/core/utils.cpp
index a3558b0..fcb455e 100644
--- a/core/utils.cpp
+++ b/core/utils.cpp
@@ -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;
diff --git a/generators/chm/kio-msits/msits.cpp b/generators/chm/kio-msits/msits.cpp
index 23a3fce..ffa04ef 100644
--- a/generators/chm/kio-msits/msits.cpp
+++ b/generators/chm/kio-msits/msits.cpp
@@ -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;
diff --git a/generators/comicbook/document.cpp b/generators/comicbook/document.cpp
index 93b948e..feca68b 100644
--- a/generators/comicbook/document.cpp
+++ b/generators/comicbook/document.cpp
@@ -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";
}
}
}
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index 5f65656..bc4ef4f 100644
--- a/generators/comicbook/unrar.cpp
+++ b/generators/comicbook/unrar.cpp
@@ -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() << ")";
}
}
diff --git a/generators/djvu/generator_djvu.cpp b/generators/djvu/generator_djvu.cpp
index b011759..d4cc448 100644
--- a/generators/djvu/generator_djvu.cpp
+++ b/generators/djvu/generator_djvu.cpp
@@ -26,7 +26,7 @@
#include <QtGui/QPrinter>
#include <kaboutdata.h>
-#include <kdebug.h>
+#include <QDebug>
#include <klocale.h>
#include <ktemporaryfile.h>
diff --git a/generators/djvu/kdjvu.cpp b/generators/djvu/kdjvu.cpp
index 302a69b..cfb8fa3 100644
--- a/generators/djvu/kdjvu.cpp
+++ b/generators/djvu/kdjvu.cpp
@@ -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;
}
diff --git a/generators/dvi/TeXFontDefinition.cpp b/generators/dvi/TeXFontDefinition.cpp
index 46d2507..66f9ff5 100644
--- a/generators/dvi/TeXFontDefinition.cpp
+++ b/generators/dvi/TeXFontDefinition.cpp
@@ -12,6 +12,7 @@
#include "xdvi.h"
#include <klocale.h>
+#include <KDebug>
#include <QFile>
diff --git a/generators/dvi/TeXFont_PFB.cpp b/generators/dvi/TeXFont_PFB.cpp
index 92745de..646856e 100644
--- a/generators/dvi/TeXFont_PFB.cpp
+++ b/generators/dvi/TeXFont_PFB.cpp
@@ -18,6 +18,7 @@
#include "kvs_debug.h"
#include <klocale.h>
+#include <KDebug>
#include <QImage>
diff --git a/generators/dvi/TeXFont_PK.cpp b/generators/dvi/TeXFont_PK.cpp
index b6fdbf5..90b2dc4 100644
--- a/generators/dvi/TeXFont_PK.cpp
+++ b/generators/dvi/TeXFont_PK.cpp
@@ -58,6 +58,7 @@
#include "xdvi.h"
#include <klocale.h>
+#include <KDebug>
#include <QFile>
#include <QImage>
diff --git a/generators/dvi/TeXFont_TFM.cpp b/generators/dvi/TeXFont_TFM.cpp
index f7d8f99..7b4ec3d 100644
--- a/generators/dvi/TeXFont_TFM.cpp
+++ b/generators/dvi/TeXFont_TFM.cpp
@@ -10,6 +10,7 @@
#include "TeXFont_TFM.h"
#include "kvs_debug.h"
+#include <KDebug>
#include <QDataStream>
#include <QFile>
diff --git a/generators/dvi/dviFile.cpp b/generators/dvi/dviFile.cpp
index d90ff1c..55f8008 100644
--- a/generators/dvi/dviFile.cpp
+++ b/generators/dvi/dviFile.cpp
@@ -59,6 +59,7 @@
#include "pageSize.h"
#include <klocale.h>
+#include <KDebug>
#include <QProcess>
#include <QSysInfo>
diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp
index 4d098f9..5ddc8cb 100644
--- a/generators/dvi/dviRenderer.cpp
+++ b/generators/dvi/dviRenderer.cpp
@@ -29,6 +29,7 @@
#include <kmimetype.h>
#include <kstandarddirs.h>
#include <kvbox.h>
+#include <KDebug>
#include <QApplication>
#include <QCheckBox>
diff --git a/generators/dvi/dviRenderer_draw.cpp b/generators/dvi/dviRenderer_draw.cpp
index 26184a4..3586bb4 100644
--- a/generators/dvi/dviRenderer_draw.cpp
+++ b/generators/dvi/dviRenderer_draw.cpp
@@ -68,7 +68,7 @@
#include <klocale.h>
#include <QPainter>
-
+#include <KDebug>
/** Routine to print characters. */
diff --git a/generators/dvi/dviexport.cpp b/generators/dvi/dviexport.cpp
index 2d31cf3..cf1d797 100644
--- a/generators/dvi/dviexport.cpp
+++ b/generators/dvi/dviexport.cpp
@@ -31,6 +31,7 @@
#include <kmessagebox.h>
#include <kprocess.h>
#include <ktemporaryfile.h>
+#include <KDebug>
#include <QEventLoop>
#include <QFileInfo>
diff --git a/generators/dvi/fontEncoding.cpp b/generators/dvi/fontEncoding.cpp
index 615cd6d..0049b5e 100644
--- a/generators/dvi/fontEncoding.cpp
+++ b/generators/dvi/fontEncoding.cpp
@@ -12,6 +12,7 @@
#include "fontEncoding.h"
#include "kvs_debug.h"
+#include <KDebug>
#include <QFile>
#include <QProcess>
diff --git a/generators/dvi/fontEncoding.h b/generators/dvi/fontEncoding.h
index 6fdcaa1..af9935b 100644
--- a/generators/dvi/fontEncoding.h
+++ b/generators/dvi/fontEncoding.h
@@ -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);
diff --git a/generators/dvi/fontMap.cpp b/generators/dvi/fontMap.cpp
index 008d198..a747c00 100644
--- a/generators/dvi/fontMap.cpp
+++ b/generators/dvi/fontMap.cpp
@@ -12,6 +12,7 @@
#include "fontMap.h"
#include "kvs_debug.h"
+#include <KDebug>
#include <QFile>
#include <QProcess>
diff --git a/generators/dvi/fontMap.h b/generators/dvi/fontMap.h
index b2532cd..b56d2ac 100644
--- a/generators/dvi/fontMap.h
+++ b/generators/dvi/fontMap.h
@@ -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
diff --git a/generators/dvi/fontpool.cpp b/generators/dvi/fontpool.cpp
index 6cca6ef..5ba7a0a 100644
--- a/generators/dvi/fontpool.cpp
+++ b/generators/dvi/fontpool.cpp
@@ -12,6 +12,7 @@
#include "TeXFont.h"
#include <klocale.h>
+#include <KDebug>
#include <QApplication>
#include <QPainter>
diff --git a/generators/dvi/generator_dvi.cpp b/generators/dvi/generator_dvi.cpp
index 8205e2e..10a6928 100644
--- a/generators/dvi/generator_dvi.cpp
+++ b/generators/dvi/generator_dvi.cpp
@@ -31,7 +31,8 @@
#include <qmutex.h>
#include <kaboutdata.h>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include <klocale.h>
#include <ktemporaryfile.h>
diff --git a/generators/dvi/kvs_debug.h b/generators/dvi/kvs_debug.h
index 3447962..8f7b0c7 100644
--- a/generators/dvi/kvs_debug.h
+++ b/generators/dvi/kvs_debug.h
@@ -10,7 +10,7 @@
#ifndef _KDVI_DEBUG_H_
#define _KDVI_DEBUG_H_
-#include <kdebug.h>
+#include <QDebug>
namespace kvs
{
diff --git a/generators/dvi/length.cpp b/generators/dvi/length.cpp
index 5f41b1d..96bec0e 100644
--- a/generators/dvi/length.cpp
+++ b/generators/dvi/length.cpp
@@ -11,7 +11,7 @@
#include "length.h"
#include "kvs_debug.h"
-
+#include <KDebug>
class unitOfDistance
{
diff --git a/generators/dvi/pageSize.cpp b/generators/dvi/pageSize.cpp
index 49bce0f..8ec55d6 100644
--- a/generators/dvi/pageSize.cpp
+++ b/generators/dvi/pageSize.cpp
@@ -14,7 +14,7 @@
#include <kglobal.h>
#include <klocale.h>
-
+#include <KDebug>
struct pageSizeItem
diff --git a/generators/dvi/pageSize.h b/generators/dvi/pageSize.h
index eca464d..5d1ae77 100644
--- a/generators/dvi/pageSize.h
+++ b/generators/dvi/pageSize.h
@@ -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'
*/
diff --git a/generators/dvi/psgs.cpp b/generators/dvi/psgs.cpp
index 5d6b807..39a7abb 100644
--- a/generators/dvi/psgs.cpp
+++ b/generators/dvi/psgs.cpp
@@ -19,6 +19,7 @@
#include <kprocess.h>
#include <ktemporaryfile.h>
#include <kurl.h>
+#include <KDebug>
#include <QDir>
#include <QPainter>
diff --git a/generators/dvi/simplePageSize.cpp b/generators/dvi/simplePageSize.cpp
index 3a2fe92..793fcf6 100644
--- a/generators/dvi/simplePageSize.cpp
+++ b/generators/dvi/simplePageSize.cpp
@@ -10,6 +10,7 @@
#include "simplePageSize.h"
#include "kvs_debug.h"
+#include <KDebug>
#include <QPaintDevice>
diff --git a/generators/dvi/special.cpp b/generators/dvi/special.cpp
index 4d63e9d..4a07c4f 100644
--- a/generators/dvi/special.cpp
+++ b/generators/dvi/special.cpp
@@ -18,6 +18,7 @@
#include <klocale.h>
#include <kmimetype.h>
+#include <KDebug>
#include <QFile>
#include <QImage>
diff --git a/generators/dvi/util.cpp b/generators/dvi/util.cpp
index e6c0a57..90c8185 100644
--- a/generators/dvi/util.cpp
+++ b/generators/dvi/util.cpp
@@ -57,6 +57,7 @@
#include <klocale.h>
#include <kmessagebox.h>
+#include <KDebug>
#include <cstdlib>
diff --git a/generators/dvi/vf.cpp b/generators/dvi/vf.cpp
index 8336048..bdf2d3c 100644
--- a/generators/dvi/vf.cpp
+++ b/generators/dvi/vf.cpp
@@ -32,6 +32,7 @@
#include "xdvi.h"
#include <klocale.h>
+#include <KDebug>
#include <cstdio>
#include <cstdlib>
diff --git a/generators/epub/converter.cpp b/generators/epub/converter.cpp
index b30cb41..7122d9d 100644
--- a/generators/epub/converter.cpp
+++ b/generators/epub/converter.cpp
@@ -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();
}
}
}
diff --git a/generators/epub/epubdocument.cpp b/generators/epub/epubdocument.cpp
index 02c59f0..4b1d5c4 100644
--- a/generators/epub/epubdocument.cpp
+++ b/generators/epub/epubdocument.cpp
@@ -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;
diff --git a/generators/fax/faxexpand.cpp b/generators/fax/faxexpand.cpp
index b004af3..36f1b8c 100644
--- a/generators/fax/faxexpand.cpp
+++ b/generators/fax/faxexpand.cpp
@@ -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);
diff --git a/generators/mobipocket/mobidocument.cpp b/generators/mobipocket/mobidocument.cpp
index 1008e2b..8c43bca 100644
--- a/generators/mobipocket/mobidocument.cpp
+++ b/generators/mobipocket/mobidocument.cpp
@@ -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
diff --git a/generators/ooo/debug.h b/generators/ooo/debug.h
index 672640d..9f3e827 100644
--- a/generators/ooo/debug.h
+++ b/generators/ooo/debug.h
@@ -10,7 +10,7 @@
#ifndef OOO_DEBUG_H
#define OOO_DEBUG_H
-#include <KDebug>
+#include <QDebug>
const int OooDebug = 4715;
#endif
diff --git a/generators/poppler/annots.cpp b/generators/poppler/annots.cpp
index 782bb29..c77d8b3 100644
--- a/generators/poppler/annots.cpp
+++ b/generators/poppler/annots.cpp
@@ -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;
}
diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp
index 112aa88..fba6308 100644
--- a/generators/poppler/generator_pdf.cpp
+++ b/generators/poppler/generator_pdf.cpp
@@ -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 )
diff --git a/generators/spectre/generator_ghostview.cpp b/generators/spectre/generator_ghostview.cpp
index b84e1e4..eb7617d 100644
--- a/generators/spectre/generator_ghostview.cpp
+++ b/generators/spectre/generator_ghostview.cpp
@@ -19,7 +19,7 @@
#include <kaboutdata.h>
#include <kconfigdialog.h>
-#include <kdebug.h>
+#include <QDebug>
#include <kmimetype.h>
#include <ktemporaryfile.h>
diff --git a/generators/spectre/rendererthread.cpp b/generators/spectre/rendererthread.cpp
index 64f207f..546c7a4 100644
--- a/generators/spectre/rendererthread.cpp
+++ b/generators/spectre/rendererthread.cpp
@@ -11,7 +11,7 @@
#include <qimage.h>
-#include <kdebug.h>
+#include <QDebug>
#include "core/generator.h"
#include "core/page.h"
diff --git a/generators/tiff/generator_tiff.cpp b/generators/tiff/generator_tiff.cpp
index 9052f6f..a1db245 100644
--- a/generators/tiff/generator_tiff.cpp
+++ b/generators/tiff/generator_tiff.cpp
@@ -19,7 +19,8 @@
#include <QtPrintSupport/QPrinter>
#include <kaboutdata.h>
-#include <kdebug.h>
+#include <QDebug>
+#include <KDebug>
#include <kglobal.h>
#include <klocale.h>
diff --git a/generators/txt/document.cpp b/generators/txt/document.cpp
index 29aa2db..3a6a4f8 100644
--- a/generators/txt/document.cpp
+++ b/generators/txt/document.cpp
@@ -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 );
}
diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp
index bdc563a..a39b3c7 100644
--- a/generators/xps/generator_xps.cpp
+++ b/generators/xps/generator_xps.cpp
@@ -28,6 +28,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kurl.h>
+#include <KDebug>
#include <QBuffer>
#include <QImageReader>
#include <QMutex>
diff --git a/part.cpp b/part.cpp
index 422ddd4..324d63f 100644
--- a/part.cpp
+++ b/part.cpp
@@ -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;
}
diff --git a/ui/annotationpropertiesdialog.cpp b/ui/annotationpropertiesdialog.cpp
index 5c0526f..390805b 100644
--- a/ui/annotationpropertiesdialog.cpp
+++ b/ui/annotationpropertiesdialog.cpp
@@ -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() );
diff --git a/ui/annotationwidgets.cpp b/ui/annotationwidgets.cpp
index c823bf1..9845204 100644
--- a/ui/annotationwidgets.cpp
+++ b/ui/annotationwidgets.cpp
@@ -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"
diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp
index 5eeb7e0..3d4475c 100644
--- a/ui/annotwindow.cpp
+++ b/ui/annotwindow.cpp
@@ -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>
diff --git a/ui/bookmarklist.cpp b/ui/bookmarklist.cpp
index 0aaada7..23d24a6 100644
--- a/ui/bookmarklist.cpp
+++ b/ui/bookmarklist.cpp
@@ -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 );
diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp
index 4724b8c..5782f1c 100644
--- a/ui/fileprinterpreview.cpp
+++ b/ui/fileprinterpreview.cpp
@@ -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 {
diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp
index e5f86e9..7a43206 100644
--- a/ui/formwidgets.cpp
+++ b/ui/formwidgets.cpp
@@ -19,6 +19,7 @@
#include <kstandardaction.h>
#include <kaction.h>
#include <kurl.h>
+#include <KDebug>
// local includes
#include "core/form.h"
diff --git a/ui/ktreeviewsearchline.cpp b/ui/ktreeviewsearchline.cpp
index 377de48..6493af6 100644
--- a/ui/ktreeviewsearchline.cpp
+++ b/ui/ktreeviewsearchline.cpp
@@ -33,7 +33,7 @@
#include <QtWidgets/QToolButton>
#include <QtWidgets/QTreeView>
-#include <kdebug.h>
+#include <QDebug>
#include <kiconloader.h>
#include <klocale.h>
#include <ktoolbar.h>
diff --git a/ui/latexrenderer.cpp b/ui/latexrenderer.cpp
index 6eaf500..3e5d4fb 100644
--- a/ui/latexrenderer.cpp
+++ b/ui/latexrenderer.cpp
@@ -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;
}
diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp
index b325f58..c59b96e 100644
--- a/ui/pagepainter.cpp
+++ b/ui/pagepainter.cpp
@@ -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>
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 70f5c76..58a8311 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -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 );
diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp
index 389c7af..8af0e42 100644
--- a/ui/pageviewannotator.cpp
+++ b/ui/pageviewannotator.cpp
@@ -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();
diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp
index 583284d..8b415de 100644
--- a/ui/presentationwidget.cpp
+++ b/ui/presentationwidget.cpp
@@ -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 );