1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

PageLoadingCommand implements the Command interface

This commit is contained in:
Joe Ferris 2012-07-08 12:05:50 -07:00
parent 95732ad796
commit 9202683c22
2 changed files with 4 additions and 7 deletions

View file

@ -3,7 +3,7 @@
#include "WebPage.h"
#include "WebPageManager.h"
PageLoadingCommand::PageLoadingCommand(Command *command, WebPageManager *manager, QObject *parent) : QObject(parent) {
PageLoadingCommand::PageLoadingCommand(Command *command, WebPageManager *manager, QObject *parent) : Command(parent) {
m_manager = manager;
m_command = command;
m_pageLoadingFromCommand = false;

View file

@ -1,7 +1,7 @@
#include <QObject>
#include <QStringList>
#include "Command.h"
class Command;
class Response;
class WebPageManager;
@ -15,21 +15,18 @@ class WebPageManager;
* If a pending page load fails, the command's response will be discarded and a
* failure response will be emitted instead.
*/
class PageLoadingCommand : public QObject {
class PageLoadingCommand : public Command {
Q_OBJECT
public:
PageLoadingCommand(Command *command, WebPageManager *page, QObject *parent = 0);
void start();
virtual void start();
public slots:
void pageLoadingFromCommand();
void pendingLoadFinished(bool success);
void commandFinished(Response *response);
signals:
void finished(Response *response);
private:
WebPageManager *m_manager;
Command *m_command;