1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
capybara-webkit/src/Response.cpp

29 lines
550 B
C++
Raw Normal View History

#include "Response.h"
#include <iostream>
Response::Response(bool success, QString message) {
m_success = success;
m_message = message.toUtf8();
}
Response::Response(bool success, QByteArray message) {
m_success = success;
m_message = message;
}
Response::Response(bool success) {
m_success = success;
}
bool Response::isSuccess() const {
return m_success;
}
QByteArray Response::message() const {
return m_message;
}
2012-07-11 23:36:22 -04:00
QString Response::toString() const {
return QString(m_success ? "Success(" : "Failure(") + m_message + ")";
}