Port away from kdebug

This commit is contained in:
Kevin Ottens 2013-07-29 19:05:59 +02:00
parent 6d000fe183
commit 0e590217f8
78 changed files with 492 additions and 492 deletions

View File

@ -158,7 +158,7 @@ int SortFilterModel::mapRowToSource(int row) const
int SortFilterModel::mapRowFromSource(int row) const int SortFilterModel::mapRowFromSource(int row) const
{ {
if (!sourceModel()) { if (!sourceModel()) {
kWarning() << "No source model defined!"; qWarning() << "No source model defined!";
return -1; return -1;
} }
QModelIndex idx = sourceModel()->index(row, 0); QModelIndex idx = sourceModel()->index(row, 0);
@ -239,7 +239,7 @@ void DataModel::setDataSource(QObject *object)
{ {
DataSource *source = qobject_cast<DataSource *>(object); DataSource *source = qobject_cast<DataSource *>(object);
if (!source) { if (!source) {
kWarning() << "Error: DataSource type expected"; qWarning() << "Error: DataSource type expected";
return; return;
} }
if (m_dataSource == source) { if (m_dataSource == source) {

View File

@ -21,7 +21,7 @@
#include <QPainter> #include <QPainter>
#include "kdebug.h" #include "QDebug"
namespace Plasma namespace Plasma
@ -31,7 +31,7 @@ FrameSvgItemMargins::FrameSvgItemMargins(Plasma::FrameSvg *frameSvg, QObject *pa
: QObject(parent), : QObject(parent),
m_frameSvg(frameSvg) m_frameSvg(frameSvg)
{ {
//kDebug() << "margins at: " << left() << top() << right() << bottom(); //qDebug() << "margins at: " << left() << top() << right() << bottom();
connect(m_frameSvg, SIGNAL(repaintNeeded()), this, SLOT(update())); connect(m_frameSvg, SIGNAL(repaintNeeded()), this, SLOT(update()));
} }

View File

@ -87,7 +87,7 @@ void RunnerModel::setRunners(const QStringList &allowedRunners)
m_manager->setSingleMode(allowedRunners.count() == 1); m_manager->setSingleMode(allowedRunners.count() == 1);
} else { } else {
m_pendingRunnersList = allowedRunners; m_pendingRunnersList = allowedRunners;
kDebug() << "runners set" << m_pendingRunnersList.count(); // qDebug() << "runners set" << m_pendingRunnersList.count();
} }
// to trigger single runner fun! // to trigger single runner fun!
@ -117,7 +117,7 @@ QVariant RunnerModel::data(const QModelIndex &index, int role) const
if (!index.isValid() || index.parent().isValid() || if (!index.isValid() || index.parent().isValid() ||
index.column() > 0 || index.row() < 0 || index.row() >= m_matches.count()) { index.column() > 0 || index.row() < 0 || index.row() >= m_matches.count()) {
// index requested must be valid, but we have no child items! // index requested must be valid, but we have no child items!
//kDebug() << "invalid index requested"; //qDebug() << "invalid index requested";
return QVariant(); return QVariant();
} }
@ -174,10 +174,10 @@ void RunnerModel::startQuery()
return; return;
} }
//kDebug() << "!!!!!!!!!!!!!" << m_pendingQuery << m_manager; //qDebug() << "!!!!!!!!!!!!!" << m_pendingQuery << m_manager;
if (createManager() || m_pendingQuery != m_manager->query()) { if (createManager() || m_pendingQuery != m_manager->query()) {
//kDebug() << "running query" << m_pendingQuery << m_manager; //qDebug() << "running query" << m_pendingQuery << m_manager;
m_manager->launchQuery(m_pendingQuery, m_singleRunnerId); m_manager->launchQuery(m_pendingQuery, m_singleRunnerId);
emit queryChanged(); emit queryChanged();
m_running = true; m_running = true;
@ -207,7 +207,7 @@ bool RunnerModel::createManager()
void RunnerModel::matchesChanged(const QList<Plasma::QueryMatch> &matches) void RunnerModel::matchesChanged(const QList<Plasma::QueryMatch> &matches)
{ {
//kDebug() << "got matches:" << matches.count(); //qDebug() << "got matches:" << matches.count();
bool fullReset = false; bool fullReset = false;
int oldCount = m_matches.count(); int oldCount = m_matches.count();
int newCount = matches.count(); int newCount = matches.count();

View File

@ -21,7 +21,7 @@
#include <QPainter> #include <QPainter>
#include "kdebug.h" #include "QDebug"
#include "plasma/svg.h" #include "plasma/svg.h"
namespace Plasma namespace Plasma

View File

@ -169,7 +169,7 @@ void DirModel::delayedPreview()
if (list.size() > 0) { if (list.size() > 0) {
KIO::PreviewJob* job = KIO::filePreview(list, m_screenshotSize); KIO::PreviewJob* job = KIO::filePreview(list, m_screenshotSize);
job->setIgnoreMaximumSize(true); job->setIgnoreMaximumSize(true);
kDebug() << "Created job" << job; // qDebug() << "Created job" << job;
connect(job, SIGNAL(gotPreview(KFileItem,QPixmap)), connect(job, SIGNAL(gotPreview(KFileItem,QPixmap)),
this, SLOT(showPreview(KFileItem,QPixmap))); this, SLOT(showPreview(KFileItem,QPixmap)));
connect(job, SIGNAL(failed(KFileItem)), connect(job, SIGNAL(failed(KFileItem)),
@ -189,7 +189,7 @@ void DirModel::showPreview(const KFileItem &item, const QPixmap &preview)
} }
m_imageCache->insertImage(item.url().toString(), preview.toImage()); m_imageCache->insertImage(item.url().toString(), preview.toImage());
//kDebug() << "preview size:" << preview.size(); //qDebug() << "preview size:" << preview.size();
emit dataChanged(index, index); emit dataChanged(index, index);
} }

View File

@ -29,7 +29,7 @@
void RunnerModelPlugin::registerTypes(const char *uri) void RunnerModelPlugin::registerTypes(const char *uri)
{ {
kWarning() << "Using deprecated import org.kde.runnermodel, please port to org.kde.plasma.core"; qWarning() << "Using deprecated import org.kde.runnermodel, please port to org.kde.plasma.core";
Q_ASSERT(uri == QLatin1String("org.kde.runnermodel")); Q_ASSERT(uri == QLatin1String("org.kde.runnermodel"));
qmlRegisterType<RunnerModel>(uri, 2, 0, "RunnerModel"); qmlRegisterType<RunnerModel>(uri, 2, 0, "RunnerModel");
qmlRegisterInterface<Plasma::QueryMatch>("QueryMatch"); qmlRegisterInterface<Plasma::QueryMatch>("QueryMatch");

View File

@ -137,13 +137,13 @@ void FullScreenWindow::init(const QString &componentName)
} }
if (filePath.isEmpty()) { if (filePath.isEmpty()) {
kWarning() << "Component not found:" << componentName; qWarning() << "Component not found:" << componentName;
return; return;
} }
QDeclarativeEngine *engine = EngineBookKeeping::self()->engine(); QDeclarativeEngine *engine = EngineBookKeeping::self()->engine();
if (!engine) { if (!engine) {
kWarning() << "Warning, no QDeclarativeEngines available anymore, should never happen"; qWarning() << "Warning, no QDeclarativeEngines available anymore, should never happen";
Q_ASSERT(0); Q_ASSERT(0);
} }
QDeclarativeComponent *component = new QDeclarativeComponent(engine, filePath, this); QDeclarativeComponent *component = new QDeclarativeComponent(engine, filePath, this);
@ -151,7 +151,7 @@ void FullScreenWindow::init(const QString &componentName)
QDeclarativeContext *creationContext = component->creationContext(); QDeclarativeContext *creationContext = component->creationContext();
m_rootObject = component->create(creationContext); m_rootObject = component->create(creationContext);
if (component->status() == QDeclarativeComponent::Error) { if (component->status() == QDeclarativeComponent::Error) {
kWarning()<<component->errors(); qWarning()<<component->errors();
} }
if (m_rootObject) { if (m_rootObject) {

View File

@ -59,7 +59,7 @@ QQmlEngine *EngineBookKeeping::engine() const
{ {
//for components creation, any engine will do, as long is valid //for components creation, any engine will do, as long is valid
if (m_engines.isEmpty()) { if (m_engines.isEmpty()) {
kWarning() << "No engines found, this should never happen"; qWarning() << "No engines found, this should never happen";
return 0; return 0;
} else { } else {
return m_engines.values().first(); return m_engines.values().first();

View File

@ -60,7 +60,7 @@ QString FallbackComponent::filePath(const QString &key)
QString resolved; QString resolved;
foreach (const QString &path, m_candidates) { foreach (const QString &path, m_candidates) {
kDebug() << "Searching for:" << path + path; // qDebug() << "Searching for:" << path + path;
if (m_possiblePaths.contains(path + key)) { if (m_possiblePaths.contains(path + key)) {
resolved = *m_possiblePaths.object(path + key); resolved = *m_possiblePaths.object(path + key);
if (!resolved.isEmpty()) { if (!resolved.isEmpty()) {

View File

@ -51,7 +51,7 @@ void ResourceInstance::syncWid()
if (!m_resourceInstance || m_resourceInstance->winId() != wid) { if (!m_resourceInstance || m_resourceInstance->winId() != wid) {
delete m_resourceInstance; delete m_resourceInstance;
kDebug() << "Creating a new instance of the resource" << m_uri << "window id" << wid; // qDebug() << "Creating a new instance of the resource" << m_uri << "window id" << wid;
m_resourceInstance = new KActivities::ResourceInstance(wid, m_uri, m_mimetype, m_title); m_resourceInstance = new KActivities::ResourceInstance(wid, m_uri, m_mimetype, m_title);
} else { } else {
@ -59,13 +59,13 @@ void ResourceInstance::syncWid()
const QString & oldPath = m_uri.path(); const QString & oldPath = m_uri.path();
m_uri.setPath(oldPath.left(oldPath.length() - 1)); m_uri.setPath(oldPath.left(oldPath.length() - 1));
kDebug() << "Old and new path" << oldPath << m_uri; // qDebug() << "Old and new path" << oldPath << m_uri;
} else { } else {
m_resourceInstance->setUri(m_uri); m_resourceInstance->setUri(m_uri);
} }
kDebug() << "Setting" << m_uri << m_mimetype << "to window" << wid; // qDebug() << "Setting" << m_uri << m_mimetype << "to window" << wid;
m_resourceInstance->setMimetype(m_mimetype); m_resourceInstance->setMimetype(m_mimetype);
m_resourceInstance->setTitle(m_title); m_resourceInstance->setTitle(m_title);

View File

@ -179,7 +179,7 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
const QPointF myPos = item->mapToItem(this, me->pos()); const QPointF myPos = item->mapToItem(this, me->pos());
KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers()); KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers());
m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers()); m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers());
//kDebug() << "pressed in sceneEventFilter"; //qDebug() << "pressed in sceneEventFilter";
emit pressed(&dme); emit pressed(&dme);
m_pressed = true; m_pressed = true;
@ -190,7 +190,7 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
QMouseEvent *me = static_cast<QMouseEvent *>(event); QMouseEvent *me = static_cast<QMouseEvent *>(event);
const QPointF myPos = item->mapToItem(this, me->pos()); const QPointF myPos = item->mapToItem(this, me->pos());
KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers()); KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers());
//kDebug() << "positionChanged..." << dme.x() << dme.y(); //qDebug() << "positionChanged..." << dme.x() << dme.y();
m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers()); m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers());
emit positionChanged(&dme); emit positionChanged(&dme);
break; break;

View File

@ -63,7 +63,7 @@ void PlasmaKPartCorona::evaluateScripts(const QStringList &scripts)
QFile file(script); QFile file(script);
if (file.open(QIODevice::ReadOnly | QIODevice::Text) ) { if (file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
QString code = file.readAll(); QString code = file.readAll();
kDebug() << "evaluating startup script:" << script; // qDebug() << "evaluating startup script:" << script;
scriptEngine.evaluateScript(code); scriptEngine.evaluateScript(code);
} }
} }
@ -71,12 +71,12 @@ void PlasmaKPartCorona::evaluateScripts(const QStringList &scripts)
void PlasmaKPartCorona::printScriptError(const QString &error) void PlasmaKPartCorona::printScriptError(const QString &error)
{ {
kWarning() << "Startup script error:" << error; qWarning() << "Startup script error:" << error;
} }
void PlasmaKPartCorona::printScriptMessage(const QString &error) void PlasmaKPartCorona::printScriptMessage(const QString &error)
{ {
kDebug() << "Startup script: " << error; // qDebug() << "Startup script: " << error;
} }
#include "plasmakpartcorona.moc" #include "plasmakpartcorona.moc"

View File

@ -76,7 +76,7 @@ void PlasmaKPartView::updateGeometry()
return; return;
} }
kDebug() << "New containment geometry is" << c->geometry(); // qDebug() << "New containment geometry is" << c->geometry();
if (c->size().toSize() != size()) { if (c->size().toSize() != size()) {
c->setMaximumSize(size()); c->setMaximumSize(size());

View File

@ -122,13 +122,13 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
{ {
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() == 0) { if (context->argumentCount() == 0) {
kDebug() << "no arguments"; // qDebug() << "no arguments";
return false; return false;
} }
const QString layout = context->argument(0).toString(); const QString layout = context->argument(0).toString();
if (layout.isEmpty() || layout.contains("'")) { if (layout.isEmpty() || layout.contains("'")) {
kDebug() << "layout is empty"; // qDebug() << "layout is empty";
return false; return false;
} }
@ -137,7 +137,7 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
KService::List offers = KServiceTypeTrader::self()->query("Plasma/LayoutTemplate", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/LayoutTemplate", constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug() << "offers fail" << constraint; // qDebug() << "offers fail" << constraint;
return false; return false;
} }
@ -147,26 +147,26 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
structure->defaultPackageRoot() + '/' + info.pluginName() + '/', structure->defaultPackageRoot() + '/' + info.pluginName() + '/',
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
if (path.isEmpty()) { if (path.isEmpty()) {
kDebug() << "script path is empty"; // qDebug() << "script path is empty";
return false; return false;
} }
Plasma::Package package(path, structure); Plasma::Package package(path, structure);
const QString scriptFile = package.filePath("mainscript"); const QString scriptFile = package.filePath("mainscript");
if (scriptFile.isEmpty()) { if (scriptFile.isEmpty()) {
kDebug() << "scriptfile is empty"; // qDebug() << "scriptfile is empty";
return false; return false;
} }
QFile file(scriptFile); QFile file(scriptFile);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
kWarning() << QString("Unable to load script file: %1").arg(path); qWarning() << QString("Unable to load script file: %1").arg(path);
return false; return false;
} }
QString script = file.readAll(); QString script = file.readAll();
if (script.isEmpty()) { if (script.isEmpty()) {
kDebug() << "script is empty"; // qDebug() << "script is empty";
return false; return false;
} }
@ -199,10 +199,10 @@ void ScriptEngine::setupEngine()
bool ScriptEngine::evaluateScript(const QString &script, const QString &path) bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
{ {
//kDebug() << "evaluating" << m_editor->toPlainText(); //qDebug() << "evaluating" << m_editor->toPlainText();
evaluate(script, path); evaluate(script, path);
if (hasUncaughtException()) { if (hasUncaughtException()) {
//kDebug() << "catch the exception!"; //qDebug() << "catch the exception!";
QString error = QString("Error: %1 at line %2\n\nBacktrace:\n%3").arg( QString error = QString("Error: %1 at line %2\n\nBacktrace:\n%3").arg(
uncaughtException().toString(), uncaughtException().toString(),
QString::number(uncaughtExceptionLineNumber()), QString::number(uncaughtExceptionLineNumber()),
@ -216,7 +216,7 @@ bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
void ScriptEngine::exception(const QScriptValue &value) void ScriptEngine::exception(const QScriptValue &value)
{ {
//kDebug() << "exception caught!" << value.toVariant(); //qDebug() << "exception caught!" << value.toVariant();
emit printError(value.toVariant().toString()); emit printError(value.toVariant().toString());
} }
@ -227,7 +227,7 @@ QStringList ScriptEngine::pendingUpdateScripts()
QStringList scriptPaths; QStringList scriptPaths;
if (scripts.isEmpty()) { if (scripts.isEmpty()) {
//kDebug() << "no update scripts"; //qDebug() << "no update scripts";
return scriptPaths; return scriptPaths;
} }
@ -242,7 +242,7 @@ QStringList ScriptEngine::pendingUpdateScripts()
} }
if (script.startsWith(localDir) || script.startsWith(localXdgDir)) { if (script.startsWith(localDir) || script.startsWith(localXdgDir)) {
kDebug() << "skipping user local script: " << script; // qDebug() << "skipping user local script: " << script;
continue; continue;
} }
@ -262,7 +262,7 @@ QStringList ScriptEngine::defaultLayoutScripts()
QStringList scriptPaths; QStringList scriptPaths;
if (scripts.isEmpty()) { if (scripts.isEmpty()) {
//kDebug() << "no javascript based layouts"; //qDebug() << "no javascript based layouts";
return scriptPaths; return scriptPaths;
} }
@ -272,7 +272,7 @@ QStringList ScriptEngine::defaultLayoutScripts()
QSet<QString> scriptNames; QSet<QString> scriptNames;
foreach (const QString &script, scripts) { foreach (const QString &script, scripts) {
if (script.startsWith(localDir) || script.startsWith(localXdgDir)) { if (script.startsWith(localDir) || script.startsWith(localXdgDir)) {
kDebug() << "skipping user local script: " << script; // qDebug() << "skipping user local script: " << script;
continue; continue;
} }
@ -325,7 +325,7 @@ QScriptValue ScriptEngine::addWidget(QScriptContext *context, QScriptEngine *eng
if (v.isNumber()) { if (v.isNumber()) {
column = v.toUInt16(); column = v.toUInt16();
} }
kDebug() << "Calculated position as" << row << column; // qDebug() << "Calculated position as" << row << column;
} }
QScriptValue v = context->argument(0); QScriptValue v = context->argument(0);

View File

@ -27,7 +27,7 @@
#include <QMutexLocker> #include <QMutexLocker>
#include <QTimer> #include <QTimer>
#include <kdebug.h> #include <QDebug>
#include <kplugininfo.h> #include <kplugininfo.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -144,7 +144,7 @@ void AbstractRunner::performMatch(Plasma::RunnerContext &localContext)
// we punish runners that return too slowly, even if they don't bring // we punish runners that return too slowly, even if they don't bring
// back matches // back matches
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << id() << "runner is too slow, putting it on the back burner."; // qDebug() << id() << "runner is too slow, putting it on the back burner.";
#endif #endif
d->fastRuns = 0; d->fastRuns = 0;
setSpeed(SlowSpeed); setSpeed(SlowSpeed);
@ -157,7 +157,7 @@ void AbstractRunner::performMatch(Plasma::RunnerContext &localContext)
// we reward slowed runners who bring back matches fast enough // we reward slowed runners who bring back matches fast enough
// 3 times in a row // 3 times in a row
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << id() << "runner is faster than we thought, kicking it up a notch"; // qDebug() << id() << "runner is faster than we thought, kicking it up a notch";
#endif #endif
setSpeed(NormalSpeed); setSpeed(NormalSpeed);
} }
@ -390,7 +390,7 @@ void AbstractRunnerPrivate::init(const KService::Ptr service)
prepScripting(path, api); prepScripting(path, api);
if (!script) { if (!script) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Could not create a(n)" << api << "ScriptEngine for the" << runnerDescription.name() << "Runner."; // qDebug() << "Could not create a(n)" << api << "ScriptEngine for the" << runnerDescription.name() << "Runner.";
#endif #endif
} }
} }
@ -422,7 +422,7 @@ void AbstractRunnerPrivate::prepScripting(const QString &path, const QString &ap
if (!package->isValid()) { if (!package->isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Invalid Runner package at" << path; // qDebug() << "Invalid Runner package at" << path;
#endif #endif
return; return;
} }
@ -443,7 +443,7 @@ void AbstractRunnerPrivate::setupScriptSupport()
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "setting up script support, package is in" << package->path() // qDebug() << "setting up script support, package is in" << package->path()
<< ", main script is" << package->filePath("mainscript"); << ", main script is" << package->filePath("mainscript");
#endif #endif

View File

@ -36,7 +36,7 @@
#include <kcoreauthorized.h> #include <kcoreauthorized.h>
#include <kcolorscheme.h> #include <kcolorscheme.h>
#include <kdesktopfile.h> #include <kdesktopfile.h>
#include <kdebug.h> #include <QDebug>
#include <kglobalaccel.h> #include <kglobalaccel.h>
#include <kplugininfo.h> #include <kplugininfo.h>
#include <klocalizedstring.h> #include <klocalizedstring.h>
@ -141,7 +141,7 @@ void Applet::save(KConfigGroup &g) const
group = *d->mainConfigGroup(); group = *d->mainConfigGroup();
} }
//kDebug() << "saving" << pluginName() << "to" << group.name(); //qDebug() << "saving" << pluginName() << "to" << group.name();
// we call the dptr member directly for locked since isImmutable() // we call the dptr member directly for locked since isImmutable()
// also checks kiosk and parent containers // also checks kiosk and parent containers
group.writeEntry("immutability", (int)d->immutability); group.writeEntry("immutability", (int)d->immutability);
@ -174,10 +174,10 @@ void Applet::restore(KConfigGroup &group)
setGlobalShortcut(QKeySequence(shortcutText)); setGlobalShortcut(QKeySequence(shortcutText));
/* /*
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "got global shortcut for" << name() << "of" << QKeySequence(shortcutText); // qDebug() << "got global shortcut for" << name() << "of" << QKeySequence(shortcutText);
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "set to" << d->activationAction->objectName() // qDebug() << "set to" << d->activationAction->objectName()
#endif #endif
<< d->activationAction->globalShortcut().primary(); << d->activationAction->globalShortcut().primary();
*/ */
@ -304,7 +304,7 @@ void Applet::constraintsEvent(Plasma::Types::Constraints constraints)
// without calling the Applet:: version as well, which it shouldn't need to. // without calling the Applet:: version as well, which it shouldn't need to.
// INSTEAD put such code into flushPendingConstraintsEvents // INSTEAD put such code into flushPendingConstraintsEvents
Q_UNUSED(constraints) Q_UNUSED(constraints)
//kDebug() << constraints << "constraints are FormFactor: " << formFactor() //qDebug() << constraints << "constraints are FormFactor: " << formFactor()
// << ", Location: " << location(); // << ", Location: " << location();
if (d->script) { if (d->script) {
d->script->constraintsEvent(constraints); d->script->constraintsEvent(constraints);
@ -429,7 +429,7 @@ void Applet::flushPendingConstraintsEvents()
d->constraintsTimer.stop(); d->constraintsTimer.stop();
} }
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!"; //qDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!";
Plasma::Types::Constraints c = d->pendingConstraints; Plasma::Types::Constraints c = d->pendingConstraints;
d->pendingConstraints = Types::NoConstraint; d->pendingConstraints = Types::NoConstraint;
@ -507,7 +507,7 @@ void Applet::flushPendingConstraintsEvents()
QList<QAction*> Applet::contextualActions() QList<QAction*> Applet::contextualActions()
{ {
//kDebug() << "empty context actions"; //qDebug() << "empty context actions";
return d->script ? d->script->contextualActions() : QList<QAction*>(); return d->script ? d->script->contextualActions() : QList<QAction*>();
} }

View File

@ -21,7 +21,7 @@
#include <kconfig.h> #include <kconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <QDebug>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include "applet.h" #include "applet.h"

View File

@ -26,7 +26,7 @@
#include <kjob.h> #include <kjob.h>
#include <QStandardPaths> #include <QStandardPaths>
#include <kdebug.h> #include <QDebug>
#include "applet.h" #include "applet.h"
#include "pluginloader.h" #include "pluginloader.h"
@ -38,7 +38,7 @@ void PlasmoidPackageTest::initTestCase()
void PlasmoidPackageTest::init() void PlasmoidPackageTest::init()
{ {
kDebug() << "PlasmoidPackage::init()"; qDebug() << "PlasmoidPackage::init()";
m_package = QString("Package"); m_package = QString("Package");
m_packageRoot = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/packageRoot"; m_packageRoot = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/packageRoot";
m_defaultPackage = Plasma::PluginLoader::self()->loadPackage("Plasma/Applet"); m_defaultPackage = Plasma::PluginLoader::self()->loadPackage("Plasma/Applet");
@ -47,14 +47,14 @@ void PlasmoidPackageTest::init()
void PlasmoidPackageTest::cleanup() void PlasmoidPackageTest::cleanup()
{ {
kDebug() << "cleaning up"; qDebug() << "cleaning up";
// Clean things up. // Clean things up.
QDir(m_packageRoot).removeRecursively(); QDir(m_packageRoot).removeRecursively();
} }
void PlasmoidPackageTest::createTestPackage(const QString &packageName) void PlasmoidPackageTest::createTestPackage(const QString &packageName)
{ {
kDebug() << "Create test package" << m_packageRoot; qDebug() << "Create test package" << m_packageRoot;
QDir pRoot(m_packageRoot); QDir pRoot(m_packageRoot);
// Create the root and package dir. // Create the root and package dir.
if (!pRoot.exists()) { if (!pRoot.exists()) {
@ -63,7 +63,7 @@ void PlasmoidPackageTest::createTestPackage(const QString &packageName)
// Create the package dir // Create the package dir
QVERIFY(QDir().mkpath(m_packageRoot + "/" + packageName)); QVERIFY(QDir().mkpath(m_packageRoot + "/" + packageName));
kDebug() << "Created" << (m_packageRoot + "/" + packageName); qDebug() << "Created" << (m_packageRoot + "/" + packageName);
// Create the metadata.desktop file // Create the metadata.desktop file
QFile file(m_packageRoot + "/" + packageName + "/metadata.desktop"); QFile file(m_packageRoot + "/" + packageName + "/metadata.desktop");
@ -77,7 +77,7 @@ void PlasmoidPackageTest::createTestPackage(const QString &packageName)
file.flush(); file.flush();
file.close(); file.close();
kDebug() << "OUT: " << packageName; qDebug() << "OUT: " << packageName;
// Create the ui dir. // Create the ui dir.
QVERIFY(QDir().mkpath(m_packageRoot + "/" + packageName + "/contents/ui")); QVERIFY(QDir().mkpath(m_packageRoot + "/" + packageName + "/contents/ui"));
@ -91,7 +91,7 @@ void PlasmoidPackageTest::createTestPackage(const QString &packageName)
file.close(); file.close();
kDebug() << "THIS IS A PLASMOID SCRIPT THING"; qDebug() << "THIS IS A PLASMOID SCRIPT THING";
// Now we have a minimal plasmoid package which is valid. Let's add some // Now we have a minimal plasmoid package which is valid. Let's add some
// files to it for test purposes. // files to it for test purposes.
@ -244,8 +244,8 @@ void PlasmoidPackageTest::entryList()
void PlasmoidPackageTest::createAndInstallPackage() void PlasmoidPackageTest::createAndInstallPackage()
{ {
kDebug() << " "; qDebug() << " ";
kDebug() << " CreateAndInstall "; qDebug() << " CreateAndInstall ";
createTestPackage("plasmoid_to_package"); createTestPackage("plasmoid_to_package");
const QString packagePath = m_packageRoot + '/' + "testpackage.plasmoid"; const QString packagePath = m_packageRoot + '/' + "testpackage.plasmoid";
@ -271,7 +271,7 @@ void PlasmoidPackageTest::createAndInstallPackage()
m_defaultPackageStructure = new Plasma::PackageStructure(this); m_defaultPackageStructure = new Plasma::PackageStructure(this);
Plasma::Package *p = new Plasma::Package(m_defaultPackageStructure); Plasma::Package *p = new Plasma::Package(m_defaultPackageStructure);
kDebug() << "Installing " << archivePath; qDebug() << "Installing " << archivePath;
//const QString packageRoot = "plasma/plasmoids/"; //const QString packageRoot = "plasma/plasmoids/";
//const QString servicePrefix = "plasma-applet-"; //const QString servicePrefix = "plasma-applet-";
KJob* job = p->install(archivePath, m_packageRoot); KJob* job = p->install(archivePath, m_packageRoot);
@ -283,7 +283,7 @@ void PlasmoidPackageTest::createAndInstallPackage()
void PlasmoidPackageTest::packageInstalled(KJob* j) void PlasmoidPackageTest::packageInstalled(KJob* j)
{ {
kDebug() << "!!!!!!!!!!!!!!!!!!!! package installed" << (j->error() == KJob::NoError); qDebug() << "!!!!!!!!!!!!!!!!!!!! package installed" << (j->error() == KJob::NoError);
QVERIFY(j->error() == KJob::NoError); QVERIFY(j->error() == KJob::NoError);
//QVERIFY(p->path()); //QVERIFY(p->path());
@ -296,7 +296,7 @@ void PlasmoidPackageTest::packageInstalled(KJob* j)
void PlasmoidPackageTest::packageUninstalled(KJob* j) void PlasmoidPackageTest::packageUninstalled(KJob* j)
{ {
kDebug() << "!!!!!!!!!!!!!!!!!!!!! package uninstalled"; qDebug() << "!!!!!!!!!!!!!!!!!!!!! package uninstalled";
QVERIFY(j->error() == KJob::NoError); QVERIFY(j->error() == KJob::NoError);
} }

View File

@ -29,7 +29,7 @@
#include <QXmlSimpleReader> #include <QXmlSimpleReader>
#include <QUrl> #include <QUrl>
#include <kdebug.h> #include <QDebug>
namespace Plasma namespace Plasma
{ {
@ -62,7 +62,7 @@ bool ConfigLoaderHandler::startElement(const QString &namespaceURI, const QStrin
Q_UNUSED(namespaceURI) Q_UNUSED(namespaceURI)
Q_UNUSED(qName) Q_UNUSED(qName)
// kDebug() << "ConfigLoaderHandler::startElement(" << localName << qName; // qDebug() << "ConfigLoaderHandler::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") {
@ -70,7 +70,7 @@ bool ConfigLoaderHandler::startElement(const QString &namespaceURI, const QStrin
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); //qDebug() << "set group to" << attrs.value(i);
group = attrs.value(i); group = attrs.value(i);
} }
} }
@ -160,7 +160,7 @@ bool ConfigLoaderHandler::endElement(const QString &namespaceURI,
Q_UNUSED(namespaceURI) Q_UNUSED(namespaceURI)
Q_UNUSED(qName) Q_UNUSED(qName)
// kDebug() << "ConfigLoaderHandler::endElement(" << localName << qName; // qDebug() << "ConfigLoaderHandler::endElement(" << localName << qName;
const QString tag = localName.toLower(); const QString tag = localName.toLower();
if (tag == "entry") { if (tag == "entry") {
addItem(); addItem();

View File

@ -36,7 +36,7 @@
#include <qtemporaryfile.h> #include <qtemporaryfile.h>
#include <qmimedatabase.h> #include <qmimedatabase.h>
#include <kdebug.h> #include <QDebug>
#include <kcoreauthorized.h> #include <kcoreauthorized.h>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
@ -165,11 +165,11 @@ void Containment::restore(KConfigGroup &group)
{ {
/* /*
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "!!!!!!!!!!!!initConstraints" << group.name() << d->type; // qDebug() << "!!!!!!!!!!!!initConstraints" << group.name() << d->type;
kDebug() << " location:" << group.readEntry("location", (int)d->location); // qDebug() << " location:" << group.readEntry("location", (int)d->location);
kDebug() << " geom:" << group.readEntry("geometry", geometry()); // qDebug() << " geom:" << group.readEntry("geometry", geometry());
kDebug() << " formfactor:" << group.readEntry("formfactor", (int)d->formFactor); // qDebug() << " formfactor:" << group.readEntry("formfactor", (int)d->formFactor);
kDebug() << " screen:" << group.readEntry("screen", d->screen); // qDebug() << " screen:" << group.readEntry("screen", d->screen);
#endif #endif
*/ */
if (!isContainment()) { if (!isContainment()) {
@ -179,7 +179,7 @@ void Containment::restore(KConfigGroup &group)
setLocation((Plasma::Types::Location)group.readEntry("location", (int)d->location)); setLocation((Plasma::Types::Location)group.readEntry("location", (int)d->location));
setFormFactor((Plasma::Types::FormFactor)group.readEntry("formfactor", (int)d->formFactor)); setFormFactor((Plasma::Types::FormFactor)group.readEntry("formfactor", (int)d->formFactor));
//kDebug() << "setScreen from restore"; //qDebug() << "setScreen from restore";
d->setScreen(group.readEntry("screen", d->screen)); d->setScreen(group.readEntry("screen", d->screen));
d->activityId = group.readEntry("activityId", QString()); d->activityId = group.readEntry("activityId", QString());
@ -193,10 +193,10 @@ void Containment::restore(KConfigGroup &group)
cfg = KConfigGroup(&cfg, QString::number(containmentType())); cfg = KConfigGroup(&cfg, QString::number(containmentType()));
//kDebug() << cfg.keyList(); //qDebug() << cfg.keyList();
if (cfg.exists()) { if (cfg.exists()) {
foreach (const QString &key, cfg.keyList()) { foreach (const QString &key, cfg.keyList()) {
//kDebug() << "loading" << key; //qDebug() << "loading" << key;
addContainmentActions(key, cfg.readEntry(key, QString())); addContainmentActions(key, cfg.readEntry(key, QString()));
} }
} else { //shell defaults } else { //shell defaults
@ -210,14 +210,14 @@ void Containment::restore(KConfigGroup &group)
defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions"); defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions");
foreach (const QString &key, defaultActionsCfg.keyList()) { foreach (const QString &key, defaultActionsCfg.keyList()) {
//kDebug() << "loading" << key; //qDebug() << "loading" << key;
addContainmentActions(key, cfg.readEntry(key, QString())); addContainmentActions(key, cfg.readEntry(key, QString()));
} }
} }
/* /*
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Containment" << id() << // qDebug() << "Containment" << id() <<
#endif #endif
"screen" << screen() << "screen" << screen() <<
"geometry is" << geometry() << "geometry is" << geometry() <<
@ -270,7 +270,7 @@ void Containment::restoreContents(KConfigGroup &group)
// are added from left to right or top to bottom for a panel containment // are added from left to right or top to bottom for a panel containment
QList<KConfigGroup> appletConfigs; QList<KConfigGroup> appletConfigs;
foreach (const QString &appletGroup, applets.groupList()) { foreach (const QString &appletGroup, applets.groupList()) {
//kDebug() << "reading from applet group" << appletGroup; //qDebug() << "reading from applet group" << appletGroup;
KConfigGroup appletConfig(&applets, appletGroup); KConfigGroup appletConfig(&applets, appletGroup);
appletConfigs.append(appletConfig); appletConfigs.append(appletConfig);
} }
@ -315,7 +315,7 @@ void Containment::setFormFactor(Types::FormFactor formFactor)
return; return;
} }
//kDebug() << "switching FF to " << formFactor; //qDebug() << "switching FF to " << formFactor;
d->formFactor = formFactor; d->formFactor = formFactor;
updateConstraints(Plasma::Types::FormFactorConstraint); updateConstraints(Plasma::Types::FormFactorConstraint);
@ -359,14 +359,14 @@ void Containment::addApplet(Applet *applet)
if (!applet) { if (!applet) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "adding null applet!?!"; // qDebug() << "adding null applet!?!";
#endif #endif
return; return;
} }
if (d->applets.contains(applet)) { if (d->applets.contains(applet)) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "already have this applet!"; // qDebug() << "already have this applet!";
#endif #endif
} }

View File

@ -31,7 +31,7 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QWheelEvent> #include <QWheelEvent>
#include <kdebug.h> #include <QDebug>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>

View File

@ -31,7 +31,7 @@
#include <cmath> #include <cmath>
#include <kdebug.h> #include <QDebug>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kwindowsystem.h> #include <kwindowsystem.h>
@ -51,7 +51,7 @@ Corona::Corona(QObject *parent)
d(new CoronaPrivate(this)) d(new CoronaPrivate(this))
{ {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Corona ctor start"; // qDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Corona ctor start";
#endif #endif
d->init(); d->init();
//setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel))); //setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel)));
@ -224,7 +224,7 @@ void Corona::setImmutability(const Types::ImmutabilityType immutable)
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "setting immutability to" << immutable; // qDebug() << "setting immutability to" << immutable;
#endif #endif
d->immutability = immutable; d->immutability = immutable;
d->updateContainmentImmutability(); d->updateContainmentImmutability();
@ -379,7 +379,7 @@ Containment *CoronaPrivate::addContainment(const QString &name, const QVariantLi
Containment *containment = 0; Containment *containment = 0;
Applet *applet = 0; Applet *applet = 0;
kDebug() << "Loading" << name << args << id; // qDebug() << "Loading" << name << args << id;
if (pluginName.isEmpty() || pluginName == "default") { if (pluginName.isEmpty() || pluginName == "default") {
// default to the desktop containment // default to the desktop containment
@ -398,7 +398,7 @@ Containment *CoronaPrivate::addContainment(const QString &name, const QVariantLi
if (!containment) { if (!containment) {
if (!loadingNull) { if (!loadingNull) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "loading of containment" << name << "failed."; // qDebug() << "loading of containment" << name << "failed.";
#endif #endif
} }
@ -488,9 +488,9 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigGroup &con
containmentConfig.copyTo(&realConf); containmentConfig.copyTo(&realConf);
} }
//kDebug() << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group; //qDebug() << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Adding Containment" << containmentConfig.readEntry("plugin", QString()); // qDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Adding Containment" << containmentConfig.readEntry("plugin", QString());
#endif #endif
Containment *c = addContainment(containmentConfig.readEntry("plugin", QString()), QVariantList(), cid); Containment *c = addContainment(containmentConfig.readEntry("plugin", QString()), QVariantList(), cid);
if (!c) { if (!c) {
@ -501,14 +501,14 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigGroup &con
containmentsIds.insert(c->id()); containmentsIds.insert(c->id());
#ifndef NDEBUG #ifndef NDEBUG
// kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Restored Containment" << c->pluginName(); // qDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Restored Containment" << c->pluginName();
#endif #endif
} }
foreach (Containment *containment, newContainments) { foreach (Containment *containment, newContainments) {
emit q->containmentAdded(containment); emit q->containmentAdded(containment);
#ifndef NDEBUG #ifndef NDEBUG
// kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name(); // qDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();
#endif #endif
} }

View File

@ -20,7 +20,7 @@
#include "private/datacontainer_p.h" #include "private/datacontainer_p.h"
#include "private/storage_p.h" #include "private/storage_p.h"
#include <kdebug.h> #include <QDebug>
#include "plasma.h" #include "plasma.h"
@ -85,7 +85,7 @@ bool DataContainer::visualizationIsConnected(QObject *visualization) const
void DataContainer::connectVisualization(QObject *visualization, uint pollingInterval, void DataContainer::connectVisualization(QObject *visualization, uint pollingInterval,
Plasma::Types::IntervalAlignment alignment) Plasma::Types::IntervalAlignment alignment)
{ {
//kDebug() << "connecting visualization" << visualization << "at interval of" //qDebug() << "connecting visualization" << visualization << "at interval of"
// << pollingInterval << "to" << objectName(); // << pollingInterval << "to" << objectName();
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization); QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
bool connected = objIt != d->relayObjects.end(); bool connected = objIt != d->relayObjects.end();
@ -95,15 +95,15 @@ void DataContainer::connectVisualization(QObject *visualization, uint pollingInt
SignalRelay *relay = objIt.value(); SignalRelay *relay = objIt.value();
if (relay) { if (relay) {
// connected to a relay // connected to a relay
//kDebug() << " already connected, but to a relay"; //qDebug() << " already connected, but to a relay";
if (relay->m_interval == pollingInterval) { if (relay->m_interval == pollingInterval) {
//kDebug() << " already connected to a relay of the same interval of" //qDebug() << " already connected to a relay of the same interval of"
// << pollingInterval << ", nothing to do"; // << pollingInterval << ", nothing to do";
return; return;
} }
if (relay->receiverCount() == 1) { if (relay->receiverCount() == 1) {
//kDebug() << " removing relay, as it is now unused"; //qDebug() << " removing relay, as it is now unused";
d->relays.remove(relay->m_interval); d->relays.remove(relay->m_interval);
delete relay; delete relay;
} else { } else {
@ -115,7 +115,7 @@ void DataContainer::connectVisualization(QObject *visualization, uint pollingInt
// the visualization was connected already, but not to a relay // the visualization was connected already, but not to a relay
// and it still doesn't want to connect to a relay, so we have // and it still doesn't want to connect to a relay, so we have
// nothing to do! // nothing to do!
//kDebug() << " already connected, nothing to do"; //qDebug() << " already connected, nothing to do";
return; return;
} else { } else {
disconnect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)), disconnect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
@ -127,12 +127,12 @@ void DataContainer::connectVisualization(QObject *visualization, uint pollingInt
} }
if (pollingInterval < 1) { if (pollingInterval < 1) {
//kDebug() << " connecting directly"; //qDebug() << " connecting directly";
d->relayObjects[visualization] = 0; d->relayObjects[visualization] = 0;
connect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)), connect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data))); visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data)));
} else { } else {
//kDebug() << " connecting to a relay"; //qDebug() << " connecting to a relay";
// we only want to do an imediate update if this is not the first object to connect to us // we only want to do an imediate update if this is not the first object to connect to us
// if it is the first visualization, then the source will already have been populated // if it is the first visualization, then the source will already have been populated
// engine's sourceRequested method // engine's sourceRequested method
@ -289,7 +289,7 @@ void DataContainer::disconnectVisualization(QObject *visualization)
void DataContainer::checkForUpdate() void DataContainer::checkForUpdate()
{ {
//kDebug() << objectName() << d->dirty; //qDebug() << objectName() << d->dirty;
if (d->dirty) { if (d->dirty) {
emit dataUpdated(objectName(), d->data); emit dataUpdated(objectName(), d->data);
@ -343,7 +343,7 @@ void DataContainer::timerEvent(QTimerEvent * event)
if (event->timerId() == d->checkUsageTimer.timerId()) { if (event->timerId() == d->checkUsageTimer.timerId()) {
if (!isUsed()) { if (!isUsed()) {
// DO NOT CALL ANYTHING AFTER THIS LINE AS IT MAY GET DELETED! // DO NOT CALL ANYTHING AFTER THIS LINE AS IT MAY GET DELETED!
//kDebug() << objectName() << "is unused"; //qDebug() << objectName() << "is unused";
emit becameUnused(objectName()); emit becameUnused(objectName());
} }
d->checkUsageTimer.stop(); d->checkUsageTimer.stop();

View File

@ -27,7 +27,7 @@
#include <QTimerEvent> #include <QTimerEvent>
#include <QVariant> #include <QVariant>
#include <kdebug.h> #include <QDebug>
#include <kplugininfo.h> #include <kplugininfo.h>
#include <kglobal.h> #include <kglobal.h>
#include <kservice.h> #include <kservice.h>
@ -56,7 +56,7 @@ DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent)
d->setupScriptSupport(); d->setupScriptSupport();
d->script->init(); d->script->init();
} else { } else {
// kDebug() << "called"; // qDebug() << "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
} }
@ -64,7 +64,7 @@ DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent)
DataEngine::~DataEngine() DataEngine::~DataEngine()
{ {
//kDebug() << objectName() << ": bye bye birdy! "; //qDebug() << objectName() << ": bye bye birdy! ";
delete d; delete d;
} }
@ -98,7 +98,7 @@ void DataEngine::connectSource(const QString &source, QObject *visualization,
uint pollingInterval, uint pollingInterval,
Plasma::Types::IntervalAlignment intervalAlignment) const Plasma::Types::IntervalAlignment intervalAlignment) const
{ {
//kDebug() << "connectSource" << source; //qDebug() << "connectSource" << source;
bool newSource; bool newSource;
DataContainer *s = d->requestSource(source, &newSource); DataContainer *s = d->requestSource(source, &newSource);
@ -112,7 +112,7 @@ void DataEngine::connectSource(const QString &source, QObject *visualization,
} }
d->connectSource(s, visualization, pollingInterval, intervalAlignment, d->connectSource(s, visualization, pollingInterval, intervalAlignment,
!newSource || pollingInterval > 0); !newSource || pollingInterval > 0);
//kDebug() << " ==> source connected"; //qDebug() << " ==> source connected";
} }
} }
@ -152,7 +152,7 @@ bool DataEngine::updateSourceEvent(const QString &source)
if (d->script) { if (d->script) {
return d->script->updateSourceEvent(source); return d->script->updateSourceEvent(source);
} else { } else {
//kDebug() << source; //qDebug() << source;
return false; //TODO: should this be true to trigger, even needless, updates on every tick? return false; //TODO: should this be true to trigger, even needless, updates on every tick?
} }
} }
@ -224,7 +224,7 @@ void DataEngine::addSource(DataContainer *source)
{ {
if (d->sources.contains(source->objectName())) { if (d->sources.contains(source->objectName())) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "source named \"" << source->objectName() << "\" already exists."; // qDebug() << "source named \"" << source->objectName() << "\" already exists.";
#endif #endif
return; return;
} }
@ -306,17 +306,17 @@ QHash<QString, DataContainer*> DataEngine::containerDict() const
void DataEngine::timerEvent(QTimerEvent *event) void DataEngine::timerEvent(QTimerEvent *event)
{ {
//kDebug(); //qDebug();
if (event->timerId() == d->updateTimerId) { if (event->timerId() == d->updateTimerId) {
// if the freq update is less than 0, don't bother // if the freq update is less than 0, don't bother
if (d->minPollingInterval < 0) { if (d->minPollingInterval < 0) {
//kDebug() << "uh oh.. no polling allowed!"; //qDebug() << "uh oh.. no polling allowed!";
return; return;
} }
// minPollingInterval // minPollingInterval
if (d->updateTimestamp.elapsed() < d->minPollingInterval) { if (d->updateTimestamp.elapsed() < d->minPollingInterval) {
//kDebug() << "hey now.. slow down!"; //qDebug() << "hey now.. slow down!";
return; return;
} }
@ -341,7 +341,7 @@ void DataEngine::updateAllSources()
QHashIterator<QString, Plasma::DataContainer*> it(d->sources); QHashIterator<QString, Plasma::DataContainer*> it(d->sources);
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
//kDebug() << "updating" << it.key(); //qDebug() << "updating" << it.key();
updateSourceEvent(it.key()); updateSourceEvent(it.key());
} }
@ -405,7 +405,7 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
if (!script) { if (!script) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Could not create a" << api << "ScriptEngine for the" // qDebug() << "Could not create a" << api << "ScriptEngine for the"
<< dataEngineDescription.name() << "DataEngine."; << dataEngineDescription.name() << "DataEngine.";
#endif #endif
delete package; delete package;
@ -428,7 +428,7 @@ void DataEnginePrivate::internalUpdateSource(DataContainer *source)
if (minPollingInterval > 0 && if (minPollingInterval > 0 &&
source->timeSinceLastUpdate() < (uint)minPollingInterval) { source->timeSinceLastUpdate() < (uint)minPollingInterval) {
// skip updating this source; it's been too soon // skip updating this source; it's been too soon
//kDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << minPollingInterval; //qDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << minPollingInterval;
//but fake an update so that the signalrelay that triggered this gets the data from the //but fake an update so that the signalrelay that triggered this gets the data from the
//recent update. this way we don't have to worry about queuing - the relay will send a //recent update. this way we don't have to worry about queuing - the relay will send a
//signal immediately and everyone else is undisturbed. //signal immediately and everyone else is undisturbed.
@ -437,11 +437,11 @@ void DataEnginePrivate::internalUpdateSource(DataContainer *source)
} }
if (q->updateSourceEvent(source->objectName())) { if (q->updateSourceEvent(source->objectName())) {
//kDebug() << "queuing an update"; //qDebug() << "queuing an update";
scheduleSourcesUpdated(); scheduleSourcesUpdated();
}/* else { }/* else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "no update"; // qDebug() << "no update";
#endif #endif
}*/ }*/
} }
@ -473,7 +473,7 @@ DataContainer *DataEnginePrivate::source(const QString &sourceName, bool createW
return 0; return 0;
} }
//kDebug() << "DataEngine " << q->objectName() << ": could not find DataContainer " << sourceName << ", creating"; //qDebug() << "DataEngine " << q->objectName() << ": could not find DataContainer " << sourceName << ", creating";
DataContainer *s = new DataContainer(q); DataContainer *s = new DataContainer(q);
s->setObjectName(sourceName); s->setObjectName(sourceName);
sources.insert(sourceName, s); sources.insert(sourceName, s);
@ -489,7 +489,7 @@ void DataEnginePrivate::connectSource(DataContainer *s, QObject *visualization,
Plasma::Types::IntervalAlignment align, Plasma::Types::IntervalAlignment align,
bool immediateCall) bool immediateCall)
{ {
//kDebug() << "connect source called" << s->objectName() << "with interval" << pollingInterval; //qDebug() << "connect source called" << s->objectName() << "with interval" << pollingInterval;
if (pollingInterval > 0) { if (pollingInterval > 0) {
// never more frequently than allowed, never more than 20 times per second // never more frequently than allowed, never more than 20 times per second
@ -503,7 +503,7 @@ void DataEnginePrivate::connectSource(DataContainer *s, QObject *visualization,
if (immediateCall) { if (immediateCall) {
// we don't want to do an immediate call if we are simply // we don't want to do an immediate call if we are simply
// reconnecting // reconnecting
//kDebug() << "immediate call requested, we have:" << s->visualizationIsConnected(visualization); //qDebug() << "immediate call requested, we have:" << s->visualizationIsConnected(visualization);
immediateCall = !s->data().isEmpty() && immediateCall = !s->data().isEmpty() &&
!s->visualizationIsConnected(visualization); !s->visualizationIsConnected(visualization);
} }
@ -537,12 +537,12 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
*newSource = false; *newSource = false;
} }
//kDebug() << "requesting source " << sourceName; //qDebug() << "requesting source " << sourceName;
DataContainer *s = source(sourceName, false); DataContainer *s = source(sourceName, false);
if (!s) { if (!s) {
// we didn't find a data source, so give the engine an opportunity to make one // we didn't find a data source, so give the engine an opportunity to make one
/*kDebug() << "DataEngine " << q->objectName() /*// qDebug() << "DataEngine " << q->objectName()
<< ": could not find DataContainer " << sourceName << ": could not find DataContainer " << sourceName
<< " will create on request" << endl;*/ << " will create on request" << endl;*/
waitingSourceRequest = sourceName; waitingSourceRequest = sourceName;
@ -574,7 +574,7 @@ void DataEnginePrivate::setupScriptSupport()
/* /*
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "sletting up script support, package is in" << package->path() // qDebug() << "sletting up script support, package is in" << package->path()
#endif #endif
<< "which is a" << package->structure()->type() << "package" << "which is a" << package->structure()->type() << "package"
<< ", main script is" << package->filePath("mainscript"); << ", main script is" << package->filePath("mainscript");

View File

@ -25,7 +25,7 @@
#include <QSet> #include <QSet>
#include <qurlpathinfo.h> #include <qurlpathinfo.h>
#include <kdebug.h> #include <QDebug>
#include "private/dataenginemanager_p.h" #include "private/dataenginemanager_p.h"
#include "servicejob.h" #include "servicejob.h"
@ -36,36 +36,36 @@ namespace Plasma
void DataEngineConsumerPrivate::slotJobFinished(Plasma::ServiceJob *job) void DataEngineConsumerPrivate::slotJobFinished(Plasma::ServiceJob *job)
{ {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "engine ready!"; // qDebug() << "engine ready!";
#endif #endif
QString engineName = job->parameters()["EngineName"].toString(); QString engineName = job->parameters()["EngineName"].toString();
QString location = job->destination(); QString location = job->destination();
QPair<QString, QString> pair(location, engineName); QPair<QString, QString> pair(location, engineName);
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "pair = " << pair; // qDebug() << "pair = " << pair;
#endif #endif
} }
void DataEngineConsumerPrivate::slotServiceReady(Plasma::Service *plasmoidService) void DataEngineConsumerPrivate::slotServiceReady(Plasma::Service *plasmoidService)
{ {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "service ready!"; // qDebug() << "service ready!";
#endif #endif
if (!engineNameForService.contains(plasmoidService)) { if (!engineNameForService.contains(plasmoidService)) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "no engine name for service!"; // qDebug() << "no engine name for service!";
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "amount of services in map: " << engineNameForService.count(); // qDebug() << "amount of services in map: " << engineNameForService.count();
#endif #endif
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "value = " << engineNameForService.value(plasmoidService); // qDebug() << "value = " << engineNameForService.value(plasmoidService);
#endif #endif
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "requesting dataengine!"; // qDebug() << "requesting dataengine!";
#endif #endif
QVariantMap op = plasmoidService->operationDescription("DataEngine"); QVariantMap op = plasmoidService->operationDescription("DataEngine");
op["EngineName"] = engineNameForService.value(plasmoidService); op["EngineName"] = engineNameForService.value(plasmoidService);

View File

@ -30,7 +30,7 @@
#include <QStringBuilder> #include <QStringBuilder>
#include <QTimer> #include <QTimer>
#include <kdebug.h> #include <QDebug>
#include <theme.h> #include <theme.h>
#include <private/svg_p.h> #include <private/svg_p.h>
@ -129,10 +129,10 @@ void FrameSvg::setEnabledBorders(const EnabledBorders borders)
const QString newKey = d->cacheId(fd, d->prefix); const QString newKey = d->cacheId(fd, d->prefix);
fd->enabledBorders = oldBorders; fd->enabledBorders = oldBorders;
//kDebug() << "looking for" << newKey; //qDebug() << "looking for" << newKey;
FrameData *newFd = FrameSvgPrivate::s_sharedFrames.value(newKey); FrameData *newFd = FrameSvgPrivate::s_sharedFrames.value(newKey);
if (newFd) { if (newFd) {
//kDebug() << "FOUND IT!" << newFd->refcount; //qDebug() << "FOUND IT!" << newFd->refcount;
// we've found a math, so insert that new one and ref it .. // we've found a math, so insert that new one and ref it ..
newFd->ref(this); newFd->ref(this);
d->frames.insert(d->prefix, newFd); d->frames.insert(d->prefix, newFd);
@ -140,7 +140,7 @@ void FrameSvg::setEnabledBorders(const EnabledBorders borders)
//.. then deref the old one and if it's no longer used, get rid of it //.. then deref the old one and if it's no longer used, get rid of it
if (fd->deref(this)) { if (fd->deref(this)) {
//const QString oldKey = d->cacheId(fd, d->prefix); //const QString oldKey = d->cacheId(fd, d->prefix);
//kDebug() << "1. Removing it" << oldKey << fd->refcount; //qDebug() << "1. Removing it" << oldKey << fd->refcount;
FrameSvgPrivate::s_sharedFrames.remove(oldKey); FrameSvgPrivate::s_sharedFrames.remove(oldKey);
delete fd; delete fd;
} }
@ -244,7 +244,7 @@ void FrameSvg::setElementPrefix(const QString &prefix)
// we have to cache after inserting the frame since the cacheId requires the // we have to cache after inserting the frame since the cacheId requires the
// frame to be in the frames collection already // frame to be in the frames collection already
const QString key = d->cacheId(oldFrameData, d->prefix); const QString key = d->cacheId(oldFrameData, d->prefix);
//kDebug() << this << " 1. inserting as" << key; //qDebug() << this << " 1. inserting as" << key;
FrameSvgPrivate::s_sharedFrames.insert(key, newFd); FrameSvgPrivate::s_sharedFrames.insert(key, newFd);
} }
@ -321,7 +321,7 @@ void FrameSvg::resizeFrame(const QSizeF &size)
if (size.isEmpty()) { if (size.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Invalid size" << size; // qDebug() << "Invalid size" << size;
#endif #endif
return; return;
} }
@ -337,10 +337,10 @@ void FrameSvg::resizeFrame(const QSizeF &size)
const QString newKey = d->cacheId(fd, d->prefix); const QString newKey = d->cacheId(fd, d->prefix);
fd->frameSize = currentSize; fd->frameSize = currentSize;
//kDebug() << "looking for" << newKey; //qDebug() << "looking for" << newKey;
FrameData *newFd = FrameSvgPrivate::s_sharedFrames.value(newKey); FrameData *newFd = FrameSvgPrivate::s_sharedFrames.value(newKey);
if (newFd) { if (newFd) {
//kDebug() << "FOUND IT!" << newFd->refcount; //qDebug() << "FOUND IT!" << newFd->refcount;
// we've found a math, so insert that new one and ref it .. // we've found a math, so insert that new one and ref it ..
newFd->ref(this); newFd->ref(this);
d->frames.insert(d->prefix, newFd); d->frames.insert(d->prefix, newFd);
@ -348,7 +348,7 @@ void FrameSvg::resizeFrame(const QSizeF &size)
//.. then deref the old one and if it's no longer used, get rid of it //.. then deref the old one and if it's no longer used, get rid of it
if (fd->deref(this)) { if (fd->deref(this)) {
//const QString oldKey = d->cacheId(fd, d->prefix); //const QString oldKey = d->cacheId(fd, d->prefix);
//kDebug() << "1. Removing it" << oldKey << fd->refcount; //qDebug() << "1. Removing it" << oldKey << fd->refcount;
FrameSvgPrivate::s_sharedFrames.remove(oldKey); FrameSvgPrivate::s_sharedFrames.remove(oldKey);
delete fd; delete fd;
} }
@ -541,7 +541,7 @@ FrameSvgPrivate::~FrameSvgPrivate()
{ {
#ifdef DEBUG_FRAMESVG_CACHE #ifdef DEBUG_FRAMESVG_CACHE
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "*************" << q << q->imagePath() << "****************"; // qDebug() << "*************" << q << q->imagePath() << "****************";
#endif #endif
#endif #endif
@ -555,7 +555,7 @@ FrameSvgPrivate::~FrameSvgPrivate()
const QString key = cacheId(it.value(), it.key()); const QString key = cacheId(it.value(), it.key());
#ifdef DEBUG_FRAMESVG_CACHE #ifdef DEBUG_FRAMESVG_CACHE
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "2. Removing it" << key << it.value() << it.value()->refcount() << s_sharedFrames.contains(key); // qDebug() << "2. Removing it" << key << it.value() << it.value()->refcount() << s_sharedFrames.contains(key);
#endif #endif
#endif #endif
s_sharedFrames.remove(key); s_sharedFrames.remove(key);
@ -564,12 +564,12 @@ FrameSvgPrivate::~FrameSvgPrivate()
#ifdef DEBUG_FRAMESVG_CACHE #ifdef DEBUG_FRAMESVG_CACHE
else { else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "still shared:" << cacheId(it.value(), it.key()) << it.value() << it.value()->refcount() << it.value()->isUsed(); // qDebug() << "still shared:" << cacheId(it.value(), it.key()) << it.value() << it.value()->refcount() << it.value()->isUsed();
#endif #endif
} }
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "lost our value for" << it.key(); // qDebug() << "lost our value for" << it.key();
#endif #endif
#endif #endif
} }
@ -583,22 +583,22 @@ FrameSvgPrivate::~FrameSvgPrivate()
const int rc = it2.value()->refcount(); const int rc = it2.value()->refcount();
if (rc == 0) { if (rc == 0) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << " LOST!" << it2.key() << rc << it2.value();// << it2.value()->references; // qDebug() << " LOST!" << it2.key() << rc << it2.value();// << it2.value()->references;
#endif #endif
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << " " << it2.key() << rc << it2.value(); // qDebug() << " " << it2.key() << rc << it2.value();
#endif #endif
foreach (FrameSvg *data, it2.value()->references.keys()) { foreach (FrameSvg *data, it2.value()->references.keys()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug( )<< " " << (void*)data << it2.value()->references[data]; qDebug()<< " " << (void*)data << it2.value()->references[data];
#endif #endif
} }
shares += rc - 1; shares += rc - 1;
} }
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "#####################################" << s_sharedFrames.count() << ", pixmaps saved:" << shares; // qDebug() << "#####################################" << s_sharedFrames.count() << ", pixmaps saved:" << shares;
#endif #endif
#endif #endif
@ -749,7 +749,7 @@ void FrameSvgPrivate::generateBackground(FrameData *frame)
void FrameSvgPrivate::generateFrameBackground(FrameData *frame) void FrameSvgPrivate::generateFrameBackground(FrameData *frame)
{ {
//kDebug() << "generating background"; //qDebug() << "generating background";
const QSizeF size = frameSize(frame); const QSizeF size = frameSize(frame);
const int topWidth = q->elementSize(prefix % "top").width(); const int topWidth = q->elementSize(prefix % "top").width();
const int leftHeight = q->elementSize(prefix % "left").height(); const int leftHeight = q->elementSize(prefix % "left").height();
@ -759,12 +759,12 @@ void FrameSvgPrivate::generateFrameBackground(FrameData *frame)
if (!size.isValid()) { if (!size.isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Invalid frame size" << size; // qDebug() << "Invalid frame size" << size;
#endif #endif
return; return;
} }
if (size.width() >= MAX_FRAME_SIZE || size.height() >= MAX_FRAME_SIZE) { if (size.width() >= MAX_FRAME_SIZE || size.height() >= MAX_FRAME_SIZE) {
kWarning() << "Not generating frame background for a size whose width or height is more than" << MAX_FRAME_SIZE << size; qWarning() << "Not generating frame background for a size whose width or height is more than" << MAX_FRAME_SIZE << size;
return; return;
} }
@ -955,7 +955,7 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave, const QPixmap &bac
const QString id = cacheId(frame, prefixToSave); const QString id = cacheId(frame, prefixToSave);
//kDebug()<<"Saving to cache frame"<<id; //qDebug()<<"Saving to cache frame"<<id;
theme->insertIntoCache(id, background, QString::number((qint64)q, 16) % prefixToSave); theme->insertIntoCache(id, background, QString::number((qint64)q, 16) % prefixToSave);
@ -967,7 +967,7 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave, const QPixmap &bac
void FrameSvgPrivate::updateSizes() const void FrameSvgPrivate::updateSizes() const
{ {
//kDebug() << "!!!!!!!!!!!!!!!!!!!!!! updating sizes" << prefix; //qDebug() << "!!!!!!!!!!!!!!!!!!!!!! updating sizes" << prefix;
FrameData *frame = frames[prefix]; FrameData *frame = frames[prefix];
Q_ASSERT(frame); Q_ASSERT(frame);
@ -1059,13 +1059,13 @@ QSizeF FrameSvgPrivate::frameSize(FrameData *frame) const
void FrameData::ref(FrameSvg *svg) void FrameData::ref(FrameSvg *svg)
{ {
references[svg] = references[svg] + 1; references[svg] = references[svg] + 1;
//kDebug() << this << svg << references[svg]; //qDebug() << this << svg << references[svg];
} }
bool FrameData::deref(FrameSvg *svg) bool FrameData::deref(FrameSvg *svg)
{ {
references[svg] = references[svg] - 1; references[svg] = references[svg] - 1;
//kDebug() << this << svg << references[svg]; //qDebug() << this << svg << references[svg];
if (references[svg] < 1) { if (references[svg] < 1) {
references.remove(svg); references.remove(svg);
} }

View File

@ -25,7 +25,7 @@
#include <qtemporarydir.h> #include <qtemporarydir.h>
#include <karchive.h> #include <karchive.h>
#include <kdebug.h> #include <QDebug>
#include <kdesktopfile.h> #include <kdesktopfile.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -114,7 +114,7 @@ bool Package::isValid() const
} }
if (failed) { if (failed) {
kWarning() << "Could not find required" << (it.value().directory ? "directory" : "file") << it.key(); qWarning() << "Could not find required" << (it.value().directory ? "directory" : "file") << it.key();
d->valid = false; d->valid = false;
break; break;
} }
@ -246,7 +246,7 @@ QString PackagePrivate::unpack(const QString& filePath) {
mimeType.inherits("application/x-xz") || mimeType.inherits("application/x-lzma")) { mimeType.inherits("application/x-xz") || mimeType.inherits("application/x-lzma")) {
archive = new KTar(filePath); archive = new KTar(filePath);
} else { } else {
kWarning() << "Could not open package file, unsupported archive format:" << filePath << mimeType.name(); qWarning() << "Could not open package file, unsupported archive format:" << filePath << mimeType.name();
} }
QString tempRoot; QString tempRoot;
if (archive && archive->open(QIODevice::ReadOnly)) { if (archive && archive->open(QIODevice::ReadOnly)) {
@ -257,7 +257,7 @@ QString PackagePrivate::unpack(const QString& filePath) {
createPackageMetadata(tempdir.path() + '/'); createPackageMetadata(tempdir.path() + '/');
tempRoot = tempdir.path() + '/'; tempRoot = tempdir.path() + '/';
} else { } else {
kWarning() << "Could not open package file:" << path; qWarning() << "Could not open package file:" << path;
} }
delete archive; delete archive;
@ -267,7 +267,7 @@ QString PackagePrivate::unpack(const QString& filePath) {
QString Package::filePath(const char *fileType, const QString &filename) const QString Package::filePath(const char *fileType, const QString &filename) const
{ {
if (!d->valid) { if (!d->valid) {
//kDebug() << "package is not valid"; //qDebug() << "package is not valid";
return QString(); return QString();
} }
@ -280,16 +280,16 @@ QString Package::filePath(const char *fileType, const QString &filename) const
QStringList paths; QStringList paths;
if (qstrlen(fileType) != 0) { if (qstrlen(fileType) != 0) {
kDebug()<<d->contents.keys(); qDebug()<<d->contents.keys();
if (!d->contents.contains(fileType)) { if (!d->contents.contains(fileType)) {
kDebug() << "package does not contain" << fileType << filename; qDebug() << "package does not contain" << fileType << filename;
return QString(); return QString();
} }
paths = d->contents[fileType].paths; paths = d->contents[fileType].paths;
if (paths.isEmpty()) { if (paths.isEmpty()) {
//kDebug() << "no matching path came of it, while looking for" << fileType << filename; //qDebug() << "no matching path came of it, while looking for" << fileType << filename;
d->discoveries.insert(discoveryKey, QString()); d->discoveries.insert(discoveryKey, QString());
return QString(); return QString();
} }
@ -299,7 +299,7 @@ QString Package::filePath(const char *fileType, const QString &filename) const
} }
//Nested loop, but in the medium case resolves to just one iteration //Nested loop, but in the medium case resolves to just one iteration
//kDebug() << "prefixes:" << prefixes.count() << prefixes; //qDebug() << "prefixes:" << prefixes.count() << prefixes;
foreach (const QString &contentsPrefix, d->contentsPrefixPaths) { foreach (const QString &contentsPrefix, d->contentsPrefixPaths) {
const QString prefix(d->path + contentsPrefix); const QString prefix(d->path + contentsPrefix);
@ -310,10 +310,10 @@ QString Package::filePath(const char *fileType, const QString &filename) const
file.append("/").append(filename); file.append("/").append(filename);
} }
//kDebug() << "testing" << file << QFile::exists("/bin/ls") << QFile::exists(file); //qDebug() << "testing" << file << QFile::exists("/bin/ls") << QFile::exists(file);
if (QFile::exists(file)) { if (QFile::exists(file)) {
if (d->externalPaths) { if (d->externalPaths) {
//kDebug() << "found" << file; //qDebug() << "found" << file;
d->discoveries.insert(discoveryKey, file); d->discoveries.insert(discoveryKey, file);
return file; return file;
} }
@ -323,9 +323,9 @@ QString Package::filePath(const char *fileType, const QString &filename) const
QDir dir(file); QDir dir(file);
QString canonicalized = dir.canonicalPath() + QDir::separator(); QString canonicalized = dir.canonicalPath() + QDir::separator();
//kDebug() << "testing that" << canonicalized << "is in" << d->path; //qDebug() << "testing that" << canonicalized << "is in" << d->path;
if (canonicalized.startsWith(d->path)) { if (canonicalized.startsWith(d->path)) {
//kDebug() << "found" << file; //qDebug() << "found" << file;
d->discoveries.insert(discoveryKey, file); d->discoveries.insert(discoveryKey, file);
return file; return file;
} }
@ -333,7 +333,7 @@ QString Package::filePath(const char *fileType, const QString &filename) const
} }
} }
//kDebug() << fileType << filename << "does not exist in" << prefixes << "at root" << d->path; //qDebug() << fileType << filename << "does not exist in" << prefixes << "at root" << d->path;
return QString(); return QString();
} }
@ -345,18 +345,18 @@ QStringList Package::entryList(const char *key) const
QHash<QByteArray, ContentStructure>::const_iterator it = d->contents.constFind(key); QHash<QByteArray, ContentStructure>::const_iterator it = d->contents.constFind(key);
if (it == d->contents.constEnd()) { if (it == d->contents.constEnd()) {
//kDebug() << "couldn't find" << key; //qDebug() << "couldn't find" << key;
return QStringList(); return QStringList();
} }
//kDebug() << "going to list" << key; //qDebug() << "going to list" << key;
QStringList list; QStringList list;
foreach (const QString &prefix, d->contentsPrefixPaths) { foreach (const QString &prefix, d->contentsPrefixPaths) {
//kDebug() << " looking in" << prefix; //qDebug() << " looking in" << prefix;
foreach (const QString &path, it.value().paths) { foreach (const QString &path, it.value().paths) {
//kDebug() << " looking in" << path; //qDebug() << " looking in" << path;
if (it.value().directory) { if (it.value().directory) {
//kDebug() << "it's a directory, so trying out" << d->path + prefix + path; //qDebug() << "it's a directory, so trying out" << d->path + prefix + path;
QDir dir(d->path + prefix + path); QDir dir(d->path + prefix + path);
if (d->externalPaths) { if (d->externalPaths) {
@ -371,7 +371,7 @@ QStringList Package::entryList(const char *key) const
} }
} else { } else {
const QString fullPath = d->path + prefix + path; const QString fullPath = d->path + prefix + path;
//kDebug() << "it's a file at" << fullPath << QFile::exists(fullPath); //qDebug() << "it's a file at" << fullPath << QFile::exists(fullPath);
if (!QFile::exists(fullPath)) { if (!QFile::exists(fullPath)) {
continue; continue;
} }
@ -382,7 +382,7 @@ QStringList Package::entryList(const char *key) const
QDir dir(fullPath); QDir dir(fullPath);
QString canonicalized = dir.canonicalPath() + QDir::separator(); QString canonicalized = dir.canonicalPath() + QDir::separator();
//kDebug() << "testing that" << canonicalized << "is in" << d->path; //qDebug() << "testing that" << canonicalized << "is in" << d->path;
if (canonicalized.startsWith(d->path)) { if (canonicalized.startsWith(d->path)) {
list += fullPath; list += fullPath;
} }
@ -528,7 +528,7 @@ void Package::setContentsPrefixPaths(const QStringList &prefixPaths)
QString Package::contentsHash() const QString Package::contentsHash() const
{ {
if (!d->valid) { if (!d->valid) {
kWarning() << "can not create hash due to Package being invalid"; qWarning() << "can not create hash due to Package being invalid";
return QString(); return QString();
} }
@ -541,10 +541,10 @@ QString Package::contentsHash() const
hash.addData(f.read(1024)); hash.addData(f.read(1024));
} }
} else { } else {
kWarning() << "could not add" << f.fileName() << "to the hash; file could not be opened for reading."; qWarning() << "could not add" << f.fileName() << "to the hash; file could not be opened for reading.";
} }
} else { } else {
kWarning() << "no metadata at" << metadataPath; qWarning() << "no metadata at" << metadataPath;
} }
foreach (QString prefix, d->contentsPrefixPaths) { foreach (QString prefix, d->contentsPrefixPaths) {
@ -700,8 +700,8 @@ KJob* Package::install(const QString &sourcePackage, const QString &packageRoot)
{ {
const QString src = sourcePackage; const QString src = sourcePackage;
const QString dest = packageRoot.isEmpty() ? defaultPackageRoot() : packageRoot; const QString dest = packageRoot.isEmpty() ? defaultPackageRoot() : packageRoot;
//kDebug() << "Source: " << src; //qDebug() << "Source: " << src;
//kDebug() << "PackageRoot: " << dest; //qDebug() << "PackageRoot: " << dest;
KJob *j = d->structure.data()->install(this, src, dest); KJob *j = d->structure.data()->install(this, src, dest);
//connect(j, SIGNAL(finished(bool)), SLOT(installFinished(bool))); //connect(j, SIGNAL(finished(bool)), SLOT(installFinished(bool)));
return j; return j;
@ -797,7 +797,7 @@ void PackagePrivate::updateHash(const QString &basePath, const QString &subPath,
hash.addData(f.read(1024)); hash.addData(f.read(1024));
} }
} else { } else {
kWarning() << "could not add" << f.fileName() << "to the hash; file could not be opened for reading. " qWarning() << "could not add" << f.fileName() << "to the hash; file could not be opened for reading. "
<< "permissions fail?" << info.permissions() << info.isFile(); << "permissions fail?" << info.permissions() << info.isFile();
} }
} }

View File

@ -18,7 +18,7 @@
*******************************************************************************/ *******************************************************************************/
#include "packagestructure.h" #include "packagestructure.h"
#include <kdebug.h> #include <QDebug>
#include <private/packagejob_p.h> #include <private/packagejob_p.h>
#include "private/package_p.h" #include "private/package_p.h"

View File

@ -21,7 +21,7 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <kdebug.h> #include <QDebug>
#include <kservice.h> #include <kservice.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
#include <kglobal.h> #include <kglobal.h>
@ -127,7 +127,7 @@ void PluginLoader::setPluginLoader(PluginLoader* loader)
s_pluginLoader = loader; s_pluginLoader = loader;
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Cannot set pluginLoader, already set!" << s_pluginLoader; // qDebug() << "Cannot set pluginLoader, already set!" << s_pluginLoader;
#endif #endif
} }
} }
@ -172,14 +172,14 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
if (offers.isEmpty()) { if (offers.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "offers is empty for " << name; // qDebug() << "offers is empty for " << name;
#endif #endif
return 0; return 0;
} }
#ifndef NDEBUG #ifndef NDEBUG
if (offers.count() > 1) { if (offers.count() > 1) {
kDebug() << "hey! we got more than one! let's blindly take the first one"; // qDebug() << "hey! we got more than one! let's blindly take the first one";
} }
#endif #endif
@ -194,7 +194,7 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
if (!offer->property("X-Plasma-API").toString().isEmpty()) { if (!offer->property("X-Plasma-API").toString().isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "we have a script using the" // qDebug() << "we have a script using the"
<< offer->property("X-Plasma-API").toString() << "API"; << offer->property("X-Plasma-API").toString() << "API";
#endif #endif
if (isContainment) { if (isContainment) {
@ -219,7 +219,7 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
applet = offer->createInstance<Plasma::Applet>(0, allArgs, &error); applet = offer->createInstance<Plasma::Applet>(0, allArgs, &error);
if (!applet) { if (!applet) {
kWarning() << "Could not load applet" << name << "! reason given:" << error; qWarning() << "Could not load applet" << name << "! reason given:" << error;
} }
return applet; return applet;
@ -240,7 +240,7 @@ DataEngine *PluginLoader::loadDataEngine(const QString &name)
if (offers.isEmpty()) { if (offers.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "offers are empty for " << name << " with constraint " << constraint; // qDebug() << "offers are empty for " << name << " with constraint " << constraint;
#endif #endif
} else { } else {
QVariantList allArgs; QVariantList allArgs;
@ -260,7 +260,7 @@ DataEngine *PluginLoader::loadDataEngine(const QString &name)
if (!engine) { if (!engine) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Couldn't load engine \"" << name << "\". Error given: " << error; // qDebug() << "Couldn't load engine \"" << name << "\". Error given: " << error;
#endif #endif
} }
@ -335,7 +335,7 @@ Service *PluginLoader::loadService(const QString &name, const QVariantList &args
if (offers.isEmpty()) { if (offers.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "offers is empty for " << name; // qDebug() << "offers is empty for " << name;
#endif #endif
return new NullService(name, parent); return new NullService(name, parent);
} }
@ -349,7 +349,7 @@ Service *PluginLoader::loadService(const QString &name, const QVariantList &args
if (!service) { if (!service) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Couldn't load Service \"" << name << "\"! reason given: " << error; // qDebug() << "Couldn't load Service \"" << name << "\"! reason given: " << error;
#endif #endif
return new NullService(name, parent); return new NullService(name, parent);
} }
@ -377,7 +377,7 @@ ContainmentActions *PluginLoader::loadContainmentActions(Containment *parent, co
if (offers.isEmpty()) { if (offers.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "offers is empty for " << name; // qDebug() << "offers is empty for " << name;
#endif #endif
return 0; return 0;
} }
@ -396,7 +396,7 @@ ContainmentActions *PluginLoader::loadContainmentActions(Containment *parent, co
if (!actions) { if (!actions) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Couldn't load containmentActions \"" << name << "\"! reason given: " << error; // qDebug() << "Couldn't load containmentActions \"" << name << "\"! reason given: " << error;
#endif #endif
} }
@ -477,7 +477,7 @@ Package PluginLoader::loadPackage(const QString &packageFormat, const QString &s
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Couldn't load Package for" << packageFormat << "! reason given: " << error; // qDebug() << "Couldn't load Package for" << packageFormat << "! reason given: " << error;
#endif #endif
} }
@ -510,7 +510,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
//kDebug() << "Applet::listAppletInfo constraint was '" << constraint //qDebug() << "Applet::listAppletInfo constraint was '" << constraint
// << "' which got us " << offers.count() << " matches"; // << "' which got us " << offers.count() << " matches";
return KPluginInfo::fromServices(offers); return KPluginInfo::fromServices(offers);
} }
@ -519,7 +519,7 @@ KPluginInfo::List PluginLoader::listAppletInfoForMimeType(const QString &mimeTyp
{ {
QString constraint = PluginLoaderPrivate::parentAppConstraint(); QString constraint = PluginLoaderPrivate::parentAppConstraint();
constraint.append(QString(" and '%1' in [X-Plasma-DropMimeTypes]").arg(mimeType)); constraint.append(QString(" and '%1' in [X-Plasma-DropMimeTypes]").arg(mimeType));
//kDebug() << "listAppletInfoForMimetype with" << mimeType << constraint; //qDebug() << "listAppletInfoForMimetype with" << mimeType << 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);
} }
@ -539,7 +539,7 @@ KPluginInfo::List PluginLoader::listAppletInfoForUrl(const QUrl &url)
rx.setPatternSyntax(QRegExp::Wildcard); rx.setPatternSyntax(QRegExp::Wildcard);
if (rx.exactMatch(url.toString())) { if (rx.exactMatch(url.toString())) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << info.name() << "matches" << glob << url; // qDebug() << info.name() << "matches" << glob << url;
#endif #endif
filtered << info; filtered << info;
} }
@ -571,10 +571,10 @@ QStringList PluginLoader::listAppletCategories(const QString &parentApp, bool vi
continue; continue;
} }
//kDebug() << " and we have " << appletCategory; //qDebug() << " and we have " << appletCategory;
if (!appletCategory.isEmpty() && !known.contains(appletCategory.toLower())) { if (!appletCategory.isEmpty() && !known.contains(appletCategory.toLower())) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Unknown category: " << applet->name() << "says it is in the" // qDebug() << "Unknown category: " << applet->name() << "says it is in the"
<< appletCategory << "category which is unknown to us"; << appletCategory << "category which is unknown to us";
#endif #endif
appletCategory.clear(); appletCategory.clear();
@ -663,14 +663,14 @@ KPluginInfo::List PluginLoader::listContainmentsOfType(const QString &type,
} }
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
kDebug() << "constraint was" << constraint << "which got us" << offers.count() << "matches"; // qDebug() << "constraint was" << constraint << "which got us" << offers.count() << "matches";
return KPluginInfo::fromServices(offers); return KPluginInfo::fromServices(offers);
} }
KPluginInfo::List PluginLoader::listContainmentsForMimeType(const QString &mimeType) KPluginInfo::List PluginLoader::listContainmentsForMimeType(const QString &mimeType)
{ {
const QString constraint = QString("'%1' in [X-Plasma-DropMimeTypes]").arg(mimeType); const QString constraint = QString("'%1' in [X-Plasma-DropMimeTypes]").arg(mimeType);
//kDebug() << mimeType << constraint; //qDebug() << mimeType << constraint;
const KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint); const KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
return KPluginInfo::fromServices(offers); return KPluginInfo::fromServices(offers);
} }

View File

@ -28,7 +28,7 @@
#include <QFile> #include <QFile>
#include <qstandardpaths.h> #include <qstandardpaths.h>
#include <kdebug.h> #include <QDebug>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocale.h> #include <klocale.h>
#include <klocalizedstring.h> #include <klocalizedstring.h>
@ -81,7 +81,7 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
AppletPrivate::~AppletPrivate() AppletPrivate::~AppletPrivate()
{ {
if (activationAction && globalShortcutEnabled) { if (activationAction && globalShortcutEnabled) {
//kDebug() << "resetting global action for" << q->title() << activationAction->objectName(); //qDebug() << "resetting global action for" << q->title() << activationAction->objectName();
KGlobalAccel::self()->removeAllShortcuts(activationAction); KGlobalAccel::self()->removeAllShortcuts(activationAction);
} }
@ -114,7 +114,7 @@ void AppletPrivate::init(const QString &packagePath)
if (!appletDescription.isValid()) { if (!appletDescription.isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Check your constructor! " // qDebug() << "Check your constructor! "
<< "You probably want to be passing in a Service::Ptr " << "You probably want to be passing in a Service::Ptr "
<< "or a QVariantList with a valid storageid as arg[0]."; << "or a QVariantList with a valid storageid as arg[0].";
#endif #endif
@ -190,7 +190,7 @@ void AppletPrivate::globalShortcutChanged()
KConfigGroup shortcutConfig(mainConfigGroup(), "Shortcuts"); KConfigGroup shortcutConfig(mainConfigGroup(), "Shortcuts");
shortcutConfig.writeEntry("global", activationAction->shortcut().toString()); shortcutConfig.writeEntry("global", activationAction->shortcut().toString());
scheduleModificationNotification(); scheduleModificationNotification();
//kDebug() << "after" << shortcut.primary() << d->activationAction->globalShortcut().primary(); //qDebug() << "after" << shortcut.primary() << d->activationAction->globalShortcut().primary();
} }
KActionCollection* AppletPrivate::defaultActions(QObject *parent) KActionCollection* AppletPrivate::defaultActions(QObject *parent)
@ -294,7 +294,7 @@ void AppletPrivate::setupPackage()
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "setting up script support, package is in" << package->path() // qDebug() << "setting up script support, package is in" << package->path()
<< ", main script is" << package->filePath("mainscript"); << ", main script is" << package->filePath("mainscript");
#endif #endif
@ -355,7 +355,7 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
if (isContainment) { if (isContainment) {
Corona *corona = static_cast<Containment*>(q)->corona(); Corona *corona = static_cast<Containment*>(q)->corona();
KConfigGroup containmentConfig; KConfigGroup containmentConfig;
//kDebug() << "got a corona, baby?" << (QObject*)corona << (QObject*)q; //qDebug() << "got a corona, baby?" << (QObject*)corona << (QObject*)q;
if (corona) { if (corona) {
containmentConfig = KConfigGroup(corona->config(), "Containments"); containmentConfig = KConfigGroup(corona->config(), "Containments");
@ -379,7 +379,7 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
appletConfig = c->config(); appletConfig = c->config();
appletConfig = KConfigGroup(&appletConfig, "Applets"); appletConfig = KConfigGroup(&appletConfig, "Applets");
} else { } else {
kWarning() << "requesting config for" << q->title() << "without a containment!"; qWarning() << "requesting config for" << q->title() << "without a containment!";
appletConfig = KConfigGroup(KSharedConfig::openConfig(), "Applets"); appletConfig = KConfigGroup(KSharedConfig::openConfig(), "Applets");
} }

View File

@ -24,7 +24,7 @@
#include <kactioncollection.h> #include <kactioncollection.h>
#include <kdebug.h> #include <QDebug>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kwindowsystem.h> #include <kwindowsystem.h>
@ -97,7 +97,7 @@ void ContainmentPrivate::setScreen(int newScreen)
newScreen = -1; newScreen = -1;
} }
//kDebug() << activity() << "setting screen to " << newScreen << "and type is" << type; //qDebug() << activity() << "setting screen to " << newScreen << "and type is" << type;
Containment *swapScreensWith(0); Containment *swapScreensWith(0);
const bool isDesktopContainment = type == Plasma::Types::DesktopContainment || const bool isDesktopContainment = type == Plasma::Types::DesktopContainment ||
@ -108,7 +108,7 @@ void ContainmentPrivate::setScreen(int newScreen)
Containment *currently = corona->containmentForScreen(newScreen); Containment *currently = corona->containmentForScreen(newScreen);
if (currently && currently != q) { if (currently && currently != q) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "currently is on screen" << currently->screen() // qDebug() << "currently is on screen" << currently->screen()
// << "desktop" << currently->desktop() // << "desktop" << currently->desktop()
<< "and is" << currently->activity() << "and is" << currently->activity()
<< (QObject*)currently << "i'm" << (QObject*)q; << (QObject*)currently << "i'm" << (QObject*)q;
@ -127,7 +127,7 @@ void ContainmentPrivate::setScreen(int newScreen)
if (oldScreen != newScreen) { if (oldScreen != newScreen) {
/* /*
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "going to signal change for" << q // qDebug() << "going to signal change for" << q
#endif #endif
<< ", old screen & desktop:" << oldScreen << ", old screen & desktop:" << oldScreen
<< ", new:" << screen << desktop; << ", new:" << screen << desktop;
@ -139,7 +139,7 @@ void ContainmentPrivate::setScreen(int newScreen)
} }
if (swapScreensWith) { if (swapScreensWith) {
//kDebug() << "setScreen due to swap, part 2"; //qDebug() << "setScreen due to swap, part 2";
swapScreensWith->setScreen(oldScreen); swapScreensWith->setScreen(oldScreen);
} }
@ -162,7 +162,7 @@ void ContainmentPrivate::configChanged()
void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus) void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus)
{ {
//kDebug() << "================== "<< appletStatus << q->status(); //qDebug() << "================== "<< appletStatus << q->status();
if (appletStatus == q->status()) { if (appletStatus == q->status()) {
emit q->statusChanged(appletStatus); emit q->statusChanged(appletStatus);
return; return;
@ -192,7 +192,7 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints
return; return;
} }
//kDebug() << "got containmentConstraintsEvent" << constraints; //qDebug() << "got containmentConstraintsEvent" << constraints;
if (constraints & Plasma::Types::ImmutableConstraint) { if (constraints & Plasma::Types::ImmutableConstraint) {
//update actions //update actions
const bool unlocked = q->immutability() == Types::Mutable; const bool unlocked = q->immutability() == Types::Mutable;
@ -241,7 +241,7 @@ Applet *ContainmentPrivate::createApplet(const QString &name, const QVariantList
if (q->immutability() != Types::Mutable) { if (q->immutability() != Types::Mutable) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "addApplet for" << name << "requested, but we're currently immutable!"; // qDebug() << "addApplet for" << name << "requested, but we're currently immutable!";
#endif #endif
return 0; return 0;
} }
@ -250,7 +250,7 @@ Applet *ContainmentPrivate::createApplet(const QString &name, const QVariantList
if (!applet) { if (!applet) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Applet" << name << "could not be loaded."; // qDebug() << "Applet" << name << "could not be loaded.";
#endif #endif
applet = new Applet(0, QString(), id); applet = new Applet(0, QString(), id);
applet->setLaunchErrorMessage(i18n("Could not find requested component: %1", name)); applet->setLaunchErrorMessage(i18n("Could not find requested component: %1", name));

View File

@ -65,7 +65,7 @@ SignalRelay::SignalRelay(DataContainer *parent, DataContainerPrivate *data, uint
m_resetTimer(true), m_resetTimer(true),
m_queued(true) m_queued(true)
{ {
//kDebug() << "signal relay with time of" << m_timerId << "being set up"; //qDebug() << "signal relay with time of" << m_timerId << "being set up";
m_timerId = startTimer(immediateUpdate ? 0 : m_interval); m_timerId = startTimer(immediateUpdate ? 0 : m_interval);
if (m_align != Plasma::Types::NoAlignment) { if (m_align != Plasma::Types::NoAlignment) {
checkAlignment(); checkAlignment();
@ -110,7 +110,7 @@ void SignalRelay::checkAlignment()
void SignalRelay::checkQueueing() void SignalRelay::checkQueueing()
{ {
//kDebug() << m_queued; //qDebug() << m_queued;
if (m_queued) { if (m_queued) {
emit dataUpdated(dc->objectName(), d->data); emit dataUpdated(dc->objectName(), d->data);
m_queued = false; m_queued = false;
@ -153,13 +153,13 @@ void SignalRelay::timerEvent(QTimerEvent *event)
emit dc->updateRequested(dc); emit dc->updateRequested(dc);
if (d->hasUpdates()) { if (d->hasUpdates()) {
//kDebug() << "emitting data updated directly" << d->data; //qDebug() << "emitting data updated directly" << d->data;
emit dataUpdated(dc->objectName(), d->data); emit dataUpdated(dc->objectName(), d->data);
m_queued = false; m_queued = false;
} else { } else {
// the source wasn't actually updated; so let's put ourselves in the queue // the source wasn't actually updated; so let's put ourselves in the queue
// so we get a dataUpdated() call when the data does arrive // so we get a dataUpdated() call when the data does arrive
//kDebug() << "queued"; //qDebug() << "queued";
m_queued = true; m_queued = true;
} }
} }

View File

@ -22,7 +22,7 @@
#include <QFile> #include <QFile>
#include <QTextStream> #include <QTextStream>
#include <kdebug.h> #include <QDebug>
#include <klocale.h> #include <klocale.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
@ -163,7 +163,7 @@ void DataEngineManager::timerEvent(QTimerEvent *)
QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "plasma_dataenginemanager_log"; QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "plasma_dataenginemanager_log";
QFile f(path); QFile f(path);
if (!f.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) { if (!f.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
kDebug() << "faild to open" << path; // qDebug() << "faild to open" << path;
return; return;
} }

View File

@ -24,7 +24,7 @@
#include <QHash> #include <QHash>
#include <QStringBuilder> #include <QStringBuilder>
#include <kdebug.h> #include <QDebug>
#include <Plasma/Theme> #include <Plasma/Theme>

View File

@ -21,7 +21,7 @@
#include "packagejobthread_p.h" #include "packagejobthread_p.h"
#include "config-plasma.h" #include "config-plasma.h"
#include <kdebug.h> #include <QDebug>
namespace Plasma namespace Plasma
{ {

View File

@ -41,7 +41,7 @@
#include <QtNetwork/QHostInfo> #include <QtNetwork/QHostInfo>
#include <qtemporarydir.h> #include <qtemporarydir.h>
#include <kdebug.h> #include <QDebug>
namespace Plasma namespace Plasma
{ {
@ -144,7 +144,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
QDir().mkpath(dest); QDir().mkpath(dest);
if (!root.exists()) { if (!root.exists()) {
d->errorMessage = i18n("Could not create package root directory: %1", dest); d->errorMessage = i18n("Could not create package root directory: %1", dest);
//kWarning() << "Could not create package root directory: " << dest; //qWarning() << "Could not create package root directory: " << dest;
return false; return false;
} }
} }
@ -177,13 +177,13 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
mimetype.inherits("application/x-xz") || mimetype.inherits("application/x-lzma")) { mimetype.inherits("application/x-xz") || mimetype.inherits("application/x-lzma")) {
archive = new KTar(src); archive = new KTar(src);
} else { } else {
//kWarning() << "Could not open package file, unsupported archive format:" << src << mimetype.name(); //qWarning() << "Could not open package file, unsupported archive format:" << src << mimetype.name();
d->errorMessage = i18n("Could not open package file, unsupported archive format: %1 %2", src, mimetype.name()); d->errorMessage = i18n("Could not open package file, unsupported archive format: %1 %2", src, mimetype.name());
return false; return false;
} }
if (!archive->open(QIODevice::ReadOnly)) { if (!archive->open(QIODevice::ReadOnly)) {
//kWarning() << "Could not open package file:" << src; //qWarning() << "Could not open package file:" << src;
delete archive; delete archive;
d->errorMessage = i18n("Could not open package file: %1", src); d->errorMessage = i18n("Could not open package file: %1", src);
return false; return false;
@ -219,7 +219,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
QString pluginName = meta.pluginName(); QString pluginName = meta.pluginName();
qDebug() << "pluginname: " << meta.pluginName(); qDebug() << "pluginname: " << meta.pluginName();
if (pluginName.isEmpty()) { if (pluginName.isEmpty()) {
//kWarning() << "Package plugin name not specified"; //qWarning() << "Package plugin name not specified";
d->errorMessage = i18n("Package plugin name not specified: %1", src); d->errorMessage = i18n("Package plugin name not specified: %1", src);
return false; return false;
} }
@ -228,7 +228,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
// bad characters into the paths used for removal. // bad characters into the paths used for removal.
QRegExp validatePluginName("^[\\w-\\.]+$"); // Only allow letters, numbers, underscore and period. QRegExp validatePluginName("^[\\w-\\.]+$"); // Only allow letters, numbers, underscore and period.
if (!validatePluginName.exactMatch(pluginName)) { if (!validatePluginName.exactMatch(pluginName)) {
//kDebug() << "Package plugin name " << pluginName << "contains invalid characters"; //qDebug() << "Package plugin name " << pluginName << "contains invalid characters";
d->errorMessage = i18n("Package plugin name %1 contains invalid characters", pluginName); d->errorMessage = i18n("Package plugin name %1 contains invalid characters", pluginName);
return false; return false;
} }
@ -249,7 +249,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
const bool ok = copyFolder(path, targetName); const bool ok = copyFolder(path, targetName);
removeFolder(path); removeFolder(path);
if (!ok) { if (!ok) {
//kWarning() << "Could not move package to destination:" << targetName; //qWarning() << "Could not move package to destination:" << targetName;
d->errorMessage = i18n("Could not move package to destination: %1", targetName); d->errorMessage = i18n("Could not move package to destination: %1", targetName);
return false; return false;
} }
@ -258,7 +258,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
// than move them // than move them
const bool ok = copyFolder(path, targetName); const bool ok = copyFolder(path, targetName);
if (!ok) { if (!ok) {
//kWarning() << "Could not copy package to destination:" << targetName; //qWarning() << "Could not copy package to destination:" << targetName;
d->errorMessage = i18n("Could not copy package to destination: %1", targetName); d->errorMessage = i18n("Could not copy package to destination: %1", targetName);
return false; return false;
} }
@ -314,7 +314,7 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
sycoca.asyncCall("recreate"); sycoca.asyncCall("recreate");
d->installPath = targetName; d->installPath = targetName;
//kWarning() << "Not updating kbuildsycoca4, since that will go away. Do it yourself for now if needed."; //qWarning() << "Not updating kbuildsycoca4, since that will go away. Do it yourself for now if needed.";
return true; return true;
} }
@ -322,9 +322,9 @@ bool PackageJobThread::installPackage(const QString& src, const QString &dest)
bool PackageJobThread::uninstall(const QString &packagePath) bool PackageJobThread::uninstall(const QString &packagePath)
{ {
bool ok = uninstallPackage(packagePath); bool ok = uninstallPackage(packagePath);
//kDebug() << "emit installPathChanged " << d->installPath; //qDebug() << "emit installPathChanged " << d->installPath;
emit installPathChanged(QString()); emit installPathChanged(QString());
//kDebug() << "Thread: installFinished" << ok; //qDebug() << "Thread: installFinished" << ok;
emit finished(ok, d->errorMessage); emit finished(ok, d->errorMessage);
return ok; return ok;
} }
@ -353,7 +353,7 @@ bool PackageJobThread::uninstallPackage(const QString& packagePath)
bool ok = QFile::remove(service); bool ok = QFile::remove(service);
if (!ok) { if (!ok) {
kWarning() << "Unable to remove " << service; qWarning() << "Unable to remove " << service;
} }
ok = removeFolder(packagePath); ok = removeFolder(packagePath);

View File

@ -21,7 +21,7 @@
#include <QTimer> #include <QTimer>
#include <kdebug.h> #include <QDebug>
//#include <Weaver/DebuggingAids.h> //#include <Weaver/DebuggingAids.h>
#include <threadweaver/ThreadWeaver.h> #include <threadweaver/ThreadWeaver.h>
@ -52,7 +52,7 @@ bool DelayedRunnerPolicy::canRun(Job *job)
FindMatchesJob *aJob = static_cast<FindMatchesJob*>(job); FindMatchesJob *aJob = static_cast<FindMatchesJob*>(job);
if (QTimer *t = aJob->delayTimer()) { if (QTimer *t = aJob->delayTimer()) {
// If the timer is active, the required delay has not been reached // If the timer is active, the required delay has not been reached
//kDebug() << "delayed timer" << aJob->runner()->name() << !t->isActive(); //qDebug() << "delayed timer" << aJob->runner()->name() << !t->isActive();
return !t->isActive(); return !t->isActive();
} }
@ -153,7 +153,7 @@ void FindMatchesJob::setDelayTimer(QTimer *timer)
void FindMatchesJob::run() void FindMatchesJob::run()
{ {
// kDebug() << "Running match for " << m_runner->objectName() // qDebug() << "Running match for " << m_runner->objectName()
// << " in Thread " << thread()->id() << endl; // << " in Thread " << thread()->id() << endl;
if (m_context.isValid()) { if (m_context.isValid()) {
m_runner->performMatch(m_context); m_runner->performMatch(m_context);

View File

@ -31,7 +31,7 @@
#include <QThreadStorage> #include <QThreadStorage>
//KDE //KDE
#include <kdebug.h> #include <QDebug>
//Plasma //Plasma

View File

@ -27,7 +27,7 @@
#include <QSqlDriver> #include <QSqlDriver>
#include <QSqlRecord> #include <QSqlRecord>
#include <kdebug.h> #include <QDebug>
#include <qstandardpaths.h> #include <qstandardpaths.h>
@ -84,12 +84,12 @@ void StorageThread::initializeDb(StorageJob *caller)
} }
if (!m_db.open()) { if (!m_db.open()) {
kWarning() << "Unable to open the plasma storage cache database: " << m_db.lastError(); qWarning() << "Unable to open the plasma storage cache database: " << m_db.lastError();
} else if (!m_db.tables().contains(caller->clientName())) { } else if (!m_db.tables().contains(caller->clientName())) {
QSqlQuery query(m_db); QSqlQuery query(m_db);
query.prepare(QString("create table ") + caller->clientName() + " (valueGroup varchar(256), id varchar(256), txt TEXT, int INTEGER, float REAL, binary BLOB, creationTime datetime, accessTime datetime, primary key (valueGroup, id))"); query.prepare(QString("create table ") + caller->clientName() + " (valueGroup varchar(256), id varchar(256), txt TEXT, int INTEGER, float REAL, binary BLOB, creationTime datetime, accessTime datetime, primary key (valueGroup, id))");
if (!query.exec()) { if (!query.exec()) {
kWarning() << "Unable to create table for" << caller->clientName(); qWarning() << "Unable to create table for" << caller->clientName();
m_db.close(); m_db.close();
} }
} }
@ -150,7 +150,7 @@ void StorageThread::save(QWeakPointer<StorageJob> wcaller, const QVariantMap &pa
it.toFront(); it.toFront();
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
//kDebug() << "going to insert" << valueGroup << it.key(); //qDebug() << "going to insert" << valueGroup << it.key();
query.bindValue(":id", it.key()); query.bindValue(":id", it.key());
QString field; QString field;
@ -185,7 +185,7 @@ void StorageThread::save(QWeakPointer<StorageJob> wcaller, const QVariantMap &pa
} }
if (!query.exec()) { if (!query.exec()) {
//kDebug() << "query failed:" << query.lastQuery() << query.lastError().text(); //qDebug() << "query failed:" << query.lastQuery() << query.lastError().text();
m_db.commit(); m_db.commit();
emit newResult(caller, false); emit newResult(caller, false);
return; return;

View File

@ -105,7 +105,7 @@ KConfigGroup &ThemePrivate::config()
if (!app.isEmpty()) { if (!app.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "using theme for app" << app; // qDebug() << "using theme for app" << app;
#endif #endif
groupName.append("-").append(app); groupName.append("-").append(app);
} }
@ -206,7 +206,7 @@ void ThemePrivate::compositingChanged(bool active)
#if HAVE_X11 #if HAVE_X11
if (compositingActive != active) { if (compositingActive != active) {
compositingActive = active; compositingActive = active;
//kDebug() << QTime::currentTime(); //qDebug() << QTime::currentTime();
scheduleThemeChangeNotification(PixmapCache | SvgElementsCache); scheduleThemeChangeNotification(PixmapCache | SvgElementsCache);
} }
#endif #endif
@ -282,7 +282,7 @@ void ThemePrivate::scheduleThemeChangeNotification(CacheTypes caches)
void ThemePrivate::notifyOfChanged() void ThemePrivate::notifyOfChanged()
{ {
//kDebug() << cachesToDiscard; //qDebug() << cachesToDiscard;
discardCache(cachesToDiscard); discardCache(cachesToDiscard);
cachesToDiscard = NoCache; cachesToDiscard = NoCache;
emit themeChanged(); emit themeChanged();
@ -456,7 +456,7 @@ void ThemePrivate::processWallpaperSettings(KConfigBase *metadata)
void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings) void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings)
{ {
//kDebug() << tempThemeName; //qDebug() << tempThemeName;
QString theme = tempThemeName; QString theme = tempThemeName;
if (theme.isEmpty() || theme == themeName) { if (theme.isEmpty() || theme == themeName) {
// let's try and get the default theme at least // let's try and get the default theme at least
@ -494,7 +494,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
const QString colorsFile = realTheme ? QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/colors")) const QString colorsFile = realTheme ? QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/colors"))
: QString(); : QString();
//kDebug() << "we're going for..." << colorsFile << "*******************"; //qDebug() << "we're going for..." << colorsFile << "*******************";
// load the wallpaper settings, if any // load the wallpaper settings, if any
if (realTheme) { if (realTheme) {

View File

@ -24,7 +24,7 @@
#include "theme.h" #include "theme.h"
#include <QHash> #include <QHash>
#include <kdebug.h> #include <QDebug>
#include <KColorScheme> #include <KColorScheme>
#include <KImageCache> #include <KImageCache>
#include <KWindowSystem> #include <KWindowSystem>

View File

@ -27,7 +27,7 @@
#include <QVariant> #include <QVariant>
#include <QWeakPointer> #include <QWeakPointer>
#include <kdebug.h> #include <QDebug>
#include "abstractrunner.h" #include "abstractrunner.h"
@ -93,7 +93,7 @@ class QueryMatchPrivate : public QSharedData
QueryMatch::QueryMatch(AbstractRunner *runner) QueryMatch::QueryMatch(AbstractRunner *runner)
: d(new QueryMatchPrivate(runner)) : d(new QueryMatchPrivate(runner))
{ {
// kDebug() << "new match created"; // qDebug() << "new match created";
} }
QueryMatch::QueryMatch(const QueryMatch &other) QueryMatch::QueryMatch(const QueryMatch &other)
@ -300,7 +300,7 @@ bool QueryMatch::operator!=(const QueryMatch &other) const
void QueryMatch::run(const RunnerContext &context) const void QueryMatch::run(const RunnerContext &context) const
{ {
//kDebug() << "we run the term" << context->query() << "whose type is" << context->mimetype(); //qDebug() << "we run the term" << context->query() << "whose type is" << context->mimetype();
if (d->runner) { if (d->runner) {
d->runner.data()->run(context, *this); d->runner.data()->run(context, *this);
} }

View File

@ -46,7 +46,7 @@
#include <kauthaction.h> #include <kauthaction.h>
#include <kauthexecutejob.h> #include <kauthexecutejob.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <QDebug>
#include <kwallet.h> #include <kwallet.h>
@ -82,7 +82,7 @@ void AuthorizationManager::setAuthorizationPolicy(AuthorizationPolicy policy)
{ {
if (d->locked) { if (d->locked) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Can't change AuthorizationPolicy: interface locked."; // qDebug() << "Can't change AuthorizationPolicy: interface locked.";
#endif #endif
return; return;
} }
@ -119,7 +119,7 @@ void AuthorizationManager::setAuthorizationInterface(AuthorizationInterface *int
{ {
if (d->authorizationInterface) { if (d->authorizationInterface) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Can't change AuthorizationInterface: interface locked."; // qDebug() << "Can't change AuthorizationInterface: interface locked.";
#endif #endif
return; return;
} }
@ -171,7 +171,7 @@ void AuthorizationManagerPrivate::prepareForServicePublication()
void AuthorizationManagerPrivate::saveRules() void AuthorizationManagerPrivate::saveRules()
{ {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "SAVE RULES"; // qDebug() << "SAVE RULES";
#endif #endif
QTemporaryFile tempFile; QTemporaryFile tempFile;
@ -183,7 +183,7 @@ void AuthorizationManagerPrivate::saveRules()
foreach (AuthorizationRule *rule, rules) { foreach (AuthorizationRule *rule, rules) {
if (rule->persistence() == AuthorizationRule::Persistent) { if (rule->persistence() == AuthorizationRule::Persistent) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "adding rule " << i; // qDebug() << "adding rule " << i;
#endif #endif
rulesGroup.group(QString::number(i)).writeEntry("CredentialsID", rule->credentials().id()); rulesGroup.group(QString::number(i)).writeEntry("CredentialsID", rule->credentials().id());
rulesGroup.group(QString::number(i)).writeEntry("serviceName", rule->serviceName()); rulesGroup.group(QString::number(i)).writeEntry("serviceName", rule->serviceName());
@ -197,7 +197,7 @@ void AuthorizationManagerPrivate::saveRules()
tempFile.close(); tempFile.close();
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "tempfile = " << tempFile.fileName(); // qDebug() << "tempfile = " << tempFile.fileName();
#endif #endif
KAuth::Action action("org.kde.kcontrol.kcmremotewidgets.save"); KAuth::Action action("org.kde.kcontrol.kcmremotewidgets.save");
@ -207,7 +207,7 @@ void AuthorizationManagerPrivate::saveRules()
if (!job->exec()) { if (!job->exec()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "KAuth failed.... YOU SUCK!"; // qDebug() << "KAuth failed.... YOU SUCK!";
#endif #endif
} }
} }
@ -218,7 +218,7 @@ void AuthorizationManagerPrivate::slotWalletOpened()
if (!wallet->readEntry("Credentials", identity)) { if (!wallet->readEntry("Credentials", identity)) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Existing identity found"; // qDebug() << "Existing identity found";
#endif #endif
QDataStream stream(&identity, QIODevice::ReadOnly); QDataStream stream(&identity, QIODevice::ReadOnly);
stream >> myCredentials; stream >> myCredentials;
@ -226,7 +226,7 @@ void AuthorizationManagerPrivate::slotWalletOpened()
if (!myCredentials.isValid()) { if (!myCredentials.isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Creating a new identity"; // qDebug() << "Creating a new identity";
#endif #endif
myCredentials = Credentials::createCredentials(QHostInfo::localHostName()); myCredentials = Credentials::createCredentials(QHostInfo::localHostName());
QDataStream stream(&identity, QIODevice::WriteOnly); QDataStream stream(&identity, QIODevice::WriteOnly);
@ -248,7 +248,7 @@ void AuthorizationManagerPrivate::slotLoadRules()
//Credentials storedCredentials = identities[identityID]; //Credentials storedCredentials = identities[identityID];
if (serviceName.isEmpty()) { if (serviceName.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Invalid rule"; // qDebug() << "Invalid rule";
#endif #endif
} else { } else {
AuthorizationRule *rule = new AuthorizationRule(serviceName, identityID); AuthorizationRule *rule = new AuthorizationRule(serviceName, identityID);
@ -281,11 +281,11 @@ AuthorizationRule *AuthorizationManagerPrivate::matchingRule(const QString &serv
if (!matchingRule) { if (!matchingRule) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "no matching rule"; // qDebug() << "no matching rule";
#endif #endif
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "matching rule found: " << matchingRule->description(); // qDebug() << "matching rule found: " << matchingRule->description();
#endif #endif
} }
return matchingRule; return matchingRule;
@ -306,7 +306,7 @@ void AuthorizationManagerPrivate::addCredentials(const Credentials &identity)
return; return;
} else if (identity.isValid()) { } else if (identity.isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Adding a new identity for " << identity.id(); // qDebug() << "Adding a new identity for " << identity.id();
#endif #endif
identities[identity.id()] = identity; identities[identity.id()] = identity;
} }

View File

@ -26,7 +26,7 @@
#include <QtCrypto> #include <QtCrypto>
#endif #endif
#include <kdebug.h> #include <QDebug>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include "authorizationmanager.h" #include "authorizationmanager.h"
@ -48,7 +48,7 @@ public:
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return; return;
} }
@ -106,7 +106,7 @@ Credentials Credentials::createCredentials(const QString &name)
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return Credentials(); return Credentials();
} }
@ -140,7 +140,7 @@ bool Credentials::isValid() const
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return false; return false;
} }
@ -152,7 +152,7 @@ bool Credentials::isValid() const
} }
#else #else
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "libplasma is compiled without support for remote widgets. Key invalid."; // qDebug() << "libplasma is compiled without support for remote widgets. Key invalid.";
#endif #endif
return false; return false;
#endif #endif
@ -172,14 +172,14 @@ bool Credentials::isValidSignature(const QByteArray &signature, const QByteArray
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return false; return false;
} }
if (d->publicKey.canVerify()) { if (d->publicKey.canVerify()) {
if (!isValid()) { if (!isValid()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Key is null?"; // qDebug() << "Key is null?";
#endif #endif
} }
QCA::PublicKey publicKey = QCA::PublicKey::fromPEM(d->publicKey.toPEM()); QCA::PublicKey publicKey = QCA::PublicKey::fromPEM(d->publicKey.toPEM());
@ -188,7 +188,7 @@ bool Credentials::isValidSignature(const QByteArray &signature, const QByteArray
return ( publicKey.validSignature( signature ) ); return ( publicKey.validSignature( signature ) );
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Can't verify?"; // qDebug() << "Can't verify?";
#endif #endif
return false; return false;
} }
@ -201,7 +201,7 @@ bool Credentials::canSign() const
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return false; return false;
} }
@ -216,7 +216,7 @@ QByteArray Credentials::signMessage(const QByteArray &message)
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if(!QCA::isSupported(REQUIRED_FEATURES)) { if(!QCA::isSupported(REQUIRED_FEATURES)) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "RSA not supported"; // qDebug() << "RSA not supported";
#endif #endif
return QByteArray(); return QByteArray();
} else if (canSign()) { } else if (canSign()) {
@ -248,7 +248,7 @@ QDataStream &operator<<(QDataStream &out, const Credentials &myObj)
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return out; return out;
} }
@ -272,7 +272,7 @@ QDataStream &operator>>(QDataStream &in, Credentials &myObj)
{ {
#if ENABLE_REMOTE_WIDGETS #if ENABLE_REMOTE_WIDGETS
if (!QCA::isSupported(REQUIRED_FEATURES)) { if (!QCA::isSupported(REQUIRED_FEATURES)) {
kWarning() << "QCA doesn't support " << REQUIRED_FEATURES; qWarning() << "QCA doesn't support " << REQUIRED_FEATURES;
return in; return in;
} }
@ -294,7 +294,7 @@ QDataStream &operator>>(QDataStream &in, Credentials &myObj)
if (conversionResult != QCA::ConvertGood) { if (conversionResult != QCA::ConvertGood) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Unsuccessfull conversion of key?"; // qDebug() << "Unsuccessfull conversion of key?";
#endif #endif
} }
#endif #endif

View File

@ -30,7 +30,7 @@
#include <kcompletion.h> #include <kcompletion.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <QDebug>
#include <qmimedatabase.h> #include <qmimedatabase.h>
#include <kshell.h> #include <kshell.h>
#include <qstandardpaths.h> #include <qstandardpaths.h>
@ -60,35 +60,35 @@ Returns true on success and false on error, in case of error, correctCasePath is
*/ */
bool correctLastComponentCase(const QString &path, QString &correctCasePath, const bool mustBeDir) bool correctLastComponentCase(const QString &path, QString &correctCasePath, const bool mustBeDir)
{ {
//kDebug() << "Correcting " << path; //qDebug() << "Correcting " << path;
// If the file already exists then no need to search for it. // If the file already exists then no need to search for it.
if (QFile::exists(path)) { if (QFile::exists(path)) {
correctCasePath = path; correctCasePath = path;
//kDebug() << "Correct path is" << correctCasePath; //qDebug() << "Correct path is" << correctCasePath;
return true; return true;
} }
const QFileInfo pathInfo(path); const QFileInfo pathInfo(path);
const QDir fileDir = pathInfo.dir(); const QDir fileDir = pathInfo.dir();
//kDebug() << "Directory is" << fileDir; //qDebug() << "Directory is" << fileDir;
const QString filename = pathInfo.fileName(); const QString filename = pathInfo.fileName();
//kDebug() << "Filename is" << filename; //qDebug() << "Filename is" << filename;
//kDebug() << "searching for a" << (mustBeDir ? "directory" : "directory/file"); //qDebug() << "searching for a" << (mustBeDir ? "directory" : "directory/file");
const QStringList matchingFilenames = fileDir.entryList(QStringList(filename), const QStringList matchingFilenames = fileDir.entryList(QStringList(filename),
mustBeDir ? QDir::Dirs : QDir::NoFilter); mustBeDir ? QDir::Dirs : QDir::NoFilter);
if (matchingFilenames.empty()) { if (matchingFilenames.empty()) {
//kDebug() << "No matches found!!\n"; //qDebug() << "No matches found!!\n";
return false; return false;
} else { } else {
/*if (matchingFilenames.size() > 1) { /*if (matchingFilenames.size() > 1) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Found multiple matches!!\n"; // qDebug() << "Found multiple matches!!\n";
#endif #endif
}*/ }*/
@ -98,7 +98,7 @@ bool correctLastComponentCase(const QString &path, QString &correctCasePath, con
correctCasePath = fileDir.path() + QDir::separator() + matchingFilenames[0]; correctCasePath = fileDir.path() + QDir::separator() + matchingFilenames[0];
} }
//kDebug() << "Correct path is" << correctCasePath; //qDebug() << "Correct path is" << correctCasePath;
return true; return true;
} }
} }
@ -126,7 +126,7 @@ bool correctPathCase(const QString& path, QString &corrected)
const bool mustBeDir = components.back().isEmpty(); const bool mustBeDir = components.back().isEmpty();
//kDebug() << "Components are" << components; //qDebug() << "Components are" << components;
if (mustBeDir) { if (mustBeDir) {
components.pop_back(); components.pop_back();
@ -142,7 +142,7 @@ bool correctPathCase(const QString& path, QString &corrected)
const QString tmp = components[0] + QDir::separator() + components[1]; const QString tmp = components[0] + QDir::separator() + components[1];
if (!correctLastComponentCase(tmp, correctPath, components.size() > 2 || mustBeDir)) { if (!correctLastComponentCase(tmp, correctPath, components.size() > 2 || mustBeDir)) {
//kDebug() << "search was not successful"; //qDebug() << "search was not successful";
return false; return false;
} }
@ -172,7 +172,7 @@ class RunnerContextPrivate : public QSharedData
q(p.q), q(p.q),
singleRunnerQueryMode(false) singleRunnerQueryMode(false)
{ {
//kDebug() << "¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿boo yeah" << type; //qDebug() << "¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿boo yeah" << type;
} }
~RunnerContextPrivate() ~RunnerContextPrivate()
@ -200,7 +200,7 @@ class RunnerContextPrivate : public QSharedData
} else { } else {
QUrl url = QUrl::fromUserInput(term); QUrl url = QUrl::fromUserInput(term);
// check for a normal URL first // check for a normal URL first
//kDebug() << url << KProtocolInfo::protocolClass(url.scheme()) << url.hasHost() << //qDebug() << url << KProtocolInfo::protocolClass(url.scheme()) << url.hasHost() <<
// url.host() << url.isLocalFile() << path << path.indexOf('/'); // url.host() << url.isLocalFile() << path << path.indexOf('/');
const bool hasProtocol = !url.scheme().isEmpty(); const bool hasProtocol = !url.scheme().isEmpty();
const bool isLocalProtocol = KProtocolInfo::protocolClass(url.scheme()) == ":local"; const bool isLocalProtocol = KProtocolInfo::protocolClass(url.scheme()) == ":local";
@ -215,13 +215,13 @@ class RunnerContextPrivate : public QSharedData
// but if a path doesn't have any slashes // but if a path doesn't have any slashes
// it's too ambiguous to be sure we're in a filesystem context // it's too ambiguous to be sure we're in a filesystem context
path = QDir::cleanPath(url.toLocalFile()); path = QDir::cleanPath(url.toLocalFile());
//kDebug( )<< "slash check" << path; //qDebug()<< "slash check" << path;
if (hasProtocol || ((path.indexOf('/') != -1 || path.indexOf('\\') != -1))) { if (hasProtocol || ((path.indexOf('/') != -1 || path.indexOf('\\') != -1))) {
QString correctCasePath; QString correctCasePath;
if (correctPathCase(path, correctCasePath)) { if (correctPathCase(path, correctCasePath)) {
path = correctCasePath; path = correctCasePath;
QFileInfo info(path); QFileInfo info(path);
//kDebug( )<< "correct cas epath is" << correctCasePath << info.isSymLink() << //qDebug()<< "correct cas epath is" << correctCasePath << info.isSymLink() <<
// info.isDir() << info.isFile(); // info.isDir() << info.isFile();
if (info.isSymLink()) { if (info.isSymLink()) {
@ -244,7 +244,7 @@ class RunnerContextPrivate : public QSharedData
} }
} }
//kDebug() << "term2type" << term << type; //qDebug() << "term2type" << term << type;
} }
void invalidate() void invalidate()
@ -329,7 +329,7 @@ void RunnerContext::reset()
d->mimeType.clear(); d->mimeType.clear();
d->type = UnknownType; d->type = UnknownType;
d->singleRunnerQueryMode = false; d->singleRunnerQueryMode = false;
//kDebug() << "match count" << d->matches.count(); //qDebug() << "match count" << d->matches.count();
} }
void RunnerContext::setQuery(const QString &term) void RunnerContext::setQuery(const QString &term)
@ -386,13 +386,13 @@ bool RunnerContext::addMatches(const QList<QueryMatch> &matches)
d->matches.append(match); d->matches.append(match);
#ifndef NDEBUG #ifndef NDEBUG
if (d->matchesById.contains(match.id())) { if (d->matchesById.contains(match.id())) {
kDebug() << "Duplicate match id " << match.id() << "from" << match.runner()->name(); // qDebug() << "Duplicate match id " << match.id() << "from" << match.runner()->name();
} }
#endif #endif
d->matchesById.insert(match.id(), &d->matches.at(d->matches.size() - 1)); d->matchesById.insert(match.id(), &d->matches.at(d->matches.size() - 1));
} }
UNLOCK(d); UNLOCK(d);
//kDebug()<< "add matches"; //qDebug()<< "add matches";
// A copied searchContext may share the d pointer, // A copied searchContext may share the d pointer,
// we always want to sent the signal of the object that created // we always want to sent the signal of the object that created
// the d pointer // the d pointer
@ -419,7 +419,7 @@ bool RunnerContext::addMatch(const QueryMatch &match)
d->matches.append(m); d->matches.append(m);
d->matchesById.insert(m.id(), &d->matches.at(d->matches.size() - 1)); d->matchesById.insert(m.id(), &d->matches.at(d->matches.size() - 1));
UNLOCK(d); UNLOCK(d);
//kDebug()<< "added match" << match->text(); //qDebug()<< "added match" << match->text();
emit d->q->matchesChanged(); emit d->q->matchesChanged();
return true; return true;

View File

@ -28,7 +28,7 @@
#include <QCoreApplication> #include <QCoreApplication>
#include <qstandardpaths.h> #include <qstandardpaths.h>
#include <kdebug.h> #include <QDebug>
#include <kplugininfo.h> #include <kplugininfo.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
@ -111,7 +111,7 @@ public:
//This entry allows to define a hard upper limit independent of the number of processors. //This entry allows to define a hard upper limit independent of the number of processors.
const int maxThreads = config.readEntry("maxThreads", 16); const int maxThreads = config.readEntry("maxThreads", 16);
const int numThreads = qMin(maxThreads, 2 + ((numProcs - 1) * 2)); const int numThreads = qMin(maxThreads, 2 + ((numProcs - 1) * 2));
//kDebug() << "setting up" << numThreads << "threads for" << numProcs << "processors"; //qDebug() << "setting up" << numThreads << "threads for" << numProcs << "processors";
if (numThreads > Weaver::instance()->maximumNumberOfThreads()) { if (numThreads > Weaver::instance()->maximumNumberOfThreads()) {
Weaver::instance()->setMaximumNumberOfThreads(numThreads); Weaver::instance()->setMaximumNumberOfThreads(numThreads);
} }
@ -192,9 +192,9 @@ public:
QMutableListIterator<KPluginInfo> it(offers); QMutableListIterator<KPluginInfo> it(offers);
while (it.hasNext()) { while (it.hasNext()) {
KPluginInfo &description = it.next(); KPluginInfo &description = it.next();
//kDebug() << "Loading runner: " << service->name() << service->storageId(); //qDebug() << "Loading runner: " << service->name() << service->storageId();
QString tryExec = description.property("TryExec").toString(); QString tryExec = description.property("TryExec").toString();
//kDebug() << "TryExec is" << tryExec; //qDebug() << "TryExec is" << tryExec;
if (!tryExec.isEmpty() && QStandardPaths::findExecutable(tryExec).isEmpty()) { if (!tryExec.isEmpty() && QStandardPaths::findExecutable(tryExec).isEmpty()) {
// we don't actually have this application! // we don't actually have this application!
continue; continue;
@ -212,7 +212,7 @@ public:
advertiseSingleRunnerIds.insert(runnerName, description.name()); advertiseSingleRunnerIds.insert(runnerName, description.name());
} }
//kDebug() << loadAll << description.isPluginEnabled() << noWhiteList << whiteList.contains(runnerName); //qDebug() << loadAll << description.isPluginEnabled() << noWhiteList << whiteList.contains(runnerName);
if (selected) { if (selected) {
if (!loaded) { if (!loaded) {
AbstractRunner *runner = loadInstalledRunner(description.service()); AbstractRunner *runner = loadInstalledRunner(description.service());
@ -225,7 +225,7 @@ public:
//Remove runner //Remove runner
deadRunners.insert(runners.take(runnerName)); deadRunners.insert(runners.take(runnerName));
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Removing runner: " << runnerName; // qDebug() << "Removing runner: " << runnerName;
#endif #endif
} }
} }
@ -268,7 +268,7 @@ public:
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "All runners loaded, total:" << runners.count(); // qDebug() << "All runners loaded, total:" << runners.count();
#endif #endif
} }
@ -293,19 +293,19 @@ public:
runner = service->createInstance<AbstractRunner>(q, args, &error); runner = service->createInstance<AbstractRunner>(q, args, &error);
if (!runner) { if (!runner) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Failed to load runner:" << service->name() << ". error reported:" << error; // qDebug() << "Failed to load runner:" << service->name() << ". error reported:" << error;
#endif #endif
} }
} }
} else { } else {
//kDebug() << "got a script runner known as" << api; //qDebug() << "got a script runner known as" << api;
runner = new AbstractRunner(service, q); runner = new AbstractRunner(service, q);
} }
} }
if (runner) { if (runner) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "================= loading runner:" << service->name() << "================="; // qDebug() << "================= loading runner:" << service->name() << "=================";
#endif #endif
QObject::connect(runner, SIGNAL(matchingSuspended(bool)), q, SLOT(runnerMatchingSuspended(bool))); QObject::connect(runner, SIGNAL(matchingSuspended(bool)), q, SLOT(runnerMatchingSuspended(bool)));
runner->init(); runner->init();
@ -326,7 +326,7 @@ public:
} }
if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) { if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) {
//kDebug() << "job actually done, running now **************"; //qDebug() << "job actually done, running now **************";
QueryMatch tmpRun = deferredRun; QueryMatch tmpRun = deferredRun;
deferredRun = QueryMatch(0); deferredRun = QueryMatch(0);
tmpRun.run(context); tmpRun.run(context);
@ -348,7 +348,7 @@ public:
void checkTearDown() void checkTearDown()
{ {
//kDebug() << prepped << teardownRequested << searchJobs.count() << oldSearchJobs.count(); //qDebug() << prepped << teardownRequested << searchJobs.count() << oldSearchJobs.count();
if (!prepped || !teardownRequested) { if (!prepped || !teardownRequested) {
return; return;
@ -623,7 +623,7 @@ void RunnerManager::run(const QueryMatch &match)
for (auto it = d->searchJobs.constBegin(); it != d->searchJobs.constEnd(); ++it) { for (auto it = d->searchJobs.constBegin(); it != d->searchJobs.constEnd(); ++it) {
if ((*it)->runner() == runner && !(*it)->isFinished()) { if ((*it)->runner() == runner && !(*it)->isFinished()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "deferred run"; // qDebug() << "deferred run";
#endif #endif
d->deferredRun = match; d->deferredRun = match;
return; return;
@ -691,7 +691,7 @@ void RunnerManager::setupMatchSession()
emit runner->prepare(); emit runner->prepare();
#ifdef MEASURE_PREPTIME #ifdef MEASURE_PREPTIME
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << t.elapsed() << runner->name(); // qDebug() << t.elapsed() << runner->name();
#endif #endif
#endif #endif
} }
@ -746,7 +746,7 @@ void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &run
} }
reset(); reset();
// kDebug() << "runners searching for" << term << "on" << runnerName; // qDebug() << "runners searching for" << term << "on" << runnerName;
d->context.setQuery(term); d->context.setQuery(term);
QHash<QString, AbstractRunner*> runable; QHash<QString, AbstractRunner*> runable;
@ -791,7 +791,7 @@ void RunnerManager::reset()
d->searchJobs.clear(); d->searchJobs.clear();
if (d->deferredRun.isEnabled()) { if (d->deferredRun.isEnabled()) {
//kDebug() << "job actually done, running now **************"; //qDebug() << "job actually done, running now **************";
QueryMatch tmpRun = d->deferredRun; QueryMatch tmpRun = d->deferredRun;
d->deferredRun = QueryMatch(0); d->deferredRun = QueryMatch(0);
tmpRun.run(d->context); tmpRun.run(d->context);

View File

@ -19,7 +19,7 @@
#include "scripting/scriptengine.h" #include "scripting/scriptengine.h"
#include <kdebug.h> #include <QDebug>
#include <kservice.h> #include <kservice.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
@ -94,7 +94,7 @@ QStringList knownLanguages(Types::ComponentTypes types)
} }
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint);
//kDebug() << "Applet::knownApplets constraint was '" << constraint //qDebug() << "Applet::knownApplets constraint was '" << constraint
// << "' which got us " << offers.count() << " matches"; // << "' which got us " << offers.count() << " matches";
QStringList languages; QStringList languages;
@ -117,7 +117,7 @@ KService::List engineOffers(const QString &language, Types::ComponentType type)
QRegExp re("[^a-zA-Z0-9\\-_]"); QRegExp re("[^a-zA-Z0-9\\-_]");
if (re.indexIn(language) != -1) { if (re.indexIn(language) != -1) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "invalid language attempted:" << language; // qDebug() << "invalid language attempted:" << language;
#endif #endif
return KService::List(); return KService::List();
} }
@ -141,11 +141,11 @@ KService::List engineOffers(const QString &language, Types::ComponentType type)
QString constraint = QString("[X-Plasma-API] == '%1' and " QString constraint = QString("[X-Plasma-API] == '%1' and "
"'%2' in [X-Plasma-ComponentTypes]").arg(language, component); "'%2' in [X-Plasma-ComponentTypes]").arg(language, component);
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint);
/* kDebug() << "********************* loadingApplet with Plasma/ScriptEngine" << constraint /* // qDebug() << "********************* loadingApplet with Plasma/ScriptEngine" << constraint
<< "resulting in" << offers.count() << "results";*/ << "resulting in" << offers.count() << "results";*/
if (offers.isEmpty()) { if (offers.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "No offers for \"" << language << "\""; // qDebug() << "No offers for \"" << language << "\"";
#endif #endif
} }
@ -181,7 +181,7 @@ ScriptEngine *loadEngine(const QString &language, Types::ComponentType type, QOb
} }
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Couldn't load script engine for language " << language // qDebug() << "Couldn't load script engine for language " << language
<< "! error reported: " << error; << "! error reported: " << error;
#endif #endif
} }

View File

@ -26,7 +26,7 @@
#include <QTimer> #include <QTimer>
#include <QQuickItem> #include <QQuickItem>
#include <kdebug.h> #include <QDebug>
#include <kservice.h> #include <kservice.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
#include <ksharedconfig.h> #include <ksharedconfig.h>
@ -193,7 +193,7 @@ QStringList Service::operationNames() const
{ {
if (d->operationsMap.keys().isEmpty()) { if (d->operationsMap.keys().isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "No valid operations scheme has been registered"; // qDebug() << "No valid operations scheme has been registered";
#endif #endif
return QStringList(); return QStringList();
} }
@ -205,12 +205,12 @@ QVariantMap Service::operationDescription(const QString &operationName)
{ {
if (d->operationsMap.keys().isEmpty()) { if (d->operationsMap.keys().isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "No valid operations scheme has been registered"; // qDebug() << "No valid operations scheme has been registered";
#endif #endif
return QVariantMap(); return QVariantMap();
} }
//kDebug() << "operation" << operationName //qDebug() << "operation" << operationName
// << "requested, has keys" << d->operationsMap.keys(); // << "requested, has keys" << d->operationsMap.keys();
return d->operationsMap.value(operationName); return d->operationsMap.value(operationName);
} }
@ -223,12 +223,12 @@ ServiceJob *Service::startOperationCall(const QVariantMap &description, QObject
if (d->operationsMap.keys().isEmpty()) { if (d->operationsMap.keys().isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "No valid operations scheme has been registered"; // qDebug() << "No valid operations scheme has been registered";
#endif #endif
} else if (!op.isEmpty() && d->operationsMap.contains(op)) { } else if (!op.isEmpty() && d->operationsMap.contains(op)) {
if (d->disabledOperations.contains(op)) { if (d->disabledOperations.contains(op)) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Operation" << op << "is disabled"; // qDebug() << "Operation" << op << "is disabled";
#endif #endif
} else { } else {
QVariantMap map = description; QVariantMap map = description;
@ -236,7 +236,7 @@ ServiceJob *Service::startOperationCall(const QVariantMap &description, QObject
} }
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << op << "is not a valid group; valid groups are:" << d->operationsMap.keys(); // qDebug() << op << "is not a valid group; valid groups are:" << d->operationsMap.keys();
#endif #endif
} }
@ -316,7 +316,7 @@ void Service::registerOperationsScheme()
if (d->name.isEmpty()) { if (d->name.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "No name found"; // qDebug() << "No name found";
#endif #endif
return; return;
} }
@ -325,7 +325,7 @@ void Service::registerOperationsScheme()
if (path.isEmpty()) { if (path.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Cannot find operations description:" << d->name << ".operations"; // qDebug() << "Cannot find operations description:" << d->name << ".operations";
#endif #endif
return; return;
} }

View File

@ -19,7 +19,7 @@
#include "servicejob.h" #include "servicejob.h"
#include <kdebug.h> #include <QDebug>
#include <plasma/private/servicejob_p.h> #include <plasma/private/servicejob_p.h>

View File

@ -38,7 +38,7 @@
#include <QtCore/QStringList> #include <QtCore/QStringList>
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kdebug.h> #include <QDebug>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kprocess.h> #include <kprocess.h>
#include <kuser.h> #include <kuser.h>
@ -55,7 +55,7 @@ SigningPrivate::SigningPrivate(Signing *auth, const QString &keystorePath = 0)
GpgME::initializeLibrary(); GpgME::initializeLibrary();
GpgME::Error error = GpgME::checkEngine(GpgME::OpenPGP); GpgME::Error error = GpgME::checkEngine(GpgME::OpenPGP);
if (error) { if (error) {
kDebug() << "OpenPGP engine not found: authentication will not work."; // qDebug() << "OpenPGP engine not found: authentication will not work.";
return; return;
} }
@ -72,7 +72,7 @@ SigningPrivate::SigningPrivate(Signing *auth, const QString &keystorePath = 0)
} else { } else {
error = m_gpgContext->setEngineHomeDirectory(m_keystorePath.toAscii().data()); error = m_gpgContext->setEngineHomeDirectory(m_keystorePath.toAscii().data());
if (error) { if (error) {
kDebug() << "Failed setting custom gpg keystore directory: using default."; // qDebug() << "Failed setting custom gpg keystore directory: using default.";
} }
} }
@ -99,14 +99,14 @@ void SigningPrivate::importKdeKeysToKeystore()
{ {
QList< QByteArray > tmp; QList< QByteArray > tmp;
if (!m_gpgContext) { if (!m_gpgContext) {
kDebug() << "GPGME context not valid: please re-initialize the library."; // qDebug() << "GPGME context not valid: please re-initialize the library.";
keys.insert(UltimatelyTrusted, tmp); keys.insert(UltimatelyTrusted, tmp);
return; return;
} }
QString path(KStandardDirs::locate("appdata", "plasmakeys/")); QString path(KStandardDirs::locate("appdata", "plasmakeys/"));
QDir dir(path); QDir dir(path);
if (!dir.exists() || path.isEmpty() || path.isNull()) { if (!dir.exists() || path.isEmpty() || path.isNull()) {
kDebug() << "Directory with KDE keys not found: aborting"; // qDebug() << "Directory with KDE keys not found: aborting";
keys[UltimatelyTrusted] = tmp; keys[UltimatelyTrusted] = tmp;
return; return;
} }
@ -123,8 +123,8 @@ void SigningPrivate::importKdeKeysToKeystore()
GpgME::Data data(fp); GpgME::Data data(fp);
GpgME::ImportResult iRes = m_gpgContext->importKeys(data); GpgME::ImportResult iRes = m_gpgContext->importKeys(data);
if (iRes.error()) { if (iRes.error()) {
kDebug() << "Error while importing the key located at: " << keyFile; // qDebug() << "Error while importing the key located at: " << keyFile;
kDebug() << " The error is:" << iRes.error().asString() << "; Skipping."; // qDebug() << " The error is:" << iRes.error().asString() << "; Skipping.";
continue; continue;
} }
@ -142,7 +142,7 @@ void SigningPrivate::importKdeKeysToKeystore()
void SigningPrivate::splitKeysByTrustLevel() void SigningPrivate::splitKeysByTrustLevel()
{ {
if (!m_gpgContext) { if (!m_gpgContext) {
kDebug() << "GPGME context not valid: please re-initialize the library."; // qDebug() << "GPGME context not valid: please re-initialize the library.";
return; return;
} }
@ -223,7 +223,7 @@ void SigningPrivate::splitKeysByTrustLevel()
lRes = m_gpgContext->endKeyListing(); lRes = m_gpgContext->endKeyListing();
if (lRes.error()) { if (lRes.error()) {
kDebug() << "Error while ending the keyListing operation: " << lRes.error().asString(); // qDebug() << "Error while ending the keyListing operation: " << lRes.error().asString();
} }
//Loop 4 - looking for keys signed by kde or by the user, tmp contains the valid public keys remaining //Loop 4 - looking for keys signed by kde or by the user, tmp contains the valid public keys remaining
@ -270,7 +270,7 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "UltimatelyTrusted = " << list; // qDebug() << "UltimatelyTrusted = " << list;
list.clear(); list.clear();
temp = keys[FullyTrused]; temp = keys[FullyTrused];
@ -278,7 +278,7 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "FullyTrused = " << list; // qDebug() << "FullyTrused = " << list;
list.clear(); list.clear();
temp = keys[SelfTrusted]; temp = keys[SelfTrusted];
@ -286,7 +286,7 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "SelfTrusted = " << list; // qDebug() << "SelfTrusted = " << list;
list.clear(); list.clear();
temp = keys[UserTrusted]; temp = keys[UserTrusted];
@ -294,7 +294,7 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "UserTrusted = " << list; // qDebug() << "UserTrusted = " << list;
list.clear(); list.clear();
temp = keys[UnknownTrusted]; temp = keys[UnknownTrusted];
@ -302,7 +302,7 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "UnknownTrusted = " << list; // qDebug() << "UnknownTrusted = " << list;
list.clear(); list.clear();
temp = keys[CompletelyUntrusted]; temp = keys[CompletelyUntrusted];
@ -310,8 +310,8 @@ void SigningPrivate::splitKeysByTrustLevel()
list.append(ba); list.append(ba);
} }
kDebug() << "CompletelyUntrusted = " << list; // qDebug() << "CompletelyUntrusted = " << list;
kDebug() << "ALL = " << keys; // qDebug() << "ALL = " << keys;
} }
QStringList SigningPrivate::keysID(const bool returnPrivate) const QStringList SigningPrivate::keysID(const bool returnPrivate) const
@ -319,7 +319,7 @@ QStringList SigningPrivate::keysID(const bool returnPrivate) const
QStringList result; QStringList result;
if (!m_gpgContext) { if (!m_gpgContext) {
kDebug() << "GPGME context not valid: please re-initialize the library."; // qDebug() << "GPGME context not valid: please re-initialize the library.";
return result; return result;
} }
@ -333,7 +333,7 @@ QStringList SigningPrivate::keysID(const bool returnPrivate) const
} }
GpgME::KeyListResult lRes = m_gpgContext->endKeyListing(); GpgME::KeyListResult lRes = m_gpgContext->endKeyListing();
if (lRes.error()) { if (lRes.error()) {
kDebug() << "Error while ending the keyListing operation: " << lRes.error().asString(); // qDebug() << "Error while ending the keyListing operation: " << lRes.error().asString();
} }
return result; return result;
@ -352,7 +352,7 @@ QString SigningPrivate::signerOf(const QString &messagePath, const QString &sign
GpgME::VerificationResult vRes = m_gpgContext->verifyDetachedSignature(sig, file); GpgME::VerificationResult vRes = m_gpgContext->verifyDetachedSignature(sig, file);
if (!vRes.error()) { if (!vRes.error()) {
kDebug() << "message " << messagePath << " and signature " << signaturePath << "matched! The fingerprint of the signer is: " << vRes.signature(0).fingerprint(); // qDebug() << "message " << messagePath << " and signature " << signaturePath << "matched! The fingerprint of the signer is: " << vRes.signature(0).fingerprint();
return QString(vRes.signature(0).fingerprint()); return QString(vRes.signature(0).fingerprint());
} }
@ -364,7 +364,7 @@ QString SigningPrivate::descriptiveString(const QString &keyID) const
QString result; QString result;
if (!m_gpgContext) { if (!m_gpgContext) {
kDebug() << "GPGME context not valid: please re-initialize the library."; // qDebug() << "GPGME context not valid: please re-initialize the library.";
return result; return result;
} }
@ -382,7 +382,7 @@ QString SigningPrivate::descriptiveString(const QString &keyID) const
} }
GpgME::KeyListResult lRes = m_gpgContext->endKeyListing(); GpgME::KeyListResult lRes = m_gpgContext->endKeyListing();
if (lRes.error()) { if (lRes.error()) {
kDebug() << "Error while ending the keyListing operation: " << lRes.error().asString(); // qDebug() << "Error while ending the keyListing operation: " << lRes.error().asString();
} }
return result; return result;
@ -503,7 +503,7 @@ void SigningPrivate::slotKDEKeyRemoved(const QString path)
error = m_gpgContext->startKeyDeletion(k, true); // GG error = m_gpgContext->startKeyDeletion(k, true); // GG
if (error) { if (error) {
kDebug() << "Can't delete key with fingerprint: " << result; // qDebug() << "Can't delete key with fingerprint: " << result;
m_gpgContext->endKeyListing(); m_gpgContext->endKeyListing();
return; return;
} }
@ -513,7 +513,7 @@ void SigningPrivate::slotKDEKeyRemoved(const QString path)
} }
GpgME::KeyListResult lRes = m_gpgContext->endKeyListing(); GpgME::KeyListResult lRes = m_gpgContext->endKeyListing();
if (lRes.error()) { if (lRes.error()) {
kDebug() << "Error while ending the keyListing operation: " << lRes.error().asString(); // qDebug() << "Error while ending the keyListing operation: " << lRes.error().asString();
} }
splitKeysByTrustLevel(); splitKeysByTrustLevel();
@ -547,10 +547,10 @@ QStringList SigningPrivate::signersOf(const QString id) const
} }
GpgME::KeyListResult lRes = m_gpgContext->endKeyListing(); GpgME::KeyListResult lRes = m_gpgContext->endKeyListing();
if (lRes.error()) { if (lRes.error()) {
kDebug() << "Error while ending the keyListing operation: " << lRes.error().asString(); // qDebug() << "Error while ending the keyListing operation: " << lRes.error().asString();
} }
kDebug() << "Hey, the key " << id << " has been signed with " << result; // qDebug() << "Hey, the key " << id << " has been signed with " << result;
return result; return result;
} }
@ -613,8 +613,8 @@ QStringList Signing::publicKeys() const
QString Signing::signerOf(const QUrl &plasmoidPath, const QUrl &plasmoidSignaturePath) const QString Signing::signerOf(const QUrl &plasmoidPath, const QUrl &plasmoidSignaturePath) const
{ {
kDebug() << "Checking existence of " << plasmoidPath.pathOrUrl(); // qDebug() << "Checking existence of " << plasmoidPath.pathOrUrl();
kDebug() << "Checking existence of " << plasmoidSignaturePath.pathOrUrl(); // qDebug() << "Checking existence of " << plasmoidSignaturePath.pathOrUrl();
// Original file and signature to verify against // Original file and signature to verify against
QFile fileHanlder(plasmoidPath.path()); QFile fileHanlder(plasmoidPath.path());
QFile signatureHandler(plasmoidSignaturePath.isEmpty() ? QFile signatureHandler(plasmoidSignaturePath.isEmpty() ?
@ -626,15 +626,15 @@ QString Signing::signerOf(const QUrl &plasmoidPath, const QUrl &plasmoidSignatur
signatureHandler.open(QIODevice::ReadOnly); signatureHandler.open(QIODevice::ReadOnly);
if (!fileHanlder.exists()) { if (!fileHanlder.exists()) {
kDebug() << "Plasmoid package doesn't exists: signature verification aborted."; // qDebug() << "Plasmoid package doesn't exists: signature verification aborted.";
return QString(); return QString();
} }
if (!signatureHandler.exists()) { if (!signatureHandler.exists()) {
kDebug() << "Plasmoid signature doesn't exists: signature verification aborted."; // qDebug() << "Plasmoid signature doesn't exists: signature verification aborted.";
return QString(); return QString();
} }
kDebug() << "Cheking if " << plasmoidPath.pathOrUrl() << " and " << plasmoidSignaturePath.pathOrUrl() << " matches"; // qDebug() << "Cheking if " << plasmoidPath.pathOrUrl() << " and " << plasmoidSignaturePath.pathOrUrl() << " matches";
return d->signerOf(plasmoidPath.pathOrUrl(), plasmoidSignaturePath.pathOrUrl()); return d->signerOf(plasmoidPath.pathOrUrl(), plasmoidSignaturePath.pathOrUrl());
} }

View File

@ -21,7 +21,7 @@
#include <QTime> #include <QTime>
#include <kdebug.h> #include <QDebug>
#include "applet.h" #include "applet.h"
#include "signing.h" #include "signing.h"

View File

@ -32,7 +32,7 @@
#include <kcolorscheme.h> #include <kcolorscheme.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <QDebug>
#include <kfilterdev.h> #include <kfilterdev.h>
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -207,7 +207,7 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
path = imagePath; path = imagePath;
} else { } else {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "file '" << path << "' does not exist!"; // qDebug() << "file '" << path << "' does not exist!";
#endif #endif
} }
@ -223,9 +223,9 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
} else { } else {
createRenderer(); createRenderer();
naturalSize = renderer->defaultSize(); naturalSize = renderer->defaultSize();
//kDebug() << "natural size for" << path << "from renderer is" << naturalSize; //qDebug() << "natural size for" << path << "from renderer is" << naturalSize;
cacheAndColorsTheme()->insertIntoRectsCache(path, "_Natural", QRectF(QPointF(0,0), naturalSize)); cacheAndColorsTheme()->insertIntoRectsCache(path, "_Natural", QRectF(QPointF(0,0), naturalSize));
//kDebug() << "natural size for" << path << "from cache is" << naturalSize; //qDebug() << "natural size for" << path << "from cache is" << naturalSize;
} }
} }
@ -334,17 +334,17 @@ QPixmap SvgPrivate::findInCache(const QString &elementId, const QSizeF &s)
id.append(actualElementId); id.append(actualElementId);
} }
//kDebug() << "id is " << id; //qDebug() << "id is " << id;
QPixmap p; QPixmap p;
if (cacheRendering && cacheAndColorsTheme()->findInCache(id, p, lastModified)) { if (cacheRendering && cacheAndColorsTheme()->findInCache(id, p, lastModified)) {
//kDebug() << "found cached version of " << id << p.size(); //qDebug() << "found cached version of " << id << p.size();
return p; return p;
} }
//kDebug() << "didn't find cached version of " << id << ", so re-rendering"; //qDebug() << "didn't find cached version of " << id << ", so re-rendering";
//kDebug() << "size for " << actualElementId << " is " << s; //qDebug() << "size for " << actualElementId << " is " << s;
// we have to re-render this puppy // we have to re-render this puppy
createRenderer(); createRenderer();
@ -386,7 +386,7 @@ void SvgPrivate::createRenderer()
return; return;
} }
//kDebug() << kBacktrace(); //qDebug() << kBacktrace();
if (themed && path.isEmpty() && !themeFailed) { if (themed && path.isEmpty() && !themeFailed) {
Applet *applet = qobject_cast<Applet*>(q->parent()); Applet *applet = qobject_cast<Applet*>(q->parent());
//FIXME: this maybe could be more efficient if we knew if the package was empty, e.g. for //FIXME: this maybe could be more efficient if we knew if the package was empty, e.g. for
@ -405,14 +405,14 @@ void SvgPrivate::createRenderer()
path = actualTheme()->imagePath(themePath); path = actualTheme()->imagePath(themePath);
themeFailed = path.isEmpty(); themeFailed = path.isEmpty();
if (themeFailed) { if (themeFailed) {
kWarning() << "No image path found for" << themePath; qWarning() << "No image path found for" << themePath;
} }
} }
} }
//kDebug() << "********************************"; //qDebug() << "********************************";
//kDebug() << "FAIL! **************************"; //qDebug() << "FAIL! **************************";
//kDebug() << path << "**"; //qDebug() << path << "**";
QString styleSheet = cacheAndColorsTheme()->d->svgStyleSheet(); QString styleSheet = cacheAndColorsTheme()->d->svgStyleSheet();
styleCrc = qChecksum(styleSheet.toUtf8(), styleSheet.size()); styleCrc = qChecksum(styleSheet.toUtf8(), styleSheet.size());
@ -420,7 +420,7 @@ void SvgPrivate::createRenderer()
QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = s_renderers.constFind(styleCrc + path); QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = s_renderers.constFind(styleCrc + path);
if (it != s_renderers.constEnd()) { if (it != s_renderers.constEnd()) {
//kDebug() << "gots us an existing one!"; //qDebug() << "gots us an existing one!";
renderer = it.value(); renderer = it.value();
} else { } else {
if (path.isEmpty()) { if (path.isEmpty()) {
@ -599,7 +599,7 @@ QRectF SvgPrivate::makeUniform(const QRectF &orig, const QRectF &dst)
res.setHeight(res.height() + offset); res.setHeight(res.height() + offset);
} }
//kDebug()<<"Aligning Rects, origin:"<<orig<<"destination:"<<dst<<"result:"<<res; //qDebug()<<"Aligning Rects, origin:"<<orig<<"destination:"<<dst<<"result:"<<res;
return res; return res;
} }
@ -619,7 +619,7 @@ void SvgPrivate::themeChanged()
eraseRenderer(); eraseRenderer();
setImagePath(currentPath); setImagePath(currentPath);
//kDebug() << themePath << ">>>>>>>>>>>>>>>>>> theme changed"; //qDebug() << themePath << ">>>>>>>>>>>>>>>>>> theme changed";
emit q->repaintNeeded(); emit q->repaintNeeded();
} }
@ -630,7 +630,7 @@ void SvgPrivate::colorsChanged()
} }
eraseRenderer(); eraseRenderer();
//kDebug() << "repaint needed from colorsChanged"; //qDebug() << "repaint needed from colorsChanged";
emit q->repaintNeeded(); emit q->repaintNeeded();
} }
@ -754,7 +754,7 @@ FIXME: implement when Qt can support us!
QSizeF naturalSize = d->renderer->defaultSize(); QSizeF naturalSize = d->renderer->defaultSize();
qreal dx = d->size.width() / naturalSize.width(); qreal dx = d->size.width() / naturalSize.width();
qreal dy = d->size.height() / naturalSize.height(); qreal dy = d->size.height() / naturalSize.height();
//kDebug() << point << "is really" //qDebug() << point << "is really"
// << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy); // << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy)); return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy));
@ -784,7 +784,7 @@ bool Svg::containsMultipleImages() const
void Svg::setImagePath(const QString &svgFilePath) void Svg::setImagePath(const QString &svgFilePath)
{ {
if (d->setImagePath(svgFilePath)) { if (d->setImagePath(svgFilePath)) {
//kDebug() << "repaintNeeded"; //qDebug() << "repaintNeeded";
emit repaintNeeded(); emit repaintNeeded();
} }
} }

