Rename option/config to localToRemoteUrlAccess(Enabled).

This commit is contained in:
Ariya Hidayat
2011-09-07 09:27:20 -07:00
parent d35f81bbda
commit 059e72588c
4 changed files with 15 additions and 15 deletions
+9 -9
View File
@@ -96,12 +96,12 @@ void Config::processArgs(const QStringList &args)
setIgnoreSslErrors(false);
continue;
}
if (arg == "--local-access-remote=no") {
setLocalAccessRemote(false);
if (arg == "--local-to-remote-url-access=no") {
setLocalToRemoteUrlAccessEnabled(false);
continue;
}
if (arg == "--local-access-remote=yes") {
setLocalAccessRemote(true);
if (arg == "--local-to-remote-url-access=yes") {
setLocalToRemoteUrlAccessEnabled(true);
continue;
}
if (arg.startsWith("--proxy=")) {
@@ -256,14 +256,14 @@ void Config::setIgnoreSslErrors(const bool value)
m_ignoreSslErrors = value;
}
bool Config::localAccessRemote() const
bool Config::localToRemoteUrlAccessEnabled() const
{
return m_localAccessRemote;
return m_localToRemoteUrlAccessEnabled;
}
void Config::setLocalAccessRemote(const bool value)
void Config::setLocalToRemoteUrlAccessEnabled(const bool value)
{
m_localAccessRemote = value;
m_localToRemoteUrlAccessEnabled = value;
}
QString Config::outputEncoding() const
@@ -419,7 +419,7 @@ void Config::resetToDefaults()
m_diskCacheEnabled = false;
m_maxDiskCacheSize = -1;
m_ignoreSslErrors = false;
m_localAccessRemote = false;
m_localToRemoteUrlAccessEnabled = false;
m_outputEncoding = "UTF-8";
m_pluginsEnabled = false;
m_proxyHost.clear();
+4 -4
View File
@@ -41,7 +41,7 @@ class Config: QObject
Q_PROPERTY(bool diskCacheEnabled READ diskCacheEnabled WRITE setDiskCacheEnabled)
Q_PROPERTY(int maxDiskCacheSize READ maxDiskCacheSize WRITE setMaxDiskCacheSize)
Q_PROPERTY(bool ignoreSslErrors READ ignoreSslErrors WRITE setIgnoreSslErrors)
Q_PROPERTY(bool localAccessRemote READ localAccessRemote WRITE setLocalAccessRemote)
Q_PROPERTY(bool localToRemoteUrlAccessEnabled READ localToRemoteUrlAccessEnabled WRITE setLocalToRemoteUrlAccessEnabled)
Q_PROPERTY(QString outputEncoding READ outputEncoding WRITE setOutputEncoding)
Q_PROPERTY(bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled)
Q_PROPERTY(QString proxy READ proxy WRITE setProxy)
@@ -70,8 +70,8 @@ public:
bool ignoreSslErrors() const;
void setIgnoreSslErrors(const bool value);
bool localAccessRemote() const;
void setLocalAccessRemote(const bool value);
bool localToRemoteUrlAccessEnabled() const;
void setLocalToRemoteUrlAccessEnabled(const bool value);
QString outputEncoding() const;
void setOutputEncoding(const QString &value);
@@ -116,7 +116,7 @@ private:
bool m_diskCacheEnabled;
int m_maxDiskCacheSize;
bool m_ignoreSslErrors;
bool m_localAccessRemote;
bool m_localToRemoteUrlAccessEnabled;
QString m_outputEncoding;
bool m_pluginsEnabled;
QString m_proxyHost;
+1 -1
View File
@@ -103,7 +103,7 @@ Phantom::Phantom(QObject *parent)
m_defaultPageSettings[PAGE_SETTINGS_JS_ENABLED] = QVariant::fromValue(true);
m_defaultPageSettings[PAGE_SETTINGS_XSS_AUDITING] = QVariant::fromValue(false);
m_defaultPageSettings[PAGE_SETTINGS_USER_AGENT] = QVariant::fromValue(m_page->userAgent());
m_defaultPageSettings[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE] = QVariant::fromValue(m_config.localAccessRemote());
m_defaultPageSettings[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE] = QVariant::fromValue(m_config.localToRemoteUrlAccessEnabled());
m_page->applySettings(m_defaultPageSettings);
setLibraryPath(QFileInfo(m_config.scriptFile()).dir().absolutePath());
+1 -1
View File
@@ -11,6 +11,6 @@ Options:
--disk-cache=[yes|no] Enables disk cache (at desktop services cache storage location, default is 'no').
--max-disk-cache-size=size Limits the size of disk cache (in KB).
--ignore-ssl-errors=[yes|no] Ignores SSL errors (i.e. expired or self-signed certificate errors).
--local-access-remote=[yes|no] Local content can access remote URL (default is 'no').
--local-to-remote-url-access=[yes|no] Local content can access remote URL (default is 'no').
--output-encoding Sets (if available) the encoding used for terminal output (default is 'utf8').
--script-encoding Sets (if available) the encoding used for the starting script (default is 'utf8').