Permalink
Browse files

Remove m_commandWaiting and add logging to TimeoutCommand

  • Loading branch information...
1 parent cbb58d0 commit 67b8a3391a110208166f0470b896cc3c331d120c @mhoran mhoran committed Oct 24, 2012
Showing with 1 addition and 3 deletions.
  1. +0 −2 src/Connection.cpp
  2. +0 −1 src/Connection.h
  3. +1 −0 src/TimeoutCommand.cpp
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 {

0 comments on commit 67b8a33

Please sign in to comment.