View File

@ -49,14 +49,14 @@ void ContextTest::contextEvent(QEvent *event)
void ContextTest::contextEvent(QGraphicsSceneMouseEvent *event) void ContextTest::contextEvent(QGraphicsSceneMouseEvent *event)
{ {
kDebug() << "test!!!!!!!!!!!!!!!!!!!!!!!" << event->pos(); // qDebug() << "test!!!!!!!!!!!!!!!!!!!!!!!" << event->pos();
kDebug() << event->buttons() << event->modifiers(); // qDebug() << event->buttons() << event->modifiers();
Plasma::Containment *c = containment(); Plasma::Containment *c = containment();
if (c) { if (c) {
kDebug() << c->name(); // qDebug() << c->name();
} else { } else {
kDebug() << "fail"; // qDebug() << "fail";
return; return;
} }
@ -69,9 +69,9 @@ void ContextTest::contextEvent(QGraphicsSceneMouseEvent *event)
void ContextTest::wheelEvent(QGraphicsSceneWheelEvent *event) void ContextTest::wheelEvent(QGraphicsSceneWheelEvent *event)
{ {
kDebug() << "test!!!!!!!!!!!!!11111111!!"; // qDebug() << "test!!!!!!!!!!!!!11111111!!";
kDebug() << event->orientation() << event->delta(); // qDebug() << event->orientation() << event->delta();
kDebug() << event->buttons() << event->modifiers(); // qDebug() << event->buttons() << event->modifiers();
} }
void ContextTest::init(const KConfigGroup &config) void ContextTest::init(const KConfigGroup &config)

View File

@ -34,7 +34,7 @@
#include <kcolorscheme.h> #include <kcolorscheme.h>
#include <kcomponentdata.h> #include <kcomponentdata.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <QDebug>
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kglobal.h> #include <kglobal.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -160,7 +160,7 @@ QString Theme::imagePath(const QString &name) const
// look for a compressed svg file in the theme // look for a compressed svg file in the theme
if (name.contains("../") || name.isEmpty()) { if (name.contains("../") || name.isEmpty()) {
// we don't support relative paths // we don't support relative paths
//kDebug() << "Theme says: bad image path " << name; //qDebug() << "Theme says: bad image path " << name;
return QString(); return QString();
} }
@ -191,7 +191,7 @@ QString Theme::imagePath(const QString &name) const
/* /*
if (path.isEmpty()) { if (path.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "Theme says: bad image path " << name; // qDebug() << "Theme says: bad image path " << name;
#endif #endif
} }
*/ */
@ -236,19 +236,19 @@ QString Theme::wallpaperPath(const QSize &size) const
if (fullPath.isEmpty()) { if (fullPath.isEmpty()) {
// we failed to find it in the theme, so look in the standard directories // we failed to find it in the theme, so look in the standard directories
//kDebug() << "looking for" << image; //qDebug() << "looking for" << image;
fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + image); fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + image);
} }
if (fullPath.isEmpty()) { if (fullPath.isEmpty()) {
// we still failed to find it in the theme, so look for the default in // we still failed to find it in the theme, so look for the default in
// the standard directories // the standard directories
//kDebug() << "looking for" << defaultImage; //qDebug() << "looking for" << defaultImage;
fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + defaultImage); fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("wallpapers/") + defaultImage);
if (fullPath.isEmpty()) { if (fullPath.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "exhausted every effort to find a wallpaper."; // qDebug() << "exhausted every effort to find a wallpaper.";
#endif #endif
} }
} }

