diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index a060122dc..d6ed24db4 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -67,16 +67,12 @@ ecm_add_test(${coronatest_srcs} TEST_NAME coronatest LINK_LIBRARIES Qt5::Gui Qt5 add_test(plasma-storagetest storagetest) ecm_mark_as_test(storagetest) -set(sortfiltermodeltest_SRCS +add_executable(sortfiltermodeltest sortfiltermodeltest.cpp ../src/declarativeimports/core/datamodel.cpp ../src/declarativeimports/core/datasource.cpp ) -ecm_qt_declare_logging_category(sortfiltermodeltest_SRCS HEADER plasmacoredebug_p.h IDENTIFIER LOG_PLASMACORE CATEGORY_NAME org.kde.plasma.imports.core) - -add_executable(sortfiltermodeltest ${sortfiltermodeltest_SRCS}) - target_link_libraries(sortfiltermodeltest KF5::Plasma Qt5::Gui diff --git a/autotests/sortfiltermodeltest.cpp b/autotests/sortfiltermodeltest.cpp index c10a7cf12..da0e393cc 100644 --- a/autotests/sortfiltermodeltest.cpp +++ b/autotests/sortfiltermodeltest.cpp @@ -19,7 +19,6 @@ #include #include -#include "plasmacoredebug_p.h" // KDE diff --git a/src/declarativeimports/calendar/CMakeLists.txt b/src/declarativeimports/calendar/CMakeLists.txt index 9f18b9d91..93d9c1407 100644 --- a/src/declarativeimports/calendar/CMakeLists.txt +++ b/src/declarativeimports/calendar/CMakeLists.txt @@ -11,8 +11,6 @@ set(calendar_SRCS eventpluginsmanager.cpp ) -ecm_qt_declare_logging_category(calendar_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMACALENDAR CATEGORY_NAME org.kde.plasma.imports.calendar) - add_library(calendarplugin SHARED ${calendar_SRCS}) target_link_libraries(calendarplugin diff --git a/src/declarativeimports/calendar/calendar.cpp b/src/declarativeimports/calendar/calendar.cpp index a94f960de..790833b8d 100644 --- a/src/declarativeimports/calendar/calendar.cpp +++ b/src/declarativeimports/calendar/calendar.cpp @@ -299,16 +299,16 @@ void Calendar::updateData() emit weeksModelChanged(); m_daysModel->update(); -// qCDebug(LOG_PLASMACALENDAR) << "---------------------------------------------------------------"; -// qCDebug(LOG_PLASMACALENDAR) << "Date obj: " << m_displayedDate; -// qCDebug(LOG_PLASMACALENDAR) << "Month: " << m_displayedDate.month(); -// qCDebug(LOG_PLASMACALENDAR) << "m_days: " << m_days; -// qCDebug(LOG_PLASMACALENDAR) << "m_weeks: " << m_weeks; -// qCDebug(LOG_PLASMACALENDAR) << "Days before this month: " << daysBeforeCurrentMonth; -// qCDebug(LOG_PLASMACALENDAR) << "Days after this month: " << daysAfterCurrentMonth; -// qCDebug(LOG_PLASMACALENDAR) << "Days in current month: " << m_displayedDate.daysInMonth(); -// qCDebug(LOG_PLASMACALENDAR) << "m_dayList size: " << m_dayList.count(); -// qCDebug(LOG_PLASMACALENDAR) << "---------------------------------------------------------------"; +// qDebug() << "---------------------------------------------------------------"; +// qDebug() << "Date obj: " << m_displayedDate; +// qDebug() << "Month: " << m_displayedDate.month(); +// qDebug() << "m_days: " << m_days; +// qDebug() << "m_weeks: " << m_weeks; +// qDebug() << "Days before this month: " << daysBeforeCurrentMonth; +// qDebug() << "Days after this month: " << daysAfterCurrentMonth; +// qDebug() << "Days in current month: " << m_displayedDate.daysInMonth(); +// qDebug() << "m_dayList size: " << m_dayList.count(); +// qDebug() << "---------------------------------------------------------------"; } void Calendar::nextDecade() diff --git a/src/declarativeimports/calendar/eventpluginsmanager.cpp b/src/declarativeimports/calendar/eventpluginsmanager.cpp index ac48e5337..bcc6177a0 100644 --- a/src/declarativeimports/calendar/eventpluginsmanager.cpp +++ b/src/declarativeimports/calendar/eventpluginsmanager.cpp @@ -18,7 +18,6 @@ */ #include "eventpluginsmanager.h" -#include "debug_p.h" #include @@ -206,8 +205,8 @@ void EventPluginsManager::loadPlugin(const QString &absolutePath) QPluginLoader loader(absolutePath); if (!loader.load()) { - qCWarning(LOG_PLASMACALENDAR) << "Could not create Plasma Calendar Plugin: " << absolutePath; - qCWarning(LOG_PLASMACALENDAR) << loader.errorString(); + qWarning() << "Could not create Plasma Calendar Plugin: " << absolutePath; + qWarning() << loader.errorString(); return; } @@ -215,7 +214,7 @@ void EventPluginsManager::loadPlugin(const QString &absolutePath) if (obj) { CalendarEvents::CalendarEventsPlugin *eventsPlugin = qobject_cast(obj); if (eventsPlugin) { - qCDebug(LOG_PLASMACALENDAR) << "Loading Calendar plugin" << eventsPlugin; + qDebug() << "Loading Calendar plugin" << eventsPlugin; eventsPlugin->setProperty("pluginPath", absolutePath); m_plugins << eventsPlugin; diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt index 12a4e1497..689a4b6c5 100644 --- a/src/declarativeimports/core/CMakeLists.txt +++ b/src/declarativeimports/core/CMakeLists.txt @@ -24,8 +24,6 @@ set(corebindings_SRCS windowthumbnail.cpp ) -ecm_qt_declare_logging_category(corebindings_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMACORE CATEGORY_NAME org.kde.plasma.imports.core) - add_library(corebindingsplugin SHARED ${corebindings_SRCS}) target_link_libraries(corebindingsplugin Qt5::Quick diff --git a/src/declarativeimports/core/datamodel.cpp b/src/declarativeimports/core/datamodel.cpp index a7abc0c91..06b64e4af 100644 --- a/src/declarativeimports/core/datamodel.cpp +++ b/src/declarativeimports/core/datamodel.cpp @@ -19,7 +19,6 @@ #include "datamodel.h" #include "datasource.h" -#include "debug_p.h" #include #include @@ -211,7 +210,7 @@ int SortFilterModel::mapRowToSource(int row) const int SortFilterModel::mapRowFromSource(int row) const { if (!sourceModel()) { - qCWarning(LOG_PLASMACORE) << "No source model defined!"; + qWarning() << "No source model defined!"; return -1; } QModelIndex idx = sourceModel()->index(row, 0); @@ -288,7 +287,7 @@ void DataModel::setDataSource(QObject *object) { DataSource *source = qobject_cast(object); if (!source) { - qCWarning(LOG_PLASMACORE) << "Error: DataSource type expected"; + qWarning() << "Error: DataSource type expected"; return; } if (m_dataSource == source) { diff --git a/src/declarativeimports/core/datasource.cpp b/src/declarativeimports/core/datasource.cpp index 8608cb050..f60e2cc5b 100644 --- a/src/declarativeimports/core/datasource.cpp +++ b/src/declarativeimports/core/datasource.cpp @@ -21,7 +21,6 @@ */ #include "datasource.h" -#include "debug_p.h" namespace Plasma { @@ -96,7 +95,7 @@ void DataSource::setEngine(const QString &e) m_dataEngineConsumer = new Plasma::DataEngineConsumer(); Plasma::DataEngine *engine = dataEngine(m_engine); if (!engine) { - qCWarning(LOG_PLASMACORE) << "DataEngine" << m_engine << "not found"; + qWarning() << "DataEngine" << m_engine << "not found"; emit engineChanged(); return; } @@ -160,7 +159,7 @@ void DataSource::setupData() return; } -// qCDebug(LOG_PLASMACORE) << " loading engine " << m_engine; +// qDebug() << " loading engine " << m_engine; //FIXME: should all services be deleted just because we're changing the interval, etc? qDeleteAll(m_services); m_services.clear(); diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp index ec9c5b367..bc8d45a62 100644 --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -183,7 +183,7 @@ FrameSvgItemMargins::FrameSvgItemMargins(Plasma::FrameSvg *frameSvg, QObject *pa m_frameSvg(frameSvg), m_fixed(false) { - //qCDebug(LOG_PLASMACORE) << "margins at: " << left() << top() << right() << bottom(); + //qDebug() << "margins at: " << left() << top() << right() << bottom(); connect(m_frameSvg, SIGNAL(repaintNeeded()), this, SLOT(update())); } diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp index 126b799bf..8f29ee2d1 100644 --- a/src/declarativeimports/core/iconitem.cpp +++ b/src/declarativeimports/core/iconitem.cpp @@ -19,7 +19,6 @@ */ #include "iconitem.h" -#include "debug_p.h" #include #include #include @@ -140,7 +139,7 @@ void IconItem::setSource(const QVariant &source) iconPath = iconTheme->iconPath(sourceString + QLatin1String(".svgz"), qMin(width(), height()), KIconLoader::MatchBest); } } else { - qCWarning(LOG_PLASMACORE) << "KIconLoader has no theme set"; + qWarning() << "KIconLoader has no theme set"; } if (!iconPath.isEmpty()) { @@ -451,7 +450,7 @@ void IconItem::loadPixmap() iconPath = iconTheme->iconPath(m_svgIconName + QLatin1String(".svgz"), qMin(width(), height()), KIconLoader::MatchBest); } } else { - qCWarning(LOG_PLASMACORE) << "KIconLoader has no theme set"; + qWarning() << "KIconLoader has no theme set"; } if (!iconPath.isEmpty()) { diff --git a/src/declarativeimports/core/windowthumbnail.cpp b/src/declarativeimports/core/windowthumbnail.cpp index 5a9ccd1a6..a67453883 100644 --- a/src/declarativeimports/core/windowthumbnail.cpp +++ b/src/declarativeimports/core/windowthumbnail.cpp @@ -17,7 +17,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "windowthumbnail.h" -#include "debug_p.h" // KF5 #include // Qt @@ -438,7 +437,7 @@ bool WindowThumbnail::xcbWindowToTextureEGL(WindowTextureNode *textureNode) (EGLClientBuffer)m_pixmap, attribs); if (m_image == EGL_NO_IMAGE_KHR) { - qCDebug(LOG_PLASMACORE) << "failed to create egl image"; + qDebug() << "failed to create egl image"; return false; } @@ -470,7 +469,7 @@ void WindowThumbnail::resolveEGLFunctions() (extensions.contains(QByteArrayLiteral("EGL_KHR_image_base")) && extensions.contains(QByteArrayLiteral("EGL_KHR_image_pixmap")))) { if (context->hasExtension(QByteArrayLiteral("GL_OES_EGL_image"))) { - qCDebug(LOG_PLASMACORE) << "Have EGL texture from pixmap"; + qDebug() << "Have EGL texture from pixmap"; m_eglCreateImageKHR = context->getProcAddress(QByteArrayLiteral("eglCreateImageKHR")); m_eglDestroyImageKHR = context->getProcAddress(QByteArrayLiteral("eglDestroyImageKHR")); m_glEGLImageTargetTexture2DOES = context->getProcAddress(QByteArrayLiteral("glEGLImageTargetTexture2DOES")); @@ -555,7 +554,7 @@ void WindowThumbnail::resolveGLXFunctions() m_bindTexImage = context->getProcAddress(QByteArrayLiteral("glXBindTexImageEXT")); m_releaseTexImage = context->getProcAddress(QByteArrayLiteral("glXReleaseTexImageEXT")); } else - qCWarning(LOG_PLASMACORE) << "couldn't resolve GLX_EXT_texture_from_pixmap functions"; + qWarning() << "couldn't resolve GLX_EXT_texture_from_pixmap functions"; m_openGLFunctionsResolved = true; } diff --git a/src/declarativeimports/plasmacomponents/CMakeLists.txt b/src/declarativeimports/plasmacomponents/CMakeLists.txt index 0f434397e..8e5ca90d5 100644 --- a/src/declarativeimports/plasmacomponents/CMakeLists.txt +++ b/src/declarativeimports/plasmacomponents/CMakeLists.txt @@ -10,8 +10,6 @@ set(plasmacomponents_SRCS qmenuitem.cpp ) -ecm_qt_declare_logging_category(plasmacomponents_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMACOMPONENTS CATEGORY_NAME org.kde.plasma.imports.components) - add_library(plasmacomponentsplugin SHARED ${plasmacomponents_SRCS}) target_link_libraries(plasmacomponentsplugin Qt5::Core diff --git a/src/declarativeimports/plasmacomponents/fullscreenwindow.cpp b/src/declarativeimports/plasmacomponents/fullscreenwindow.cpp index 60c065f36..05da708b9 100644 --- a/src/declarativeimports/plasmacomponents/fullscreenwindow.cpp +++ b/src/declarativeimports/plasmacomponents/fullscreenwindow.cpp @@ -20,7 +20,6 @@ #include "fullscreenwindow.h" #include "../core/declarativeitemcontainer_p.h" #include "plasmacomponentsplugin.h" -#include "debug_p.h" #include #include @@ -137,13 +136,13 @@ void FullScreenWindow::init(const QString &componentName) } if (filePath.isEmpty()) { - qCWarning(LOG_PLASMACOMPONENTS) << "Component not found:" << componentName; + qWarning() << "Component not found:" << componentName; return; } QDeclarativeEngine *engine = EngineBookKeeping::self()->engine(); if (!engine) { - qCWarning(LOG_PLASMACOMPONENTS) << "Warning, no QDeclarativeEngines available anymore, should never happen"; + qWarning() << "Warning, no QDeclarativeEngines available anymore, should never happen"; Q_ASSERT(0); } QDeclarativeComponent *component = new QDeclarativeComponent(engine, filePath, this); @@ -151,7 +150,7 @@ void FullScreenWindow::init(const QString &componentName) QDeclarativeContext *creationContext = component->creationContext(); m_rootObject = component->create(creationContext); if (component->status() == QDeclarativeComponent::Error) { - qCWarning(LOG_PLASMACOMPONENTS) << component->errors(); + qWarning() << component->errors(); } if (m_rootObject) { diff --git a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp index 1831132c3..83016c222 100644 --- a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp +++ b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp @@ -33,7 +33,6 @@ #include "enums.h" #include "qmenu.h" #include "qmenuitem.h" -#include "debug_p.h" class BKSingleton { @@ -55,7 +54,7 @@ QQmlEngine *EngineBookKeeping::engine() const { //for components creation, any engine will do, as long is valid if (m_engines.isEmpty()) { - qCWarning(LOG_PLASMACOMPONENTS) << "No engines found, this should never happen"; + qWarning() << "No engines found, this should never happen"; return 0; } else { return m_engines.values().at(0); diff --git a/src/declarativeimports/plasmacomponents/qmenu.cpp b/src/declarativeimports/plasmacomponents/qmenu.cpp index 81cb3cad6..c6b59a87e 100644 --- a/src/declarativeimports/plasmacomponents/qmenu.cpp +++ b/src/declarativeimports/plasmacomponents/qmenu.cpp @@ -18,7 +18,6 @@ ***************************************************************************/ #include "qmenu.h" -#include "debug_p.h" #include #include @@ -270,7 +269,7 @@ void QMenuProxy::rebuildMenu() void QMenuProxy::open(int x, int y) { - qCDebug(LOG_PLASMACOMPONENTS) << "Opening menu at" << x << y; + qDebug() << "Opening menu at" << x << y; QQuickItem *parentItem = nullptr; diff --git a/src/declarativeimports/platformcomponents/CMakeLists.txt b/src/declarativeimports/platformcomponents/CMakeLists.txt index 911e8ab76..4cce385f2 100644 --- a/src/declarativeimports/platformcomponents/CMakeLists.txt +++ b/src/declarativeimports/platformcomponents/CMakeLists.txt @@ -7,8 +7,6 @@ set(platformcomponents_SRCS icondialog.cpp ) -ecm_qt_declare_logging_category(platformcomponents_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMAPLATFORMCOMPONENTS CATEGORY_NAME org.kde.plasma.imports.platformcomponents) - add_library(platformcomponentsplugin SHARED ${platformcomponents_SRCS}) target_link_libraries( diff --git a/src/declarativeimports/platformcomponents/application.cpp b/src/declarativeimports/platformcomponents/application.cpp index 39cc3786d..1326a7b46 100644 --- a/src/declarativeimports/platformcomponents/application.cpp +++ b/src/declarativeimports/platformcomponents/application.cpp @@ -19,7 +19,6 @@ #include "application.h" #include "application_p.h" -#include "debug_p.h" #include "utils/d_ptr_implementation.h" @@ -51,7 +50,7 @@ void Application::Private::stateChanged(QProcess::ProcessState newState) void Application::Private::errorFound(QProcess::ProcessError err) { Q_UNUSED(err) - qCWarning(LOG_PLASMAPLATFORMCOMPONENTS) << "Error" << process.error() << "while starting" << application; + qWarning() << "Error" << process.error() << "while starting" << application; } Application::Application(QObject *parent) @@ -110,7 +109,7 @@ void Application::start() } if (d->application.isEmpty()) { - qCWarning(LOG_PLASMAPLATFORMCOMPONENTS) << "Cannot run an empty application"; + qWarning() << "Cannot run an empty application"; return; } diff --git a/src/plasmapkg/CMakeLists.txt b/src/plasmapkg/CMakeLists.txt index c788fc98a..7d3df5d22 100644 --- a/src/plasmapkg/CMakeLists.txt +++ b/src/plasmapkg/CMakeLists.txt @@ -1,13 +1,6 @@ - -set (plasmapkg_SRCS - main.cpp - plasmapkg.cpp -) - -ecm_qt_declare_logging_category(plasmapkg_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMAPKG CATEGORY_NAME org.kde.plasmapkg) - add_executable(plasmapkg2 - ${plasmapkg_SRCS} + main.cpp + plasmapkg.cpp ) target_link_libraries(plasmapkg2 KF5::Plasma KF5::I18n KF5::Service KF5::CoreAddons Qt5::DBus) diff --git a/src/plasmapkg/plasmapkg.cpp b/src/plasmapkg/plasmapkg.cpp index fd4ea1ffb..3724ae85e 100644 --- a/src/plasmapkg/plasmapkg.cpp +++ b/src/plasmapkg/plasmapkg.cpp @@ -19,7 +19,6 @@ *******************************************************************************/ #include "plasmapkg.h" -#include "debug_p.h" #include #include @@ -182,7 +181,7 @@ void PlasmaPkg::runMain() type = QStringLiteral("layout-template"); } else { type = serviceType; - //qCDebug(LOG_PLASMAPKG) << "fallthrough type is" << serviceType; + //qDebug() << "fallthrough type is" << serviceType; } } else { if (type.compare(i18nc("package type", "wallpaper"), Qt::CaseInsensitive) == 0) { @@ -357,7 +356,7 @@ void PlasmaPkg::runMain() return; } if (d->package.isEmpty()) { - qCWarning(LOG_PLASMAPKG) << i18nc("No option was given, this is the error message telling the user he needs at least one, do not translate install, remove, upgrade nor list", "One of install, remove, upgrade or list is required."); + qWarning() << i18nc("No option was given, this is the error message telling the user he needs at least one, do not translate install, remove, upgrade nor list", "One of install, remove, upgrade or list is required."); exit(6); } else { d->runKbuildsycoca(); @@ -484,11 +483,11 @@ QString PlasmaPkg::findPackageRoot(const QString &pluginName, const QString &pre Q_UNUSED(prefix) QString packageRoot; if (d->parser->isSet(QStringLiteral("packageroot")) && d->parser->isSet(QStringLiteral("global"))) { - qCWarning(LOG_PLASMAPKG) << i18nc("The user entered conflicting options packageroot and global, this is the error message telling the user he can use only one", "The packageroot and global options conflict each other, please select only one."); + qWarning() << i18nc("The user entered conflicting options packageroot and global, this is the error message telling the user he can use only one", "The packageroot and global options conflict each other, please select only one."); ::exit(7); } else if (d->parser->isSet(QStringLiteral("packageroot"))) { packageRoot = d->parser->value(QStringLiteral("packageroot")); - //qCDebug(LOG_PLASMAPKG) << "(set via arg) d->packageRoot is: " << d->packageRoot; + //qDebug() << "(set via arg) d->packageRoot is: " << d->packageRoot; } else if (d->parser->isSet(QStringLiteral("global"))) { packageRoot = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, d->packageRoot, QStandardPaths::LocateDirectory).last(); } else { @@ -595,7 +594,7 @@ void PlasmaPkgPrivate::listTypes() //QString path = structure->defaultPackageRoot(); //QString path = defaultPackageRoot; plugins.insert(name, QStringList() << name << plugin << comment); - //qCDebug(LOG_PLASMAPKG) << "KService stuff:" << name << plugin << comment; + //qDebug() << "KService stuff:" << name << plugin << comment; } renderTypeTable(plugins); diff --git a/src/plasmaquick/CMakeLists.txt b/src/plasmaquick/CMakeLists.txt index a1fe2af93..8aaa77aca 100644 --- a/src/plasmaquick/CMakeLists.txt +++ b/src/plasmaquick/CMakeLists.txt @@ -20,8 +20,6 @@ set(plasmaquick_LIB_SRC ../declarativeimports/core/units.cpp ) -ecm_qt_declare_logging_category(plasmaquick_LIB_SRC HEADER debug_p.h IDENTIFIER LOG_PLASMAQUICK CATEGORY_NAME org.kde.plasmaquick) - add_library(KF5PlasmaQuick SHARED ${plasmaquick_LIB_SRC}) add_library(KF5::PlasmaQuick ALIAS KF5PlasmaQuick) target_include_directories(KF5PlasmaQuick PUBLIC "$") diff --git a/src/plasmaquick/configmodel.cpp b/src/plasmaquick/configmodel.cpp index 9945c770f..03beac7b8 100644 --- a/src/plasmaquick/configmodel.cpp +++ b/src/plasmaquick/configmodel.cpp @@ -25,7 +25,6 @@ #include "Plasma/Containment" //#include "plasmoid/wallpaperinterface.h" #include "kdeclarative/configpropertymap.h" -#include "debug_p.h" #include #include @@ -201,7 +200,7 @@ QVariant ConfigModel::data(const QModelIndex &index, int role) const // Quick check if source is an absolute path or not if (d->appletInterface && !source.isEmpty() && !(source.startsWith('/') && source.endsWith(QLatin1String("qml")))) { if(!d->appletInterface.data()->kPackage().isValid()) - qCWarning(LOG_PLASMAQUICK) << "wrong applet" << d->appletInterface.data()->pluginMetaData().name(); + qWarning() << "wrong applet" << d->appletInterface.data()->pluginMetaData().name(); return QUrl::fromLocalFile(d->appletInterface.data()->kPackage().filePath("ui", source)); } else { return source; @@ -226,11 +225,11 @@ QVariant ConfigModel::data(const QModelIndex &index, int role) const KPluginLoader loader(pluginPath); KPluginFactory* factory = loader.factory(); if (!factory) { - qCWarning(LOG_PLASMAQUICK) << "Error loading KCM:" << loader.errorString(); + qWarning() << "Error loading KCM:" << loader.errorString(); } else { KQuickAddons::ConfigModule *cm = factory->create(const_cast(this)); if (!cm) { - qCWarning(LOG_PLASMAQUICK) << "Error creating KCM object from plugin" << loader.fileName(); + qWarning() << "Error creating KCM object from plugin" << loader.fileName(); } d->kcms[pluginName] = cm; return QVariant::fromValue(cm); diff --git a/src/plasmaquick/configview.cpp b/src/plasmaquick/configview.cpp index 8ebc05655..e8627c93d 100644 --- a/src/plasmaquick/configview.cpp +++ b/src/plasmaquick/configview.cpp @@ -24,7 +24,6 @@ #include "Plasma/Containment" //#include "plasmoid/wallpaperinterface.h" #include "kdeclarative/configpropertymap.h" -#include "debug_p.h" #include #include @@ -83,11 +82,11 @@ ConfigViewPrivate::ConfigViewPrivate(Plasma::Applet *appl, ConfigView *view) void ConfigViewPrivate::init() { if (!applet) { - qCWarning(LOG_PLASMAQUICK) << "Null applet passed to constructor"; + qWarning() << "Null applet passed to constructor"; return; } if (!applet.data()->pluginMetaData().isValid()) { - qCWarning(LOG_PLASMAQUICK) << "Invalid applet passed to constructor"; + qWarning() << "Invalid applet passed to constructor"; return; } @@ -116,12 +115,12 @@ void ConfigViewPrivate::init() corona = a->containment()->corona(); } } else if (!applet.data()->containment()->corona()->kPackage().isValid()) { - qCWarning(LOG_PLASMAQUICK) << "Invalid home screen package"; + qWarning() << "Invalid home screen package"; } else { corona = applet.data()->containment()->corona(); } if (!corona) { - qCWarning(LOG_PLASMAQUICK) << "Cannot find a Corona, this should never happen!"; + qWarning() << "Cannot find a Corona, this should never happen!"; return; } @@ -155,7 +154,7 @@ void ConfigViewPrivate::init() KPluginMetaData md(loader.fileName()); if (!md.isValid()) { - qCWarning(LOG_PLASMAQUICK) << "Could not find" << kcm << "specified in X-Plasma-ConfigPlugins"; + qWarning() << "Could not find" << kcm << "specified in X-Plasma-ConfigPlugins"; continue; } diff --git a/src/plasmaquick/containmentview.cpp b/src/plasmaquick/containmentview.cpp index 11f978c1c..309a2cb15 100644 --- a/src/plasmaquick/containmentview.cpp +++ b/src/plasmaquick/containmentview.cpp @@ -18,7 +18,6 @@ #include "containmentview.h" #include "configview.h" -#include "debug_p.h" #include #include @@ -77,7 +76,7 @@ void ContainmentViewPrivate::setContainment(Plasma::Containment *cont) QObject::disconnect(containment, 0, q, 0); QObject *oldGraphicObject = containment->property("_plasma_graphicObject").value(); if (oldGraphicObject) { -// qCDebug(LOG_PLASMAQUICK) << "Old graphics Object:" << oldGraphicObject << "Old containment" << containment.data(); +// qDebug() << "Old graphics Object:" << oldGraphicObject << "Old containment" << containment.data(); //make sure the graphic object won't die with us //FIXME:we need a way to reparent to *NO* graphics item, but this makes Qt crash oldGraphicObject->setParent(containment); @@ -134,7 +133,7 @@ void ContainmentViewPrivate::setContainment(Plasma::Containment *cont) QQuickItem *graphicObject = qobject_cast(containment->property("_plasma_graphicObject").value()); if (graphicObject) { -// qCDebug(LOG_PLASMAQUICK) << "using as graphic containment" << graphicObject << containment.data(); +// qDebug() << "using as graphic containment" << graphicObject << containment.data(); //by resizing before adding, it will avoid some resizes in most cases graphicObject->setProperty("width", q->width()); @@ -147,10 +146,10 @@ void ContainmentViewPrivate::setContainment(Plasma::Containment *cont) q->rootObject()->setProperty("wallpaper", QVariant::fromValue(wpGraphicObject)); } } else { - qCWarning(LOG_PLASMAQUICK) << "Could not set containment property on rootObject"; + qWarning() << "Could not set containment property on rootObject"; } } else { - qCWarning(LOG_PLASMAQUICK) << "Containment graphic object not valid"; + qWarning() << "Containment graphic object not valid"; } } @@ -211,10 +210,10 @@ ContainmentView::ContainmentView(Plasma::Corona *corona, QWindow *parent) if (info.isValid()) { setTranslationDomain("plasma_shell_" + info.pluginName()); } else { - qCWarning(LOG_PLASMAQUICK) << "Invalid corona package metadata"; + qWarning() << "Invalid corona package metadata"; } } else { - qCWarning(LOG_PLASMAQUICK) << "Invalid home screen package"; + qWarning() << "Invalid home screen package"; } //Force QtQuickControls to use the "Plasma" style for this engine. diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index fefce963c..9afdf6032 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -25,7 +25,6 @@ #include "../declarativeimports/core/framesvgitem.h" #include "dialogshadows_p.h" #include "view.h" -#include "debug_p.h" #include #include @@ -581,7 +580,7 @@ void DialogPrivate::syncToMainItemSize() return; } if (mainItem->width() <= 0 || mainItem->height() <= 0) { - qCWarning(LOG_PLASMAQUICK) << "trying to show an empty dialog"; + qWarning() << "trying to show an empty dialog"; } updateTheme(); diff --git a/src/plasmaquick/dialogshadows.cpp b/src/plasmaquick/dialogshadows.cpp index e81b7452c..10b5ed905 100644 --- a/src/plasmaquick/dialogshadows.cpp +++ b/src/plasmaquick/dialogshadows.cpp @@ -17,7 +17,6 @@ */ #include "dialogshadows_p.h" -#include "debug_p.h" #include #include @@ -545,7 +544,7 @@ void DialogShadows::Private::updateShadowX11(const QWindow *window, Plasma::Fram Display *dpy = QX11Info::display(); Atom atom = XInternAtom(dpy, "_KDE_NET_WM_SHADOW", False); - //qCDebug(LOG_PLASMAQUICK) << "going to set the shadow of" << window->winId() << "to" << data; + //qDebug() << "going to set the shadow of" << window->winId() << "to" << data; XChangeProperty(dpy, window->winId(), atom, XA_CARDINAL, 32, PropModeReplace, reinterpret_cast(data[enabledBorders].constData()), data[enabledBorders].size()); #endif @@ -658,7 +657,7 @@ void DialogShadows::Private::updateShadowWayland(const QWindow *window, Plasma:: void DialogShadows::Private::clearShadow(const QWindow *window) { if (!static_cast(window)->surfaceHandle()) { - qCWarning(LOG_PLASMAQUICK) << "Cannot clear shadow from window without native surface!"; + qWarning() << "Cannot clear shadow from window without native surface!"; return; } #if HAVE_X11 diff --git a/src/plasmaquick/packageurlinterceptor.cpp b/src/plasmaquick/packageurlinterceptor.cpp index 7b5bb35c0..4aa5c3ad2 100644 --- a/src/plasmaquick/packageurlinterceptor.cpp +++ b/src/plasmaquick/packageurlinterceptor.cpp @@ -81,7 +81,7 @@ QStringList PackageUrlInterceptor::allowedPaths() const QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlInterceptor::DataType type) { - //qCDebug(LOG_PLASMA) << "Intercepted URL:" << path << type; + //qDebug() << "Intercepted URL:" << path << type; QString pkgRoot; Plasma::Package package; if (d->package.isValid()) { @@ -127,7 +127,7 @@ QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlIntercept //asked a file inside a package: let's rewrite the url! if (path.path().startsWith(package.path())) { - //qCDebug(LOG_PLASMA) << "Found URL in package" << path; + //qDebug() << "Found URL in package" << path; //tries to isolate the relative path asked relative to the contentsPrefixPath: like ui/foo.qml QString relativePath; @@ -153,7 +153,7 @@ QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlIntercept QUrl ret = QUrl::fromLocalFile(package.filePath(prefixForType(type, filename), filename)); - //qCDebug(LOG_PLASMA) << "Returning" << ret; + //qDebug() << "Returning" << ret; if (ret.path().isEmpty()) { return path; diff --git a/src/plasmaquick/view.cpp b/src/plasmaquick/view.cpp index 394d4cbf2..ca6ae6f2b 100644 --- a/src/plasmaquick/view.cpp +++ b/src/plasmaquick/view.cpp @@ -18,7 +18,6 @@ #include "view.h" #include "configview.h" -#include "debug_p.h" #include #include @@ -77,7 +76,7 @@ void ViewPrivate::setContainment(Plasma::Containment *cont) QObject::disconnect(containment, 0, q, 0); QObject *oldGraphicObject = containment->property("_plasma_graphicObject").value(); if (oldGraphicObject) { -// qCDebug(LOG_PLASMA) << "Old graphics Object:" << oldGraphicObject << "Old containment" << containment.data(); +// qDebug() << "Old graphics Object:" << oldGraphicObject << "Old containment" << containment.data(); //make sure the graphic object won't die with us //FIXME:we need a way to reparent to *NO* graphics item, but this makes Qt crash oldGraphicObject->setParent(containment); @@ -117,7 +116,7 @@ void ViewPrivate::setContainment(Plasma::Containment *cont) QQuickItem *graphicObject = qobject_cast(containment->property("_plasma_graphicObject").value()); if (graphicObject) { -// qCDebug(LOG_PLASMA) << "using as graphic containment" << graphicObject << containment.data(); +// qDebug() << "using as graphic containment" << graphicObject << containment.data(); //by resizing before adding, it will avoid some resizes in most cases graphicObject->setProperty("width", q->width()); @@ -130,10 +129,10 @@ void ViewPrivate::setContainment(Plasma::Containment *cont) q->rootObject()->setProperty("wallpaper", QVariant::fromValue(wpGraphicObject)); } } else { - qCWarning(LOG_PLASMAQUICK) << "Could not set containment property on rootObject"; + qWarning() << "Could not set containment property on rootObject"; } } else { - qCWarning(LOG_PLASMAQUICK) << "Containment graphic object not valid"; + qWarning() << "Containment graphic object not valid"; } } @@ -199,7 +198,7 @@ View::View(Plasma::Corona *corona, QWindow *parent) kdeclarative.setTranslationDomain("plasma_shell_" + corona->kPackage().metadata().pluginId()); kdeclarative.setupBindings(); } else { - qCWarning(LOG_PLASMAQUICK) << "Invalid home screen package"; + qWarning() << "Invalid home screen package"; } //Force QtQuickControls to use the "Plasma" style for this engine. diff --git a/src/scriptengines/qml/CMakeLists.txt b/src/scriptengines/qml/CMakeLists.txt index b80775bd1..fd953d63b 100644 --- a/src/scriptengines/qml/CMakeLists.txt +++ b/src/scriptengines/qml/CMakeLists.txt @@ -16,8 +16,6 @@ set(declarative_appletscript_SRCS plasmoid/wallpaperinterface.cpp ) -ecm_qt_declare_logging_category(declarative_appletscript_SRCS HEADER debug_p.h IDENTIFIER LOG_PLASMAQMLSCRIPTENGINE CATEGORY_NAME org.kde.plasma.scriptengine.qml) - add_library(plasma_appletscript_declarative MODULE ${declarative_appletscript_SRCS} ) set_target_properties(plasma_appletscript_declarative PROPERTIES PREFIX "") diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 5320e2302..d0dbda967 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -20,7 +20,6 @@ */ #include "containmentinterface.h" -#include "debug_p.h" #include "wallpaperinterface.h" #include @@ -124,10 +123,10 @@ void ContainmentInterface::init() containmentGraphicObject->setProperty("toolBox", QVariant::fromValue(toolBoxObject)); } } else { - qCWarning(LOG_PLASMAQMLSCRIPTENGINE) << "Could not load toolbox package." << pkg.path(); + qWarning() << "Could not load toolbox package." << pkg.path(); } } else { - qCWarning(LOG_PLASMAQMLSCRIPTENGINE) << "Toolbox not loading, toolbox package is either invalid or disabled."; + qWarning() << "Toolbox not loading, toolbox package is either invalid or disabled."; } } @@ -427,13 +426,13 @@ void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y) //const QMimeData *mimeData = data; - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Arrived mimeData" << mimeData->urls() << mimeData->formats() << "at" << x << ", " << y; + qDebug() << "Arrived mimeData" << mimeData->urls() << mimeData->formats() << "at" << x << ", " << y; if (mimeData->hasFormat(QStringLiteral("text/x-plasmoidservicename"))) { QString data = mimeData->data(QStringLiteral("text/x-plasmoidservicename")); const QStringList appletNames = data.split('\n', QString::SkipEmptyParts); foreach (const QString &appletName, appletNames) { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "adding" << appletName; + qDebug() << "adding" << appletName; metaObject()->invokeMethod(this, "createApplet", Qt::QueuedConnection, Q_ARG(QString, appletName), Q_ARG(QVariantList, QVariantList()), Q_ARG(QRectF, QRectF(x, y, -1, -1))); } @@ -449,7 +448,7 @@ void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y) QString mimeName = mime.name(); QVariantList args; args << url.url(); - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "can decode" << mimeName << args; + qDebug() << "can decode" << mimeName << args; // It may be a directory or a file, let's stat KIO::JobFlags flags = KIO::HideProgressInfo; @@ -485,7 +484,7 @@ void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y) pluginFormats.insert(plugin.pluginName(), format); } } - //qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Mimetype ..." << formats << seenPlugins.keys() << pluginFormats.values(); + //qDebug() << "Mimetype ..." << formats << seenPlugins.keys() << pluginFormats.values(); QString selectedPlugin; @@ -537,7 +536,7 @@ void ContainmentInterface::dropJobResult(KJob *job) { #ifndef PLASMA_NO_KIO if (job->error()) { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "ERROR" << job->error() << ' ' << job->errorString(); + qDebug() << "ERROR" << job->error() << ' ' << job->errorString(); } // We call mimetypeRetrieved since there might be other mechanisms // for finding suitable applets. Cleanup happens there as well. @@ -548,38 +547,38 @@ void ContainmentInterface::dropJobResult(KJob *job) void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimetype) { #ifndef PLASMA_NO_KIO - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Mimetype Job returns." << mimetype; + qDebug() << "Mimetype Job returns." << mimetype; KIO::TransferJob *tjob = dynamic_cast(job); if (!tjob) { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "job should be a TransferJob, but isn't"; + qDebug() << "job should be a TransferJob, but isn't"; clearDataForMimeJob(job); return; } KPluginInfo::List appletList = Plasma::PluginLoader::self()->listAppletInfoForUrl(tjob->url()); if (mimetype.isEmpty() && appletList.isEmpty()) { clearDataForMimeJob(job); - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "No applets found matching the url (" << tjob->url() << ") or the mimetype (" << mimetype << ")"; + qDebug() << "No applets found matching the url (" << tjob->url() << ") or the mimetype (" << mimetype << ")"; return; } else { QPoint posi; // will be overwritten with the event's position if (m_dropPoints.keys().contains(tjob)) { posi = m_dropPoints[tjob]; - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Received a suitable dropEvent at" << posi; + qDebug() << "Received a suitable dropEvent at" << posi; } else { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Bailing out. Cannot find associated dropEvent related to the TransferJob"; + qDebug() << "Bailing out. Cannot find associated dropEvent related to the TransferJob"; clearDataForMimeJob(job); return; } QMenu *choices = m_dropMenus.value(tjob); if (!choices) { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Bailing out. No QMenu found for this job."; + qDebug() << "Bailing out. No QMenu found for this job."; clearDataForMimeJob(job); return; } - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Creating menu for:" << mimetype << posi; + qDebug() << "Creating menu for:" << mimetype << posi; appletList << Plasma::PluginLoader::self()->listAppletInfoForMimeType(mimetype); @@ -607,7 +606,7 @@ void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimet QHash actionsToApplets; choices->addSection(i18n("Widgets")); foreach (const KPluginInfo &info, appletList) { - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << info.name(); + qDebug() << info.name(); QAction *action; if (!info.icon().isEmpty()) { action = choices->addAction(QIcon::fromTheme(info.icon()), info.name()); @@ -616,7 +615,7 @@ void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimet } actionsToApplets.insert(action, info.pluginName()); - qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << info.pluginName(); + qDebug() << info.pluginName(); } actionsToApplets.insert(choices->addAction(i18n("Icon")), QStringLiteral("org.kde.plasma.icon")); @@ -727,7 +726,7 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet) AppletInterface *appletGraphicObject = applet->property("_plasma_graphicObject").value(); AppletInterface *contGraphicObject = m_containment->property("_plasma_graphicObject").value(); -// qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Applet added on containment:" << m_containment->title() << contGraphicObject +// qDebug() << "Applet added on containment:" << m_containment->title() << contGraphicObject // << "Applet: " << applet << applet->title() << appletGraphicObject; //Every applet should have a graphics object, otherwise don't disaplay anything @@ -901,7 +900,7 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event) } } } - //qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "Invoking menu for applet" << applet; + //qDebug() << "Invoking menu for applet" << applet; QMenu *desktopMenu = new QMenu; desktopMenu->setAttribute(Qt::WA_DeleteOnClose); @@ -1026,13 +1025,13 @@ void ContainmentInterface::addAppletActions(QMenu *desktopMenu, Plasma::Applet * if (m_containment->immutability() == Plasma::Types::Mutable && (m_containment->containmentType() != Plasma::Types::PanelContainment || m_containment->isUserConfiguring())) { QAction *closeApplet = applet->actions()->action(QStringLiteral("remove")); - //qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "checking for removal" << closeApplet; + //qDebug() << "checking for removal" << closeApplet; if (closeApplet) { if (!desktopMenu->isEmpty()) { desktopMenu->addSeparator(); } - //qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "adding close action" << closeApplet->isEnabled() << closeApplet->isVisible(); + //qDebug() << "adding close action" << closeApplet->isEnabled() << closeApplet->isVisible(); desktopMenu->addAction(closeApplet); } } @@ -1042,7 +1041,7 @@ void ContainmentInterface::addContainmentActions(QMenu *desktopMenu, QEvent *eve { if (m_containment->corona()->immutability() != Plasma::Types::Mutable && !KAuthorized::authorizeKAction(QStringLiteral("plasma/containment_actions"))) { - //qCDebug(LOG_PLASMAQMLSCRIPTENGINE) << "immutability"; + //qDebug() << "immutability"; return; } diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index 623b45b74..9ef2d03a6 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -18,7 +18,6 @@ */ #include "wallpaperinterface.h" -#include "debug_p.h" #include "containmentinterface.h" #include @@ -137,7 +136,7 @@ void WallpaperInterface::syncWallpaperPackage() m_pkg = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/Wallpaper")); m_pkg.setPath(m_wallpaperPlugin); if (!m_pkg.isValid()) { - qCWarning(LOG_PLASMAQMLSCRIPTENGINE) << "Error loading the wallpaper, no valid package loaded"; + qWarning() << "Error loading the wallpaper, no valid package loaded"; return; } @@ -180,13 +179,13 @@ void WallpaperInterface::loadFinished() prop.write(expr.evaluate()); } else if (m_qmlObject->mainComponent()) { - qCWarning(LOG_PLASMAQMLSCRIPTENGINE) << "Error loading the wallpaper" << m_qmlObject->mainComponent()->errors(); + qWarning() << "Error loading the wallpaper" << m_qmlObject->mainComponent()->errors(); s_rootObjects.remove(m_qmlObject->engine()); m_qmlObject->deleteLater(); m_qmlObject = 0; } else { - qCWarning(LOG_PLASMAQMLSCRIPTENGINE) << "Error loading the wallpaper, package not found"; + qWarning() << "Error loading the wallpaper, package not found"; } emit packageChanged();