Switch to a busy cursor while the applet is loading

BUG: 154512

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753469
This commit is contained in:
Jason Stubbs 2007-12-27 15:03:50 +00:00
parent a57e472c8d
commit a5ad6a0675

View File

@ -23,6 +23,7 @@
#include <QDesktopWidget>
#include <QFile>
#include <QGraphicsSceneContextMenuEvent>
#include <QGraphicsView>
#include <QMimeData>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
@ -393,7 +394,16 @@ void Containment::clearApplets()
Applet* Containment::addApplet(const QString& name, const QVariantList& args, uint id, const QRectF& appletGeometry, bool delayInit)
{
QGraphicsView *v = view();
if (v) {
v->setCursor(Qt::BusyCursor);
}
Applet* applet = Applet::loadApplet(name, id, args);
if (v) {
v->unsetCursor();
}
if (!applet) {
kDebug() << "Applet" << name << "could not be loaded.";
applet = new Applet;