Rename confusing method
This commit is contained in:
parent
67d5e3da0a
commit
3ebe0fa577
|
@ -25,7 +25,6 @@ Connection::Connection(QTcpSocket *socket, WebPage *page, QObject *parent) :
|
||||||
connect(m_page, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
|
connect(m_page, SIGNAL(pageFinished(bool)), this, SLOT(pendingLoadFinished(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Connection::commandReady(QString commandName, QStringList arguments) {
|
void Connection::commandReady(QString commandName, QStringList arguments) {
|
||||||
m_queuedCommand = m_commandFactory->createCommand(commandName.toAscii().constData(), arguments);
|
m_queuedCommand = m_commandFactory->createCommand(commandName.toAscii().constData(), arguments);
|
||||||
if (m_page->isLoading())
|
if (m_page->isLoading())
|
||||||
|
@ -46,7 +45,7 @@ void Connection::startCommand() {
|
||||||
SLOT(finishCommand(Response *)));
|
SLOT(finishCommand(Response *)));
|
||||||
m_runningCommand->start();
|
m_runningCommand->start();
|
||||||
} else {
|
} else {
|
||||||
pageLoadFailed();
|
writePageLoadFailure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,13 +63,13 @@ void Connection::pendingLoadFinished(bool success) {
|
||||||
if (m_pageSuccess) {
|
if (m_pageSuccess) {
|
||||||
writeResponse(m_pendingResponse);
|
writeResponse(m_pendingResponse);
|
||||||
} else {
|
} else {
|
||||||
pageLoadFailed();
|
writePageLoadFailure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Connection::pageLoadFailed() {
|
void Connection::writePageLoadFailure() {
|
||||||
m_pageSuccess = true;
|
m_pageSuccess = true;
|
||||||
QString message = m_page->failureString();
|
QString message = m_page->failureString();
|
||||||
writeResponse(new Response(false, message));
|
writeResponse(new Response(false, message));
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Connection : public QObject {
|
||||||
private:
|
private:
|
||||||
void startCommand();
|
void startCommand();
|
||||||
void writeResponse(Response *response);
|
void writeResponse(Response *response);
|
||||||
void pageLoadFailed();
|
void writePageLoadFailure();
|
||||||
|
|
||||||
QTcpSocket *m_socket;
|
QTcpSocket *m_socket;
|
||||||
Command *m_runningCommand;
|
Command *m_runningCommand;
|
||||||
|
|
Loading…
Reference in New Issue