Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove m_commandWaiting and add logging to TimeoutCommand

  • Loading branch information...
commit 67b8a3391a110208166f0470b896cc3c331d120c 1 parent cbb58d0
@mhoran mhoran authored
View
2  src/Connection.cpp
@@ -16,7 +16,6 @@ Connection::Connection(QTcpSocket *socket, WebPageManager *manager, QObject *par
m_commandFactory = new CommandFactory(m_manager, this);
m_commandParser = new CommandParser(socket, m_commandFactory, this);
m_pageSuccess = true;
- m_commandWaiting = false;
connect(m_socket, SIGNAL(readyRead()), m_commandParser, SLOT(checkNext()));
connect(m_commandParser, SIGNAL(commandReady(Command *)), this, SLOT(commandReady(Command *)));
connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
@@ -29,7 +28,6 @@ void Connection::commandReady(Command *command) {
}
void Connection::startCommand() {
- m_commandWaiting = false;
if (m_pageSuccess) {
m_runningCommand = new PageLoadingCommand(m_queuedCommand, m_manager, this);
m_runningCommand = new TimeoutCommand(m_runningCommand, m_manager, this);
View
1  src/Connection.h
@@ -33,7 +33,6 @@ class Connection : public QObject {
CommandFactory *m_commandFactory;
Command *m_runningCommand;
bool m_pageSuccess;
- bool m_commandWaiting;
WebPage *currentPage();
};
View
1  src/TimeoutCommand.cpp
@@ -15,6 +15,7 @@ TimeoutCommand::TimeoutCommand(Command *command, WebPageManager *manager, QObjec
void TimeoutCommand::start() {
if (m_manager->isLoading()) {
+ m_manager->logger() << this->toString() << "waiting for load to finish";
connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
startTimeout();
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.