mirror of https://github.com/vitalif/phantomjs
commit
f7ca056f1f
|
@ -40,7 +40,7 @@ CSConverter::CSConverter(QObject *parent)
|
|||
{
|
||||
QFile file(":/coffee-script.js");
|
||||
if (!file.open(QFile::ReadOnly)) {
|
||||
qFatal("CoffeeScript compiler is not available!");
|
||||
std::cerr << "CoffeeScript compiler is not available!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
QString script = QString::fromUtf8(file.readAll());
|
||||
|
|
|
@ -164,13 +164,13 @@ Phantom::Phantom(QObject *parent)
|
|||
|
||||
QFile file(":/bootstrap.js");
|
||||
if (!file.open(QFile::ReadOnly)) {
|
||||
qCritical() << "Can not bootstrap!";
|
||||
std::cerr << "Can not bootstrap!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
QString bootstrapper = QString::fromUtf8(file.readAll());
|
||||
file.close();
|
||||
if (bootstrapper.isEmpty()) {
|
||||
qCritical() << "Can not bootstrap!";
|
||||
std::cerr << "Can not bootstrap!" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
m_page->mainFrame()->evaluateJavaScript(bootstrapper);
|
||||
|
|
|
@ -42,7 +42,7 @@ void Utils::showUsage()
|
|||
QFile file;
|
||||
file.setFileName(":/usage.txt");
|
||||
if ( !file.open(QFile::ReadOnly) ) {
|
||||
qFatal("Unable to print the usage message");
|
||||
std::cerr << "Unable to print the usage message" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
std::cout << qPrintable(QString::fromUtf8(file.readAll()));
|
||||
|
@ -107,7 +107,7 @@ bool Utils::injectJsInFrame(const QString &jsFilePath, const QString &libraryPat
|
|||
jsFile.close();
|
||||
return true;
|
||||
} else {
|
||||
std::cerr << "Can't open '" << qPrintable(jsFilePath) << "'" << std::endl << std::endl;
|
||||
qWarning() << "Can't open '" << qPrintable(jsFilePath) << "'";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue