mirror of https://github.com/vitalif/phantomjs
Fix warnings.
Stop passing around lineNumber and sourceID as they are unused and don't contain useful information. Also declare Q_UNUSED on them to fix compiler warnings.1.5
parent
35e8c94925
commit
8f93ca08ea
|
@ -107,8 +107,8 @@ Phantom::Phantom(QObject *parent)
|
|||
// Set script file encoding
|
||||
m_scriptFileEnc.setEncoding(m_config.scriptEncoding());
|
||||
|
||||
connect(m_page, SIGNAL(javaScriptConsoleMessageSent(QString, int, QString)),
|
||||
SLOT(printConsoleMessage(QString, int, QString)));
|
||||
connect(m_page, SIGNAL(javaScriptConsoleMessageSent(QString)),
|
||||
SLOT(printConsoleMessage(QString)));
|
||||
connect(m_page, SIGNAL(initialized()),
|
||||
SLOT(onInitialized()));
|
||||
|
||||
|
@ -288,7 +288,7 @@ void Phantom::debugExit(int code)
|
|||
}
|
||||
|
||||
// private slots:
|
||||
void Phantom::printConsoleMessage(const QString &message, int lineNumber, const QString &source)
|
||||
void Phantom::printConsoleMessage(const QString &message)
|
||||
{
|
||||
Terminal::instance()->cout(message);
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ signals:
|
|||
void aboutToExit(int code);
|
||||
|
||||
private slots:
|
||||
void printConsoleMessage(const QString &msg, int lineNumber, const QString &source);
|
||||
void printConsoleMessage(const QString &msg);
|
||||
|
||||
void onInitialized();
|
||||
private:
|
||||
|
|
|
@ -89,7 +89,10 @@ protected:
|
|||
}
|
||||
|
||||
void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID) {
|
||||
m_webPage->emitConsoleMessage(message, lineNumber, sourceID);
|
||||
Q_UNUSED(lineNumber);
|
||||
Q_UNUSED(sourceID);
|
||||
|
||||
m_webPage->emitConsoleMessage(message);
|
||||
}
|
||||
|
||||
void javaScriptError(const QWebPage::JavaScriptError& error) {
|
||||
|
@ -299,9 +302,9 @@ void WebPage::emitAlert(const QString &msg)
|
|||
emit javaScriptAlertSent(msg);
|
||||
}
|
||||
|
||||
void WebPage::emitConsoleMessage(const QString &message, int lineNumber, const QString &source)
|
||||
void WebPage::emitConsoleMessage(const QString &message)
|
||||
{
|
||||
emit javaScriptConsoleMessageSent(message, lineNumber, source);
|
||||
emit javaScriptConsoleMessageSent(message);
|
||||
}
|
||||
|
||||
void WebPage::emitError(const QWebPage::JavaScriptError& error)
|
||||
|
|
|
@ -101,7 +101,7 @@ signals:
|
|||
void loadStarted();
|
||||
void loadFinished(const QString &status);
|
||||
void javaScriptAlertSent(const QString &msg);
|
||||
void javaScriptConsoleMessageSent(const QString &message, int lineNumber, const QString &source);
|
||||
void javaScriptConsoleMessageSent(const QString &message);
|
||||
void javaScriptErrorSent(const QString &message, const QVariantList &backtrace);
|
||||
void resourceRequested(const QVariant &req);
|
||||
void resourceReceived(const QVariant &resource);
|
||||
|
@ -116,7 +116,7 @@ private:
|
|||
QString userAgent() const;
|
||||
|
||||
void emitAlert(const QString &msg);
|
||||
void emitConsoleMessage(const QString &msg, int lineNumber, const QString &source);
|
||||
void emitConsoleMessage(const QString &msg);
|
||||
void emitError(const QWebPage::JavaScriptError& error);
|
||||
|
||||
virtual void initCompletions();
|
||||
|
|
Loading…
Reference in New Issue