remove the use of 1209 explicitly now that i have Winter's Magic Formula for default debug space. makes backporting way easier; sorry for the noise of the earlier commit. suppose i should read planetkde.org more closely ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758498
This commit is contained in:
Aaron J. Seigo 2008-01-08 01:25:09 +00:00
parent d01c48e722
commit ee32d3c996
28 changed files with 163 additions and 163 deletions

View File

@ -164,7 +164,7 @@ AbstractRunner::List AbstractRunner::loadRunners(QObject* parent, const QStringL
if( whitelist.empty() || whitelist.contains( service->name() ) ) {
AbstractRunner* runner = service->createInstance<AbstractRunner>(parent, QVariantList(), &error);
if (runner) {
//kDebug(1209) << "loaded runner : " << service->name();
//kDebug() << "loaded runner : " << service->name();
QString phase = service->property("X-Plasma-RunnerPhase").toString();
if (phase == "last") {
lastRunners.append(runner);
@ -175,7 +175,7 @@ AbstractRunner::List AbstractRunner::loadRunners(QObject* parent, const QStringL
}
}
else {
kDebug(1209) << "failed to load runner : " << service->name() << ". error reported: " << error;
kDebug() << "failed to load runner : " << service->name() << ". error reported: " << error;
}
}
}

View File

@ -118,7 +118,7 @@ void Animator::slideIn(qreal progress, QGraphicsItem *item, const QPoint &start,
void Animator::slideOut(qreal progress, QGraphicsItem *item, const QPoint &start, const QPoint &destination)
{
//kDebug(1209);
//kDebug();
double x = start.x() + (destination.x() - start.x()) * progress;
double y = start.y() + (destination.y() - start.y()) * progress;
item->setPos(x, y);

View File

@ -137,7 +137,7 @@ public:
appletDescription.pluginName(), appletDescription.name()));
} else {
// create the package and see if we have something real
//kDebug(1209) << "trying for" << path;
//kDebug() << "trying for" << path;
package = new Package(path, PlasmoidStructure());
if (package->isValid()) {
// now we try and set up the script engine.
@ -345,7 +345,7 @@ public:
Q_ASSERT(asContainment);
KConfigGroup containmentConfig;
//kDebug(1209) << "got a corona, baby?" << (QObject*)asContainment->corona();
//kDebug() << "got a corona, baby?" << (QObject*)asContainment->corona();
if (asContainment->corona()) {
containmentConfig = KConfigGroup(asContainment->corona()->config(), "Containments");
} else {
@ -457,7 +457,7 @@ void Applet::save(KConfigGroup* group) const
group->writeEntry("plugin", pluginName());
//FIXME: for containments, we need to have some special values here w/regards to
// screen affinity (e.g. "bottom of screen 0")
//kDebug(1209) << pluginName() << "geometry is" << geometry() << "pos is" << pos() << "bounding rect is" << boundingRect();
//kDebug() << pluginName() << "geometry is" << geometry() << "pos is" << pos() << "bounding rect is" << boundingRect();
group->writeEntry("geometry", geometry());
if (transform() == QTransform()) {
@ -517,7 +517,7 @@ KConfigGroup Applet::globalConfig() const
void Applet::destroy()
{
//kDebug(1209) << "???????????????? DESTROYING APPLET" << name() << " ???????????????????????????";
//kDebug() << "???????????????? DESTROYING APPLET" << name() << " ???????????????????????????";
if (d->configXml) {
d->configXml->setDefaults();
}
@ -566,7 +566,7 @@ void Applet::updateConstraints(Plasma::Constraints constraints)
void Applet::constraintsUpdated(Plasma::Constraints constraints)
{
Q_UNUSED(constraints)
//kDebug(1209) << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location();
//kDebug() << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location();
}
QString Applet::name() const
@ -780,7 +780,7 @@ void Applet::flushUpdatedConstraints()
return;
}
//kDebug(1209) << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
Plasma::Constraints c = d->pendingConstraints;
d->pendingConstraints = NoConstraint;
@ -819,7 +819,7 @@ QRectF Applet::boundingRect() const
d->getBorderSize(left,top,right,bottom);
//kDebug(1209) << "Background , Border size" << d->background << left << top << right << bottom;
//kDebug() << "Background , Border size" << d->background << left << top << right << bottom;
return rect.adjusted(-left,-top,right,bottom);
}
@ -834,14 +834,14 @@ QSizeF Applet::sizeHint() const
d->getBorderSize(left, top, right, bottom);
QSizeF borderSize = QSizeF(left + right, top + bottom);
//kDebug(1209) << "Applet content size hint: " << contentSizeHint() << "plus our borders" << left << right << top << bottom;
//kDebug() << "Applet content size hint: " << contentSizeHint() << "plus our borders" << left << right << top << bottom;
return contentSizeHint() + QSizeF(left + right, top + bottom);
}
QList<QAction*> Applet::contextActions()
{
kDebug(1209) << "empty context actions";
kDebug() << "empty context actions";
return QList<QAction*>();
}
@ -881,7 +881,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
{
Q_UNUSED(widget)
if (d->shadow && d->shadow->shadowedSize() != boundingRect().size()) {
//kDebug(1209) << "sizes are " << d->shadow->shadowedSize() << boundingRect().size();
//kDebug() << "sizes are " << d->shadow->shadowedSize() << boundingRect().size();
d->shadow->generate();
}
@ -892,7 +892,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
}
if (d->background) {
//kDebug(1209) << "option rect is" << option->rect;
//kDebug() << "option rect is" << option->rect;
d->paintBackground(painter, this, option->rect);
}
@ -906,7 +906,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
}
}
//kDebug(1209) << "paint interface of" << (QObject*) this;
//kDebug() << "paint interface of" << (QObject*) this;
paintInterface(painter, option, QRect(QPoint(0,0), d->contentSize(this).toSize()));
}
@ -921,7 +921,7 @@ void Applet::paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *o
if (d->scriptEngine) {
d->scriptEngine->paintInterface(painter, option, contentsRect);
} else {
//kDebug(1209) << "Applet::paintInterface() default impl";
//kDebug() << "Applet::paintInterface() default impl";
}
}
@ -965,8 +965,8 @@ QSizeF Applet::contentSize() const
int top, left, right, bottom;
d->getBorderSize(left, top, right, bottom);
// kDebug(1209) << "Geometry size: " << geometry().size();
// kDebug(1209) << "Borders: " << left << top << right << bottom;
// kDebug() << "Geometry size: " << geometry().size();
// kDebug() << "Borders: " << left << top << right << bottom;
return (geometry().size() - QSizeF(left + right, top + bottom)).expandedTo(QSizeF(0, 0));
}
@ -1152,14 +1152,14 @@ KPluginInfo::List Applet::knownApplets(const QString &category,
}
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
//kDebug(1209) << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
//kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
return KPluginInfo::fromServices(offers);
}
KPluginInfo::List Applet::knownAppletsForMimetype(const QString &mimetype)
{
QString constraint = QString("'%1' in MimeTypes").arg(mimetype);
//kDebug(1209) << "knownAppletsForMimetype with" << mimetype << constraint;
//kDebug() << "knownAppletsForMimetype with" << mimetype << constraint;
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
return KPluginInfo::fromServices(offers);
}
@ -1183,7 +1183,7 @@ QStringList Applet::knownCategories(const QString &parentApp, bool visibleOnly)
continue;
}
//kDebug(1209) << " and we have " << appletCategory;
//kDebug() << " and we have " << appletCategory;
if (appletCategory.isEmpty()) {
if (!categories.contains(i18n("Miscellaneous"))) {
categories << i18n("Miscellaneous");
@ -1209,10 +1209,10 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
if (offers.isEmpty()) {
//TODO: what would be -really- cool is offer to try and download the applet
// from the network at this point
kDebug(1209) << "Applet::loadApplet: offers is empty for \"" << appletName << "\"";
kDebug() << "Applet::loadApplet: offers is empty for \"" << appletName << "\"";
return 0;
} /* else if (offers.count() > 1) {
kDebug(1209) << "hey! we got more than one! let's blindly take the first one";
kDebug() << "hey! we got more than one! let's blindly take the first one";
} */
KService::Ptr offer = offers.first();
@ -1222,7 +1222,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
}
if (!offer->property("X-Plasma-Language").toString().isEmpty()) {
kDebug(1209) << "we have a script in the language of" << offer->property("X-Plasma-Language").toString();
kDebug() << "we have a script in the language of" << offer->property("X-Plasma-Language").toString();
Applet *applet = new Applet(0, offer->storageId(), appletId);
return applet;
}
@ -1233,7 +1233,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
Applet* applet = offer->createInstance<Plasma::Applet>(0, allArgs, &error);
if (!applet) {
kDebug(1209) << "Couldn't load applet \"" << appletName << "\"! reason given: " << error;
kDebug() << "Couldn't load applet \"" << appletName << "\"! reason given: " << error;
}
return applet;

View File

@ -80,7 +80,7 @@ void AppletBrowserWidget::Private::initFilters()
if (!rx.exactMatch(i.key())) {
continue;
}
//kDebug(1209) << "These are the key/vals in rc file " << rx.cap(1) << "\n";
//kDebug() << "These are the key/vals in rc file " << rx.cap(1) << "\n";
QString id = rx.cap(1);
QString caption = configGroup.readEntry("recommended." + id + ".caption");
@ -118,7 +118,7 @@ void AppletBrowserWidget::Private::updateRunningApplets()
foreach (QString key, runningApplets.uniqueKeys()) {
appCount[key]=runningApplets.count(key);
}
kDebug(1209) << appCount;
kDebug() << appCount;
itemModel.setRunningApplets(appCount);
}
@ -184,14 +184,14 @@ void AppletBrowserWidget::init()
void AppletBrowserWidget::initRunningApplets()
{
//get applets from corona, count them, send results to model
kDebug(1209) << d->runningApplets.count();
kDebug() << d->runningApplets.count();
QHash<QString,int> appCount;
Plasma::Corona *c = d->containment->corona();
//we've tried our best to get a corona
//we don't want just one containment, we want them all
if (!c) {
kDebug(1209) << "can't happen";
kDebug() << "can't happen";
return;
}
@ -207,7 +207,7 @@ void AppletBrowserWidget::initRunningApplets()
appCount[applet->name()]++;
}
}
kDebug(1209) << appCount;
kDebug() << appCount;
d->itemModel.setRunningApplets(appCount);
}
@ -232,14 +232,14 @@ QString AppletBrowserWidget::application()
void AppletBrowserWidget::addApplet()
{
kDebug(1209) << "Button ADD clicked";
kDebug() << "Button ADD clicked";
if (!d->containment) {
return;
}
foreach (AbstractItem *item, d->appletList->selectedItems()) {
PlasmaAppletItem *selectedItem = (PlasmaAppletItem *) item;
kDebug(1209) << "Adding applet " << selectedItem->name() << "to containment";
kDebug() << "Adding applet " << selectedItem->name() << "to containment";
d->containment->addApplet(selectedItem->pluginName(), selectedItem->arguments());
}
}
@ -247,7 +247,7 @@ void AppletBrowserWidget::addApplet()
void AppletBrowserWidget::appletAdded(Plasma::Applet* applet)
{
QString name = applet->name();
kDebug(1209) << name;
kDebug() << name;
d->runningApplets.insert(name, applet);
d->appletNames.insert(applet, name);
connect(applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed(QObject*)));
@ -256,7 +256,7 @@ void AppletBrowserWidget::appletAdded(Plasma::Applet* applet)
void AppletBrowserWidget::appletDestroyed(QObject* applet)
{
kDebug(1209) << applet;
kDebug() << applet;
Plasma::Applet* a = (Plasma::Applet*)applet; //don't care if it's valid, just need the address
QString name = d->appletNames.take(a);
//if !name, was the applet not found or was the name actually ""?
@ -278,7 +278,7 @@ void AppletBrowserWidget::destroyApplets(QString name)
void AppletBrowserWidget::downloadApplets()
{
//TODO: implement
kDebug(1209) << "GHNS button clicked";
kDebug() << "GHNS button clicked";
}

View File

@ -48,7 +48,7 @@ void CustomDragTreeView::startDrag ( Qt::DropActions supportedActions )
off = (MAX_OFFSET * MAX_COUNT) / indexes.count();
}
kDebug(1209) << "Size: " << size << " Off: " << off << "\n";
kDebug() << "Size: " << size << " Off: " << off << "\n";
QPixmap pixmap(size, size);
pixmap.fill(QColor(255, 255, 255, 0)); // TODO: Transparent. Now it flickers when it's transparent

