kdebug fixes

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695587
This commit is contained in:
Aaron J. Seigo 2007-08-02 13:12:59 +00:00
parent d40669a2d2
commit ac918ad4bf
16 changed files with 67 additions and 67 deletions

View File

@ -116,11 +116,11 @@ AbstractRunner::List AbstractRunner::loadRunners( QWidget* parent )
foreach ( KService::Ptr service, offers ) { foreach ( KService::Ptr service, offers ) {
AbstractRunner* runner = KService::createInstance<AbstractRunner>( service, parent ); AbstractRunner* runner = KService::createInstance<AbstractRunner>( service, parent );
if ( runner ) { if ( runner ) {
kDebug() << "loaded runner : " << service->name() << endl ; kDebug() << "loaded runner : " << service->name();
runners.append( runner ); runners.append( runner );
} }
else { else {
kDebug() << "failed to load runner : " << service->name() << endl ; kDebug() << "failed to load runner : " << service->name();
} }
} }

View File

@ -120,7 +120,7 @@ void Animator::slideOut(qreal progress, QGraphicsItem *item, const QPoint &desti
{ {
//FIXME: rewrite //FIXME: rewrite
Q_UNUSED(progress); Q_UNUSED(progress);
//kDebug()<<k_funcinfo<<endl; //kDebug()<<k_funcinfo;
item->translate(destination.x(), destination.y()); item->translate(destination.x(), destination.y());
} }

View File

@ -386,7 +386,7 @@ const Package* Applet::package() const
void Applet::constraintsUpdated() void Applet::constraintsUpdated()
{ {
kDebug() << "Applet::constraintsUpdate(): constraints are FormFactor: " << formFactor() << ", Location: " << location() << endl; kDebug() << "Applet::constraintsUpdate(): constraints are FormFactor: " << formFactor() << ", Location: " << location();
} }
QString Applet::name() const QString Applet::name() const
@ -607,7 +607,7 @@ void Applet::paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *o
if (d->scriptEngine) { if (d->scriptEngine) {
d->scriptEngine->paintInterface(painter, option); d->scriptEngine->paintInterface(painter, option);
} else { } else {
//kDebug() << "Applet::paintInterface() default impl" << endl; //kDebug() << "Applet::paintInterface() default impl";
} }
} }
@ -755,14 +755,14 @@ KPluginInfo::List Applet::knownApplets(const QString &category,
} }
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
//kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches" << endl; //kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
return KPluginInfo::fromServices(offers); return KPluginInfo::fromServices(offers);
} }
KPluginInfo::List Applet::knownAppletsForMimetype(const QString &mimetype) KPluginInfo::List Applet::knownAppletsForMimetype(const QString &mimetype)
{ {
QString constraint = QString("'%1' in [X-Plasma-Mimetypes]").arg(mimetype); QString constraint = QString("'%1' in [X-Plasma-Mimetypes]").arg(mimetype);
kDebug() << constraint << endl; kDebug() << constraint;
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
return KPluginInfo::fromServices(offers); return KPluginInfo::fromServices(offers);
} }
@ -781,7 +781,7 @@ QStringList Applet::knownCategories(const QString &parentApp)
QStringList categories; QStringList categories;
foreach (KService::Ptr applet, offers) { foreach (KService::Ptr applet, offers) {
QString appletCategory = applet->property("X-KDE-PluginInfo-Category").toString(); QString appletCategory = applet->property("X-KDE-PluginInfo-Category").toString();
kDebug() << " and we have " << appletCategory << endl; kDebug() << " and we have " << appletCategory;
if (appletCategory.isEmpty()) { if (appletCategory.isEmpty()) {
if (!categories.contains(i18n("Misc"))) { if (!categories.contains(i18n("Misc"))) {
categories << i18n("Misc"); categories << i18n("Misc");
@ -807,7 +807,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QStri
if (offers.isEmpty()) { if (offers.isEmpty()) {
//TODO: what would be -really- cool is offer to try and download the applet //TODO: what would be -really- cool is offer to try and download the applet
// from the network at this point // from the network at this point
kDebug() << "Applet::loadApplet: offers is empty for \"" << appletName << "\"" << endl; kDebug() << "Applet::loadApplet: offers is empty for \"" << appletName << "\"";
return 0; return 0;
} }
@ -822,7 +822,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QStri
Applet* applet = KService::createInstance<Plasma::Applet>(offers.first(), 0, allArgs); Applet* applet = KService::createInstance<Plasma::Applet>(offers.first(), 0, allArgs);
if (!applet) { if (!applet) {
kDebug() << "Couldn't load applet \"" << appletName << "\"!" << endl; kDebug() << "Couldn't load applet \"" << appletName << "\"!";
} }
return applet; return applet;

View File

@ -164,14 +164,14 @@ bool ConfigXmlHandler::startElement(const QString &namespaceURI, const QString &
Q_UNUSED(namespaceURI) Q_UNUSED(namespaceURI)
Q_UNUSED(qName) Q_UNUSED(qName)
// kDebug() << "ConfigXmlHandler::startElement(" << localName << " " << qName << endl; // kDebug() << "ConfigXmlHandler::startElement(" << localName << qName;
int numAttrs = attrs.count(); int numAttrs = attrs.count();
QString tag = localName.toLower(); QString tag = localName.toLower();
if (tag == "group") { if (tag == "group") {
for (int i = 0; i < numAttrs; ++i) { for (int i = 0; i < numAttrs; ++i) {
QString name = attrs.localName(i).toLower(); QString name = attrs.localName(i).toLower();
if (name == "name") { if (name == "name") {
kDebug() << "set group to " << attrs.value(i) << endl; kDebug() << "set group to " << attrs.value(i);
m_config->setCurrentGroup(attrs.value(i)); m_config->setCurrentGroup(attrs.value(i));
} }
} }
@ -213,7 +213,7 @@ bool ConfigXmlHandler::endElement(const QString &namespaceURI, const QString &lo
Q_UNUSED(namespaceURI) Q_UNUSED(namespaceURI)
Q_UNUSED(qName) Q_UNUSED(qName)
// kDebug() << "ConfigXmlHandler::endElement(" << localName << " " << qName << endl; // kDebug() << "ConfigXmlHandler::endElement(" << localName << qName;
QString tag = localName.toLower(); QString tag = localName.toLower();
if (tag == "entry") { if (tag == "entry") {
addItem(); addItem();

View File

@ -126,7 +126,7 @@ void Corona::setFormFactor(FormFactor formFactor)
return; return;
} }
//kDebug() << "switching FF to " << formFactor << endl; //kDebug() << "switching FF to " << formFactor;
d->formFactor = formFactor; d->formFactor = formFactor;
delete d->layout; delete d->layout;
d->layout = 0; d->layout = 0;
@ -143,7 +143,7 @@ void Corona::setFormFactor(FormFactor formFactor)
case MediaCenter: case MediaCenter:
break; break;
default: default:
kDebug() << "This can't be happening!" << endl; kDebug() << "This can't be happening!";
break; break;
} }
@ -173,7 +173,7 @@ Applet* Corona::addApplet(const QString& name, const QStringList& args)
{ {
Applet* applet = Applet::loadApplet(name, 0, args); Applet* applet = Applet::loadApplet(name, 0, args);
if (!applet) { if (!applet) {
kDebug() << "Applet " << name << " could not be loaded." << endl; kDebug() << "Applet " << name << " could not be loaded.";
applet = new Applet; applet = new Applet;
applet->setFailedToLaunch(true); applet->setFailedToLaunch(true);
} }
@ -201,13 +201,13 @@ void Corona::addKaramba(const KUrl& path)
addItem(karamba); addItem(karamba);
Phase::self()->animateItem(karamba, Phase::Appear); Phase::self()->animateItem(karamba, Phase::Appear);
} else { } else {
kDebug() << "Karamba " << path << " could not be loaded." << endl; kDebug() << "Karamba " << path << " could not be loaded.";
} }
} }
void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event) void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
{ {
kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)" << endl; kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
if (event->mimeData()->hasFormat("text/x-plasmoidservicename") || if (event->mimeData()->hasFormat("text/x-plasmoidservicename") ||
KUrl::List::canDecode(event->mimeData())) { KUrl::List::canDecode(event->mimeData())) {
event->acceptProposedAction(); event->acceptProposedAction();
@ -224,7 +224,7 @@ void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
void Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) void Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
{ {
kDebug() << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)" << endl; kDebug() << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)";
//TODO If an established Applet is dragged out of the Corona, remove it and //TODO If an established Applet is dragged out of the Corona, remove it and
// create a QDrag type thing to keep the Applet's settings // create a QDrag type thing to keep the Applet's settings
} }
@ -234,12 +234,12 @@ void Corona::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
QGraphicsScene::dragMoveEvent(event); QGraphicsScene::dragMoveEvent(event);
event->accept(); event->accept();
kDebug() << "Corona::dragMoveEvent(QDragMoveEvent* event)" << endl; kDebug() << "Corona::dragMoveEvent(QDragMoveEvent* event)";
} }
void Corona::dropEvent(QGraphicsSceneDragDropEvent *event) void Corona::dropEvent(QGraphicsSceneDragDropEvent *event)
{ {
kDebug() << "Corona::dropEvent(QDropEvent* event)" << endl; kDebug() << "Corona::dropEvent(QDropEvent* event)";
if (event->mimeData()->hasFormat("text/x-plasmoidservicename")) { if (event->mimeData()->hasFormat("text/x-plasmoidservicename")) {
//TODO This will pretty much move into dragEnterEvent() //TODO This will pretty much move into dragEnterEvent()
QString plasmoidName; QString plasmoidName;
@ -258,7 +258,7 @@ void Corona::dropEvent(QGraphicsSceneDragDropEvent *event)
foreach (const KUrl& url, urls) { foreach (const KUrl& url, urls) {
KMimeType::Ptr mime = KMimeType::findByUrl(url); KMimeType::Ptr mime = KMimeType::findByUrl(url);
QString mimeName = mime->name(); QString mimeName = mime->name();
// kDebug() << mimeName << endl; // kDebug() << mimeName;
KPluginInfo::List appletList = Applet::knownAppletsForMimetype(mimeName); KPluginInfo::List appletList = Applet::knownAppletsForMimetype(mimeName);

View File

@ -124,7 +124,7 @@ DataEngine::DataEngine(QObject* parent)
DataEngine::~DataEngine() DataEngine::~DataEngine()
{ {
//kDebug() << objectName() << ": bye bye birdy! " << endl; //kDebug() << objectName() << ": bye bye birdy! ";
delete d; delete d;
} }
@ -201,7 +201,7 @@ void DataEngine::startInit()
void DataEngine::init() void DataEngine::init()
{ {
// kDebug() << "DataEngine::init() called " << endl; // kDebug() << "DataEngine::init() called ";
// default implementation does nothing. this is for engines that have to // default implementation does nothing. this is for engines that have to
// start things in motion external to themselves before they can work // start things in motion external to themselves before they can work
} }
@ -258,7 +258,7 @@ void DataEngine::addSource(DataContainer* source)
{ {
SourceDict::const_iterator it = d->sources.find(source->objectName()); SourceDict::const_iterator it = d->sources.find(source->objectName());
if (it != d->sources.constEnd()) { if (it != d->sources.constEnd()) {
kDebug() << "source named \"" << source->objectName() << "\" already exists." << endl; kDebug() << "source named \"" << source->objectName() << "\" already exists.";
return; return;
} }
@ -283,7 +283,7 @@ void DataEngine::setSourceLimit(uint limit)
void DataEngine::removeSource(const QString& source) void DataEngine::removeSource(const QString& source)
{ {
//kDebug() << "removing source " << source << endl; //kDebug() << "removing source " << source;
SourceDict::iterator it = d->sources.find(source); SourceDict::iterator it = d->sources.find(source);
if (it != d->sources.end()) { if (it != d->sources.end()) {
emit sourceRemoved(it.key()); emit sourceRemoved(it.key());

View File

@ -120,13 +120,13 @@ Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
constraint); constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug() << "offers are empty for " << name << " with constraint " << constraint << endl; kDebug() << "offers are empty for " << name << " with constraint " << constraint;
} else { } else {
engine = KService::createInstance<Plasma::DataEngine>(offers.first(), 0); engine = KService::createInstance<Plasma::DataEngine>(offers.first(), 0);
} }
if (!engine) { if (!engine) {
kDebug() << "Couldn't load engine \"" << name << "\"!" << endl; kDebug() << "Couldn't load engine \"" << name << "\"!";
return d->nullEngine(); return d->nullEngine();
} }

View File

@ -182,7 +182,7 @@ void Phase::appletDestroyed(QObject* o)
void Phase::animateItem(QGraphicsItem* item, Animation animation) void Phase::animateItem(QGraphicsItem* item, Animation animation)
{ {
//kDebug()<<k_funcinfo<<endl; //kDebug()<<k_funcinfo;
// get rid of any existing animations on this item. // get rid of any existing animations on this item.
//TODO: shoudl we allow multiple anims per item? //TODO: shoudl we allow multiple anims per item?
QMap<QGraphicsItem*, AnimationState*>::iterator it = d->animatedItems.find(item); QMap<QGraphicsItem*, AnimationState*>::iterator it = d->animatedItems.find(item);
@ -221,7 +221,7 @@ void Phase::animateItem(QGraphicsItem* item, Animation animation)
void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination) void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination)
{ {
//kDebug()<<k_funcinfo<<endl; //kDebug()<<k_funcinfo;
QMap<QGraphicsItem*, MovementState*>::iterator it = d->movingItems.find(item); QMap<QGraphicsItem*, MovementState*>::iterator it = d->movingItems.find(item);
if (it != d->movingItems.end()) { if (it != d->movingItems.end()) {
delete it.value(); delete it.value();
@ -268,7 +268,7 @@ void Phase::render(QGraphicsItem* item, QImage& image, RenderOp op)
Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animation) Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animation)
{ {
//kDebug() << "startElementAnimation(AnimId " << animation << ")" << endl; //kDebug() << "startElementAnimation(AnimId " << animation << ")";
ElementAnimationState *state = new ElementAnimationState; ElementAnimationState *state = new ElementAnimationState;
state->item = item; state->item = item;
state->curve = d->animator->curve(animation); state->curve = d->animator->curve(animation);
@ -281,7 +281,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
state->currentInterval = state->interval; state->currentInterval = state->interval;
state->id = ++d->animId; state->id = ++d->animId;
//kDebug() << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames << endl; //kDebug() << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames;
bool needTimer = true; bool needTimer = true;
if (state->frames < 1) { if (state->frames < 1) {
state->frames = 1; state->frames = 1;
@ -292,7 +292,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
d->animatedElements[state->id] = state; d->animatedElements[state->id] = state;
state->item->update(); state->item->update();
//kDebug() << "startElementAnimation(AnimId " << animation << ") returning " << state->id << endl; //kDebug() << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
if (needTimer && !d->timerId) { if (needTimer && !d->timerId) {
// start a 20fps timer; // start a 20fps timer;
//TODO: should be started at the maximum frame rate needed only? //TODO: should be started at the maximum frame rate needed only?
@ -309,7 +309,7 @@ void Phase::stopElementAnimation(AnimId id)
delete it.value(); delete it.value();
d->animatedElements.erase(it); d->animatedElements.erase(it);
} }
//kDebug() << "stopElementAnimation(AnimId " << id << ") done" << endl; //kDebug() << "stopElementAnimation(AnimId " << id << ") done";
} }
void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap) void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
@ -317,7 +317,7 @@ void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
QMap<AnimId, ElementAnimationState*>::iterator it = d->animatedElements.find(id); QMap<AnimId, ElementAnimationState*>::iterator it = d->animatedElements.find(id);
if (it == d->animatedElements.end()) { if (it == d->animatedElements.end()) {
kDebug() << "Phase::setAnimationPixmap(" << id << ") found no entry for it!" << endl; kDebug() << "Phase::setAnimationPixmap(" << id << ") found no entry for it!";
return; return;
} }
@ -329,16 +329,16 @@ QPixmap Phase::animationResult(AnimId id)
QMap<AnimId, ElementAnimationState*>::const_iterator it = d->animatedElements.find(id); QMap<AnimId, ElementAnimationState*>::const_iterator it = d->animatedElements.find(id);
if (it == d->animatedElements.constEnd()) { if (it == d->animatedElements.constEnd()) {
//kDebug() << "Phase::animationResult(" << id << ") found no entry for it!" << endl; //kDebug() << "Phase::animationResult(" << id << ") found no entry for it!";
return QPixmap(); return QPixmap();
} }
ElementAnimationState* state = it.value(); ElementAnimationState* state = it.value();
qreal progress = state->frames; qreal progress = state->frames;
//kDebug() << "Phase::animationResult(" << id << " at " << progress << endl; //kDebug() << "Phase::animationResult(" << id << " at " << progress;
progress = state->currentFrame / progress; progress = state->currentFrame / progress;
progress = qMin(1.0, qMax(0.0, progress)); progress = qMin(1.0, qMax(0.0, progress));
//kDebug() << "Phase::animationResult(" << id << " at " << progress << endl; //kDebug() << "Phase::animationResult(" << id << " at " << progress;
switch (state->animation) { switch (state->animation) {
case ElementAppear: case ElementAppear:
@ -361,7 +361,7 @@ void Phase::timerEvent(QTimerEvent *event)
elapsed = d->time.elapsed(); elapsed = d->time.elapsed();
} }
d->time.restart(); d->time.restart();
//kDebug() << "timeEvent, elapsed time: " << elapsed << endl; //kDebug() << "timeEvent, elapsed time: " << elapsed;
foreach (AnimationState* state, d->animatedItems) { foreach (AnimationState* state, d->animatedItems) {
if (state->currentInterval <= elapsed) { if (state->currentInterval <= elapsed) {
@ -398,7 +398,7 @@ void Phase::timerEvent(QTimerEvent *event)
qreal progress = state->frames; qreal progress = state->frames;
progress = state->currentFrame / progress; progress = state->currentFrame / progress;
progress = qMin(1.0, qMax(0.0, progress)); progress = qMin(1.0, qMax(0.0, progress));
//kDebug()<<progress<<endl; //kDebug()<<progress;
d->performMovement(progress, state); d->performMovement(progress, state);
state->currentInterval = state->interval; state->currentInterval = state->interval;
animationsRemain = true; animationsRemain = true;

View File

@ -92,7 +92,7 @@ const Package* ScriptEngine::package() const
QStringList ScriptEngine::knownLanguages() QStringList ScriptEngine::knownLanguages()
{ {
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine"); KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine");
//kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches" << endl; //kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
QStringList languages; QStringList languages;
foreach (KService::Ptr service, offers) { foreach (KService::Ptr service, offers) {
@ -115,7 +115,7 @@ ScriptEngine* ScriptEngine::load(const QString &language, Applet *applet)
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug() << "ScriptEngine::load: no offers for \"" << language << "\"" << endl; kDebug() << "ScriptEngine::load: no offers for \"" << language << "\"";
return 0; return 0;
} }
@ -129,7 +129,7 @@ ScriptEngine* ScriptEngine::load(const QString &language, Applet *applet)
} }
if (!engine) { if (!engine) {
kDebug() << "Couldn't load script engine for language " << language << "!" << endl; kDebug() << "Couldn't load script engine for language " << language << "!";
return 0; return 0;
} }

18
svg.cpp
View File

@ -52,7 +52,7 @@ class SharedSvgRenderer : public KSvgRenderer, public QSharedData
~SharedSvgRenderer() ~SharedSvgRenderer()
{ {
kDebug() << "leaving this world for a better one." << endl; kDebug() << "leaving this world for a better one.";
} }
}; };
@ -68,7 +68,7 @@ class Svg::Private
themed = false; themed = false;
if (!QFile::exists(path)) { if (!QFile::exists(path)) {
kDebug() << "Plasma::Svg: file '" << path << "' does not exist!" << endl; kDebug() << "Plasma::Svg: file '" << path << "' does not exist!";
} }
} else { } else {
themePath = imagePath; themePath = imagePath;
@ -106,13 +106,13 @@ class Svg::Private
if (!elementId.isEmpty()) { if (!elementId.isEmpty()) {
id.append(elementId); id.append(elementId);
} }
//kDebug() << "id is " << id << endl; //kDebug() << "id is " << id;
if (QPixmapCache::find(id, p)) { if (QPixmapCache::find(id, p)) {
//kDebug() << "found cached version of " << id << endl; //kDebug() << "found cached version of " << id;
return; return;
} else { } else {
//kDebug() << "didn't find cached version of " << id << ", so re-rendering" << endl; //kDebug() << "didn't find cached version of " << id << ", so re-rendering";
} }
// we have to re-render this puppy // we have to re-render this puppy
@ -122,7 +122,7 @@ class Svg::Private
} else { } else {
s = elementSize(elementId); s = elementSize(elementId);
} }
//kDebug() << "size for " << elementId << " is " << s << endl; //kDebug() << "size for " << elementId << " is " << s;
p = QPixmap(s); p = QPixmap(s);
p.fill(Qt::transparent); p.fill(Qt::transparent);
@ -150,7 +150,7 @@ class Svg::Private
QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = renderers.find(path); QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = renderers.find(path);
if (it != renderers.end()) { if (it != renderers.end()) {
//kDebug() << "gots us an existing one!" << endl; //kDebug() << "gots us an existing one!";
renderer = it.value(); renderer = it.value();
} else { } else {
renderer = new SharedSvgRenderer(path); renderer = new SharedSvgRenderer(path);
@ -212,7 +212,7 @@ void Svg::paint(QPainter* painter, const QPointF& point, const QString& elementI
{ {
QPixmap pix; QPixmap pix;
d->findInCache(pix, elementID); d->findInCache(pix, elementID);
//kDebug() << "pix size is " << pix.size() << endl; //kDebug() << "pix size is " << pix.size();
painter->drawPixmap(QRectF(point, pix.size()), pix, QRectF(QPointF(0,0), pix.size())); painter->drawPixmap(QRectF(point, pix.size()), pix, QRectF(QPointF(0,0), pix.size()));
} }
@ -225,7 +225,7 @@ void Svg::paint(QPainter* painter, const QRectF& rect, const QString& elementID)
{ {
QPixmap pix; QPixmap pix;
d->findInCache(pix, elementID); d->findInCache(pix, elementID);
//kDebug() << "pix size is " << pix.size() << endl; //kDebug() << "pix size is " << pix.size();
painter->drawPixmap(rect, pix, QRectF(QPointF(0,0), pix.size())); painter->drawPixmap(rect, pix, QRectF(QPointF(0,0), pix.size()));
} }

View File

@ -54,11 +54,11 @@ qreal HBoxLayout::widthForHeight(qreal w) const
void HBoxLayout::setGeometry(const QRectF& geometry) void HBoxLayout::setGeometry(const QRectF& geometry)
{ {
if (!geometry.isValid() || geometry.isEmpty()) { if (!geometry.isValid() || geometry.isEmpty()) {
kDebug() << "Invalid Geometry " << geometry << endl; kDebug() << "Invalid Geometry " << geometry;
return; return;
} }
//kDebug() << this << " Geometry process " << geometry << " for " << children().count() << " childrens"<< endl; //kDebug() << this << " Geometry process " << geometry << " for " << children().count() << " childrens";
QList<LayoutItem *> fixedChildren; QList<LayoutItem *> fixedChildren;
QList<LayoutItem *> expandingChildren; QList<LayoutItem *> expandingChildren;
@ -93,7 +93,7 @@ void HBoxLayout::setGeometry(const QRectF& geometry)
for (int i = 0; i < sizes.size(); i++) { for (int i = 0; i < sizes.size(); i++) {
LayoutItem *l = itemAt(i); LayoutItem *l = itemAt(i);
kDebug() << "Setting Geometry for child " << l << " to " << QRectF(start, sizes[i]) << endl; kDebug() << "Setting Geometry for child " << l << " to " << QRectF(start, sizes[i]);
l->setGeometry(QRectF(start, sizes[i])); l->setGeometry(QRectF(start, sizes[i]));
start += QPointF(sizes[i].width() + spacing(), 0.0); start += QPointF(sizes[i].width() + spacing(), 0.0);
} }

View File

@ -305,7 +305,7 @@ bool IconAction::event(QEvent::Type type, const QPointF &pos)
break; break;
case QEvent::MouseButtonRelease: { case QEvent::MouseButtonRelease: {
kDebug() << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected() << endl; kDebug() << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected();
bool wasSelected = isSelected(); bool wasSelected = isSelected();
setSelected(false); setSelected(false);
if (wasSelected) { if (wasSelected) {
@ -387,7 +387,7 @@ void Icon::addAction(QAction *action)
{ {
int count = d->cornerActions.count(); int count = d->cornerActions.count();
if (count > 3) { if (count > 3) {
kDebug() << "Icon::addAction(QAction*) no more room for more actions!" << endl; kDebug() << "Icon::addAction(QAction*) no more room for more actions!";
} }
IconAction* iconAction = new IconAction(this, action); IconAction* iconAction = new IconAction(this, action);
@ -689,7 +689,7 @@ bool Icon::isDown()
void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event) void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
kDebug() << "Icon::mousePressEvent " << endl; kDebug() << "Icon::mousePressEvent ";
foreach (IconAction *action, d->cornerActions) { foreach (IconAction *action, d->cornerActions) {
action->event(event->type(), event->pos()); action->event(event->type(), event->pos());
} }
@ -702,7 +702,7 @@ kDebug() << "Icon::mousePressEvent " << endl;
void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{ {
bool inside = boundingRect().contains(event->pos()); bool inside = boundingRect().contains(event->pos());
kDebug() << "Icon::mouseReleaseEvent " << inside << endl; kDebug() << "Icon::mouseReleaseEvent " << inside;
Private::ButtonState was = d->state; Private::ButtonState was = d->state;
if (inside) { if (inside) {
d->state = Private::HoverState; d->state = Private::HoverState;

View File

@ -79,7 +79,7 @@ qreal LayoutItem::widthForHeight(qreal h) const
void LayoutItem::setLayout(Layout* layout) void LayoutItem::setLayout(Layout* layout)
{ {
if (d->layout && layout) { if (d->layout && layout) {
kDebug() << k_funcinfo << " already have a layout." << endl; kDebug() << k_funcinfo << " already have a layout.";
return; return;
} }

View File

@ -154,7 +154,7 @@ qreal LineEdit::heightForWidth(qreal w) const
QTextDocument* doc = document(); QTextDocument* doc = document();
doc->setTextWidth(w); doc->setTextWidth(w);
qreal height = doc->size().height(); qreal height = doc->size().height();
kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height << endl; kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height;
return height; return height;
} }
@ -182,7 +182,7 @@ void LineEdit::setGeometry(const QRectF& geometry)
QSizeF LineEdit::sizeHint() const QSizeF LineEdit::sizeHint() const
{ {
kDebug() << "LineEdit::sizeeHint() " << document()->size() << endl; kDebug() << "LineEdit::sizeeHint() " << document()->size();
return document()->size(); return document()->size();
} }

View File

@ -54,12 +54,12 @@ qreal VBoxLayout::heightForWidth(qreal w) const
void VBoxLayout::setGeometry(const QRectF& geometry) void VBoxLayout::setGeometry(const QRectF& geometry)
{ {
if (!geometry.isValid() || geometry.isEmpty()) { if (!geometry.isValid() || geometry.isEmpty()) {
kDebug() << "Invalid Geometry " << geometry << endl; kDebug() << "Invalid Geometry " << geometry;
BoxLayout::setGeometry(geometry); BoxLayout::setGeometry(geometry);
return; return;
} }
kDebug() << this << " Geometry process " << geometry << " for " << children().count() << " children"<< endl; kDebug() << this << " Geometry process " << geometry << " for " << children().count() << " children";
QList<LayoutItem *> fixedChildren; QList<LayoutItem *> fixedChildren;
QList<LayoutItem *> expandingChildren; QList<LayoutItem *> expandingChildren;
@ -67,7 +67,7 @@ void VBoxLayout::setGeometry(const QRectF& geometry)
QSizeF available = geometry.size() - QSizeF(2 * margin(), 2 * margin()); QSizeF available = geometry.size() - QSizeF(2 * margin(), 2 * margin());
foreach (LayoutItem *l, children()) { foreach (LayoutItem *l, children()) {
kDebug() << "testing layout item " << l << endl; kDebug() << "testing layout item " << l;
if (l->expandingDirections() & Qt::Vertical) { if (l->expandingDirections() & Qt::Vertical) {
expandingChildren.append(l); expandingChildren.append(l);
} else { } else {
@ -98,7 +98,7 @@ void VBoxLayout::setGeometry(const QRectF& geometry)
for (int i = 0; i < sizes.size(); i++) { for (int i = 0; i < sizes.size(); i++) {
LayoutItem *l = itemAt(i); LayoutItem *l = itemAt(i);
kDebug() << "Setting Geometry for child " << l << " to " << QRectF(start, sizes[i]) << endl; kDebug() << "Setting Geometry for child " << l << " to " << QRectF(start, sizes[i]);
l->setGeometry(QRectF(start, sizes[i])); l->setGeometry(QRectF(start, sizes[i]));
start += QPointF(0.0, sizes[i].height() + spacing()); start += QPointF(0.0, sizes[i].height() + spacing());

View File

@ -147,7 +147,7 @@ void Widget::setGeometry(const QRectF& geometry)
void Widget::updateGeometry() void Widget::updateGeometry()
{ {
if (layout()) { if (layout()) {
kDebug() << (void *) this << " updating geometry to " << size() << endl; kDebug() << (void *) this << " updating geometry to " << size();
layout()->setGeometry(geometry()); layout()->setGeometry(geometry());
} }
} }