Skip to content
This repository
Browse code

Remove m_commandWaiting and add logging to TimeoutCommand

  • Loading branch information...
commit 67b8a3391a110208166f0470b896cc3c331d120c 1 parent cbb58d0
Matthew Horan authored October 24, 2012
2  src/Connection.cpp
@@ -16,7 +16,6 @@ Connection::Connection(QTcpSocket *socket, WebPageManager *manager, QObject *par
16 16
   m_commandFactory = new CommandFactory(m_manager, this);
17 17
   m_commandParser = new CommandParser(socket, m_commandFactory, this);
18 18
   m_pageSuccess = true;
19  
-  m_commandWaiting = false;
20 19
   connect(m_socket, SIGNAL(readyRead()), m_commandParser, SLOT(checkNext()));
21 20
   connect(m_commandParser, SIGNAL(commandReady(Command *)), this, SLOT(commandReady(Command *)));
22 21
   connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
@@ -29,7 +28,6 @@ void Connection::commandReady(Command *command) {
29 28
 }
30 29
 
31 30
 void Connection::startCommand() {
32  
-  m_commandWaiting = false;
33 31
   if (m_pageSuccess) {
34 32
     m_runningCommand = new PageLoadingCommand(m_queuedCommand, m_manager, this);
35 33
     m_runningCommand = new TimeoutCommand(m_runningCommand, m_manager, this);
1  src/Connection.h
@@ -33,7 +33,6 @@ class Connection : public QObject {
33 33
     CommandFactory *m_commandFactory;
34 34
     Command *m_runningCommand;
35 35
     bool m_pageSuccess;
36  
-    bool m_commandWaiting;
37 36
     WebPage *currentPage();
38 37
 };
39 38
 
1  src/TimeoutCommand.cpp
@@ -15,6 +15,7 @@ TimeoutCommand::TimeoutCommand(Command *command, WebPageManager *manager, QObjec
15 15
 
16 16
 void TimeoutCommand::start() {
17 17
   if (m_manager->isLoading()) {
  18
+    m_manager->logger() << this->toString() << "waiting for load to finish";
18 19
     connect(m_manager, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
19 20
     startTimeout();
20 21
   } else {

0 notes on commit 67b8a33

Please sign in to comment.
Something went wrong with that request. Please try again.