View File

@ -18,7 +18,7 @@
*/ */
#include <plasma/version.h> #include <plasma/version.h>
#include <kdebug.h> #include <QDebug>
namespace Plasma namespace Plasma
{ {
@ -52,7 +52,7 @@ bool isPluginVersionCompatible(unsigned int version)
{ {
if (version == quint32(-1)) { if (version == quint32(-1)) {
// unversioned, just let it through // unversioned, just let it through
kWarning() << "unversioned plugin detected, may result in instability"; qWarning() << "unversioned plugin detected, may result in instability";
return true; return true;
} }
@ -62,7 +62,7 @@ bool isPluginVersionCompatible(unsigned int version)
if (version < minVersion || version > maxVersion) { if (version < minVersion || version > maxVersion) {
#ifndef NDEBUG #ifndef NDEBUG
kDebug() << "plugin is compiled against incompatible Plasma version " << version // qDebug() << "plugin is compiled against incompatible Plasma version " << version
<< "This build is compatible with" << PLASMA_VERSION_MAJOR << ".0.0 (" << minVersion << "This build is compatible with" << PLASMA_VERSION_MAJOR << ".0.0 (" << minVersion
<< ") to" << PLASMA_VERSION_STRING << "(" << maxVersion << ")"; << ") to" << PLASMA_VERSION_STRING << "(" << maxVersion << ")";
#endif #endif

View File

@ -20,7 +20,7 @@
#include "plasmapkg.h" #include "plasmapkg.h"
#include <kdebug.h> #include <QDebug>
#include <kservice.h> #include <kservice.h>
#include <kservicetypetrader.h> #include <kservicetypetrader.h>
#include <kshell.h> #include <kshell.h>
@ -261,7 +261,7 @@ void PlasmaPkg::runMain()
exit(1); exit(1);
return; return;
} }
kWarning() << "custom PackageStructure plugins not ported"; qWarning() << "custom PackageStructure plugins not ported";
KService::Ptr offer = offers.first(); KService::Ptr offer = offers.first();
QString error; QString error;

View File

@ -74,7 +74,7 @@ QScriptValue ScriptEnv::getUrl(QScriptContext *context, QScriptEngine *engine)
ScriptEnv *env = ScriptEnv::findScriptEnv(engine); ScriptEnv *env = ScriptEnv::findScriptEnv(engine);
if (!env) { if (!env) {
//kDebug() << "findScriptEnv failed"; //qDebug() << "findScriptEnv failed";
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -111,7 +111,7 @@ QScriptValue ScriptEnv::download(QScriptContext *context, QScriptEngine *engine)
ScriptEnv *env = ScriptEnv::findScriptEnv(engine); ScriptEnv *env = ScriptEnv::findScriptEnv(engine);
if (!env) { if (!env) {
//kDebug() << "findScriptEnv failed"; //qDebug() << "findScriptEnv failed";
return engine->undefinedValue(); return engine->undefinedValue();
} }

View File

@ -186,12 +186,12 @@ QScriptValue ScriptEnv::defaultApplication(QScriptContext *context, QScriptEngin
} else { } else {
// try the files in share/apps/kcm_componentchooser/ // try the files in share/apps/kcm_componentchooser/
const QStringList services = KGlobal::dirs()->findAllResources("data","kcm_componentchooser/*.desktop", KStandardDirs::NoDuplicates); const QStringList services = KGlobal::dirs()->findAllResources("data","kcm_componentchooser/*.desktop", KStandardDirs::NoDuplicates);
//kDebug() << "ok, trying in" << services.count(); //qDebug() << "ok, trying in" << services.count();
foreach (const QString &service, services) { foreach (const QString &service, services) {
KConfig config(service, KConfig::SimpleConfig); KConfig config(service, KConfig::SimpleConfig);
KConfigGroup cg = config.group(QByteArray()); KConfigGroup cg = config.group(QByteArray());
const QString type = cg.readEntry("valueName", QString()); const QString type = cg.readEntry("valueName", QString());
//kDebug() << " checking" << service << type << application; //qDebug() << " checking" << service << type << application;
if (type.compare(application, Qt::CaseInsensitive) == 0) { if (type.compare(application, Qt::CaseInsensitive) == 0) {
KConfig store(cg.readPathEntry("storeInFile", "null")); KConfig store(cg.readPathEntry("storeInFile", "null"));
KConfigGroup storeCg(&store, cg.readEntry("valueSection", QString())); KConfigGroup storeCg(&store, cg.readEntry("valueSection", QString()));

View File

@ -106,9 +106,9 @@ void ScriptEnv::registerEnums(QScriptValue &scriptValue, const QMetaObject &meta
QScriptEngine *engine = scriptValue.engine(); QScriptEngine *engine = scriptValue.engine();
for (int i = 0; i < meta.enumeratorCount(); ++i) { for (int i = 0; i < meta.enumeratorCount(); ++i) {
QMetaEnum e = meta.enumerator(i); QMetaEnum e = meta.enumerator(i);
//kDebug() << e.name(); //qDebug() << e.name();
for (int i=0; i < e.keyCount(); ++i) { for (int i=0; i < e.keyCount(); ++i) {
//kDebug() << e.key(i) << e.value(i); //qDebug() << e.key(i) << e.value(i);
scriptValue.setProperty(e.key(i), QScriptValue(engine, e.value(i))); scriptValue.setProperty(e.key(i), QScriptValue(engine, e.value(i)));
} }
} }
@ -118,12 +118,12 @@ bool ScriptEnv::include(const QString &path)
{ {
QFile file(path); QFile file(path);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
kWarning() << i18n("Unable to load script file: %1", path); qWarning() << i18n("Unable to load script file: %1", path);
return false; return false;
} }
QString script = file.readAll(); QString script = file.readAll();
//kDebug() << "Script says" << script; //qDebug() << "Script says" << script;
// change the context to the parent context so that the include is actually // change the context to the parent context so that the include is actually
// executed in the same context as the caller; seems to be what javascript // executed in the same context as the caller; seems to be what javascript
@ -154,7 +154,7 @@ bool ScriptEnv::checkForErrors(bool fatal)
bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &obj) bool ScriptEnv::importBuiltinExtension(const QString &extension, QScriptValue &obj)
{ {
kDebug() << extension; // qDebug() << extension;
if ("filedialog" == extension) { if ("filedialog" == extension) {
#ifdef USEGUI #ifdef USEGUI
FileDialogProxy::registerWithRuntime(m_engine); FileDialogProxy::registerWithRuntime(m_engine);
@ -193,7 +193,7 @@ bool ScriptEnv::importExtensions(const KPluginInfo &info, QScriptValue &obj, Aut
{ {
QStringList requiredExtensions = info.service()->property("X-Plasma-RequiredExtensions", QVariant::StringList).toStringList(); QStringList requiredExtensions = info.service()->property("X-Plasma-RequiredExtensions", QVariant::StringList).toStringList();
if (!requiredExtensions.isEmpty()) { if (!requiredExtensions.isEmpty()) {
kDebug() << "required extensions are" << requiredExtensions; // qDebug() << "required extensions are" << requiredExtensions;
} }
foreach (const QString &ext, requiredExtensions) { foreach (const QString &ext, requiredExtensions) {
@ -221,7 +221,7 @@ bool ScriptEnv::importExtensions(const KPluginInfo &info, QScriptValue &obj, Aut
QStringList optionalExtensions = info.service()->property("X-Plasma-OptionalExtensions", QVariant::StringList).toStringList(); QStringList optionalExtensions = info.service()->property("X-Plasma-OptionalExtensions", QVariant::StringList).toStringList();
if (!optionalExtensions.isEmpty()) { if (!optionalExtensions.isEmpty()) {
kDebug() << "optional extensions are" << optionalExtensions; // qDebug() << "optional extensions are" << optionalExtensions;
} }
foreach (const QString &ext, optionalExtensions) { foreach (const QString &ext, optionalExtensions) {
@ -260,7 +260,7 @@ QScriptValue ScriptEnv::debug(QScriptContext *context, QScriptEngine *engine)
return throwNonFatalError(i18n("debug takes one argument"), context, engine); return throwNonFatalError(i18n("debug takes one argument"), context, engine);
} }
kDebug() << context->argument(0).toString(); // qDebug() << context->argument(0).toString();
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -353,7 +353,7 @@ QScriptValue ScriptEnv::loadAddon(QScriptContext *context, QScriptEngine *engine
QScriptValue::ReadOnly | QScriptValue::ReadOnly |
QScriptValue::Undeletable | QScriptValue::Undeletable |
QScriptValue::SkipInEnumeration); QScriptValue::SkipInEnumeration);
//kDebug() << "context is" << innerContext; //qDebug() << "context is" << innerContext;
engine->evaluate(code, file.fileName()); engine->evaluate(code, file.fileName());
engine->popContext(); engine->popContext();
@ -391,11 +391,11 @@ QScriptValue ScriptEnv::registerAddon(QScriptContext *context, QScriptEngine *en
QString ScriptEnv::filePathFromScriptContext(const char *type, const QString &file) const QString ScriptEnv::filePathFromScriptContext(const char *type, const QString &file) const
{ {
//kDebug() << type << file; //qDebug() << type << file;
QScriptContext *c = m_engine->currentContext(); QScriptContext *c = m_engine->currentContext();
while (c) { while (c) {
QScriptValue v = c->activationObject().property("__plasma_package"); QScriptValue v = c->activationObject().property("__plasma_package");
//kDebug() << "variant in parent context?" << v.isVariant(); //qDebug() << "variant in parent context?" << v.isVariant();
if (v.isVariant()) { if (v.isVariant()) {
const QString path = v.toVariant().value<Plasma::Package>().filePath(type, file); const QString path = v.toVariant().value<Plasma::Package>().filePath(type, file);
if (!path.isEmpty()) { if (!path.isEmpty()) {
@ -406,7 +406,7 @@ QString ScriptEnv::filePathFromScriptContext(const char *type, const QString &fi
c = c->parentContext(); c = c->parentContext();
} }
//kDebug() << "fail"; //qDebug() << "fail";
return QString(); return QString();
} }

View File

@ -123,7 +123,7 @@ QScriptValue JavaScriptDataEngine::jsSetData(QScriptContext *context, QScriptEng
if (context->argumentCount() == 1) { if (context->argumentCount() == 1) {
iFace->setData(source, DataEngine::Data()); iFace->setData(source, DataEngine::Data());
} else if (context->argument(1).isArray() || context->argument(1).isObject()) { } else if (context->argument(1).isArray() || context->argument(1).isObject()) {
kDebug( )<< "array or object"; // qDebug()<< "array or object";
QScriptValueIterator it(context->argument(1)); QScriptValueIterator it(context->argument(1));
DataEngine::Data data; DataEngine::Data data;
@ -262,9 +262,9 @@ void JavaScriptDataEngine::reportError(ScriptEnv *env, bool fatal) const
{ {
Q_UNUSED(fatal) Q_UNUSED(fatal)
kDebug() << "Error: " << env->engine()->uncaughtException().toString() // qDebug() << "Error: " << env->engine()->uncaughtException().toString()
<< " at line " << env->engine()->uncaughtExceptionLineNumber() << endl; << " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
kDebug() << env->engine()->uncaughtExceptionBacktrace(); // qDebug() << env->engine()->uncaughtExceptionBacktrace();
} }
QStringList JavaScriptDataEngine::sources() const QStringList JavaScriptDataEngine::sources() const

View File

@ -66,7 +66,7 @@ JavaScriptService::JavaScriptService(const QString &serviceName, JavaScriptDataE
JavaScriptService::~JavaScriptService() JavaScriptService::~JavaScriptService()
{ {
// kDebug(); // qDebug();
} }
Plasma::ServiceJob *JavaScriptService::createJob(const QString &operation, QMap<QString, QVariant> &parameters) Plasma::ServiceJob *JavaScriptService::createJob(const QString &operation, QMap<QString, QVariant> &parameters)
@ -96,7 +96,7 @@ void JavaScriptService::registerOperationsScheme()
const QString path = m_dataEngine.data()->filePath("services", name() + ".operations"); const QString path = m_dataEngine.data()->filePath("services", name() + ".operations");
if (path.isEmpty()) { if (path.isEmpty()) {
kDebug() << "Cannot find operations description:" << name() << ".operations"; // qDebug() << "Cannot find operations description:" << name() << ".operations";
m_dataEngine.clear(); m_dataEngine.clear();
return; return;
} }

View File

@ -68,12 +68,12 @@ bool JavaScriptRunner::init()
QFile file(mainScript()); QFile file(mainScript());
if (!file.open(QIODevice::ReadOnly | QIODevice::Text) ) { if (!file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
kWarning() << "Unable to load script file"; qWarning() << "Unable to load script file";
return false; return false;
} }
QString script = file.readAll(); QString script = file.readAll();
kDebug() << "Script says" << script; // qDebug() << "Script says" << script;
m_engine->evaluate(script); m_engine->evaluate(script);
if (m_engine->hasUncaughtException()) { if (m_engine->hasUncaughtException()) {
@ -88,7 +88,7 @@ void JavaScriptRunner::match(Plasma::RunnerContext &search)
{ {
QScriptValue fun = m_self.property("match"); QScriptValue fun = m_self.property("match");
if (!fun.isFunction()) { if (!fun.isFunction()) {
kDebug() << "Script: match is not a function, " << fun.toString(); // qDebug() << "Script: match is not a function, " << fun.toString();
return; return;
} }
@ -110,7 +110,7 @@ void JavaScriptRunner::exec(const Plasma::RunnerContext *search, const Plasma::Q
{ {
QScriptValue fun = m_self.property("exec"); QScriptValue fun = m_self.property("exec");
if (!fun.isFunction()) { if (!fun.isFunction()) {
kDebug() << "Script: exec is not a function, " << fun.toString(); // qDebug() << "Script: exec is not a function, " << fun.toString();
return; return;
} }
@ -144,9 +144,9 @@ void JavaScriptRunner::setupObjects()
void JavaScriptRunner::reportError(ScriptEnv *env, bool fatal) void JavaScriptRunner::reportError(ScriptEnv *env, bool fatal)
{ {
Q_UNUSED(fatal) Q_UNUSED(fatal)
kDebug() << "Error: " << env->engine()->uncaughtException().toString() // qDebug() << "Error: " << env->engine()->uncaughtException().toString()
<< " at line " << env->engine()->uncaughtExceptionLineNumber() << endl; << " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
kDebug() << env->engine()->uncaughtExceptionBacktrace(); // qDebug() << env->engine()->uncaughtExceptionBacktrace();
} }
QString JavaScriptRunner::filePath(const char *type, const QString &file) const QString JavaScriptRunner::filePath(const char *type, const QString &file) const

View File

@ -118,8 +118,8 @@ static QScriptValue setThemeColor(QScriptContext *ctx, QScriptEngine *)
if (ctx->argumentCount() > 0) { if (ctx->argumentCount() > 0) {
const qint32 arg = ctx->argument(0).toInt32(); const qint32 arg = ctx->argument(0).toInt32();
if (arg >= 0 && arg <= Plasma::Theme::VisitedLinkColor) { if (arg >= 0 && arg <= Plasma::Theme::VisitedLinkColor) {
kDebug() << "setting to: " << static_cast<Plasma::Theme::ColorRole>(arg); // qDebug() << "setting to: " << static_cast<Plasma::Theme::ColorRole>(arg);
kDebug() << "color is: " << Plasma::Theme::defaultTheme()->color(static_cast<Plasma::Theme::ColorRole>(arg)); // qDebug() << "color is: " << Plasma::Theme::defaultTheme()->color(static_cast<Plasma::Theme::ColorRole>(arg));
self->setRgba(Plasma::Theme::defaultTheme()->color(static_cast<Plasma::Theme::ColorRole>(arg)).rgba()); self->setRgba(Plasma::Theme::defaultTheme()->color(static_cast<Plasma::Theme::ColorRole>(arg)).rgba());
} }
} }

View File

@ -39,7 +39,7 @@ Q_DECLARE_METATYPE(DataEngine::Data)
template <class M> template <class M>
QScriptValue qScriptValueFromMap(QScriptEngine *eng, const M &map) QScriptValue qScriptValueFromMap(QScriptEngine *eng, const M &map)
{ {
//kDebug() << "qScriptValueFromMap called"; //qDebug() << "qScriptValueFromMap called";
QScriptValue obj = eng->newObject(); QScriptValue obj = eng->newObject();
typename M::const_iterator begin = map.constBegin(); typename M::const_iterator begin = map.constBegin();
typename M::const_iterator end = map.constEnd(); typename M::const_iterator end = map.constEnd();
@ -54,7 +54,7 @@ QScriptValue qScriptValueFromMap(QScriptEngine *eng, const M &map)
template <class M> template <class M>
QScriptValue qScriptValueFromVariantMap(QScriptEngine *eng, const M &map) QScriptValue qScriptValueFromVariantMap(QScriptEngine *eng, const M &map)
{ {
//kDebug() << "qScriptValueFromMap called"; //qDebug() << "qScriptValueFromMap called";
QScriptValue obj = eng->newObject(); QScriptValue obj = eng->newObject();
typename M::const_iterator begin = map.constBegin(); typename M::const_iterator begin = map.constBegin();
typename M::const_iterator end = map.constEnd(); typename M::const_iterator end = map.constEnd();
@ -75,7 +75,7 @@ QScriptValue qScriptValueFromVariantMap(QScriptEngine *eng, const M &map)
template <class M> template <class M>
void qScriptValueToMap(const QScriptValue &value, M &map) void qScriptValueToMap(const QScriptValue &value, M &map)
{ {
//kDebug() << "qScriptValueToMap called"; //qDebug() << "qScriptValueToMap called";
QScriptValueIterator it(value); QScriptValueIterator it(value);
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();

View File

@ -46,7 +46,7 @@ DataEngineReceiver::DataEngineReceiver(const Plasma::DataEngine *engine, const Q
DataEngineReceiver::~DataEngineReceiver() DataEngineReceiver::~DataEngineReceiver()
{ {
s_receivers.remove(this); s_receivers.remove(this);
//kDebug() << s_receivers.count(); //qDebug() << s_receivers.count();
} }
bool DataEngineReceiver::isValid() const bool DataEngineReceiver::isValid() const
@ -189,13 +189,13 @@ QScriptValue DataEngineReceiver::disconnectSource(QScriptContext *context, QScri
DataEngine *dataEngine = qobject_cast<DataEngine *>(context->thisObject().toQObject()); DataEngine *dataEngine = qobject_cast<DataEngine *>(context->thisObject().toQObject());
if (!dataEngine) { if (!dataEngine) {
//kDebug() << "no engine!"; //qDebug() << "no engine!";
return engine->undefinedValue(); return engine->undefinedValue();
} }
const QString source = context->argument(0).toString(); const QString source = context->argument(0).toString();
if (source.isEmpty()) { if (source.isEmpty()) {
//kDebug() << "no source!"; //qDebug() << "no source!";
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -214,7 +214,7 @@ QScriptValue DataEngineReceiver::disconnectSource(QScriptContext *context, QScri
} }
if (!obj) { if (!obj) {
//kDebug() << "no object!"; //qDebug() << "no object!";
return engine->undefinedValue(); return engine->undefinedValue();
} }

View File

@ -30,7 +30,7 @@ QScriptValue jsi18n(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 1) { if (context->argumentCount() < 1) {
kDebug() << i18n("i18n() takes at least one argument"); // qDebug() << i18n("i18n() takes at least one argument");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -49,7 +49,7 @@ QScriptValue jsi18nc(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 2) { if (context->argumentCount() < 2) {
kDebug() << i18n("i18nc() takes at least two arguments"); // qDebug() << i18n("i18nc() takes at least two arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -69,7 +69,7 @@ QScriptValue jsi18np(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 2) { if (context->argumentCount() < 2) {
kDebug() << i18n("i18np() takes at least two arguments"); // qDebug() << i18n("i18np() takes at least two arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -94,7 +94,7 @@ QScriptValue jsi18ncp(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 3) { if (context->argumentCount() < 3) {
kDebug() << i18n("i18ncp() takes at least three arguments"); // qDebug() << i18n("i18ncp() takes at least three arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }

View File

@ -72,7 +72,7 @@ QScriptValue qScriptValueFromKConfigGroup(QScriptEngine *engine, const KConfigGr
//setting the key/value pairs //setting the key/value pairs
for (it = begin; it != end; ++it) { for (it = begin; it != end; ++it) {
//kDebug() << "setting" << it.key() << "to" << it.value(); //qDebug() << "setting" << it.key() << "to" << it.value();
QString prop = it.key(); QString prop = it.key();
prop.replace(' ', '_'); prop.replace(' ', '_');
obj.setProperty(prop, it.value()); obj.setProperty(prop, it.value());
@ -89,7 +89,7 @@ void kConfigGroupFromScriptValue(const QScriptValue& obj, KConfigGroup &config)
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
//kDebug() << it.name() << "is" << it.value().toString(); //qDebug() << it.name() << "is" << it.value().toString();
if (it.name() != "__name") { if (it.name() != "__name") {
config.writeEntry(it.name(), it.value().toString()); config.writeEntry(it.name(), it.value().toString());
} }

View File

@ -114,7 +114,7 @@ UiLoader::UiLoader()
UiLoader::~UiLoader() UiLoader::~UiLoader()
{ {
kDebug(); // qDebug();
} }
QStringList UiLoader::availableWidgets() const QStringList UiLoader::availableWidgets() const

View File

@ -162,7 +162,7 @@ void AppletInterface::init()
} }
qDebug() << "Loaded org.kde.toolbox"; qDebug() << "Loaded org.kde.toolbox";
} else { } else {
kWarning() << "Could not load org.kde.toolbox package."; qWarning() << "Could not load org.kde.toolbox package.";
} }
} }
@ -324,7 +324,7 @@ void AppletInterface::writeConfig(const QString &entry, const QVariant &value)
m_appletScriptEngine->configNeedsSaving(); m_appletScriptEngine->configNeedsSaving();
} }
} else } else
kWarning() << "Couldn't find a configuration entry"; qWarning() << "Couldn't find a configuration entry";
} }
QVariant AppletInterface::readConfig(const QString &entry) const QVariant AppletInterface::readConfig(const QString &entry) const
@ -469,7 +469,7 @@ int AppletInterface::apiVersion() const
void AppletInterface::debug(const QString &msg) void AppletInterface::debug(const QString &msg)
{ {
kDebug() << msg; qDebug() << msg;
} }
void AppletInterface::setAssociatedApplication(const QString &string) void AppletInterface::setAssociatedApplication(const QString &string)

View File

@ -284,13 +284,13 @@ void ContainmentInterface::addAppletActions(QMenu &desktopMenu, Plasma::Applet *
if (containment()->immutability() == Plasma::Types::Mutable) { if (containment()->immutability() == Plasma::Types::Mutable) {
QAction *closeApplet = applet->actions()->action("remove"); QAction *closeApplet = applet->actions()->action("remove");
//kDebug() << "checking for removal" << closeApplet; //qDebug() << "checking for removal" << closeApplet;
if (closeApplet) { if (closeApplet) {
if (!desktopMenu.isEmpty()) { if (!desktopMenu.isEmpty()) {
desktopMenu.addSeparator(); desktopMenu.addSeparator();
} }
//kDebug() << "adding close action" << closeApplet->isEnabled() << closeApplet->isVisible(); //qDebug() << "adding close action" << closeApplet->isEnabled() << closeApplet->isVisible();
desktopMenu.addAction(closeApplet); desktopMenu.addAction(closeApplet);
} }
} }
@ -300,7 +300,7 @@ void ContainmentInterface::addContainmentActions(QMenu &desktopMenu, QEvent *eve
{ {
if (containment()->corona()->immutability() != Plasma::Types::Mutable && if (containment()->corona()->immutability() != Plasma::Types::Mutable &&
!KAuthorized::authorizeKAction("plasma/containment_actions")) { !KAuthorized::authorizeKAction("plasma/containment_actions")) {
//kDebug() << "immutability"; //qDebug() << "immutability";
return; return;
} }

View File

@ -117,7 +117,7 @@ QObject *DeclarativeAppletScript::loadui(const QString &filename)
{ {
QFile f(filename); QFile f(filename);
if (!f.open(QIODevice::ReadOnly)) { if (!f.open(QIODevice::ReadOnly)) {
kWarning() << i18n("Unable to open '%1'",filename); qWarning() << i18n("Unable to open '%1'",filename);
return 0; return 0;
} }

View File

@ -84,7 +84,7 @@ QList<int> AppInterface::panelIds() const
QList<int> panels; QList<int> panels;
foreach (Plasma::Containment *c, m_env->corona()->containments()) { foreach (Plasma::Containment *c, m_env->corona()->containments()) {
//kDebug() << "checking" << (QObject*)c << isPanel(c); //qDebug() << "checking" << (QObject*)c << isPanel(c);
if (ScriptEngine::isPanel(c)) { if (ScriptEngine::isPanel(c)) {
panels.append(c->id()); panels.append(c->id());
} }

View File

@ -61,7 +61,7 @@ ConfigGroup::ConfigGroup(QObject *parent)
ConfigGroup::~ConfigGroup() ConfigGroup::~ConfigGroup()
{ {
if (d->synchTimer->isActive()) { if (d->synchTimer->isActive()) {
//kDebug() << "SYNC......"; //qDebug() << "SYNC......";
d->synchTimer->stop(); d->synchTimer->stop();
d->configGroup->sync(); d->configGroup->sync();
} }
@ -139,7 +139,7 @@ bool ConfigGroup::readConfigFile()
return true; return true;
} else { } else {
if (d->file.isEmpty()) { if (d->file.isEmpty()) {
kWarning() << "Could not find KConfig Parent: specify a file or parent to another ConfigGroup"; qWarning() << "Could not find KConfig Parent: specify a file or parent to another ConfigGroup";
return false; return false;
} }
d->config = KSharedConfig::openConfig(d->file); d->config = KSharedConfig::openConfig(d->file);
@ -167,7 +167,7 @@ QVariant ConfigGroup::readEntry(const QString& key)
return QVariant(); return QVariant();
} }
const QVariant value = d->configGroup->readEntry(key, QVariant("")); const QVariant value = d->configGroup->readEntry(key, QVariant(""));
//kDebug() << " reading setting: " << key << value; //qDebug() << " reading setting: " << key << value;
return value; return value;
} }
@ -179,7 +179,7 @@ void ConfigGroup::deleteEntry(const QString& key)
void ConfigGroup::sync() void ConfigGroup::sync()
{ {
if (d->configGroup) { if (d->configGroup) {
//kDebug() << "synching config..."; //qDebug() << "synching config...";
d->configGroup->sync(); d->configGroup->sync();
} }
} }

View File

@ -30,7 +30,7 @@ QScriptValue jsi18n(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 1) { if (context->argumentCount() < 1) {
kDebug() << i18n("i18n() takes at least one argument"); // qDebug() << i18n("i18n() takes at least one argument");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -49,7 +49,7 @@ QScriptValue jsi18nc(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 2) { if (context->argumentCount() < 2) {
kDebug() << i18n("i18nc() takes at least two arguments"); // qDebug() << i18n("i18nc() takes at least two arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -69,7 +69,7 @@ QScriptValue jsi18np(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 2) { if (context->argumentCount() < 2) {
kDebug() << i18n("i18np() takes at least two arguments"); // qDebug() << i18n("i18np() takes at least two arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -94,7 +94,7 @@ QScriptValue jsi18ncp(QScriptContext *context, QScriptEngine *engine)
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() < 3) { if (context->argumentCount() < 3) {
kDebug() << i18n("i18ncp() takes at least three arguments"); // qDebug() << i18n("i18ncp() takes at least three arguments");
return engine->undefinedValue(); return engine->undefinedValue();
} }

View File

@ -255,13 +255,13 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
{ {
Q_UNUSED(engine) Q_UNUSED(engine)
if (context->argumentCount() == 0) { if (context->argumentCount() == 0) {
kDebug() << "no arguments"; // qDebug() << "no arguments";
return false; return false;
} }
const QString layout = context->argument(0).toString(); const QString layout = context->argument(0).toString();
if (layout.isEmpty() || layout.contains("'")) { if (layout.isEmpty() || layout.contains("'")) {
kDebug() << "layout is empty"; // qDebug() << "layout is empty";
return false; return false;
} }
@ -270,7 +270,7 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
KService::List offers = KServiceTypeTrader::self()->query("Plasma/LayoutTemplate", constraint); KService::List offers = KServiceTypeTrader::self()->query("Plasma/LayoutTemplate", constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug() << "offers fail" << constraint; // qDebug() << "offers fail" << constraint;
return false; return false;
} }
@ -279,26 +279,26 @@ QScriptValue ScriptEngine::loadTemplate(QScriptContext *context, QScriptEngine *
KPluginInfo info(offers.first()); KPluginInfo info(offers.first());
const QString path = KStandardDirs::locate("data", package.defaultPackageRoot() + '/' + info.pluginName() + '/'); const QString path = KStandardDirs::locate("data", package.defaultPackageRoot() + '/' + info.pluginName() + '/');
if (path.isEmpty()) { if (path.isEmpty()) {
kDebug() << "script path is empty"; // qDebug() << "script path is empty";
return false; return false;
} }
package.setPath(path); package.setPath(path);
const QString scriptFile = package.filePath("mainscript"); const QString scriptFile = package.filePath("mainscript");
if (scriptFile.isEmpty()) { if (scriptFile.isEmpty()) {
kDebug() << "scriptfile is empty"; // qDebug() << "scriptfile is empty";
return false; return false;
} }
QFile file(scriptFile); QFile file(scriptFile);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
kWarning() << i18n("Unable to load script file: %1", path); qWarning() << i18n("Unable to load script file: %1", path);
return false; return false;
} }
QString script = file.readAll(); QString script = file.readAll();
if (script.isEmpty()) { if (script.isEmpty()) {
kDebug() << "script is empty"; // qDebug() << "script is empty";
return false; return false;
} }
@ -433,12 +433,12 @@ QScriptValue ScriptEngine::defaultApplication(QScriptContext *context, QScriptEn
} else { } else {
// try the files in share/apps/kcm_componentchooser/ // try the files in share/apps/kcm_componentchooser/
const QStringList services = KGlobal::dirs()->findAllResources("data","kcm_componentchooser/*.desktop", KStandardDirs::NoDuplicates); const QStringList services = KGlobal::dirs()->findAllResources("data","kcm_componentchooser/*.desktop", KStandardDirs::NoDuplicates);
//kDebug() << "ok, trying in" << services.count(); //qDebug() << "ok, trying in" << services.count();
foreach (const QString &service, services) { foreach (const QString &service, services) {
KConfig config(service, KConfig::SimpleConfig); KConfig config(service, KConfig::SimpleConfig);
KConfigGroup cg = config.group(QByteArray()); KConfigGroup cg = config.group(QByteArray());
const QString type = cg.readEntry("valueName", QString()); const QString type = cg.readEntry("valueName", QString());
//kDebug() << " checking" << service << type << application; //qDebug() << " checking" << service << type << application;
if (type.compare(application, Qt::CaseInsensitive) == 0) { if (type.compare(application, Qt::CaseInsensitive) == 0) {
KConfig store(cg.readPathEntry("storeInFile", "null")); KConfig store(cg.readPathEntry("storeInFile", "null"));
KConfigGroup storeCg(&store, cg.readEntry("valueSection", QString())); KConfigGroup storeCg(&store, cg.readEntry("valueSection", QString()));
@ -656,10 +656,10 @@ Plasma::Corona *ScriptEngine::corona() const
bool ScriptEngine::evaluateScript(const QString &script, const QString &path) bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
{ {
//kDebug() << "evaluating" << m_editor->toPlainText(); //qDebug() << "evaluating" << m_editor->toPlainText();
evaluate(script, path); evaluate(script, path);
if (hasUncaughtException()) { if (hasUncaughtException()) {
//kDebug() << "catch the exception!"; //qDebug() << "catch the exception!";
QString error = i18n("Error: %1 at line %2\n\nBacktrace:\n%3", QString error = i18n("Error: %1 at line %2\n\nBacktrace:\n%3",
uncaughtException().toString(), uncaughtException().toString(),
QString::number(uncaughtExceptionLineNumber()), QString::number(uncaughtExceptionLineNumber()),
@ -673,7 +673,7 @@ bool ScriptEngine::evaluateScript(const QString &script, const QString &path)
void ScriptEngine::exception(const QScriptValue &value) void ScriptEngine::exception(const QScriptValue &value)
{ {
//kDebug() << "exception caught!" << value.toVariant(); //qDebug() << "exception caught!" << value.toVariant();
emit printError(value.toVariant().toString()); emit printError(value.toVariant().toString());
} }
@ -684,7 +684,7 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
QStringList scriptPaths; QStringList scriptPaths;
if (scripts.isEmpty()) { if (scripts.isEmpty()) {
//kDebug() << "no update scripts"; //qDebug() << "no update scripts";
return scriptPaths; return scriptPaths;
} }
@ -699,7 +699,7 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
} }
if (script.startsWith(localDir) || script.startsWith(localXdgDir)) { if (script.startsWith(localDir) || script.startsWith(localXdgDir)) {
kDebug() << "skipping user local script: " << script; // qDebug() << "skipping user local script: " << script;
continue; continue;
} }

View File

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

View File

@ -224,22 +224,22 @@ void PlasmaAppletItemModel::populateModel(const QStringList &whatChanged)
} }
clear(); clear();
//kDebug() << "populating model, our application is" << m_application; //qDebug() << "populating model, our application is" << m_application;
//kDebug() << "number of applets is" //qDebug() << "number of applets is"
// << Plasma::Applet::listAppletInfo(QString(), m_application).count(); // << Plasma::Applet::listAppletInfo(QString(), m_application).count();
KService::List services = KServiceTypeTrader::self()->query("Plasma/Applet", QString()); KService::List services = KServiceTypeTrader::self()->query("Plasma/Applet", QString());
foreach (const KSharedPtr<KService> service, services) { foreach (const KSharedPtr<KService> service, services) {
KPluginInfo info(service); KPluginInfo info(service);
//kDebug() << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool(); //qDebug() << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool();
if (info.property("NoDisplay").toBool() || info.category() == i18n("Containments")) { if (info.property("NoDisplay").toBool() || info.category() == i18n("Containments")) {
// we don't want to show the hidden category // we don't want to show the hidden category
continue; continue;
} }
qDebug() << info.pluginName() << " is the name of the plugin at" << info.entryPath(); qDebug() << info.pluginName() << " is the name of the plugin at" << info.entryPath();
//kDebug() << info.name() << info.property("X-Plasma-Thumbnail"); //qDebug() << info.name() << info.property("X-Plasma-Thumbnail");
PlasmaAppletItem::FilterFlags flags(PlasmaAppletItem::NoFilter); PlasmaAppletItem::FilterFlags flags(PlasmaAppletItem::NoFilter);
if (m_favorites.contains(info.pluginName())) { if (m_favorites.contains(info.pluginName())) {
@ -300,7 +300,7 @@ QSet<QString> PlasmaAppletItemModel::categories() const
QMimeData *PlasmaAppletItemModel::mimeData(const QModelIndexList &indexes) const QMimeData *PlasmaAppletItemModel::mimeData(const QModelIndexList &indexes) const
{ {
//kDebug() << "GETTING MIME DATA\n"; //qDebug() << "GETTING MIME DATA\n";
if (indexes.count() <= 0) { if (indexes.count() <= 0) {
return 0; return 0;
} }
@ -325,7 +325,7 @@ QMimeData *PlasmaAppletItemModel::mimeData(const QModelIndexList &indexes) const
lastRow = index.row(); lastRow = index.row();
PlasmaAppletItem *selectedItem = (PlasmaAppletItem *) itemFromIndex(index); PlasmaAppletItem *selectedItem = (PlasmaAppletItem *) itemFromIndex(index);
appletNames += '\n' + selectedItem->pluginName().toUtf8(); appletNames += '\n' + selectedItem->pluginName().toUtf8();
//kDebug() << selectedItem->pluginName() << index.column() << index.row(); //qDebug() << selectedItem->pluginName() << index.column() << index.row();
} }
data->setData(format, appletNames); data->setData(format, appletNames);

View File

@ -258,7 +258,7 @@ QList <QObject *> WidgetExplorer::widgetsMenuActions()
KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure"); KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure");
foreach (const KService::Ptr &service, offers) { foreach (const KService::Ptr &service, offers) {
//kDebug() << service->property("X-Plasma-ProvidesWidgetBrowser"); //qDebug() << service->property("X-Plasma-ProvidesWidgetBrowser");
if (service->property("X-Plasma-ProvidesWidgetBrowser").toBool()) { if (service->property("X-Plasma-ProvidesWidgetBrowser").toBool()) {
WidgetAction *action = new WidgetAction(QIcon::fromTheme("applications-internet"), WidgetAction *action = new WidgetAction(QIcon::fromTheme("applications-internet"),
i18nc("%1 is a type of widgets, as defined by " i18nc("%1 is a type of widgets, as defined by "
@ -328,7 +328,7 @@ void WidgetExplorerPrivate::initRunningApplets()
} }
} }
//kDebug() << runningApplets; //qDebug() << runningApplets;
itemModel.setRunningApplets(runningApplets); itemModel.setRunningApplets(runningApplets);
} }
@ -522,7 +522,7 @@ void WidgetExplorer::downloadWidgets(const QString &type)
KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure", KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure",
constraint); constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
//kDebug() << "could not find requested PackageStructure plugin" << type; //qDebug() << "could not find requested PackageStructure plugin" << type;
} else { } else {
KService::Ptr service = offers.first(); KService::Ptr service = offers.first();
QString error; QString error;
@ -533,7 +533,7 @@ void WidgetExplorer::downloadWidgets(const QString &type)
// connect(installer, SIGNAL(newWidgetBrowserFinished()), // connect(installer, SIGNAL(newWidgetBrowserFinished()),
// installer, SLOT(deleteLater())); // installer, SLOT(deleteLater()));
} else { } else {
//kDebug() << "found, but could not load requested PackageStructure plugin" << type //qDebug() << "found, but could not load requested PackageStructure plugin" << type
// << "; reported error was" << error; // << "; reported error was" << error;
} }
} }