mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
Port some missing debug output to categorized logging
This commit is contained in:
parent
fc47ce5620
commit
033f21c826
|
@ -732,7 +732,7 @@ bool DocumentPrivate::openRelativeFile( const QString & fileName )
|
|||
Generator * DocumentPrivate::loadGeneratorLibrary( const KPluginMetaData &service )
|
||||
{
|
||||
KPluginLoader loader( service.fileName() );
|
||||
qDebug() << service.fileName();
|
||||
qCDebug(OkularCoreDebug) << service.fileName();
|
||||
KPluginFactory *factory = loader.factory();
|
||||
if ( !factory )
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp)
|
|||
target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n)
|
||||
|
||||
add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
|
||||
set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp )
|
||||
set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp )
|
||||
ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test)
|
||||
target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>")
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ set(okular_SRCS
|
|||
${CMAKE_SOURCE_DIR}/ui/guiutils.cpp
|
||||
${CMAKE_SOURCE_DIR}/ui/tocmodel.cpp
|
||||
${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp
|
||||
${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp
|
||||
pageitem.cpp
|
||||
documentitem.cpp
|
||||
thumbnailitem.cpp
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <QIcon>
|
||||
|
||||
#include "annotationmodel.h"
|
||||
#include "debug_ui.h"
|
||||
|
||||
static quint32 mixIndex( int row, int column )
|
||||
{
|
||||
|
@ -289,7 +290,7 @@ class AuthorGroupItem
|
|||
QString prefix;
|
||||
for ( int i = 0; i < level; ++i ) prefix += QLatin1Char(' ');
|
||||
|
||||
qDebug( "%s%s", qPrintable( prefix ), ( mType == Page ? "Page" : (mType == Author ? "Author" : "Annotation") ) );
|
||||
qCDebug(OkularUiDebug, "%s%s", qPrintable( prefix ), ( mType == Page ? "Page" : (mType == Author ? "Author" : "Annotation") ) );
|
||||
|
||||
for ( int i = 0; i < mChilds.count(); ++i )
|
||||
mChilds[ i ]->dump( level + 2 );
|
||||
|
|
|
@ -92,7 +92,7 @@ QButtonGroup* FormWidgetsController::registerRadioButton( QAbstractButton *butto
|
|||
const QList< int >::const_iterator idsIt = qFind( (*it).ids, id );
|
||||
if ( idsIt != (*it).ids.constEnd() )
|
||||
{
|
||||
qDebug(OkularUiDebug) << "Adding id" << id << "To group including" << (*it).ids;
|
||||
qCDebug(OkularUiDebug) << "Adding id" << id << "To group including" << (*it).ids;
|
||||
(*it).group->addButton( button );
|
||||
(*it).group->setId( button, id );
|
||||
return (*it).group;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/observer.h"
|
||||
#include "core/tile.h"
|
||||
#include "settings_core.h"
|
||||
#include "ui/debug_ui.h"
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon(QLatin1String("okular"), KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) )
|
||||
|
||||
|
@ -881,7 +882,7 @@ void PagePainter::cropPixmapOnImage( QImage & dest, const QPixmap * src, const Q
|
|||
void PagePainter::recolor(QImage *image, const QColor &foreground, const QColor &background)
|
||||
{
|
||||
if (image->format() != QImage::Format_ARGB32_Premultiplied) {
|
||||
qWarning() << "Wrong image format! Converting...";
|
||||
qCWarning(OkularUiDebug) << "Wrong image format! Converting...";
|
||||
*image = image->convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
}
|
||||
|
||||
|
|
|
@ -1220,7 +1220,7 @@ void PageView::slotRealNotifyViewportChanged( bool smoothMove )
|
|||
}
|
||||
if ( !item )
|
||||
{
|
||||
qWarning() << "viewport for page" << vp.pageNumber << "has no matching item!";
|
||||
qCWarning(OkularUiDebug) << "viewport for page" << vp.pageNumber << "has no matching item!";
|
||||
d->blockViewport = false;
|
||||
return;
|
||||
}
|
||||
|
@ -2752,7 +2752,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
|
|||
{
|
||||
// request the textpage if there isn't one
|
||||
okularPage= item->page();
|
||||
qWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
|
||||
qCDebug(OkularUiDebug) << "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
|
||||
|
@ -2907,7 +2907,7 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
|
|||
{
|
||||
// request the textpage if there isn't one
|
||||
okularPage= item->page();
|
||||
qWarning() << "checking if page" << item->pageNumber() << "has text:" << okularPage->hasTextPage();
|
||||
qCDebug(OkularUiDebug) << "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
|
||||
|
|
|
@ -1661,9 +1661,9 @@ void PresentationWidget::inhibitPowerManagement()
|
|||
reply.waitForFinished();
|
||||
if (reply.isValid()) {
|
||||
m_screenInhibitCookie = reply.value();
|
||||
qDebug() << "Screen inhibition cookie" << m_screenInhibitCookie;
|
||||
qCDebug(OkularUiDebug) << "Screen inhibition cookie" << m_screenInhibitCookie;
|
||||
} else {
|
||||
qWarning() << "Unable to inhibit screensaver" << reply.error();
|
||||
qCWarning(OkularUiDebug) << "Unable to inhibit screensaver" << reply.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1683,7 +1683,7 @@ void PresentationWidget::inhibitPowerManagement()
|
|||
if (reply.isValid()) {
|
||||
m_sleepInhibitCookie = reply.value().fileDescriptor();
|
||||
} else {
|
||||
qWarning() << "Unable to inhibit sleep" << reply.error();
|
||||
qCWarning(OkularUiDebug) << "Unable to inhibit sleep" << reply.error();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue