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:
parent
a57e472c8d
commit
a5ad6a0675
@ -23,6 +23,7 @@
|
|||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QGraphicsSceneContextMenuEvent>
|
#include <QGraphicsSceneContextMenuEvent>
|
||||||
|
#include <QGraphicsView>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOptionGraphicsItem>
|
#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)
|
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);
|
Applet* applet = Applet::loadApplet(name, id, args);
|
||||||
|
if (v) {
|
||||||
|
v->unsetCursor();
|
||||||
|
}
|
||||||
|
|
||||||
if (!applet) {
|
if (!applet) {
|
||||||
kDebug() << "Applet" << name << "could not be loaded.";
|
kDebug() << "Applet" << name << "could not be loaded.";
|
||||||
applet = new Applet;
|
applet = new Applet;
|
||||||
|
Loading…
Reference in New Issue
Block a user