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:
Aaron J. Seigo 2008-06-29 00:20:31 +00:00
parent caa6823d98
commit 6db6dafee6
2 changed files with 16 additions and 12 deletions

View File

@ -37,13 +37,21 @@ namespace Plasma
class WebContent::Private
{
public:
Private(WebContent *parent)
: q(parent)
{
}
void loadingFinished(bool success);
WebContent *q;
QWebPage *page;
bool loaded;
};
WebContent::WebContent(QGraphicsItem *parent)
: QGraphicsWidget(parent),
d(new Private)
d(new Private(this))
{
d->page = 0;
d->loaded = false;
@ -101,7 +109,7 @@ void WebContent::setPage(QWebPage *page)
if (d->page) {
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());
}
void WebContent::loadingComplete(bool success)
void WebContent::Private::loadingFinished(bool success)
{
d->loaded = success;
emit loadDone(success);
loaded = success;
emit q->loadFinished(success);
}
} // namespace Plasma

View File

@ -112,7 +112,7 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
* @param success true if the content was loaded successfully,
* otherwise false
*/
void loadDone(bool success);
void loadFinished(bool success);
protected:
/**
@ -134,13 +134,9 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
void dropEvent(QGraphicsSceneDragDropEvent * event);
private Q_SLOTS:
/**
* @internal
*/
void loadingComplete(bool success);
private:
Q_PRIVATE_SLOT(d, void loadingFinished(bool success))
class Private;
Private * const d;
};