sync the api with QtWebkit changes in 4.4.0
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=825691
This commit is contained in:
parent
caa6823d98
commit
6db6dafee6
@ -37,13 +37,21 @@ namespace Plasma
|
|||||||
class WebContent::Private
|
class WebContent::Private
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Private(WebContent *parent)
|
||||||
|
: q(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadingFinished(bool success);
|
||||||
|
|
||||||
|
WebContent *q;
|
||||||
QWebPage *page;
|
QWebPage *page;
|
||||||
bool loaded;
|
bool loaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
WebContent::WebContent(QGraphicsItem *parent)
|
WebContent::WebContent(QGraphicsItem *parent)
|
||||||
: QGraphicsWidget(parent),
|
: QGraphicsWidget(parent),
|
||||||
d(new Private)
|
d(new Private(this))
|
||||||
{
|
{
|
||||||
d->page = 0;
|
d->page = 0;
|
||||||
d->loaded = false;
|
d->loaded = false;
|
||||||
@ -101,7 +109,7 @@ void WebContent::setPage(QWebPage *page)
|
|||||||
|
|
||||||
if (d->page) {
|
if (d->page) {
|
||||||
connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int)));
|
connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int)));
|
||||||
connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(loadingComplete(bool)));
|
connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(loadingFinished(bool)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,10 +344,10 @@ void WebContent::setGeometry(const QRectF &geometry)
|
|||||||
d->page->setViewportSize(geometry.size().toSize());
|
d->page->setViewportSize(geometry.size().toSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContent::loadingComplete(bool success)
|
void WebContent::Private::loadingFinished(bool success)
|
||||||
{
|
{
|
||||||
d->loaded = success;
|
loaded = success;
|
||||||
emit loadDone(success);
|
emit q->loadFinished(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
@ -112,7 +112,7 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
|
|||||||
* @param success true if the content was loaded successfully,
|
* @param success true if the content was loaded successfully,
|
||||||
* otherwise false
|
* otherwise false
|
||||||
*/
|
*/
|
||||||
void loadDone(bool success);
|
void loadFinished(bool success);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
@ -134,13 +134,9 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
|
|||||||
void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
|
void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
|
||||||
void dropEvent(QGraphicsSceneDragDropEvent * event);
|
void dropEvent(QGraphicsSceneDragDropEvent * event);
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
void loadingComplete(bool success);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Q_PRIVATE_SLOT(d, void loadingFinished(bool success))
|
||||||
|
|
||||||
class Private;
|
class Private;
|
||||||
Private * const d;
|
Private * const d;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user