header cleanup, copyrights, runtime warnings--

This commit is contained in:
Sebastian Kügler 2013-03-21 05:22:46 +01:00
parent 64b3812c05
commit 12f481e50a
6 changed files with 13 additions and 45 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright 2008 Aaron Seigo <aseigo@kde.org>
* Copyright 2013 Sebastian Kügler <sebas@kde.org>
*
* 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();
}

View File

@ -137,7 +137,7 @@ void DefaultItemFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel
QStandardItemModel *model = qobject_cast<QStandardItemModel*>(sourceModel);
if (!model) {
kWarning() << "Expecting a QStandardItemModel!";
qWarning() << "Expecting a QStandardItemModel!";
return;
}

View File

@ -23,7 +23,6 @@
#include <QtGui/QtGui>
#include <QtCore/QtCore>
#include <QIcon>
#include <KDebug>
namespace KCategorizedItemsViewModels {

View File

@ -20,7 +20,7 @@
#ifndef PLASMA_PLASMAAPPLETITEMMODEL_P_H
#define PLASMA_PLASMAAPPLETITEMMODEL_P_H
#include <kplugininfo.h>
#include <KPluginInfo>
#include <Plasma/Applet>
#include "kcategorizeditemsviewmodels_p.h"

View File

@ -21,45 +21,17 @@
#include "widgetexplorer.h"
#include <QDeclarativeContext>
#include <QDeclarativeEngine>
#include <QDeclarativeComponent>
#include <KLocalizedString>
#include <KServiceTypeTrader>
#include <kaction.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kmenu.h>
#include <kpushbutton.h>
#include <kservicetypetrader.h>
#include <kstandardaction.h>
#include <kaboutdata.h>
#include <kaboutapplicationdialog.h>
#include <kcomponentdata.h>
#include <kpluginloader.h>
#include <klineedit.h>
#include <KStandardDirs>
#include <KWindowSystem>
#include <plasma/applet.h>
#include <plasma/corona.h>
#include <plasma/containment.h>
#include <plasma/package.h>
#include <Plasma/Applet>
#include <Plasma/Corona>
#include <Plasma/Containment>
#include <Plasma/Package>
#include <Plasma/PackageStructure>
// #include <plasma/widgets/toolbutton.h>
// #include <plasma/widgets/lineedit.h>
// #include <Plasma/DeclarativeWidget>
#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<Containment*> 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()) {

View File

@ -1,6 +1,7 @@
/*
* Copyright (C) 2007 by Ivan Cukic <ivan.cukic+kde@gmail.com>
* Copyright (C) 2009 by Ana Cecília Martins <anaceciliamb@gmail.com>
* Copyright 2013 by Sebastian Kügler <sebas@kde.org>
*
* 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 <QAction>
#include <QObject>
//#include <KDE/KDialog>
//#include <plasma/framesvg.h>
#include "plasmaappletitemmodel_p.h"
//#include "plasmagenericshell_export.h"
namespace Plasma {
class Corona;
class Containment;