Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d0ff8a26 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Don't use kDebug(***) anymore, use the defines from kis_debug.h. This way,

other people can always turn krita debug off, and krita developers have
it easy and can use easy-to-remember mnemonics.

svn path=/trunk/koffice/; revision=754910
parent 5ccb43f9
......@@ -19,7 +19,7 @@
#include "extensions_plugin.h"
#include <kdebug.h>
#include <kis_debug.h>
#include <kgenericfactory.h>
#include <KoColorTransformationFactoryRegistry.h>
......
......@@ -24,7 +24,7 @@
#include <half.h>
#endif
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoColorConversions.h>
......
......@@ -18,7 +18,7 @@
#include <QDomElement>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoIntegerMaths.h>
......
......@@ -18,7 +18,7 @@
#include <QDomElement>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoIntegerMaths.h>
......
......@@ -25,7 +25,7 @@
#include <QImage>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "kis_lms_f32_colorspace.h"
......
......@@ -18,7 +18,7 @@
#include <lcms.h>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoColorSpaceRegistry.h>
......
......@@ -18,7 +18,7 @@
#include <lcms.h>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "KoColorSpaceRegistry.h"
......
......@@ -21,7 +21,7 @@
#include <QDomElement>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "compositeops/KoCompositeOpOver.h"
......
......@@ -20,7 +20,7 @@
#include <QImage>
#include <QColor>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoIntegerMaths.h>
......
......@@ -20,7 +20,7 @@
#include <QImage>
#include <QColor>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoIntegerMaths.h>
......
......@@ -26,6 +26,7 @@ include_directories( ${KDE4_INCLUDE_DIR}/threadweaver/
set(kritaimage_LIB_SRCS
${libkritatile_SRCS}
kis_filter_mask.cpp
kis_node_action.cpp
kis_paintop_settings.cpp
kis_base_node.cpp
kis_node.cpp
......@@ -114,7 +115,7 @@ install(TARGETS kritaimage DESTINATION ${LIB_INSTALL_DIR})
########### install files ###############
# Don't install the header files for now
#install( FILES kis_debug_areas.h kis_global.h kis_annotation.h
#install( FILES kis_debug.h kis_global.h kis_annotation.h
#kis_shared_ptr_vector.h kis_undo_adapter.h kis_progress_subject.h
#kis_progress_display_interface.h kis_adjustment_layer.h
# kis_autobrush_resource.h
......
......@@ -17,13 +17,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include <kis_debug.h>
#include <kicon.h>
#include <QImage>
#include <klocale.h>
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_group_layer.h"
#include "kis_image.h"
#include "kis_layer.h"
......
......@@ -17,7 +17,7 @@
*/
#include "kis_autobrush_resource.h"
#include <kdebug.h>
#include <kis_debug.h>
#include <math.h>
#include <KoColor.h>
......
......@@ -26,7 +26,7 @@
#include <klocale.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <kdebug.h>
#include <kis_debug.h>
#include <KoID.h>
......@@ -34,7 +34,7 @@
#include <iso646.h>
#endif
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_serializable_configuration.h"
const KoID KisBookmarkedConfigurationManager::ConfigDefault = KoID("Default", i18n("Default"));
......@@ -71,13 +71,13 @@ KisSerializableConfiguration* KisBookmarkedConfigurationManager::load(QString co
doc.setContent( cfg.readEntry<QString>(configname, "") );
QDomElement e = doc.documentElement();
KisSerializableConfiguration* config = d->configFactory->create(e);
kDebug() << config << endl;
dbgImage << config << endl;
return config;
}
void KisBookmarkedConfigurationManager::save(QString configname, const KisSerializableConfiguration* config)
{
kDebug(DBG_AREA_IMAGE) << "Saving configuration " << config << " to " << configname;
dbgImage << "Saving configuration " << config << " to " << configname;
if(not config) return;
KConfigGroup cfg = KGlobal::config()->group(configEntryGroup());
cfg.writeEntry(configname,config->toXML());
......
......@@ -28,7 +28,7 @@
#include <QImage>
#include <QPoint>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoColor.h>
......
......@@ -20,7 +20,7 @@
#include <QImage>
#include <QVector>
#include <kdebug.h>
#include <kis_debug.h>
#include <KoColorSpace.h>
......
......@@ -22,7 +22,7 @@
#include <QString>
#include <kicon.h>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <KoColorSpace.h>
......
......@@ -35,7 +35,7 @@
#include <QString>
#include <QVector>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <QColor>
......
......@@ -18,24 +18,24 @@
#ifndef KIS_DEBUG_AREAS_H_
#define KIS_DEBUG_AREAS_H_
#include <kdebug.h>
/**
* In krita code, include kis_debug.h instead of kdebug.h. Then use one of the areas #defined here
* instead of the raw numbers. Also, try not to check in code outside of tests that uses kDebug
* without an area.
*/
#define DBG_AREA_IMAGE 41001
#define DBG_AREA_REGISTRY 40002
#define DBG_AREA_TOOLS 41003
#define DBG_AREA_CMS 41004
#define DBG_AREA_FILTERS 41005
#define DBG_AREA_PLUGINS 41006
#define DBG_AREA_UI 41007
#define DBG_AREA_FILE 41008
#define DBG_AREA_MATH 41009
#define DBG_AREA_RENDER 41010
#define DBG_AREA_SCRIPT 41011
#define dbgKrita kDebug(41000) // For temporary debug lines, where you'd have used dbgKrita before.
#define dbgImage kDebug(41001)
#define dbgRegistry kDebug(41002)
#define dbgTools kDebug(41003)
#define dbgTiles kDebug(41004)
#define dbgFilters kDebug(41005)
#define dbgPlugins kDebug(41006)
#define dbgUI kDebug(41007)
#define dbgFile kDebug(41008)
#define dbgMath kDebug(41009)
#define dbgRender kDebug(41010)
#define dbgScript kDebug(41011)
#endif
......@@ -35,11 +35,11 @@
#include <QRect>
#include <QString>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "kis_brush.h"
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_image.h"
#include "kis_layer.h"
#include "kis_paint_device.h"
......
......@@ -17,7 +17,7 @@
*/
#include "kis_filter.h"
#include <kdebug.h>
#include <kis_debug.h>
#include <qdom.h>
#include <QString>
......
......@@ -19,7 +19,7 @@
#include <QObject>
#include <QRect>
#include <kdebug.h>
#include <kis_debug.h>
#include <KoProgressUpdater.h>
#include <KoColorSpace.h>
......
......@@ -69,8 +69,8 @@ void KisFilterMask::setFilter(KisFilterConfiguration * filterConfig)
void KisFilterMask::apply( KisPaintDeviceSP projection, const QRect & rc ) const
{
// kDebug() << "applying filter mask on projection " << projection << " with rect " << rc;
// kDebug() << "and filter config " << m_d->filterConfig;
// dbgImage << "applying filter mask on projection " << projection << " with rect " << rc;
// dbgImage << "and filter config " << m_d->filterConfig;
Q_ASSERT( m_d->filterConfig );
if (!m_d->filterConfig) return;
......
......@@ -19,14 +19,14 @@
#include <QString>
#include <kaction.h>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include <kparts/plugin.h>
#include <kservice.h>
#include <kservicetypetrader.h>
#include <kparts/componentfactory.h>
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include <math.h>
#include "kis_types.h"
#include "kis_filter_registry.h"
......@@ -53,7 +53,7 @@ KisFilterRegistry::KisFilterRegistry()
KParts::Plugin* plugin =
KService::createInstance<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( !plugin ) {
kDebug(41006) <<"found plugin" << service->property("Name").toString() <<"," << errCode <<"";
dbgPlugins <<"found plugin" << service->property("Name").toString() <<"," << errCode <<"";
if( errCode == KLibLoader::ErrNoLibrary)
{
kWarning(41006) <<" Error loading plugin was : ErrNoLibrary" << KLibLoader::self()->lastErrorMessage();
......
......@@ -16,9 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_filter_strategy.h"
#include <math.h>
......
......@@ -41,7 +41,7 @@
#include <KoAbstractGradient.h>
#include "kis_brush.h"
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_image.h"
#include "kis_iterators_pixel.h"
#include "kis_layer.h"
......
......@@ -29,7 +29,7 @@
#include "kis_layer.h"
#include "kis_group_layer.h"
#include "kis_node_visitor.h"
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_image.h"
#include "kis_paint_device.h"
#include "kis_merge_visitor.h"
......
......@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include <kis_debug.h>
#include <QVector>
#include "kis_types.h"
......@@ -25,7 +25,7 @@
#include "kis_paint_layer.h"
#include "kis_iterators_pixel.h"
#include "KoColorSpace.h"
#include "kis_debug_areas.h"
#include "kis_debug.h"
KisHistogram::KisHistogram(const KisPaintLayerSP layer,
KoHistogramProducerSP producer,
......@@ -177,37 +177,37 @@ KisHistogram::Calculations KisHistogram::calculateSingleRange(int channel, doubl
void KisHistogram::dump() {
kDebug(DBG_AREA_MATH) <<"Histogram";
dbgMath <<"Histogram";
switch (m_type) {
case LINEAR:
kDebug(DBG_AREA_MATH) <<"Linear histogram";
dbgMath <<"Linear histogram";
break;
case LOGARITHMIC:
kDebug(DBG_AREA_MATH) <<"Logarithmic histogram";
dbgMath <<"Logarithmic histogram";
}
kDebug(DBG_AREA_MATH) <<"Dumping channel" << m_channel;
dbgMath <<"Dumping channel" << m_channel;
Calculations c = calculations();
/* for( int i = 0; i <256; ++i ) {
kDebug(DBG_AREA_MATH) <<"Value"
dbgMath <<"Value"
<< QString().setNum(i)
<< ": "
<< QString().setNum(m_values[i])
<< "\n";
}*/
kDebug(DBG_AREA_MATH) <<"";
kDebug(DBG_AREA_MATH) <<"Max:" << QString().setNum(c.getMax()) <<"";
kDebug(DBG_AREA_MATH) <<"Min:" << QString().setNum(c.getMin()) <<"";
kDebug(DBG_AREA_MATH) <<"High:" << QString().setNum(c.getHighest()) <<"";
kDebug(DBG_AREA_MATH) <<"Low:" << QString().setNum(c.getLowest()) <<"";
kDebug(DBG_AREA_MATH) <<"Mean:" << m_producer->positionToString(c.getMean()) <<"";
kDebug(DBG_AREA_MATH) <<"Total:" << QString().setNum(c.getTotal()) <<"";
// kDebug(DBG_AREA_MATH) <<"Median:" << QString().setNum(m_median) <<"";
// kDebug(DBG_AREA_MATH) <<"Stddev:" << QString().setNum(m_stddev) <<"";
// kDebug(DBG_AREA_MATH) <<"percentile:" << QString().setNum(m_percentile) <<"";
kDebug(DBG_AREA_MATH) <<"";
dbgMath <<"";
dbgMath <<"Max:" << QString().setNum(c.getMax()) <<"";
dbgMath <<"Min:" << QString().setNum(c.getMin()) <<"";
dbgMath <<"High:" << QString().setNum(c.getHighest()) <<"";
dbgMath <<"Low:" << QString().setNum(c.getLowest()) <<"";
dbgMath <<"Mean:" << m_producer->positionToString(c.getMean()) <<"";
dbgMath <<"Total:" << QString().setNum(c.getTotal()) <<"";
// dbgMath <<"Median:" << QString().setNum(m_median) <<"";
// dbgMath <<"Stddev:" << QString().setNum(m_stddev) <<"";
// dbgMath <<"percentile:" << QString().setNum(m_percentile) <<"";
dbgMath <<"";
}
......@@ -25,7 +25,7 @@
#include <QRegion>
#include <QBitArray>
#include <kdebug.h>
#include <kis_debug.h>
#include <kurl.h>
#include <KoColorConversionTransformation.h>
......
......@@ -19,7 +19,7 @@
#include <qglobal.h>
#include <kdebug.h>
#include <kis_debug.h>
#include "kis_iterator.h"
#include "kis_datamanager.h"
......
......@@ -25,7 +25,7 @@
#include <KoProperties.h>
#include "kis_debug_areas.h"
#include "kis_debug.h"
#include "kis_group_layer.h"
#include "kis_image.h"
#include "kis_layer.h"
......@@ -156,13 +156,13 @@ void KisLayer::setTemporary(bool t)
const KoCompositeOp * KisLayer::compositeOp() const
{
//kDebug() << m_d->compositeOp->description();
//dbgImage << m_d->compositeOp->description();
return m_d->compositeOp;
}
void KisLayer::setCompositeOp(const KoCompositeOp* compositeOp)
{
//kDebug() << "old: " << m_d->compositeOp->description() << ", new: " << compositeOp->description();
//dbgImage << "old: " << m_d->compositeOp->description() << ", new: " << compositeOp->description();
if (m_d->compositeOp != compositeOp)
{
m_d->compositeOp = const_cast<KoCompositeOp*>( compositeOp );
......
......@@ -20,7 +20,7 @@
#include <QDomNode>
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "kis_image.h"
......@@ -88,19 +88,19 @@ void KisMacro::fromXML(const QDomElement& docElem)
QString id = elt.attribute("id", "");
if(not id.isNull())
{
kDebug() << "Reconstruct : " << id << endl; // the node really is an element.
dbgImage << "Reconstruct : " << id << endl; // the node really is an element.
KisRecordedActionFactory* raf = KisRecordedActionFactoryRegistry::instance()->get(id);
if(raf)
{
d->actions.append( raf->fromXML( d->image, elt) );
} else {
kDebug() << "Unknown action : " << id << endl;
dbgImage << "Unknown action : " << id << endl;
}
} else {
kDebug() << "Invalid recorded action: null id";
dbgImage << "Invalid recorded action: null id";
}
} else {
kDebug() << "Unknown element " << elt.tagName() << (elt.tagName() == "RecordedAction");
dbgImage << "Unknown element " << elt.tagName() << (elt.tagName() == "RecordedAction");
}
node = node.nextSibling();
}
......
......@@ -17,7 +17,7 @@
*/
#include "kis_mask.h"
#include <kdebug.h>
#include <kis_debug.h>
#include <klocale.h>
#include "KoColorSpaceRegistry.h"
......
......@@ -191,7 +191,7 @@ public:
QRect tmpRc = m_rc;
KisPaintDeviceSP tempTarget = layer->temporaryTarget();
kDebug() << "tempTarget: " << tempTarget;
dbgImage << "tempTarget: " << tempTarget;
if (tempTarget) {
tmpRc = (layer->extent() | tempTarget->extent()) & tmpRc;
}
......@@ -199,7 +199,7 @@ public:
if (tmpRc.width() == 0 || tmpRc.height() == 0) // Don't even try
return true;
kDebug() << "Filtering on " << tmpRc;
dbgImage << "Filtering on " << tmpRc;
KisFilterConfiguration * cfg = layer->filter();
if (!cfg) return false;
......
......@@ -18,7 +18,7 @@
#include "kis_node_facade.h"
#include "kis_node_graph_listener.h"
#include "kis_node.h"
#include <kdebug.h>
#include <kis_debug.h>
class KisNodeFacade::Private
{
......
......@@ -27,7 +27,7 @@
#include <QString>
#include <QPaintDevice>