View File

@ -114,7 +114,7 @@ void KCategorizedItemsView::setItemModel(QStandardItemModel * model)
void KCategorizedItemsView::searchTermChanged(const QString & text)
{
kDebug(1209) << "EVENT\n" << text;
kDebug() << "EVENT\n" << text;
if (m_modelFilterItems) {
m_modelFilterItems->setSearch(text);
}

View File

@ -74,7 +74,7 @@ void KCategorizedItemsViewDelegate::paint(QPainter *painter,
paintColRemove(painter, option, item);
break;
default:
kDebug(1209) << "unexpected column";
kDebug() << "unexpected column";
}
// Dividing line
@ -311,7 +311,7 @@ KCategorizedItemsViewModels::AbstractItem * KCategorizedItemsViewDelegate::getIt
KCategorizedItemsViewFilterDelegate::KCategorizedItemsViewFilterDelegate(QObject *parent)
: QItemDelegate(parent) {
kDebug(1209) << "KCategorizedItemsViewFilterDelegate(QObject *parent)\n";
kDebug() << "KCategorizedItemsViewFilterDelegate(QObject *parent)\n";
}

View File

@ -122,7 +122,7 @@ bool DefaultItemFilterProxyModel::filterAcceptsRow(int sourceRow,
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
AbstractItem * item = (AbstractItem *) model->itemFromIndex(index);
//kDebug(1209) << "ITEM " << (item ? "IS NOT " : "IS") << " NULL\n";
//kDebug() << "ITEM " << (item ? "IS NOT " : "IS") << " NULL\n";
return (m_filter.first.isEmpty() || item->passesFiltering(m_filter))
&&(m_searchPattern.isEmpty() || item->matches(m_searchPattern));

View File

@ -104,7 +104,7 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
void PlasmaAppletItemModel::populateModel()
{
clear();
//kDebug(1209) << "populating model, our application is" << m_application;
//kDebug() << "populating model, our application is" << m_application;
// Recommended emblems and filters
QRegExp rx("recommended[.]([0-9A-Za-z]+)[.]plugins");
@ -121,14 +121,14 @@ void PlasmaAppletItemModel::populateModel()
}
//TODO: get recommended, favorite, used, etc out of knownApplets()
//kDebug(1209) << "number of applets is" << Plasma::Applet::knownApplets(QString(), m_application).count();
//kDebug() << "number of applets is" << Plasma::Applet::knownApplets(QString(), m_application).count();
foreach (const KPluginInfo& info, Plasma::Applet::knownApplets(QString(), m_application)) {
//kDebug(1209) << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool();
//kDebug() << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool();
if (info.property("NoDisplay").toBool()) {
// we don't want to show the hidden category
continue;
}
//kDebug(1209) << info.pluginName() << " is the name of the plugin\n";
//kDebug() << info.pluginName() << " is the name of the plugin\n";
if (info.pluginName() == "skapplet") {
// If there is the SuperKaramba applet,
@ -183,7 +183,7 @@ QStringList PlasmaAppletItemModel::mimeTypes() const
QMimeData* PlasmaAppletItemModel::mimeData(const QModelIndexList & indexes) const
{
kDebug(1209) << "GETTING MIME DATA\n";
kDebug() << "GETTING MIME DATA\n";
if (indexes.count() <= 0) {
return 0;
}

View File

@ -332,8 +332,8 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
// add the applet to the new containment
// and take it from the old one
QPointF scenePosition = scenePos();
kDebug(1209) << "moving to other containment with position" << pos() << event->scenePos();
kDebug(1209) << "position before reparenting" << pos() << scenePos();
kDebug() << "moving to other containment with position" << pos() << event->scenePos();
kDebug() << "position before reparenting" << pos() << scenePos();
m_containment = containments[i];
//m_containment->addChild(m_applet);
//setParentItem(containments[i]);
@ -451,14 +451,14 @@ QVariant AppletHandle::itemChange(GraphicsItemChange change, const QVariant &val
void AppletHandle::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
//kDebug(1209) << "hover enter";
//kDebug() << "hover enter";
startFading(FadeIn);
}
void AppletHandle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
//kDebug(1209) << "hover leave";
//kDebug() << "hover leave";
startFading(FadeOut);
}

View File

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

View File

@ -135,11 +135,11 @@ void Containment::init()
void Containment::loadConstraints(KConfigGroup* group)
{
/*kDebug(1209) << "!!!!!!!!!!!!initConstraints" << group->name() << containmentType();
kDebug(1209) << " location:" << group->readEntry("location", (int)d->location);
kDebug(1209) << " geom:" << group->readEntry("geometry", geometry());
kDebug(1209) << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
kDebug(1209) << " screen:" << group->readEntry("screen", d->screen);*/
/*kDebug() << "!!!!!!!!!!!!initConstraints" << group->name() << containmentType();
kDebug() << " location:" << group->readEntry("location", (int)d->location);
kDebug() << " geom:" << group->readEntry("geometry", geometry());
kDebug() << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
kDebug() << " screen:" << group->readEntry("screen", d->screen);*/
setGeometry(group->readEntry("geometry", geometry()));
setLocation((Plasma::Location)group->readEntry("location", (int)d->location));
setFormFactor((Plasma::FormFactor)group->readEntry("formfactor", (int)d->formFactor));
@ -156,7 +156,7 @@ void Containment::saveConstraints(KConfigGroup* group) const
void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints)
{
//kDebug(1209) << "got containmentConstraintsUpdated" << constraints << (QObject*)d->toolbox;
//kDebug() << "got containmentConstraintsUpdated" << constraints << (QObject*)d->toolbox;
if (d->toolbox) {
if (constraints & Plasma::ScreenConstraint) {
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), 0);
@ -201,7 +201,7 @@ Corona* Containment::corona() const
void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
{
//kDebug(1209) << "let's see if we manage to get a context menu here, huh";
//kDebug() << "let's see if we manage to get a context menu here, huh";
if (!scene() || !KAuthorized::authorizeKAction("desktop_contextmenu")) {
Applet::contextMenuEvent(event);
return;
@ -225,10 +225,10 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
}
KMenu desktopMenu;
//kDebug(1209) << "context menu event " << (QObject*)applet;
//kDebug() << "context menu event " << (QObject*)applet;
if (!applet) {
if (!scene() || (static_cast<Corona*>(scene())->isImmutable() && !KAuthorized::authorizeKAction("unlock_desktop"))) {
//kDebug(1209) << "immutability";
//kDebug() << "immutability";
Applet::contextMenuEvent(event);
return;
}
@ -238,7 +238,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
QList<QAction*> actions = contextActions();
if (actions.count() < 1) {
//kDebug(1209) << "no applet, but no actions";
//kDebug() << "no applet, but no actions";
Applet::contextMenuEvent(event);
return;
}
@ -280,13 +280,13 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
if (!hasEntries) {
Applet::contextMenuEvent(event);
kDebug(1209) << "no entries";
kDebug() << "no entries";
return;
}
}
event->accept();
//kDebug(1209) << "executing at" << event->screenPos();
//kDebug() << "executing at" << event->screenPos();
desktopMenu.exec(event->screenPos());
}
@ -308,7 +308,7 @@ void Containment::setFormFactor(FormFactor formFactor)
return;
}
//kDebug(1209) << "switching FF to " << formFactor;
//kDebug() << "switching FF to " << formFactor;
d->formFactor = formFactor;
Layout *lay = layout();
setLayout(0);
@ -333,7 +333,7 @@ void Containment::setFormFactor(FormFactor formFactor)
//FIXME: need a layout type here!
break;
default:
kDebug(1209) << "This can't be happening! Or... can it? ;)" << d->formFactor;
kDebug() << "This can't be happening! Or... can it? ;)" << d->formFactor;
break;
}
@ -396,7 +396,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
}
if (!applet) {
kDebug(1209) << "Applet" << name << "could not be loaded.";
kDebug() << "Applet" << name << "could not be loaded.";
applet = new Applet;
}
@ -457,7 +457,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
addApplet(applet);
prepareApplet(applet, delayInit);
//kDebug(1209) << "adding applet" << applet->name() << "with a default geometry of" << appletGeometry << appletGeometry.isValid();
//kDebug() << "adding applet" << applet->name() << "with a default geometry of" << appletGeometry << appletGeometry.isValid();
if (appletGeometry.isValid()) {
applet->setGeometry(appletGeometry);
} else if (appletGeometry.x() != -1 && appletGeometry.y() != -1) {
@ -469,7 +469,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
}
}
//kDebug(1209) << applet->name() << "sizehint:" << applet->sizeHint() << "geometry:" << applet->geometry();
//kDebug() << applet->name() << "sizehint:" << applet->sizeHint() << "geometry:" << applet->geometry();
Corona *c = corona();
if (c) {
@ -626,19 +626,19 @@ void Containment::setScreen(int screen)
if (screen > -1 && containmentType() == DesktopContainment && corona()) {
Containment* currently = corona()->containmentForScreen(screen);
if (currently && currently != this) {
//kDebug(1209) << "currently is on screen" << currently->screen() << "and is" << currently->name() << (QObject*)currently << (QObject*)this;
//kDebug() << "currently is on screen" << currently->screen() << "and is" << currently->name() << (QObject*)currently << (QObject*)this;
currently->setScreen(-1);
}
}
//kDebug(1209) << "setting screen to" << screen << "and we are a" << containmentType();
//kDebug() << "setting screen to" << screen << "and we are a" << containmentType();
QDesktopWidget *desktop = QApplication::desktop();
int numScreens = desktop->numScreens();
if (screen < -1) {
screen = -1;
}
//kDebug(1209) << "setting screen to " << screen << "and type is" << containmentType();
//kDebug() << "setting screen to " << screen << "and type is" << containmentType();
if (screen < numScreens && screen > -1) {
QRect r = desktop->screenGeometry(screen);
@ -666,10 +666,10 @@ void Containment::setScreen(int screen)
// FIXME: positioning at this x,y will break if we switch between containments for a
// given screen! we should change the pos() on new containment setup.
setGeometry(r);
//kDebug(1209) << "setting geometry to" << desktop->screenGeometry(screen) << r << geometry();
//kDebug() << "setting geometry to" << desktop->screenGeometry(screen) << r << geometry();
} else if (containmentType() == PanelContainment) {
QRect r = desktop->screenGeometry(screen);
//kDebug(1209) << "we are a panel on" << r << ", let's move ourselves to a negative coordinate system" << -(r.y() * 2) - r.height() - INTER_CONTAINMENT_MARGIN;
//kDebug() << "we are a panel on" << r << ", let's move ourselves to a negative coordinate system" << -(r.y() * 2) - r.height() - INTER_CONTAINMENT_MARGIN;
// panels are moved into negative coords; we double the x() so that each screen get's
// it's own area for panels
int vertOffset = (r.y() * 2) + r.height() + INTER_CONTAINMENT_MARGIN;
@ -709,21 +709,21 @@ KPluginInfo::List Containment::knownContainments(const QString &category,
}
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
//kDebug(1209) << "constraint was" << constraint << "which got us" << offers.count() << "matches";
//kDebug() << "constraint was" << constraint << "which got us" << offers.count() << "matches";
return KPluginInfo::fromServices(offers);
}
KPluginInfo::List Containment::knownContainmentsForMimetype(const QString &mimetype)
{
QString constraint = QString("'%1' in MimeTypes").arg(mimetype);
//kDebug(1209) << "knownContainmentsForMimetype with" << mimetype << constraint;
//kDebug() << "knownContainmentsForMimetype with" << mimetype << constraint;
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
return KPluginInfo::fromServices(offers);
}
void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
{
//kDebug(1209) << "drop event:" << event->mimeData()->text();
//kDebug() << "drop event:" << event->mimeData()->text();
QString mimetype(static_cast<Corona*>(scene())->appletMimeType());
@ -741,7 +741,7 @@ void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
QRectF geom(event->scenePos(), QSize(0, 0));
QVariantList args;
args << url.url();
// kDebug(1209) << mimeName;
// kDebug() << mimeName;
KPluginInfo::List appletList = Applet::knownAppletsForMimetype(mimeName);
if (appletList.isEmpty()) {
@ -783,7 +783,7 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
//QEvent::GraphicsSceneHoverEnter
// Otherwise we're watching something we shouldn't be...
//kDebug(1209) << "got sceneEvent";
//kDebug() << "got sceneEvent";
Q_ASSERT(applet!=0);
if (!d->applets.contains(applet)) {
return false;
@ -791,9 +791,9 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
switch (event->type()) {
case QEvent::GraphicsSceneHoverEnter:
//kDebug(1209) << "got hoverenterEvent" << isImmutable << " " << applet->isImmutable();
//kDebug() << "got hoverenterEvent" << isImmutable << " " << applet->isImmutable();
if (!isImmutable() && !applet->isImmutable() && !d->handles.contains(applet)) {
//kDebug(1209) << "generated applet handle";
//kDebug() << "generated applet handle";
//TODO: there should be a small delay on showing these. they pop up too quickly/easily
// right now
AppletHandle *handle = new AppletHandle(this, applet);
@ -819,7 +819,7 @@ void Containment::handleDisappeared(AppletHandle *handle)
void Containment::emitLaunchActivated()
{
kDebug(1209);
kDebug();
emit launchActivated();
}

View File

@ -211,7 +211,7 @@ void Corona::loadApplets(const QString& configName)
}
int cid = group.toUInt();
//kDebug(1209) << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
//kDebug() << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
Containment *c = addContainment(containmentConfig.readEntry("plugin", QString()), QVariantList(),
cid, true);
if (!c) {
@ -222,14 +222,14 @@ void Corona::loadApplets(const QString& configName)
c->init();
c->loadConstraints(&containmentConfig);
c->flushUpdatedConstraints();
//kDebug(1209) << "Containment" << c->id() << "geometry is" << c->geometry().toRect() << "config'd with" << appletConfig.name();
//kDebug() << "Containment" << c->id() << "geometry is" << c->geometry().toRect() << "config'd with" << appletConfig.name();
KConfigGroup applets(&containmentConfig, "Applets");
// Sort the applet configs in order of geometry to ensure that applets
// are added from left to right or top to bottom for a panel containment
QList<KConfigGroup> appletConfigs;
foreach (const QString &appletGroup, applets.groupList()) {
//kDebug(1209) << "reading from applet group" << appletGroup;
//kDebug() << "reading from applet group" << appletGroup;
KConfigGroup appletConfig(&applets, appletGroup);
appletConfigs.append(appletConfig);
}
@ -237,7 +237,7 @@ void Corona::loadApplets(const QString& configName)
foreach (KConfigGroup appletConfig, appletConfigs) {
int appId = appletConfig.name().toUInt();
//kDebug(1209) << "the name is" << appletConfig.name();
//kDebug() << "the name is" << appletConfig.name();
QString plugin = appletConfig.readEntry("plugin", QString());
if (plugin.isEmpty()) {
@ -301,14 +301,14 @@ void Corona::loadDefaultSetup()
//FIXME: implement support for system-wide defaults
QDesktopWidget *desktop = QApplication::desktop();
int numScreens = desktop->numScreens();
kDebug(1209) << "number of screens is" << numScreens;
kDebug() << "number of screens is" << numScreens;
int topLeftScreen = 0;
QPoint topLeftCorner = desktop->screenGeometry(0).topLeft();
// create a containment for each screen
for (int i = 0; i < numScreens; ++i) {
QRect g = desktop->screenGeometry(i);
kDebug(1209) << " screen " << i << "geometry is" << g;
kDebug() << " screen " << i << "geometry is" << g;
Containment* c = addContainment("desktop");
c->setScreen(i);
c->setFormFactor(Plasma::Planar);
@ -392,7 +392,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
Containment* containment = 0;
Applet* applet = 0;
//kDebug(1209) << "Loading" << name << args << id;
//kDebug() << "Loading" << name << args << id;
if (pluginName.isEmpty()) {
// default to the desktop containment
@ -403,7 +403,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
}
if (!containment) {
kDebug(1209) << "loading of containment" << name << "failed.";
kDebug() << "loading of containment" << name << "failed.";
// in case we got a non-Containment from Applet::loadApplet or a null containment was requested
delete applet;
@ -446,7 +446,7 @@ void Corona::destroyContainment(Containment *c)
void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
{
// kDebug(1209) << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
if (event->mimeData()->hasFormat(d->mimetype) ||
KUrl::List::canDecode(event->mimeData())) {
event->acceptProposedAction();
@ -463,7 +463,7 @@ void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
void Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
{
// kDebug(1209) << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)";
// kDebug() << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)";
//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
@ -475,7 +475,7 @@ void Corona::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
QGraphicsScene::dragMoveEvent(event);
event->accept();
//kDebug(1209) << "Corona::dragMoveEvent(QDragMoveEvent* event)";
//kDebug() << "Corona::dragMoveEvent(QDragMoveEvent* event)";
}
void Corona::containmentDestroyed(QObject* obj)
@ -539,7 +539,7 @@ void Corona::setImmutable(bool immutable)
return;
}
kDebug(1209) << "setting immutability to" << immutable;
kDebug() << "setting immutability to" << immutable;
d->immutable = immutable;
d->updateContainmentImmutability();
}

View File

@ -104,7 +104,7 @@ void DataContainer::checkUsage()
void DataContainer::connectVisualization(QObject* visualization, uint updateInterval, Plasma::IntervalAlignment alignment)
{
// kDebug(1209) << "connecting visualization" << (void*)visualization << "at interval of" << updateInterval;
// kDebug() << "connecting visualization" << (void*)visualization << "at interval of" << updateInterval;
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
bool connected = objIt != d->relayObjects.end();
if (connected) {
@ -120,12 +120,12 @@ void DataContainer::connectVisualization(QObject* visualization, uint updateInte
d->relays.remove(relay->m_interval);
delete relay;
}
// kDebug(1209) << " already connected, but to a relay";
// kDebug() << " already connected, but to a relay";
} else if (updateInterval < 1) {
// the visualization was connected already, but not to a relay
// and it still doesn't want to connect to a relay, so we have
// nothing to do!
//kDebug(1209) << " already connected, nothing to do";
//kDebug() << " already connected, nothing to do";
return;
} else {
disconnect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
@ -141,11 +141,11 @@ void DataContainer::connectVisualization(QObject* visualization, uint updateInte
d->relayObjects[visualization] = 0;
if (updateInterval < 1) {
// kDebug(1209) << " connecting directly";
// kDebug() << " connecting directly";
connect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data)));
} else {
// kDebug(1209) << " connecting to a relay";
// kDebug() << " connecting to a relay";
connect(d->signalRelay(this, visualization, updateInterval, alignment),
SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data)));

View File

@ -71,7 +71,7 @@ class DataEngine::Private
return 0;
}
/*kDebug(1209) << "DataEngine " << engine->objectName()
/*kDebug() << "DataEngine " << engine->objectName()
<< ": could not find DataContainer " << sourceName
<< ", creating" << endl;*/
DataContainer* s = new DataContainer(engine);
@ -90,7 +90,7 @@ class DataEngine::Private
void connectSource(DataContainer* s, QObject* visualization, uint updateInterval,
Plasma::IntervalAlignment align, bool immediateCall = true)
{
//kDebug(1209) << "connect source called with interval" << updateInterval;
//kDebug() << "connect source called with interval" << updateInterval;
if (updateInterval > 0) {
// never more frequently than allowed, never more than 20 times per second
uint min = qMax(50, minUpdateInterval); // for qMin below
@ -115,12 +115,12 @@ class DataEngine::Private
*newSource = false;
}
//kDebug(1209) << "requesting source " << sourceName;
//kDebug() << "requesting source " << sourceName;
DataContainer* s = source(sourceName, false);
if (!s) {
// we didn't find a data source, so give the engine an opportunity to make one
/*kDebug(1209) << "DataEngine " << engine->objectName()
/*kDebug() << "DataEngine " << engine->objectName()
<< ": could not find DataContainer " << sourceName
<< " will create on request" << endl;*/
if (engine->sourceRequested(sourceName)) {
@ -182,7 +182,7 @@ DataEngine::DataEngine(QObject* parent)
DataEngine::~DataEngine()
{
//kDebug(1209) << objectName() << ": bye bye birdy! ";
//kDebug() << objectName() << ": bye bye birdy! ";
delete d;
}
@ -194,7 +194,7 @@ QStringList DataEngine::sources() const
void DataEngine::connectSource(const QString& source, QObject* visualization,
uint updateInterval, Plasma::IntervalAlignment intervalAlignment) const
{
//kDebug(1209) << "connectSource" << source;
//kDebug() << "connectSource" << source;
bool newSource;
DataContainer* s = d->requestSource(source, &newSource);
@ -203,7 +203,7 @@ void DataEngine::connectSource(const QString& source, QObject* visualization,
// don't request delayed updates (we want to do an immediate update in that case so they
// don't have to wait for the first time out)
d->connectSource(s, visualization, updateInterval, intervalAlignment, !newSource || updateInterval > 0);
//kDebug(1209) << " ==> source connected";
//kDebug() << " ==> source connected";
}
}
@ -254,7 +254,7 @@ void DataEngine::internalUpdateSource(DataContainer* source)
// skip updating this source; it's been too soon
//TODO: should we queue an update in this case? return to this
// once we see the results in real world usage
//kDebug(1209) << "internal update source is delaying" << source->timeSinceLastUpdate() << d->minUpdateInterval;
//kDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << d->minUpdateInterval;
return;
}
@ -265,7 +265,7 @@ void DataEngine::internalUpdateSource(DataContainer* source)
void DataEngine::init()
{
// kDebug(1209) << "DataEngine::init() called ";
// kDebug() << "DataEngine::init() called ";
// default implementation does nothing. this is for engines that have to
// start things in motion external to themselves before they can work
}
@ -279,7 +279,7 @@ bool DataEngine::sourceRequested(const QString &name)
bool DataEngine::updateSource(const QString& source)
{
Q_UNUSED(source);
//kDebug(1209) << "updateSource source" << endl;
//kDebug() << "updateSource source" << endl;
return false; //TODO: should this be true to trigger, even needless, updates on every tick?
}
@ -329,7 +329,7 @@ void DataEngine::addSource(DataContainer* source)
{
SourceDict::const_iterator it = d->sources.find(source->objectName());
if (it != d->sources.constEnd()) {
kDebug(1209) << "source named \"" << source->objectName() << "\" already exists.";
kDebug() << "source named \"" << source->objectName() << "\" already exists.";
return;
}
@ -385,7 +385,7 @@ void DataEngine::updateInterval()
void DataEngine::removeSource(const QString& source)
{
//kDebug(1209) << "removing source " << source;
//kDebug() << "removing source " << source;
SourceDict::iterator it = d->sources.find(source);
if (it != d->sources.end()) {
emit sourceRemoved(it.key());

View File

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

View File

@ -133,7 +133,7 @@ void DesktopToolbox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
continue;
}
//kDebug(1209) << "let's show and move" << tool << tool->boundingRect();
//kDebug() << "let's show and move" << tool << tool->boundingRect();
tool->show();
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
//x += 0;
@ -178,7 +178,7 @@ void DesktopToolbox::animate(qreal progress)
m_animFrame = m_size * (1.0 - progress);
}
//kDebug(1209) << "animating at" << progress << "for" << m_animFrame;
//kDebug() << "animating at" << progress << "for" << m_animFrame;
if (progress >= 1) {
m_animId = 0;
@ -189,7 +189,7 @@ void DesktopToolbox::animate(qreal progress)
void DesktopToolbox::toolMoved(QGraphicsItem *item)
{
//kDebug(1209) << "geometry is now " << static_cast<Plasma::Widget*>(item)->geometry();
//kDebug() << "geometry is now " << static_cast<Plasma::Widget*>(item)->geometry();
if (!m_showing &&
QGraphicsItem::children().indexOf(static_cast<Plasma::Widget*>(item)) != -1) {
item->hide();
@ -212,7 +212,7 @@ void DesktopToolbox::addTool(QGraphicsItem *tool, const QString &name)
void DesktopToolbox::enableTool(const QString &toolName, bool visible)
{
//kDebug(1209) << (visible? "enabling" : "disabling") << "tool" << toolName;
//kDebug() << (visible? "enabling" : "disabling") << "tool" << toolName;
QGraphicsItem *t = tool(toolName);
if (t) {
@ -234,9 +234,9 @@ bool DesktopToolbox::isToolEnabled(const QString &toolName) const
QGraphicsItem* DesktopToolbox::tool(const QString &toolName) const
{
foreach (QGraphicsItem *child, QGraphicsItem::children()) {
//kDebug(1209) << "checking tool" << child << child->data(ToolName);
//kDebug() << "checking tool" << child << child->data(ToolName);
if (child->data(ToolName).toString() == toolName) {
//kDebug(1209) << "tool found!";
//kDebug() << "tool found!";
return child;
}
}

View File

@ -191,7 +191,7 @@ void Dialog::position(QGraphicsView * view,const QRectF boundingRect,QPointF sce
globalPos.rx()-=((globalPos.rx() + width())-view->width());
}
move(globalPos);
kDebug(1209) << globalPos;
kDebug() << globalPos;
}
}

View File

@ -111,11 +111,11 @@ QRectF FreeLayout::geometry() const
QSizeF FreeLayout::sizeHint() const
{
if (parent()) {
//kDebug(1209) << "returning size hint from freelayout of" << parent()->geometry().size();
//kDebug() << "returning size hint from freelayout of" << parent()->geometry().size();
return parent()->geometry().size();
}
//kDebug(1209) << "returning size hint from freelayout of" << maximumSize();
//kDebug() << "returning size hint from freelayout of" << maximumSize();
return maximumSize();
}

View File

@ -88,7 +88,7 @@ qreal LayoutItem::widthForHeight(qreal h) const
void LayoutItem::setLayout(Layout* layout)
{
if (d->layout && layout) {
kDebug(1209) << "already have a layout.";
kDebug() << "already have a layout.";
return;
}
@ -99,7 +99,7 @@ void LayoutItem::setLayout(Layout* layout)
// and we are without layout; we should tell our
// children about this, but LayoutItem doesn't know
// about children =/
kDebug(1209) << "layout removed from under us. expect crashes";
kDebug() << "layout removed from under us. expect crashes";
}
d->layout = layout;

View File

@ -145,11 +145,11 @@ class Phase::Private
{
switch (state->movement) {
case Phase::SlideIn:
//kDebug(1209) << "performMovement, SlideIn";
//kDebug() << "performMovement, SlideIn";
animator->slideIn(amount, state->item, state->start, state->destination);
break;
case Phase::SlideOut:
//kDebug(1209) << "performMovement, SlideOut";
//kDebug() << "performMovement, SlideOut";
animator->slideOut(amount, state->item, state->start, state->destination);
break;
}
@ -230,7 +230,7 @@ void Phase::customAnimReceiverDestroyed(QObject* o)
void Phase::animateItem(QGraphicsItem* item, Animation animation)
{
//kDebug(1209);
//kDebug();
// get rid of any existing animations on this item.
//TODO: shoudl we allow multiple anims per item?
QMap<QGraphicsItem*, AnimationState*>::iterator it = d->animatedItems.find(item);
@ -269,7 +269,7 @@ void Phase::animateItem(QGraphicsItem* item, Animation animation)
void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination)
{
//kDebug(1209);
//kDebug();
QMap<QGraphicsItem*, MovementState*>::iterator it = d->movingItems.find(item);
if (it != d->movingItems.end()) {
delete it.value();
@ -347,12 +347,12 @@ void Phase::stopCustomAnimation(AnimId id)
delete it.value();
d->customAnims.erase(it);
}
//kDebug(1209) << "stopCustomAnimation(AnimId " << id << ") done";
//kDebug() << "stopCustomAnimation(AnimId " << id << ") done";
}
Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animation)
{
//kDebug(1209) << "startElementAnimation(AnimId " << animation << ")";
//kDebug() << "startElementAnimation(AnimId " << animation << ")";
ElementAnimationState *state = new ElementAnimationState;
state->item = item;
state->curve = d->animator->curve(animation);
@ -365,7 +365,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
state->currentInterval = state->interval;
state->id = ++d->animId;
//kDebug(1209) << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames;
//kDebug() << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames;
bool needTimer = true;
if (state->frames < 1) {
state->frames = 1;
@ -383,7 +383,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
state->item->update();
}
//kDebug(1209) << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
//kDebug() << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
if (needTimer && !d->timerId) {
// start a 20fps timer;
//TODO: should be started at the maximum frame rate needed only?
@ -400,7 +400,7 @@ void Phase::stopElementAnimation(AnimId id)
delete it.value();
d->animatedElements.erase(it);
}
//kDebug(1209) << "stopElementAnimation(AnimId " << id << ") done";
//kDebug() << "stopElementAnimation(AnimId " << id << ") done";
}
void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
@ -408,7 +408,7 @@ void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
QMap<AnimId, ElementAnimationState*>::iterator it = d->animatedElements.find(id);
if (it == d->animatedElements.end()) {
kDebug(1209) << "Phase::setAnimationPixmap(" << id << ") found no entry for it!";
kDebug() << "Phase::setAnimationPixmap(" << id << ") found no entry for it!";
return;
}
@ -420,16 +420,16 @@ QPixmap Phase::animationResult(AnimId id)
QMap<AnimId, ElementAnimationState*>::const_iterator it = d->animatedElements.find(id);
if (it == d->animatedElements.constEnd()) {
//kDebug(1209) << "Phase::animationResult(" << id << ") found no entry for it!";
//kDebug() << "Phase::animationResult(" << id << ") found no entry for it!";
return QPixmap();
}
ElementAnimationState* state = it.value();
qreal progress = state->frames;
//kDebug(1209) << "Phase::animationResult(" << id << " at " << progress;
//kDebug() << "Phase::animationResult(" << id << " at " << progress;
progress = state->currentFrame / progress;
progress = qMin(qreal(1.0), qMax(qreal(0.0), progress));
//kDebug(1209) << "Phase::animationResult(" << id << " at " << progress;
//kDebug() << "Phase::animationResult(" << id << " at " << progress;
switch (state->animation) {
case ElementAppear:
@ -452,7 +452,7 @@ void Phase::timerEvent(QTimerEvent *event)
elapsed = d->time.elapsed();
}
d->time.restart();
//kDebug(1209) << "timeEvent, elapsed time: " << elapsed;
//kDebug() << "timeEvent, elapsed time: " << elapsed;
foreach (AnimationState* state, d->animatedItems) {
if (state->currentInterval <= elapsed) {
@ -502,7 +502,7 @@ void Phase::timerEvent(QTimerEvent *event)
foreach (ElementAnimationState* state, d->animatedElements) {
if (state->currentFrame == state->frames) {
//kDebug(1209) << "skipping" << state->id << "as its already at frame" << state->currentFrame << "of" << state->frames;
//kDebug() << "skipping" << state->id << "as its already at frame" << state->currentFrame << "of" << state->frames;
// since we keep element animations around until they are
// removed, we will end up with finished animations in the queue;
// just skip them
@ -512,7 +512,7 @@ void Phase::timerEvent(QTimerEvent *event)
if (state->currentInterval <= elapsed) {
// we need to step forward!
/*kDebug(1209) << "stepping forwards element anim " << state->id << " from " << state->currentFrame
/*kDebug() << "stepping forwards element anim " << state->id << " from " << state->currentFrame
<< " by " << qMax(1, elapsed / state->interval) << " to "
<< state->currentFrame + qMax(1, elapsed / state->interval) << endl;*/
state->currentFrame += qMax(1, elapsed / state->interval);
@ -541,7 +541,7 @@ void Phase::timerEvent(QTimerEvent *event)
if (state->currentInterval <= elapsed) {
// advance the frame
state->currentFrame += qMax(1, elapsed / state->interval);
/*kDebug(1209) << "custom anim for" << state->receiver << "to slot" << state->slot
/*kDebug() << "custom anim for" << state->receiver << "to slot" << state->slot
<< "with interval of" << state->interval << "at frame" << state->currentFrame;*/
if (state->currentFrame < state->frames) {
@ -585,7 +585,7 @@ void Phase::init()
QString error;
d->animator = offers.first()->createInstance<Plasma::Animator>(0, QVariantList(), &error);
if (!d->animator) {
kDebug(1209) << "Could not load requested animator " << offers.first() << ". Error given: " << error;
kDebug() << "Could not load requested animator " << offers.first() << ". Error given: " << error;
}
}
}

View File

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

22
svg.cpp
View File

@ -53,7 +53,7 @@ class SharedSvgRenderer : public KSvgRenderer, public QSharedData
~SharedSvgRenderer()
{
//kDebug(1209) << "leaving this world for a better one.";
//kDebug() << "leaving this world for a better one.";
}
};
@ -83,7 +83,7 @@ class Svg::Private
path = imagePath;
if (!QFile::exists(path)) {
kDebug(1209) << "Plasma::Svg: file '" << path << "' does not exist!";
kDebug() << "Plasma::Svg: file '" << path << "' does not exist!";
}
}
}
@ -108,13 +108,13 @@ class Svg::Private
if (!elementId.isEmpty()) {
id.append(elementId);
}
//kDebug(1209) << "id is " << id;
//kDebug() << "id is " << id;
if (QPixmapCache::find(id, p)) {
//kDebug(1209) << "found cached version of " << id;
//kDebug() << "found cached version of " << id;
return;
} else {
//kDebug(1209) << "didn't find cached version of " << id << ", so re-rendering";
//kDebug() << "didn't find cached version of " << id << ", so re-rendering";
}
// we have to re-render this puppy
@ -124,7 +124,7 @@ class Svg::Private
} else {
s = elementSize(elementId);
}
//kDebug(1209) << "size for " << elementId << " is " << s;
//kDebug() << "size for " << elementId << " is " << s;
p = QPixmap(s);
p.fill(Qt::transparent);
@ -139,7 +139,7 @@ class Svg::Private
renderPainter.end();
if (!QPixmapCache::insert( id, p )) {
kDebug(1209) << "pixmap cache is too small for inserting" << id << "of size" << s;
kDebug() << "pixmap cache is too small for inserting" << id << "of size" << s;
}
}
@ -156,7 +156,7 @@ class Svg::Private
QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = renderers.find(path);
if (it != renderers.end()) {
//kDebug(1209) << "gots us an existing one!";
//kDebug() << "gots us an existing one!";
renderer = it.value();
} else {
renderer = new SharedSvgRenderer(path);
@ -236,7 +236,7 @@ void Svg::paint(QPainter* painter, const QPointF& point, const QString& elementI
{
QPixmap pix;
d->findInCache(pix, elementID);
//kDebug(1209) << "pix size is " << pix.size();
//kDebug() << "pix size is " << pix.size();
painter->drawPixmap(QRectF(point, pix.size()), pix, QRectF(QPointF(0,0), pix.size()));
}
@ -249,7 +249,7 @@ void Svg::paint(QPainter* painter, const QRectF& rect, const QString& elementID)
{
QPixmap pix;
d->findInCache(pix, elementID);
//kDebug(1209) << "pix size is " << pix.size();
//kDebug() << "pix size is " << pix.size();
painter->drawPixmap(rect, pix, QRectF(QPointF(0,0), pix.size()));
}
@ -292,7 +292,7 @@ QString Svg::elementAtPoint(const QPoint &point) const
QSizeF naturalSize = d->renderer->defaultSize();
qreal dx = d->size.width() / naturalSize.width();
qreal dy = d->size.height() / naturalSize.height();
//kDebug(1209) << point << "is really" << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
//kDebug() << point << "is really" << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy));
}

View File

@ -148,7 +148,7 @@ QString Theme::image( const QString& name ) const
}
if (path.isEmpty()) {
kDebug(1209) << "Theme says: bad image path " << name
kDebug() << "Theme says: bad image path " << name
<< "; looked in: " << search << endl;
}
}

View File

@ -102,7 +102,7 @@ void Flash::setFont( const QFont &font )
void Flash::flash( const QString &text, int duration, const QTextOption &option)
{
kDebug(1209) << duration;
kDebug() << duration;
d->type = Private::Text;
d->duration = (duration == 0) ? d->defaultDuration : duration;
d->text = text;

View File

@ -189,7 +189,7 @@ bool IconAction::event(QEvent::Type type, const QPointF &pos)
break;
case QEvent::GraphicsSceneMouseRelease: {
// kDebug(1209) << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected();
// kDebug() << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected();
bool wasSelected = isSelected();
setSelected(false);
if (wasSelected) {
@ -287,7 +287,7 @@ void Icon::addAction(QAction *action)
{
int count = d->cornerActions.count();
if (count > 3) {
kDebug(1209) << "Icon::addAction(QAction*) no more room for more actions!";
kDebug() << "Icon::addAction(QAction*) no more room for more actions!";
}
IconAction* iconAction = new IconAction(this, action);

View File

@ -142,7 +142,7 @@ qreal LineEdit::heightForWidth(qreal w) const
QTextDocument* doc = document();
doc->setTextWidth(w);
qreal height = doc->size().height();
kDebug(1209) << "LineEdit::heightForWidth(" << w << ") is " << height;
kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height;
return height;
}

View File

@ -358,14 +358,14 @@ void Widget::addChild(Widget *w)
w->setParentItem(this);
//kDebug(1209) << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
//kDebug() << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
if (layout()) {
layout()->addItem(w);
}
updateGeometry();
//kDebug(1209) << "after the item is added our geom is now" << geometry();
//kDebug() << "after the item is added our geom is now" << geometry();
}
void Widget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)