Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Rename confusing method
Browse files Browse the repository at this point in the history
  • Loading branch information
jferris committed Mar 21, 2012
1 parent 67d5e3d commit 3ebe0fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/Connection.cpp
Expand Up @@ -25,7 +25,6 @@ Connection::Connection(QTcpSocket *socket, WebPage *page, QObject *parent) :
connect(m_page, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
}


void Connection::commandReady(QString commandName, QStringList arguments) {
m_queuedCommand = m_commandFactory->createCommand(commandName.toAscii().constData(), arguments);
if (m_page->isLoading())
Expand All @@ -46,7 +45,7 @@ void Connection::startCommand() {
SLOT(finishCommand(Response *)));
m_runningCommand->start();
} else {
pageLoadFailed();
writePageLoadFailure();
}
}

Expand All @@ -64,13 +63,13 @@ void Connection::pendingLoadFinished(bool success) {
if (m_pageSuccess) {
writeResponse(m_pendingResponse);
} else {
pageLoadFailed();
writePageLoadFailure();
}
}
}
}

void Connection::pageLoadFailed() {
void Connection::writePageLoadFailure() {
m_pageSuccess = true;
QString message = m_page->failureString();
writeResponse(new Response(false, message));
Expand Down
2 changes: 1 addition & 1 deletion src/Connection.h
Expand Up @@ -23,7 +23,7 @@ class Connection : public QObject {
private:
void startCommand();
void writeResponse(Response *response);
void pageLoadFailed();
void writePageLoadFailure();

QTcpSocket *m_socket;
Command *m_runningCommand;
Expand Down

0 comments on commit 3ebe0fa

Please sign in to comment.