Warn when using Qt 4

We plan on removing support for Qt 4 in the next major release. This
allows us to give users a heads-up in the next minor release.
This commit is contained in:
Joe Ferris 2015-04-10 13:28:14 -04:00
parent 8d665b04f4
commit e8cc0fa382
No known key found for this signature in database
GPG Key ID: 1B00F8C9678CF148
1 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,13 @@ Server::Server(QObject *parent) : QObject(parent) {
}
bool Server::start() {
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QTextStream(stderr) <<
"WARNING: The next major version of capybara-webkit " <<
"will require at least version 5.0 of Qt. " <<
"You're using version " << QT_VERSION_STR << "." << endl;
#endif
connect(m_tcp_server, SIGNAL(newConnection()), this, SLOT(handleConnection()));
return m_tcp_server->listen(QHostAddress::LocalHost, 0);
}