From 12f481e50ae971f1d2f620ea8fdf54b302d67fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Thu, 21 Mar 2013 05:22:46 +0100 Subject: [PATCH] header cleanup, copyrights, runtime warnings-- --- src/shell/desktopcorona.cpp | 4 +- .../kcategorizeditemsviewmodels.cpp | 2 +- .../kcategorizeditemsviewmodels_p.h | 1 - .../widgetexplorer/plasmaappletitemmodel_p.h | 2 +- src/shell/widgetexplorer/widgetexplorer.cpp | 42 ++++--------------- src/shell/widgetexplorer/widgetexplorer.h | 7 +--- 6 files changed, 13 insertions(+), 45 deletions(-) diff --git a/src/shell/desktopcorona.cpp b/src/shell/desktopcorona.cpp index 308609943..15d333497 100644 --- a/src/shell/desktopcorona.cpp +++ b/src/shell/desktopcorona.cpp @@ -1,5 +1,6 @@ /* * Copyright 2008 Aaron Seigo + * Copyright 2013 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -293,7 +294,8 @@ void DesktopCorona::showWidgetExplorer() qDebug() << "Found containment."; m_widgetExplorer->setContainment(c); } else { - qDebug() << "containment not set"; + // FIXME: try harder to find a suitable containment? + qWarning() << "containment not set, don't know where to add the applet."; } m_widgetExplorerView->show(); } diff --git a/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp b/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp index 2471f874e..08a0cde2b 100644 --- a/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp +++ b/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp @@ -137,7 +137,7 @@ void DefaultItemFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel QStandardItemModel *model = qobject_cast(sourceModel); if (!model) { - kWarning() << "Expecting a QStandardItemModel!"; + qWarning() << "Expecting a QStandardItemModel!"; return; } diff --git a/src/shell/widgetexplorer/kcategorizeditemsviewmodels_p.h b/src/shell/widgetexplorer/kcategorizeditemsviewmodels_p.h index ed60582ba..e9d7ef304 100644 --- a/src/shell/widgetexplorer/kcategorizeditemsviewmodels_p.h +++ b/src/shell/widgetexplorer/kcategorizeditemsviewmodels_p.h @@ -23,7 +23,6 @@ #include #include #include -#include namespace KCategorizedItemsViewModels { diff --git a/src/shell/widgetexplorer/plasmaappletitemmodel_p.h b/src/shell/widgetexplorer/plasmaappletitemmodel_p.h index 694fb5146..181c77299 100644 --- a/src/shell/widgetexplorer/plasmaappletitemmodel_p.h +++ b/src/shell/widgetexplorer/plasmaappletitemmodel_p.h @@ -20,7 +20,7 @@ #ifndef PLASMA_PLASMAAPPLETITEMMODEL_P_H #define PLASMA_PLASMAAPPLETITEMMODEL_P_H -#include +#include #include #include "kcategorizeditemsviewmodels_p.h" diff --git a/src/shell/widgetexplorer/widgetexplorer.cpp b/src/shell/widgetexplorer/widgetexplorer.cpp index 955bb99c3..6e6f6193e 100644 --- a/src/shell/widgetexplorer/widgetexplorer.cpp +++ b/src/shell/widgetexplorer/widgetexplorer.cpp @@ -21,45 +21,17 @@ #include "widgetexplorer.h" -#include -#include -#include - #include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - +#include +#include +#include +#include #include -// #include -// #include -// #include #include "kcategorizeditemsviewmodels_p.h" #include "plasmaappletitemmodel_p.h" -//#include "openwidgetassistant_p.h" - -//getting the user local -//KGlobal::dirs()->localkdedir(); -//Compare it to the entryPath of the KPluginInfo -//and see if it can be uninstalled using namespace KCategorizedItemsViewModels; using namespace Plasma; @@ -314,7 +286,7 @@ void WidgetExplorerPrivate::initRunningApplets() //we've tried our best to get a corona //we don't want just one containment, we want them all if (!c) { - kDebug() << "can't happen"; + qDebug() << "can't happen"; return; } @@ -322,7 +294,7 @@ void WidgetExplorerPrivate::initRunningApplets() runningApplets.clear(); QList containments = c->containments(); foreach (Containment *containment, containments) { - QObject::connect(containment, SIGNAL(appletAdded(Plasma::Applet*,QPointF)), q, SLOT(appletAdded(Plasma::Applet*))); + QObject::connect(containment, SIGNAL(appletAdded(Plasma::Applet*)), q, SLOT(appletAdded(Plasma::Applet*))); QObject::connect(containment, SIGNAL(appletRemoved(Plasma::Applet*)), q, SLOT(appletRemoved(Plasma::Applet*))); foreach (Applet *applet, containment->applets()) { diff --git a/src/shell/widgetexplorer/widgetexplorer.h b/src/shell/widgetexplorer/widgetexplorer.h index 00ad8af91..ea0e0377b 100644 --- a/src/shell/widgetexplorer/widgetexplorer.h +++ b/src/shell/widgetexplorer/widgetexplorer.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2007 by Ivan Cukic * Copyright (C) 2009 by Ana Cecília Martins + * Copyright 2013 by Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library/Lesser General Public License @@ -25,14 +26,8 @@ #include #include -//#include - -//#include - #include "plasmaappletitemmodel_p.h" -//#include "plasmagenericshell_export.h" - namespace Plasma { class Corona; class Containment;