Fix fallout from qDebug -> kDebug porting

* Multi-line debug statements were essentially broken
* There's still a bunch of #include "QDebug" in there, which seems wrong

* It's not necessary to comment most occurrences in src/plasma, since
  they're wrapped wiht #ifdef NDEBUG already.

CCMAIL:ervin@kde.org
This commit is contained in:
Sebastian Kügler 2013-08-01 12:15:38 +02:00
parent 767cd813ae
commit d9aa851e17
7 changed files with 14 additions and 16 deletions

View File

@ -406,7 +406,7 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
if (!script) {
#ifndef NDEBUG
// qDebug() << "Could not create a" << api << "ScriptEngine for the"
<< dataEngineDescription.name() << "DataEngine.";
// << dataEngineDescription.name() << "DataEngine.";
#endif
delete package;
package = 0;

View File

@ -195,7 +195,7 @@ Applet *PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
if (!offer->property("X-Plasma-API").toString().isEmpty()) {
#ifndef NDEBUG
// qDebug() << "we have a script using the"
<< offer->property("X-Plasma-API").toString() << "API";
// << offer->property("X-Plasma-API").toString() << "API";
#endif
if (isContainment) {
return new Containment(0, allArgs);
@ -575,7 +575,7 @@ QStringList PluginLoader::listAppletCategories(const QString &parentApp, bool vi
if (!appletCategory.isEmpty() && !known.contains(appletCategory.toLower())) {
#ifndef NDEBUG
// 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
appletCategory.clear();
}

View File

@ -115,8 +115,8 @@ void AppletPrivate::init(const QString &packagePath)
if (!appletDescription.isValid()) {
#ifndef NDEBUG
// qDebug() << "Check your constructor! "
<< "You probably want to be passing in a Service::Ptr "
<< "or a QVariantList with a valid storageid as arg[0].";
// << "You probably want to be passing in a Service::Ptr "
// << "or a QVariantList with a valid storageid as arg[0].";
#endif
return;
}
@ -295,7 +295,7 @@ void AppletPrivate::setupPackage()
#ifndef NDEBUG
// qDebug() << "setting up script support, package is in" << package->path()
<< ", main script is" << package->filePath("mainscript");
// << ", main script is" << package->filePath("mainscript");
#endif
const QString translationsPath = package->filePath("translations");

View File

@ -110,8 +110,8 @@ void ContainmentPrivate::setScreen(int newScreen)
#ifndef NDEBUG
// qDebug() << "currently is on screen" << currently->screen()
// << "desktop" << currently->desktop()
<< "and is" << currently->activity()
<< (QObject*)currently << "i'm" << (QObject*)q;
// << "and is" << currently->activity()
// << (QObject*)currently << "i'm" << (QObject*)q;
#endif
currently->setScreen(-1);
swapScreensWith = currently;
@ -125,13 +125,11 @@ void ContainmentPrivate::setScreen(int newScreen)
q->updateConstraints(Plasma::Types::ScreenConstraint);
if (oldScreen != newScreen) {
/*
#ifndef NDEBUG
// qDebug() << "going to signal change for" << q
// << ", old screen & desktop:" << oldScreen
// << ", new:" << screen << desktop;
#endif
<< ", old screen & desktop:" << oldScreen
<< ", new:" << screen << desktop;
*/
KConfigGroup c = q->config();
c.writeEntry("screen", screen);
emit q->configNeedsSaving();

View File

@ -63,8 +63,8 @@ bool isPluginVersionCompatible(unsigned int version)
if (version < minVersion || version > maxVersion) {
#ifndef NDEBUG
// qDebug() << "plugin is compiled against incompatible Plasma version " << version
<< "This build is compatible with" << PLASMA_VERSION_MAJOR << ".0.0 (" << minVersion
<< ") to" << PLASMA_VERSION_STRING << "(" << maxVersion << ")";
// << "This build is compatible with" << PLASMA_VERSION_MAJOR << ".0.0 (" << minVersion
// << ") to" << PLASMA_VERSION_STRING << "(" << maxVersion << ")";
#endif
return false;
}

View File

@ -263,7 +263,7 @@ void JavaScriptDataEngine::reportError(ScriptEnv *env, bool fatal) const
Q_UNUSED(fatal)
// qDebug() << "Error: " << env->engine()->uncaughtException().toString()
<< " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
// << " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
// qDebug() << env->engine()->uncaughtExceptionBacktrace();
}

View File

@ -145,7 +145,7 @@ void JavaScriptRunner::reportError(ScriptEnv *env, bool fatal)
{
Q_UNUSED(fatal)
// qDebug() << "Error: " << env->engine()->uncaughtException().toString()
<< " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
// << " at line " << env->engine()->uncaughtExceptionLineNumber() << endl;
// qDebug() << env->engine()->uncaughtExceptionBacktrace();
}