[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [vidalia/alpha] Remove trailing whitespace
commit 96d36ac24ea038912f444d778f986cd38e207561
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date: Sat Mar 17 12:41:55 2012 -0300
Remove trailing whitespace
---
src/common/Log.cpp | 6 +-
src/common/Log.h | 28 +++++-----
src/common/TorSocket.cpp | 14 ++--
src/common/TorSocket.h | 10 ++--
src/common/ZlibByteArray.cpp | 50 ++++++++--------
src/common/ZlibByteArray.h | 18 +++---
src/common/crypto.cpp | 16 +++---
src/common/crypto.h | 16 +++---
src/common/file.cpp | 20 +++---
src/common/file.h | 8 +-
src/common/html.cpp | 4 +-
src/common/html.h | 4 +-
src/common/net.cpp | 4 +-
src/common/net.h | 4 +-
src/common/procutil.cpp | 14 ++--
src/common/procutil.h | 4 +-
src/common/stringutil.cpp | 22 ++++----
src/common/stringutil.h | 6 +-
src/common/win32.cpp | 28 +++++-----
src/common/win32.h | 4 +-
src/crashreporter/CrashReportDialog.cpp | 4 +-
src/crashreporter/CrashReportDialog.h | 4 +-
src/crashreporter/main.cpp | 6 +-
src/miniupnpc/bsdqueue.h | 12 ++--
src/miniupnpc/miniupnpc.h | 4 +-
src/miniupnpc/upnpcommands.h | 8 +-
src/miniupnpc/upnperrors.h | 2 +-
src/miniupnpc/upnpreplyparse.h | 4 +-
src/tools/nostdset/nostdset.sh | 8 +-
src/tools/nsh2po/nsh2po.cpp | 46 +++++++-------
src/tools/po2nsh/po2nsh.cpp | 28 +++++-----
src/tools/po2ts/po2ts.cpp | 30 +++++-----
src/tools/po2wxl/po2wxl.cpp | 62 ++++++++++----------
src/tools/ts2po/ts2po.cpp | 26 ++++----
src/tools/wixtool/wixtool.cpp | 10 ++--
src/torcontrol/AddressMap.cpp | 8 +-
src/torcontrol/AddressMap.h | 10 ++--
src/torcontrol/BootstrapStatus.cpp | 6 +-
src/torcontrol/BootstrapStatus.h | 22 ++++----
src/torcontrol/ControlCommand.cpp | 10 ++--
src/torcontrol/ControlCommand.h | 10 ++--
src/torcontrol/ControlConnection.h | 8 +-
src/torcontrol/ControlMethod.cpp | 6 +-
src/torcontrol/ControlMethod.h | 6 +-
src/torcontrol/ControlReply.cpp | 6 +-
src/torcontrol/ControlReply.h | 8 +-
src/torcontrol/ControlSocket.cpp | 28 +++++-----
src/torcontrol/ControlSocket.h | 10 ++--
src/torcontrol/LogEvent.cpp | 6 +-
src/torcontrol/LogEvent.h | 12 ++--
src/torcontrol/ProtocolInfo.cpp | 8 +-
src/torcontrol/ProtocolInfo.h | 10 ++--
src/torcontrol/ReplyLine.cpp | 10 ++--
src/torcontrol/ReplyLine.h | 12 ++--
src/torcontrol/RouterDescriptor.h | 6 +-
src/torcontrol/RouterStatus.cpp | 8 +-
src/torcontrol/RouterStatus.h | 10 ++--
src/torcontrol/SendCommandEvent.cpp | 8 +-
src/torcontrol/SendCommandEvent.h | 12 ++--
src/torcontrol/Stream.cpp | 22 ++++----
src/torcontrol/Stream.h | 12 ++--
src/torcontrol/TorEvents.cpp | 22 ++++----
src/torcontrol/TorEvents.h | 10 ++--
src/torcontrol/TorProcess.h | 10 ++--
src/torcontrol/TorService.cpp | 30 +++++-----
src/torcontrol/TorService.h | 12 ++--
src/torcontrol/TorSignal.cpp | 6 +-
src/torcontrol/TorSignal.h | 8 +-
src/torcontrol/tcglobal.cpp | 6 +-
src/torcontrol/tcglobal.h | 8 +-
src/vidalia/ControlPasswordInputDialog.cpp | 4 +-
src/vidalia/ControlPasswordInputDialog.h | 4 +-
src/vidalia/CrashReporter.cpp | 8 +-
src/vidalia/CrashReporter.h | 4 +-
src/vidalia/HelperProcess.cpp | 22 ++++----
src/vidalia/HelperProcess.h | 12 ++--
src/vidalia/LanguageSupport.cpp | 22 ++++----
src/vidalia/LanguageSupport.h | 4 +-
src/vidalia/PackageInfo.cpp | 4 +-
src/vidalia/PackageInfo.h | 6 +-
src/vidalia/StatusTab.cpp | 18 +++---
src/vidalia/UpdateProcess.cpp | 6 +-
src/vidalia/UpdateProcess.h | 4 +-
src/vidalia/UpdateProgressDialog.cpp | 4 +-
src/vidalia/UpdateProgressDialog.h | 4 +-
src/vidalia/UpdatesAvailableDialog.cpp | 8 +-
src/vidalia/UpdatesAvailableDialog.h | 4 +-
src/vidalia/VAttachButton.cpp | 8 +-
src/vidalia/VAttachButton.h | 4 +-
src/vidalia/VMessageBox.cpp | 28 +++++-----
src/vidalia/VMessageBox.h | 22 ++++----
src/vidalia/VTabWidget.cpp | 2 +-
src/vidalia/Vidalia.cpp | 16 +++---
src/vidalia/Vidalia.h | 20 +++---
src/vidalia/VidaliaTab.cpp | 4 +-
src/vidalia/VidaliaWindow.cpp | 8 +-
src/vidalia/VidaliaWindow.h | 8 +-
src/vidalia/about/AboutDialog.cpp | 8 +-
src/vidalia/about/AboutDialog.h | 4 +-
src/vidalia/about/LicenseDialog.cpp | 4 +-
src/vidalia/about/LicenseDialog.h | 4 +-
src/vidalia/bwgraph/BandwidthGraph.cpp | 20 +++---
src/vidalia/bwgraph/BandwidthGraph.h | 8 +-
src/vidalia/bwgraph/GraphFrame.cpp | 30 +++++-----
src/vidalia/bwgraph/GraphFrame.h | 8 +-
src/vidalia/config/AbstractTorSettings.cpp | 10 ++--
src/vidalia/config/AbstractTorSettings.h | 10 ++--
src/vidalia/config/AdvancedPage.h | 14 ++--
src/vidalia/config/AppearancePage.cpp | 8 +-
src/vidalia/config/AppearancePage.h | 4 +-
src/vidalia/config/BridgeDownloader.cpp | 12 ++--
src/vidalia/config/BridgeDownloader.h | 10 ++--
.../config/BridgeDownloaderProgressDialog.cpp | 10 ++--
.../config/BridgeDownloaderProgressDialog.h | 6 +-
src/vidalia/config/BridgeUsageDialog.cpp | 4 +-
src/vidalia/config/BridgeUsageDialog.h | 4 +-
src/vidalia/config/ConfigPageStack.cpp | 4 +-
src/vidalia/config/ConfigPageStack.h | 8 +-
src/vidalia/config/DefaultSettings.h | 10 ++--
src/vidalia/config/DomainValidator.cpp | 4 +-
src/vidalia/config/DomainValidator.h | 4 +-
src/vidalia/config/ExitPolicy.cpp | 12 ++--
src/vidalia/config/ExitPolicy.h | 16 +++---
src/vidalia/config/GeneralPage.cpp | 16 +++---
src/vidalia/config/GeneralPage.h | 4 +-
src/vidalia/config/IpValidator.cpp | 4 +-
src/vidalia/config/IpValidator.h | 4 +-
src/vidalia/config/Local8BitStringValidator.cpp | 4 +-
src/vidalia/config/Local8BitStringValidator.h | 4 +-
src/vidalia/config/NetworkPage.cpp | 24 ++++----
src/vidalia/config/NetworkPage.h | 4 +-
src/vidalia/config/NetworkSettings.h | 12 ++--
src/vidalia/config/NicknameValidator.cpp | 6 +-
src/vidalia/config/NicknameValidator.h | 4 +-
src/vidalia/config/Policy.cpp | 16 +++---
src/vidalia/config/Policy.h | 8 +-
src/vidalia/config/PortValidator.cpp | 4 +-
src/vidalia/config/PortValidator.h | 4 +-
src/vidalia/config/ServerPage.h | 10 ++--
src/vidalia/config/ServerSettings.h | 12 ++--
src/vidalia/config/TorrcDialog.cpp | 18 +++---
src/vidalia/config/TorrcDialog.h | 10 ++--
src/vidalia/config/UPNPControl.cpp | 16 +++---
src/vidalia/config/UPNPControl.h | 16 +++---
src/vidalia/config/UPNPControlThread.cpp | 22 ++++----
src/vidalia/config/UPNPControlThread.h | 14 ++--
src/vidalia/config/UPNPTestDialog.cpp | 16 +++---
src/vidalia/config/UPNPTestDialog.h | 18 +++---
src/vidalia/config/VSettings.h | 2 +-
src/vidalia/config/VidaliaSettings.cpp | 10 ++--
src/vidalia/config/VidaliaSettings.h | 14 ++--
src/vidalia/config/torrc/Torrc.h | 8 +-
src/vidalia/config/torrc/TorrcParser.h | 20 +++---
src/vidalia/help/browser/HelpBrowser.cpp | 52 ++++++++--------
src/vidalia/help/browser/HelpBrowser.h | 10 ++--
src/vidalia/help/browser/HelpTextBrowser.cpp | 14 ++--
src/vidalia/help/browser/HelpTextBrowser.h | 4 +-
src/vidalia/log/LogFile.cpp | 10 ++--
src/vidalia/log/LogFile.h | 8 +-
src/vidalia/log/LogHeaderView.cpp | 4 +-
src/vidalia/log/LogHeaderView.h | 4 +-
src/vidalia/log/LogMessageColumnDelegate.cpp | 6 +-
src/vidalia/log/LogMessageColumnDelegate.h | 4 +-
src/vidalia/log/LogTreeItem.cpp | 16 +++---
src/vidalia/log/LogTreeItem.h | 8 +-
src/vidalia/log/LogTreeWidget.cpp | 16 +++---
src/vidalia/log/LogTreeWidget.h | 16 +++---
src/vidalia/log/MessageLog.cpp | 8 +-
src/vidalia/log/MessageLog.h | 12 ++--
src/vidalia/log/StatusEventItem.cpp | 4 +-
src/vidalia/log/StatusEventItem.h | 4 +-
src/vidalia/log/StatusEventItemDelegate.cpp | 4 +-
src/vidalia/log/StatusEventItemDelegate.h | 6 +-
src/vidalia/log/StatusEventWidget.cpp | 4 +-
src/vidalia/log/StatusEventWidget.h | 22 ++++----
src/vidalia/main.cpp | 14 ++--
src/vidalia/network/CircuitItem.cpp | 6 +-
src/vidalia/network/CircuitItem.h | 8 +-
src/vidalia/network/CircuitListWidget.cpp | 30 +++++-----
src/vidalia/network/CircuitListWidget.h | 12 ++--
src/vidalia/network/CountryInfo.cpp | 6 +-
src/vidalia/network/CountryInfo.h | 4 +-
src/vidalia/network/GeoIpDatabase.cpp | 6 +-
src/vidalia/network/GeoIpDatabase.h | 4 +-
src/vidalia/network/GeoIpRecord.cpp | 6 +-
src/vidalia/network/GeoIpRecord.h | 8 +-
src/vidalia/network/GeoIpResolver.h | 4 +-
src/vidalia/network/NetViewer.h | 8 +-
src/vidalia/network/RouterDescriptorView.cpp | 28 +++++-----
src/vidalia/network/RouterDescriptorView.h | 4 +-
src/vidalia/network/RouterInfoDialog.cpp | 6 +-
src/vidalia/network/RouterInfoDialog.h | 4 +-
src/vidalia/network/RouterListItem.cpp | 12 ++--
src/vidalia/network/RouterListItem.h | 4 +-
src/vidalia/network/RouterListWidget.cpp | 20 +++---
src/vidalia/network/RouterListWidget.h | 8 +-
src/vidalia/network/StreamItem.cpp | 6 +-
src/vidalia/network/StreamItem.h | 6 +-
src/vidalia/network/TorMapImageView.h | 6 +-
src/vidalia/network/TorMapWidget.cpp | 10 ++--
src/vidalia/network/TorMapWidget.h | 4 +-
src/vidalia/network/TorMapWidgetPopupMenu.cpp | 4 +-
src/vidalia/network/TorMapWidgetPopupMenu.h | 4 +-
src/vidalia/network/ZImageView.cpp | 42 +++++++-------
src/vidalia/network/ZImageView.h | 12 ++--
src/vidalia/plugin/DebugDialog.cpp | 4 +-
src/vidalia/plugin/DebugDialog.h | 4 +-
src/vidalia/plugin/PluginEngine.cpp | 16 +++---
src/vidalia/plugin/PluginEngine.h | 4 +-
src/vidalia/plugin/PluginWrapper.cpp | 24 ++++----
src/vidalia/plugin/PluginWrapper.h | 8 +-
.../plugin/prototypes/HelperProcessPrototype.cpp | 16 +++---
.../plugin/prototypes/TorControlPrototype.cpp | 46 +++++++-------
.../plugin/prototypes/TorControlPrototype.h | 22 ++++----
.../plugin/prototypes/VidaliaTabPrototype.cpp | 10 ++--
.../plugin/prototypes/VidaliaTabPrototype.h | 4 +-
216 files changed, 1214 insertions(+), 1214 deletions(-)
diff --git a/src/common/Log.cpp b/src/common/Log.cpp
index 8f1d4db..69ca5f0 100644
--- a/src/common/Log.cpp
+++ b/src/common/Log.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -41,7 +41,7 @@ Log::~Log()
QStringList
Log::logLevels()
{
- return (QStringList() << "debug" << "info" << "notice"
+ return (QStringList() << "debug" << "info" << "notice"
<< "warn" << "error");
}
diff --git a/src/common/Log.h b/src/common/Log.h
index 89fc529..3d450f2 100644
--- a/src/common/Log.h
+++ b/src/common/Log.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -25,7 +25,7 @@
/** The Log class is similar to the QDebug class provided with Qt, but with
* finer-grained logging levels, slightly different output (for example, not
- * everything is wrapped in double quotes), supports using .arg(), and can
+ * everything is wrapped in double quotes), supports using .arg(), and can
* still be used even if Qt was compiled with QT_NO_DEBUG_STREAM. */
class Log
{
@@ -41,7 +41,7 @@ public:
Unknown /**< Unknown/invalid log level. */
};
class LogMessage;
-
+
/** Default constructor. */
Log();
/** Destructor. */
@@ -52,13 +52,13 @@ public:
bool open(FILE *file);
/** Opens a file on disk to which log messages will be written. */
bool open(QString file);
- /** Closes the log file. */
+ /** Closes the log file. */
void close();
/** Returns true if the log file is open and ready for writing. */
bool isOpen() { return _logFile.isOpen() && _logFile.isWritable(); }
/** Returns a string description of the last file error encountered. */
QString errorString() { return _logFile.errorString(); }
-
+
/** Sets the current log level to <b>level</b>. */
void setLogLevel(LogLevel level);
/** Returns a list of strings representing valid log levels. */
@@ -67,7 +67,7 @@ public:
static inline QString logLevelToString(LogLevel level);
/** Returns a LogLevel for the level given by <b>str</b>. */
static LogLevel stringToLogLevel(QString str);
-
+
/** Creates a log message with severity <b>level</b> and initial message
* contents <b>message</b>. The log message can be appended to until the
* returned LogMessage's destructor is called, at which point the complete
@@ -77,36 +77,36 @@ public:
* appended to until the returned LogMessage's destructor is called, at
* which point the complete message is written to the log file. */
inline LogMessage log(LogLevel level);
-
+
private:
LogLevel _logLevel; /**< Minimum log severity level. */
QFile _logFile; /**< Log output destination. */
};
-/** This internal class represents a single message that is to be written to
+/** This internal class represents a single message that is to be written to
* the log destination. The message is buffered until it is written to the
* log in this class's destructor. */
class Log::LogMessage
{
public:
struct Stream {
- Stream(Log::LogLevel t, QIODevice *o)
+ Stream(Log::LogLevel t, QIODevice *o)
: type(t), out(o), ref(1) {}
Log::LogLevel type;
QIODevice *out;
int ref;
QString buf;
} *stream;
-
+
inline LogMessage(Log::LogLevel t, QIODevice *o)
: stream(new Stream(t,o)) {}
- inline LogMessage(const LogMessage &o)
+ inline LogMessage(const LogMessage &o)
: stream(o.stream) { ++stream->ref; }
inline QString toString() const;
~LogMessage();
-
+
/* Support both the << and .arg() methods */
- inline LogMessage &operator<<(const QString &t)
+ inline LogMessage &operator<<(const QString &t)
{ stream->buf += t; return *this; }
inline LogMessage arg(const QString &a)
{ stream->buf = stream->buf.arg(a); return *this; }
diff --git a/src/common/TorSocket.cpp b/src/common/TorSocket.cpp
index 4d37a2d..3cdf153 100644
--- a/src/common/TorSocket.cpp
+++ b/src/common/TorSocket.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -90,9 +90,9 @@ TorSocket::sendSocksHandshake(const QString &remoteHost, quint16 remotePort)
sock << (quint8)0;
}
-/** Handles the second half of the handshake, received from the SOCKS
- * proxy server. The response should be formatted as follows:
- *
+/** Handles the second half of the handshake, received from the SOCKS
+ * proxy server. The response should be formatted as follows:
+ *
* 0x00 (response version)
* STATUS (0x5A means success; other values mean failure)
* PORT (not set)
@@ -106,10 +106,10 @@ TorSocket::onHandshakeResponse()
/* We've received our response, so stop waiting for it. */
QObject::disconnect(this, SIGNAL(readyRead()),
this, SLOT(onHandshakeResponse()));
-
+
/* Read the 8-byte response off the socket. */
response = read(SOCKS_RESPONSE_LEN);
-
+
/* Check to make sure we got a good response from the proxy. */
if ((uchar)response[0] == (uchar)SOCKS_RESPONSE_VERSION &&
(uchar)response[1] == (uchar)SOCKS_CONNECT_STATUS_OK) {
diff --git a/src/common/TorSocket.h b/src/common/TorSocket.h
index 2b724f8..4ff44c5 100644
--- a/src/common/TorSocket.h
+++ b/src/common/TorSocket.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -23,7 +23,7 @@
class TorSocket : public QTcpSocket
{
Q_OBJECT
-
+
public:
/** Constructor. */
TorSocket(const QHostAddress &socksAddr,
@@ -38,7 +38,7 @@ signals:
void connectedToRemoteHost();
/** Emitted when a connection error has occurred. */
void socketError(QString errmsg);
-
+
private slots:
/** Called when the socket is connected to the proxy and sends our
* half of a Socks4a handshake. */
@@ -51,7 +51,7 @@ private slots:
private:
/** Sends the client part of a Socks4a handshake with a proxy server. */
void sendSocksHandshake(const QString &remoteHost, quint16 remotePort);
-
+
QHostAddress _socksAddr; /**< Address of Tor's SOCKS listener. */
QString _remoteHost; /**< Remote hostname. */
quint16 _socksPort; /**< Port of Tor's SOCKS listener. */
diff --git a/src/common/ZlibByteArray.cpp b/src/common/ZlibByteArray.cpp
index e851dd4..ab508f0 100644
--- a/src/common/ZlibByteArray.cpp
+++ b/src/common/ZlibByteArray.cpp
@@ -3,15 +3,15 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
**
** * * *
-**
+**
** Zlib support in this class is derived from Tor's torgzip.[ch].
** Tor is distributed under this license:
-**
+**
** Copyright (c) 2001-2004, Roger Dingledine
** Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
**
@@ -26,7 +26,7 @@
** copyright notice, this list of conditions and the following disclaimer
** in the documentation and/or other materials provided with the
** distribution.
-**
+**
** * Neither the names of the copyright owners nor the names of its
** contributors may be used to endorse or promote products derived from
** this software without specific prior written permission.
@@ -146,9 +146,9 @@ ZlibByteArray::isGzipSupported()
return isGzipSupported;
}
-/** Compresses the current contents of this object using <b>method</b>.
- * Returns the compressed data if successful. If an error occurs, this will
- * return an empty QByteArray and set the optional <b>errmsg</b> to a string
+/** Compresses the current contents of this object using <b>method</b>.
+ * Returns the compressed data if successful. If an error occurs, this will
+ * return an empty QByteArray and set the optional <b>errmsg</b> to a string
* describing the failure. */
QByteArray
ZlibByteArray::compress(const CompressionMethod method,
@@ -172,7 +172,7 @@ ZlibByteArray::compress(const QByteArray in,
size_t out_len;
size_t in_len = in.length();
off_t offset;
-
+
if (method == None)
return in;
if (method == Gzip && !isGzipSupported()) {
@@ -182,14 +182,14 @@ ZlibByteArray::compress(const QByteArray in,
.arg(ZLIB_VERSION);
return QByteArray();
}
-
+
stream = new struct z_stream_s;
stream->zalloc = Z_NULL;
stream->zfree = Z_NULL;
stream->opaque = NULL;
stream->next_in = (unsigned char*)in.data();
stream->avail_in = in_len;
-
+
if (deflateInit2(stream, Z_BEST_COMPRESSION, Z_DEFLATED,
methodBits(method),
8, Z_DEFAULT_STRATEGY) != Z_OK) {
@@ -197,15 +197,15 @@ ZlibByteArray::compress(const QByteArray in,
.arg(stream->msg ? stream->msg : "<no message>");
goto err;
}
-
+
/* Guess 50% compression. */
out_size = in_len / 2;
if (out_size < 1024) out_size = 1024;
-
+
out.resize(out_size);
stream->next_out = (unsigned char*)out.data();
stream->avail_out = out_size;
-
+
while (1) {
switch (deflate(stream, Z_FINISH))
{
@@ -221,7 +221,7 @@ ZlibByteArray::compress(const QByteArray in,
out.resize(out_size);
stream->next_out = (unsigned char*)(out.data() + offset);
if (out_size - offset > UINT_MAX) {
- errorstr =
+ errorstr =
"Ran over unsigned int limit of zlib while uncompressing";
goto err;
}
@@ -253,9 +253,9 @@ err:
return QByteArray();
}
-/** Uncompresses the current contents of this object using <b>method</b>.
- * Returns the uncompressed data if successful. If an error occurs, this will
- * return an empty QByteArray and set the optional <b>errmsg</b> to a string
+/** Uncompresses the current contents of this object using <b>method</b>.
+ * Returns the uncompressed data if successful. If an error occurs, this will
+ * return an empty QByteArray and set the optional <b>errmsg</b> to a string
* describing the failure. */
QByteArray
ZlibByteArray::uncompress(const CompressionMethod method,
@@ -280,7 +280,7 @@ ZlibByteArray::uncompress(const QByteArray in,
size_t in_len = in.length();
off_t offset;
int r;
-
+
if (method == None)
return in;
if (method == Gzip && !isGzipSupported()) {
@@ -290,7 +290,7 @@ ZlibByteArray::uncompress(const QByteArray in,
.arg(ZLIB_VERSION);
return QByteArray();
}
-
+
stream = new struct z_stream_s;
stream->zalloc = Z_NULL;
stream->zfree = Z_NULL;
@@ -298,21 +298,21 @@ ZlibByteArray::uncompress(const QByteArray in,
stream->msg = NULL;
stream->next_in = (unsigned char*) in.data();
stream->avail_in = in_len;
-
+
if (inflateInit2(stream,
methodBits(method)) != Z_OK) {
errorstr = QString("Error from inflateInit2: %1")
.arg(stream->msg ? stream->msg : "<no message>");
goto err;
}
-
+
out_size = in_len * 2; /* guess 50% compression. */
if (out_size < 1024) out_size = 1024;
-
+
out.resize(out_size);
stream->next_out = (unsigned char*)out.data();
stream->avail_out = out_size;
-
+
while (1) {
switch (inflate(stream, Z_FINISH))
{
@@ -347,7 +347,7 @@ ZlibByteArray::uncompress(const QByteArray in,
out.resize(out_size);
stream->next_out = (unsigned char*)(out.data() + offset);
if (out_size - offset > UINT_MAX) {
- errorstr =
+ errorstr =
"Ran over unsigned int limit of zlib while uncompressing";
goto err;
}
diff --git a/src/common/ZlibByteArray.h b/src/common/ZlibByteArray.h
index 85f6dde..8db9837 100644
--- a/src/common/ZlibByteArray.h
+++ b/src/common/ZlibByteArray.h
@@ -3,15 +3,15 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
**
** * * *
-**
+**
** Zlib support in this class is derived from Tor's torgzip.[ch].
** Tor is distributed under this license:
-**
+**
** Copyright (c) 2001-2004, Roger Dingledine
** Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
**
@@ -26,7 +26,7 @@
** copyright notice, this list of conditions and the following disclaimer
** in the documentation and/or other materials provided with the
** distribution.
-**
+**
** * Neither the names of the copyright owners nor the names of its
** contributors may be used to endorse or promote products derived from
** this software without specific prior written permission.
@@ -65,15 +65,15 @@ public:
Gzip, /**< Gzip compression method. */
Zlib /**< Zlib compression method. */
};
-
+
/** Constructor. */
- ZlibByteArray(QByteArray data);
-
+ ZlibByteArray(QByteArray data);
+
/** Compresses the current contents of this object using <b>method</b>. */
QByteArray compress(const CompressionMethod method = Zlib,
QString *errmsg = 0) const;
/** Compreses the contents of <b>in</b> using <b>method</b>. */
- static QByteArray compress(const QByteArray in,
+ static QByteArray compress(const QByteArray in,
const CompressionMethod method = Zlib,
QString *errmsg = 0);
/** Uncompresses the current contents of this object using <b>method</b>. */
diff --git a/src/common/crypto.cpp b/src/common/crypto.cpp
index 73c1e44..223d202 100644
--- a/src/common/crypto.cpp
+++ b/src/common/crypto.cpp
@@ -3,15 +3,15 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
**
** * * *
-**
+**
** Pseudorandom number generation support in this file is derived from
** Tor's crypto.[ch]. Tor is distributed under this license.
-**
+**
** Copyright (c) 2001-2004, Roger Dingledine
** Copyright (c) 2004-2007, Roger Dingledine, Nick Mathewson
**
@@ -26,7 +26,7 @@
** copyright notice, this list of conditions and the following disclaimer
** in the documentation and/or other materials provided with the
** distribution.
-**
+**
** * Neither the names of the copyright owners nor the names of its
** contributors may be used to endorse or promote products derived from
** this software without specific prior written permission.
@@ -136,7 +136,7 @@ crypto_rand_quint32(quint32 max)
forever {
buf = crypto_rand_bytes(sizeof(quint32));
Q_ASSERT(buf.size() == sizeof(quint32));
-
+
val = *((quint32 *)buf.constData());
if (val < cutoff)
break;
@@ -151,7 +151,7 @@ crypto_rand_string(int len)
{
QString str;
Q_ASSERT(len >= 0);
-
+
for (int i = 0; i < len; i++)
str += QChar('!' + crypto_rand_quint32('~'-'!'+1));
return str;
@@ -159,7 +159,7 @@ crypto_rand_string(int len)
/** Generates a salted hash of <b>secret</b> using the random <b>salt</b>
* according to the iterated and salted S2K algorithm in RFC 2440. <b>c</b>
- * is the one-octet coded count value that specifies how much data to hash.
+ * is the one-octet coded count value that specifies how much data to hash.
* <b>salt</b> must contain at least 8 bytes, otherwise this method will
* return a default-constructed QByteArray. */
QByteArray
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 39a4b90..65582ed 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -3,15 +3,15 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
-**
+**
** * * *
-**
+**
** Pseudorandom number generation support in this file is derived from
** Tor's crypto.[ch]. Tor is distributed under this license.
-**
+**
** Copyright (c) 2001-2004, Roger Dingledine
** Copyright (c) 2004-2007, Roger Dingledine, Nick Mathewson
**
@@ -26,7 +26,7 @@
** copyright notice, this list of conditions and the following disclaimer
** in the documentation and/or other materials provided with the
** distribution.
-**
+**
** * Neither the names of the copyright owners nor the names of its
** contributors may be used to endorse or promote products derived from
** this software without specific prior written permission.
@@ -68,10 +68,10 @@ quint32 crypto_rand_quint32(quint32 max);
QString crypto_rand_string(int len);
/** Generates a salted hash of <b>secret</b> using the random <b>salt</b>
* according to the iterated and salted S2K algorithm in RFC 2440. <b>c</b>
- * is the one-octet coded count value that specifies how much data to hash.
+ * is the one-octet coded count value that specifies how much data to hash.
* <b>salt</b> must contain at least 8 bytes, otherwise this method will
* return a default-constructed QByteArray. */
-QByteArray
+QByteArray
crypto_secret_to_key(const QString &secret, const QByteArray &salt, quint8 c);
#endif
diff --git a/src/common/file.cpp b/src/common/file.cpp
index a91c06a..f133565 100644
--- a/src/common/file.cpp
+++ b/src/common/file.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -25,7 +25,7 @@
/** Create an empty file named <b>filename</b>. if <b>createdir</b> is true,
- * then the full path to <b>filename</b> will be created. Returns true on
+ * then the full path to <b>filename</b> will be created. Returns true on
* success, or false on error and <b>errmsg</b> will be set. */
bool
touch_file(const QString &filename, bool createdir, QString *errmsg)
@@ -33,19 +33,19 @@ touch_file(const QString &filename, bool createdir, QString *errmsg)
/* Expand the file's path if it starts with a shortcut, like "~/" or
* "%APPDATA%" */
QString expanded = expand_filename(filename);
-
+
/* If the file's path doesn't exist and we're supposed to create it, do that
* now. */
if (createdir && !create_path(QFileInfo(expanded).absolutePath())) {
return false;
}
-
+
/* Touch the file */
QFile file(expanded);
if (!QFileInfo(expanded).exists()) {
if (!file.open(QIODevice::WriteOnly)) {
return err(errmsg, file.errorString());
- }
+ }
}
return true;
}
@@ -72,9 +72,9 @@ copy_dir(const QString &source, const QString &dest)
/* Source and destination as QDir's */
QDir src(source);
QDir dst(dest);
-
+
/* Get contents of the directory */
- QFileInfoList contents = src.entryInfoList(QDir::Files | QDir::Dirs
+ QFileInfoList contents = src.entryInfoList(QDir::Files | QDir::Dirs
| QDir::NoDotAndDotDot);
/* Copy each entry in src to dst */
@@ -94,7 +94,7 @@ copy_dir(const QString &source, const QString &dest)
/* This is a file, copy it */
if (!QFile::copy(srcFilePath, dstFilePath))
return false;
- }
+ }
/* Ignore special files (e.g. symlinks, devices) */
}
@@ -112,7 +112,7 @@ expand_filename(const QString &filename)
if (fname.startsWith("%APPDATA%\\") ||
fname.startsWith("%APPDATA%/"))
return fname.replace(0, 9, win32_app_data_folder());
-
+
if (fname.startsWith("%PROGRAMFILES%\\") ||
fname.startsWith("%PROGRAMFILES%/"))
return fname.replace(0, 14, win32_program_files_folder());
diff --git a/src/common/file.h b/src/common/file.h
index bc0acf3..30d4477 100644
--- a/src/common/file.h
+++ b/src/common/file.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -20,7 +20,7 @@
/** Create an empty file named <b>filename</b>. if <b>createdir</b> is true,
- * then the full path to <b>filename</b> will be created. Returns true on
+ * then the full path to <b>filename</b> will be created. Returns true on
* success, or false on error and <b>errmsg</b> will be set. */
bool touch_file(const QString &filename, bool createdir = false,
QString *errmsg = 0);
@@ -32,7 +32,7 @@ bool create_path(const QString &path);
* expand "%APPDATA%" and "%PROGRAMFILES%". If <b>filename</b> does not
* start with a shortcut, <b>filename</b> will be returned unmodified. */
QString expand_filename(const QString &filename);
-
+
/** Recursively copy the contents of one directory to another. The
* destination must already exist. Returns true on success, and false
* otherwise. */
diff --git a/src/common/html.cpp b/src/common/html.cpp
index f1a4563..4268a9a 100644
--- a/src/common/html.cpp
+++ b/src/common/html.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/common/html.h b/src/common/html.h
index aa84561..f120daf 100644
--- a/src/common/html.h
+++ b/src/common/html.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/common/net.cpp b/src/common/net.cpp
index c4c68c8..77a571a 100644
--- a/src/common/net.cpp
+++ b/src/common/net.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/common/net.h b/src/common/net.h
index 4ab5790..e868aa0 100644
--- a/src/common/net.h
+++ b/src/common/net.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/common/procutil.cpp b/src/common/procutil.cpp
index 2e06e16..8774ecb 100644
--- a/src/common/procutil.cpp
+++ b/src/common/procutil.cpp
@@ -3,14 +3,14 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
** \file procutil.cpp
-** \brief Process information and pidfile functions
+** \brief Process information and pidfile functions
*/
#include "procutil.h"
@@ -85,11 +85,11 @@ write_pidfile(const QString &pidFileName, QString *errmsg)
/** Reads the given pidfile and returns the value contained in it. If the file
* does not exist 0 is returned. Returns -1 if an error occurs. */
-qint64
+qint64
read_pidfile(const QString &pidFileName, QString *errmsg)
{
qint64 pid;
-
+
/* Open the pidfile, if it exists */
QFile pidfile(pidFileName);
if (!pidfile.exists()) {
@@ -99,9 +99,9 @@ read_pidfile(const QString &pidFileName, QString *errmsg)
if (errmsg) {
*errmsg = pidfile.errorString();
}
- return -1;
+ return -1;
}
-
+
/* Read the PID in from the file */
QTextStream pidstream(&pidfile);
pidstream >> pid;
diff --git a/src/common/procutil.h b/src/common/procutil.h
index f82ec43..0a4a99e 100644
--- a/src/common/procutil.h
+++ b/src/common/procutil.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/common/stringutil.cpp b/src/common/stringutil.cpp
index 404261a..8b9b64d 100644
--- a/src/common/stringutil.cpp
+++ b/src/common/stringutil.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -78,12 +78,12 @@ string_wrap(const QString &str, int width,
QString wrapped;
int pos, nextsep, wordlen, n;
int seplen = sep.length();
-
+
if (str.length() < width) {
return str;
}
- pos = 0;
+ pos = 0;
n = width;
while (pos < str.length()) {
/* Get the length of a "word" */
@@ -246,17 +246,17 @@ string_parse_keyvals(const QString &str, bool *ok)
int i, len;
bool tmp_ok;
QHash<QString,QString> keyvals;
-
+
i = 0;
len = str.length();
while (i < len && str[i].isSpace())
i++; /* Skip initial whitespace */
while (i < len) {
QString key, val;
-
+
while (i < len && !str[i].isSpace() && str[i] != '=')
key.append(str[i++]);
-
+
if (i < len && str[i] == '=') {
if (++i < len && str[i] == '\"') {
/* The value is wrapped in quotes */
@@ -270,7 +270,7 @@ string_parse_keyvals(const QString &str, bool *ok)
} else if (str[i] == '\"') {
i++;
break;
- }
+ }
}
val = string_unescape(val, &tmp_ok);
if (!tmp_ok)
@@ -314,7 +314,7 @@ string_parse_arguments(const QString &str, bool *ok)
i++; /* Skip initial whitespace */
while (i < len) {
QString arg;
-
+
if (str[i] == '\"') {
/* The value is wrapped in quotes */
arg.append(str[i]);
@@ -327,7 +327,7 @@ string_parse_arguments(const QString &str, bool *ok)
} else if (str[i] == '\"') {
i++;
break;
- }
+ }
}
arg = string_unescape(arg, &tmp_ok);
if (!tmp_ok)
@@ -363,7 +363,7 @@ string_format_arguments(const QStringList &args)
foreach (QString arg, args) {
if (arg.contains("\"") || arg.contains("\\") || arg.contains(" "))
out << string_escape(arg);
- else
+ else
out << arg;
}
return out.join(" ");
diff --git a/src/common/stringutil.h b/src/common/stringutil.h
index 5feb392..24cac74 100644
--- a/src/common/stringutil.h
+++ b/src/common/stringutil.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -39,7 +39,7 @@ bool err(QString *str, const QString &errmsg);
/** Wraps <b>str</b> at <b>width</b> characters wide, using <b>sep</b> as the
* word separator (" ", for example), and placing the line ending <b>le</b> at
* the end of each line, except the last.*/
-QString string_wrap(const QString &str, int width,
+QString string_wrap(const QString &str, int width,
const QString &sep = QString(" "),
const QString &le = QString("\n"));
diff --git a/src/common/win32.cpp b/src/common/win32.cpp
index 931da7a..27ce0a9 100644
--- a/src/common/win32.cpp
+++ b/src/common/win32.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -89,7 +89,7 @@ win32_app_data_folder()
CSIDL_LOCAL_APPDATA, QDir::homePath() + "\\Application Data");
}
-/** Returns the value in keyName at keyLocation.
+/** Returns the value in keyName at keyLocation.
* Returns an empty QString if the keyName doesn't exist */
QString
win32_registry_get_key_value(QString keyLocation, QString keyName)
@@ -100,11 +100,11 @@ win32_registry_get_key_value(QString keyLocation, QString keyName)
/* Open the key for reading (opens new key if it doesn't exist) */
if (RegOpenKeyExA(HKEY_CURRENT_USER,
- qPrintable(keyLocation),
+ qPrintable(keyLocation),
0L, KEY_READ, &key) == ERROR_SUCCESS) {
-
+
/* Key exists, so read the value into data */
- RegQueryValueExA(key, qPrintable(keyName),
+ RegQueryValueExA(key, qPrintable(keyName),
NULL, NULL, (LPBYTE)data, &size);
}
@@ -119,7 +119,7 @@ void
win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyValue)
{
HKEY key;
-
+
/* Open the key for writing (opens new key if it doesn't exist */
if (RegOpenKeyExA(HKEY_CURRENT_USER,
qPrintable(keyLocation),
@@ -133,7 +133,7 @@ win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyVa
}
/* Save the value in the key */
- RegSetValueExA(key, qPrintable(keyName), 0, REG_SZ,
+ RegSetValueExA(key, qPrintable(keyName), 0, REG_SZ,
(BYTE *)qPrintable(keyValue),
(DWORD)keyValue.length() + 1); // include null terminator
@@ -146,12 +146,12 @@ void
win32_registry_remove_key(QString keyLocation, QString keyName)
{
HKEY key;
-
+
/* Open the key for writing (opens new key if it doesn't exist */
if (RegOpenKeyExA(HKEY_CURRENT_USER,
qPrintable(keyLocation),
0, KEY_SET_VALUE, &key) == ERROR_SUCCESS) {
-
+
/* Key exists so delete it */
RegDeleteValueA(key, qPrintable(keyName));
}
@@ -163,7 +163,7 @@ win32_registry_remove_key(QString keyLocation, QString keyName)
/**
* Callback for EnumThreadWindows which sends the WM_QUIT message
*/
-BOOL CALLBACK
+BOOL CALLBACK
quitWindowCallback(HWND hwnd, LPARAM targetPID)
{
DWORD hwndPID = 0;
@@ -241,7 +241,7 @@ win32_process_list()
(CreateToolhelp32Snapshot_fn)QLibrary::resolve("kernel32", "CreateToolhelp32Snapshot");
pProcess32First = (Process32First_fn)QLibrary::resolve("kernel32", "Process32First");
pProcess32Next = (Process32Next_fn)QLibrary::resolve("kernel32", "Process32Next");
-
+
if (!pCreateToolhelp32Snapshot || !pProcess32First || !pProcess32Next) {
qWarning("Unable to load tool help functions. Running process information "
"will be unavailable.");
@@ -252,14 +252,14 @@ win32_process_list()
hSnapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapshot != INVALID_HANDLE_VALUE) {
proc.dwSize = sizeof(PROCESSENTRY32);
-
+
/* Iterate through all the processes in the snapshot */
if (pProcess32First(hSnapshot, &proc)) {
do {
/* Extract the PID and exe filename from the process record */
pid = (qint64)proc.th32ProcessID;
exeFile = QString::fromAscii((const char *)proc.szExeFile);
-
+
/* Add this process to our list */
procList.insert(pid, exeFile);
} while (pProcess32Next(hSnapshot, &proc));
diff --git a/src/common/win32.h b/src/common/win32.h
index b555d43..0e113f8 100644
--- a/src/common/win32.h
+++ b/src/common/win32.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/crashreporter/CrashReportDialog.cpp b/src/crashreporter/CrashReportDialog.cpp
index 30e186e..d3d436f 100644
--- a/src/crashreporter/CrashReportDialog.cpp
+++ b/src/crashreporter/CrashReportDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/crashreporter/CrashReportDialog.h b/src/crashreporter/CrashReportDialog.h
index 05a697b..d06b9ee 100644
--- a/src/crashreporter/CrashReportDialog.h
+++ b/src/crashreporter/CrashReportDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/crashreporter/main.cpp b/src/crashreporter/main.cpp
index c63d9f5..fec53df 100644
--- a/src/crashreporter/main.cpp
+++ b/src/crashreporter/main.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -52,7 +52,7 @@ read_annotations_file(const QString &fileName, QString &errorMessage)
if (idx > 0 && idx < line.length()-1) {
QString key = line.mid(0, idx).trimmed();
QString val = line.mid(idx + 1).trimmed();
- annotations.insert(key, val);
+ annotations.insert(key, val);
}
}
return annotations;
diff --git a/src/miniupnpc/bsdqueue.h b/src/miniupnpc/bsdqueue.h
index 1fe0599..c6afe1f 100644
--- a/src/miniupnpc/bsdqueue.h
+++ b/src/miniupnpc/bsdqueue.h
@@ -36,7 +36,7 @@
#define _SYS_QUEUE_H_
/*
- * This file defines five types of data structures: singly-linked lists,
+ * This file defines five types of data structures: singly-linked lists,
* lists, simple queues, tail queues, and circular queues.
*
*
@@ -95,7 +95,7 @@
struct name { \
struct type *slh_first; /* first element */ \
}
-
+
#define SLIST_HEAD_INITIALIZER(head) \
{ NULL }
@@ -107,7 +107,7 @@ struct name { \
struct { \
struct type *sle_next; /* next element */ \
}
-
+
/*
* Singly-linked List access methods.
*/
@@ -322,8 +322,8 @@ struct { \
struct type **tqe_prev; /* address of previous next element */ \
}
-/*
- * tail queue access methods
+/*
+ * tail queue access methods
*/
#define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_END(head) NULL
@@ -430,7 +430,7 @@ struct { \
}
/*
- * Circular queue access methods
+ * Circular queue access methods
*/
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
diff --git a/src/miniupnpc/miniupnpc.h b/src/miniupnpc/miniupnpc.h
index 2379ba1..5b1174f 100644
--- a/src/miniupnpc/miniupnpc.h
+++ b/src/miniupnpc/miniupnpc.h
@@ -97,8 +97,8 @@ LIBSPEC void GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *, const char *);
LIBSPEC void FreeUPNPUrls(struct UPNPUrls *);
-/* Reads data from the specified socket.
- * Returns the number of bytes read if successful, zero if no bytes were
+/* Reads data from the specified socket.
+ * Returns the number of bytes read if successful, zero if no bytes were
* read or if we timed out. Returns negative if there was an error. */
int ReceiveData(int socket, char * data, int length, int timeout);
diff --git a/src/miniupnpc/upnpcommands.h b/src/miniupnpc/upnpcommands.h
index 217c472..397d799 100644
--- a/src/miniupnpc/upnpcommands.h
+++ b/src/miniupnpc/upnpcommands.h
@@ -67,12 +67,12 @@ UPNP_GetConnectionTypeInfo(const char * controlURL,
/* UPNP_GetExternalIPAddress() call the corresponding UPNP method.
* if the third arg is not null the value is copied to it.
- * at least 16 bytes must be available
+ * at least 16 bytes must be available
*
* Return values :
* 0 : SUCCESS
* NON ZERO : ERROR Either an UPnP error code or an unknown error.
- *
+ *
* possible UPnP Errors :
* 402 Invalid Args - See UPnP Device Architecture section on Control.
* 501 Action Failed - See UPnP Device Architecture section on Control. */
@@ -100,7 +100,7 @@ UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
* Return values :
* 0 : SUCCESS
* NON ZERO : ERROR. Either an UPnP error code or an unknown error.
- *
+ *
* List of possible UPnP errors for AddPortMapping :
* errorCode errorDescription (short) - Description (long)
* 402 Invalid Args - See UPnP Device Architecture section on Control.
@@ -111,7 +111,7 @@ UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
* 718 ConflictInMappingEntry - The port mapping entry specified conflicts
* with a mapping assigned previously to another client
* 724 SamePortValuesRequired - Internal and External port values
- * must be the same
+ * must be the same
* 725 OnlyPermanentLeasesSupported - The NAT implementation only supports
* permanent lease times on port mappings
* 726 RemoteHostOnlySupportsWildcard - RemoteHost must be a wildcard
diff --git a/src/miniupnpc/upnperrors.h b/src/miniupnpc/upnperrors.h
index 2c544c9..3a6aaa7 100644
--- a/src/miniupnpc/upnperrors.h
+++ b/src/miniupnpc/upnperrors.h
@@ -15,7 +15,7 @@ extern "C" {
#endif
/* strupnperror()
- * Return a string description of the UPnP error code
+ * Return a string description of the UPnP error code
* or NULL for undefinded errors */
LIBSPEC const char * strupnperror(int err);
diff --git a/src/miniupnpc/upnpreplyparse.h b/src/miniupnpc/upnpreplyparse.h
index fb7d453..a3c90e2 100644
--- a/src/miniupnpc/upnpreplyparse.h
+++ b/src/miniupnpc/upnpreplyparse.h
@@ -1,14 +1,14 @@
/* $Id: upnpreplyparse.h,v 1.10 2009/07/09 16:01:50 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
- * (c) 2006-2009 Thomas Bernard
+ * (c) 2006-2009 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
#ifndef __UPNPREPLYPARSE_H__
#define __UPNPREPLYPARSE_H__
-#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
+#if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
#include "bsdqueue.h"
#else
#include <sys/queue.h>
diff --git a/src/tools/nostdset/nostdset.sh b/src/tools/nostdset/nostdset.sh
index 5a41062..d81c6c5 100644
--- a/src/tools/nostdset/nostdset.sh
+++ b/src/tools/nostdset/nostdset.sh
@@ -1,12 +1,12 @@
#!/bin/bash
## $Id$
-##
+##
## This file is part of Vidalia, and is subject to the license terms in the
-## LICENSE file, found in the top level directory of this distribution. If
+## LICENSE file, found in the top level directory of this distribution. If
## you did not receive the LICENSE file with this file, you may obtain it
## from the Vidalia source package distributed by the Vidalia Project at
-## http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-## including this file, may be copied, modified, propagated, or distributed
+## http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+## including this file, may be copied, modified, propagated, or distributed
## except according to the terms described in the LICENSE file.
##
diff --git a/src/tools/nsh2po/nsh2po.cpp b/src/tools/nsh2po/nsh2po.cpp
index 3f129b2..750f437 100644
--- a/src/tools/nsh2po/nsh2po.cpp
+++ b/src/tools/nsh2po/nsh2po.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -43,8 +43,8 @@ parse_message_context_lame(const QString &str)
QString
parse_message_string(const QString &msg)
{
- QString out = msg.trimmed();
-
+ QString out = msg.trimmed();
+
if (out.startsWith("\""))
out = out.remove(0, 1);
if (out.endsWith("\""))
@@ -59,7 +59,7 @@ QString
parse_nsh_langstring(const QString &msg)
{
QString out = msg.trimmed();
-
+
if (out.startsWith("\""))
out = out.remove(0, 1);
if (out.endsWith("\""))
@@ -113,7 +113,7 @@ read_next_line(QTextStream *stream)
return stream->readLine();
}
-/** Skip past the header portion of the POT file and any leading whitespace.
+/** Skip past the header portion of the POT file and any leading whitespace.
* The next line read from <b>po</b> will be the first non-header line in the
* document. */
void
@@ -130,14 +130,14 @@ skip_pot_header(QTextStream *pot)
/** Parse a PO template file for (context,source string) pairs, which are
* be stored in <b>out</b> using <i>msgctxt</i> as the key and <i>msgid</i>
- * as the value. Return true on success, or false on failure and set
+ * as the value. Return true on success, or false on failure and set
* <b>errmsg</b>. */
bool
parse_po_template(QTextStream *pot, QHash<QString,QString> *out,
QString *errmsg)
{
QString line, msgctxt, msgid;
-
+
skip_pot_header(pot);
line = read_next_line(pot);
while (!pot->atEnd()) {
@@ -146,7 +146,7 @@ parse_po_template(QTextStream *pot, QHash<QString,QString> *out,
line = read_next_line(pot);
continue;
}
-
+
if (line.startsWith("#:")) {
/* Context was specified with the stupid overloaded "#:" syntax.*/
msgctxt = line.section(" ", 1);
@@ -162,13 +162,13 @@ parse_po_template(QTextStream *pot, QHash<QString,QString> *out,
msgctxt = parse_message_context(msgctxt);
line = read_next_line(pot);
}
-
+
if (!line.startsWith("msgid ")) {
*errmsg = "expected 'msgid' line";
return false;
}
msgid = line.section(" ", 1);
-
+
line = read_next_line(pot);
while (line.startsWith("\"")) {
/* This msgid line had multiple parts to it */
@@ -179,7 +179,7 @@ parse_po_template(QTextStream *pot, QHash<QString,QString> *out,
out->insert(msgctxt, msgid);
}
-
+
return true;
}
@@ -188,7 +188,7 @@ parse_po_template(QTextStream *pot, QHash<QString,QString> *out,
* message entry is PO-formatted and appended to <b>po</b>. Return true on
* success, or false on failure and <b>errmsg</b> will be set. */
int
-nsh2po(QTextStream *nsh, const QString &charset,
+nsh2po(QTextStream *nsh, const QString &charset,
const QHash<QString,QString> &pot, QString *po, QString *errmsg)
{
QString line, msgctxt, msgid, msgstr;
@@ -209,7 +209,7 @@ nsh2po(QTextStream *nsh, const QString &charset,
msgctxt = parts.at(1);
else
continue; /* Not properly formatted */
-
+
idx = line.indexOf("\"");
if (idx > 0)
msgstr = parse_nsh_langstring(line.mid(idx));
@@ -217,7 +217,7 @@ nsh2po(QTextStream *nsh, const QString &charset,
}
/* Format the PO file based on the template. */
- n_strings = 0;
+ n_strings = 0;
foreach (QString msgctxt, pot.keys()) {
msgid = pot.value(msgctxt);
if (langStrings.contains(msgctxt)) {
@@ -226,7 +226,7 @@ nsh2po(QTextStream *nsh, const QString &charset,
} else {
msgstr = msgid;
}
-
+
po->append(QString("msgctxt \"%1\"\n").arg(msgctxt));
po->append(QString("msgid \"%1\"\n").arg(msgid));
po->append(QString("msgstr \"%1\"\n").arg(msgstr));
@@ -247,7 +247,7 @@ write_po_output(const char *poFileName, const QString &po, QTextCodec *codec,
*errmsg = QString("Unable to open '%1' for writing.").arg(poFileName);
return false;
}
-
+
QTextStream out(&poFile);
out.setCodec(codec);
out << po;
@@ -280,7 +280,7 @@ main(int argc, char *argv[])
QTextStream pot, nsh;
QTextCodec *codec = QTextCodec::codecForName("utf-8");
bool quiet = false;
-
+
/* Check for the correct number of input parameters. */
if (argc < 7 || argc > 10)
print_usage_and_exit();
@@ -316,18 +316,18 @@ main(int argc, char *argv[])
return 1;
}
} else
- print_usage_and_exit();
+ print_usage_and_exit();
}
pot.setCodec(codec);
nsh.setCodec(codec);
-
+
/* Parse the template for the source strings */
QHash<QString,QString> poTemplate;
if (!parse_po_template(&pot, &poTemplate, &errorMessage)) {
error << QString("Failed to parse PO template: %1\n").arg(errorMessage);
return 1;
}
-
+
/* Parse the nsh for the translated strings */
int n_strings = nsh2po(&nsh, QString(codec->name()), poTemplate,
&po, &errorMessage);
@@ -335,13 +335,13 @@ main(int argc, char *argv[])
error << QString("Conversion failed: %1\n").arg(errorMessage);
return 2;
}
-
+
/* Write the formatted PO output */
if (!write_po_output(outFileName, po, codec, &errorMessage)) {
error << QString("Failed to write PO output: %1\n").arg(errorMessage);
return 3;
}
-
+
if (!quiet) {
QTextStream out(stdout);
out << QString("Wrote %1 strings to '%2'.\n").arg(n_strings)
diff --git a/src/tools/po2nsh/po2nsh.cpp b/src/tools/po2nsh/po2nsh.cpp
index c83a738..68b8d87 100644
--- a/src/tools/po2nsh/po2nsh.cpp
+++ b/src/tools/po2nsh/po2nsh.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -41,8 +41,8 @@ parse_message_context_lame(const QString &str)
QString
parse_message_string(const QString &msg)
{
- QString out = msg.trimmed();
-
+ QString out = msg.trimmed();
+
out.replace("\"\n\"", "");
if (out.startsWith("\""))
out = out.remove(0, 1);
@@ -62,7 +62,7 @@ read_next_line(QTextStream *stream)
return stream->readLine().append("\n");
}
-/** Skip past the header portion of the PO file and any leading whitespace.
+/** Skip past the header portion of the PO file and any leading whitespace.
* The next line read from <b>po</b> will be the first non-header line in the
* document. */
void
@@ -90,11 +90,11 @@ po2nsh(QTextStream *po, QString *nsh, const QString &language,
QHash<QString,QString> header;
QTextCodec *codec;
int n_strings = 0;
-
+
Q_ASSERT(po);
Q_ASSERT(nsh);
Q_ASSERT(errorMessage);
-
+
skip_po_header(po);
line = read_next_line(po);
while (!po->atEnd()) {
@@ -110,19 +110,19 @@ po2nsh(QTextStream *po, QString *nsh, const QString &language,
/* A context specified on a "msgctxt" line takes precedence over a context
* specified using the overload "#:" notation. */
- if (line.startsWith("msgctxt ")) {
+ if (line.startsWith("msgctxt ")) {
msgctxt = line.section(" ", 1);
msgctxt = parse_message_context(msgctxt);
line = read_next_line(po);
}
-
+
/* Parse the (possibly multiline) message source string */
if (!line.startsWith("msgid ")) {
*errorMessage = "expected 'msgid' line";
return -1;
}
msgid = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgid.append(line);
@@ -136,7 +136,7 @@ po2nsh(QTextStream *po, QString *nsh, const QString &language,
return -1;
}
msgstr = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgstr.append(line);
@@ -185,7 +185,7 @@ main(int argc, char *argv[])
bool quiet = false;
QTextCodec *from_codec = QTextCodec::codecForName("utf-8");
QTextCodec *to_codec = QTextCodec::codecForName("iso-8859-1");
-
+
/* Check for the correct number of input parameters. */
if (argc < 7 || argc > 12)
print_usage_and_exit();
@@ -212,7 +212,7 @@ main(int argc, char *argv[])
return 1;
}
} else
- print_usage_and_exit();
+ print_usage_and_exit();
}
/* Open the input PO file for reading. */
@@ -232,7 +232,7 @@ main(int argc, char *argv[])
.arg(errorMessage);
return 3;
}
-
+
/* Open the NSH file for writing. */
QFile nshFile(outfile);
if (!nshFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
diff --git a/src/tools/po2ts/po2ts.cpp b/src/tools/po2ts/po2ts.cpp
index 844d348..45e57c2 100644
--- a/src/tools/po2ts/po2ts.cpp
+++ b/src/tools/po2ts/po2ts.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,7 +31,7 @@ QDomElement
new_context_element(QDomDocument *ts, const QString &contextName)
{
QDomElement context, name;
-
+
/* Create a <name> element */
name = ts->createElement(TS_ELEMENT_NAME);
name.appendChild(ts->createTextNode(contextName));
@@ -76,7 +76,7 @@ QDomDocument
new_ts_document()
{
QDomDocument ts(TS_DOCTYPE);
-
+
QDomElement root = ts.createElement(TS_ELEMENT_ROOT);
root.setAttribute(TS_ATTR_VERSION, "1.1");
ts.appendChild(root);
@@ -110,8 +110,8 @@ parse_message_context_lame(const QString &str)
QString
parse_message_string(const QString &msg)
{
- QString out = msg.trimmed();
-
+ QString out = msg.trimmed();
+
out.replace("\"\n\"", "");
if (out.startsWith("\""))
out = out.remove(0, 1);
@@ -129,7 +129,7 @@ read_next_line(QTextStream *stream)
return stream->readLine().append("\n");
}
-/** Skip past the header portion of the PO file and any leading whitespace.
+/** Skip past the header portion of the PO file and any leading whitespace.
* The next line read from <b>po</b> will be the first non-header line in the
* document. */
void
@@ -162,7 +162,7 @@ po2ts(QTextStream *po, QDomDocument *ts, QString *errorMessage)
Q_ASSERT(errorMessage);
*ts = new_ts_document();
-
+
skip_po_header(po);
line = read_next_line(po);
while (!po->atEnd()) {
@@ -178,19 +178,19 @@ po2ts(QTextStream *po, QDomDocument *ts, QString *errorMessage)
/* A context specified on a "msgctxt" line takes precedence over a context
* specified using the overload "#:" notation. */
- if (line.startsWith("msgctxt ")) {
+ if (line.startsWith("msgctxt ")) {
msgctxt = line.section(" ", 1);
msgctxt = parse_message_context(msgctxt);
line = read_next_line(po);
}
-
+
/* Parse the (possibly multiline) message source string */
if (!line.startsWith("msgid ")) {
*errorMessage = "expected 'msgid' line";
return -1;
}
msgid = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgid.append(line);
@@ -204,7 +204,7 @@ po2ts(QTextStream *po, QDomDocument *ts, QString *errorMessage)
return -1;
}
msgstr = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgstr.append(line);
@@ -220,8 +220,8 @@ po2ts(QTextStream *po, QDomDocument *ts, QString *errorMessage)
ts->documentElement().appendChild(contextElement);
contextElements.insert(msgctxt, contextElement);
}
- contextElement.appendChild(new_message_element(ts, msgid, msgstr));
-
+ contextElement.appendChild(new_message_element(ts, msgid, msgstr));
+
n_strings++;
}
return n_strings;
@@ -269,7 +269,7 @@ main(int argc, char *argv[])
return 1;
}
} else
- print_usage_and_exit();
+ print_usage_and_exit();
}
/* Open the input PO file for reading. */
diff --git a/src/tools/po2wxl/po2wxl.cpp b/src/tools/po2wxl/po2wxl.cpp
index 51edcf5..37b884f 100644
--- a/src/tools/po2wxl/po2wxl.cpp
+++ b/src/tools/po2wxl/po2wxl.cpp
@@ -5,8 +5,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -24,42 +24,42 @@
#define WXL_ATTR_TRANSLATION_TYPE "Culture"
#define WXL_ATTR_OVERRIDABLE "Overridable"
-/** We need to provide an element with the LCID for this locale
+/** We need to provide an element with the LCID for this locale
* that is used in the WiX Product definition. */
QString
culture_lcid(const QString &culture)
{
/* For now character encoding focused, not generally locale / dialect aware. */
QString lcid = "0";
- if(!culture.compare("en", Qt::CaseInsensitive))
+ if(!culture.compare("en", Qt::CaseInsensitive))
lcid = "1033";
- else if(!culture.compare("cs", Qt::CaseInsensitive))
+ else if(!culture.compare("cs", Qt::CaseInsensitive))
lcid = "1029";
- else if(!culture.compare("de", Qt::CaseInsensitive))
+ else if(!culture.compare("de", Qt::CaseInsensitive))
lcid = "1031";
- else if(!culture.compare("es", Qt::CaseInsensitive))
+ else if(!culture.compare("es", Qt::CaseInsensitive))
lcid = "1034";
- else if(!culture.compare("fa", Qt::CaseInsensitive))
+ else if(!culture.compare("fa", Qt::CaseInsensitive))
lcid = "1065";
- else if(!culture.compare("fi", Qt::CaseInsensitive))
+ else if(!culture.compare("fi", Qt::CaseInsensitive))
lcid = "1035";
- else if(!culture.compare("fr", Qt::CaseInsensitive))
+ else if(!culture.compare("fr", Qt::CaseInsensitive))
lcid = "1036";
- else if(!culture.compare("he", Qt::CaseInsensitive))
+ else if(!culture.compare("he", Qt::CaseInsensitive))
lcid = "1037";
- else if(!culture.compare("it", Qt::CaseInsensitive))
+ else if(!culture.compare("it", Qt::CaseInsensitive))
lcid = "1040";
- else if(!culture.compare("nl", Qt::CaseInsensitive))
+ else if(!culture.compare("nl", Qt::CaseInsensitive))
lcid = "1043";
- else if(!culture.compare("pl", Qt::CaseInsensitive))
+ else if(!culture.compare("pl", Qt::CaseInsensitive))
lcid = "1045";
- else if(!culture.compare("pt", Qt::CaseInsensitive))
+ else if(!culture.compare("pt", Qt::CaseInsensitive))
lcid = "1046";
- else if(!culture.compare("ro", Qt::CaseInsensitive))
+ else if(!culture.compare("ro", Qt::CaseInsensitive))
lcid = "1048";
- else if(!culture.compare("ru", Qt::CaseInsensitive))
+ else if(!culture.compare("ru", Qt::CaseInsensitive))
lcid = "1049";
- else if(!culture.compare("sv", Qt::CaseInsensitive))
+ else if(!culture.compare("sv", Qt::CaseInsensitive))
lcid = "1053";
return lcid;
}
@@ -93,7 +93,7 @@ QDomDocument
new_wxl_document(const QString &culture)
{
QDomDocument wxl;
-
+
QDomElement root = wxl.createElementNS(WXL_NAMESPACE, WXL_ELEMENT_ROOT);
root.setAttribute(WXL_ATTR_TRANSLATION_TYPE, culture);
wxl.appendChild(root);
@@ -127,8 +127,8 @@ parse_message_context_lame(const QString &str)
QString
parse_message_string(const QString &msg)
{
- QString out = msg.trimmed();
-
+ QString out = msg.trimmed();
+
out.replace("\"\n\"", "\n");
if (out.startsWith("\""))
out = out.remove(0, 1);
@@ -154,7 +154,7 @@ read_next_line(QTextStream *stream)
return stream->readLine().append("\n");
}
-/** Skip past the header portion of the PO file and any leading whitespace.
+/** Skip past the header portion of the PO file and any leading whitespace.
* The next line read from <b>po</b> will be the first non-header line in the
* document. */
void
@@ -189,9 +189,9 @@ po2wxl(const QString& culture, QTextStream *po, QDomDocument *wxl,
*wxl = new_wxl_document(culture);
/* Set the LCID to Language code for use as !(loc.LCID) in Product. */
- QString lcid = culture_lcid(culture);
+ QString lcid = culture_lcid(culture);
wxl->documentElement().appendChild(
- new_message_element(wxl, WXL_ATTR_LANGUAGE, lcid, lcid));
+ new_message_element(wxl, WXL_ATTR_LANGUAGE, lcid, lcid));
skip_po_header(po);
line = read_next_line(po);
@@ -208,19 +208,19 @@ po2wxl(const QString& culture, QTextStream *po, QDomDocument *wxl,
/* A context specified on a "msgctxt" line takes precedence over a context
* specified using the overload "#:" notation. */
- if (line.startsWith("msgctxt ")) {
+ if (line.startsWith("msgctxt ")) {
msgctxt = line.section(" ", 1);
msgctxt = parse_message_context(msgctxt);
line = read_next_line(po);
}
-
+
/* Parse the (possibly multiline) message source string */
if (!line.startsWith("msgid ")) {
*errorMessage = "expected 'msgid' line";
return -1;
}
msgid = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgid.append(line);
@@ -234,7 +234,7 @@ po2wxl(const QString& culture, QTextStream *po, QDomDocument *wxl,
return -1;
}
msgstr = line.section(" ", 1);
-
+
line = read_next_line(po);
while (line.startsWith("\"")) {
msgstr.append(line);
@@ -244,8 +244,8 @@ po2wxl(const QString& culture, QTextStream *po, QDomDocument *wxl,
/* Add the message and translation to the .wxl document */
wxl->documentElement().appendChild(
- new_message_element(wxl, msgctxt, msgid, msgstr));
-
+ new_message_element(wxl, msgctxt, msgid, msgstr));
+
n_strings++;
}
return n_strings;
@@ -296,7 +296,7 @@ main(int argc, char *argv[])
return 1;
}
} else
- print_usage_and_exit();
+ print_usage_and_exit();
}
/* Open the input PO file for reading. */
diff --git a/src/tools/ts2po/ts2po.cpp b/src/tools/ts2po/ts2po.cpp
index 02719c3..98f8292 100644
--- a/src/tools/ts2po/ts2po.cpp
+++ b/src/tools/ts2po/ts2po.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -115,7 +115,7 @@ convert_context(const QDomElement &context, QString *po, QString *errorMessage)
msgstr.replace("\r", "");
msgstr.replace("\"", "\\\"");
msgstr.replace("\n", "\\n\"\n\"");
-
+
/* Try to extract the <location> tags (optional) */
location = msg.firstChildElement(TS_ELEMENT_LOCATION);
filename = parse_filename(location.attribute(TS_ATTR_FILENAME));
@@ -128,7 +128,7 @@ convert_context(const QDomElement &context, QString *po, QString *errorMessage)
(*po).append(QString("msgid \"%1\"\n").arg(msgid));
(*po).append(QString("msgstr \"%1\"\n").arg(msgstr));
(*po).append("\n");
-
+
/* Find the next source message in the current context */
msg = msg.nextSiblingElement(TS_ELEMENT_MESSAGE);
n++;
@@ -152,7 +152,7 @@ ts2po(const QDomDocument *ts, QString *po, const QString &encoding,
Q_ASSERT(errorMessage);
/* Get the document root and check that it's valid */
- QDomElement root = ts->documentElement();
+ QDomElement root = ts->documentElement();
if (root.tagName() != TS_DOCTYPE)
return -1;
@@ -164,12 +164,12 @@ ts2po(const QDomDocument *ts, QString *po, const QString &encoding,
QDomElement child = root.firstChildElement(TS_ELEMENT_CONTEXT);
while (!child.isNull()) {
QString context;
-
+
/* Convert the current .ts context to .po */
int n = convert_context(child, &context, errorMessage);
if (n < 0)
return -1;
-
+
/* Add it to the output file */
(*po).append(context);
n_strings += n;
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
char *infile, *outfile;
QTextCodec *codec = QTextCodec::codecForName("utf-8");
bool quiet = false;
-
+
/* Check for the correct number of input parameters. */
if (argc < 5 || argc > 8)
print_usage_and_exit();
@@ -222,9 +222,9 @@ main(int argc, char *argv[])
return 1;
}
} else
- print_usage_and_exit();
+ print_usage_and_exit();
}
-
+
/* Read and parse the input .ts file. */
QDomDocument ts;
QFile tsFile(infile);
@@ -233,7 +233,7 @@ main(int argc, char *argv[])
.arg(errorMessage);
return 1;
}
-
+
/* Try to open the output .po file for writing. */
QFile poFile(outfile);
if (!poFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -242,7 +242,7 @@ main(int argc, char *argv[])
.arg(tsFile.errorString());
return 2;
}
-
+
/* Convert the input .ts file to a .po formatted file. */
QString po;
int n_strings = ts2po(&ts, &po, QString(codec->name()), &errorMessage);
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
out.setCodec(codec);
out << po;
poFile.close();
-
+
if (!quiet) {
QTextStream results(stdout);
results << QString("Converted %1 strings from %2 to %3.\n").arg(n_strings)
diff --git a/src/tools/wixtool/wixtool.cpp b/src/tools/wixtool/wixtool.cpp
index 58c0f40..a8e5efd 100644
--- a/src/tools/wixtool/wixtool.cpp
+++ b/src/tools/wixtool/wixtool.cpp
@@ -129,7 +129,7 @@ walkdoc(QDomDocument *doc,
return true;
}
-void
+void
splicefunc(void *cbdata,
QDomElement e)
{
@@ -227,7 +227,7 @@ docsplice(QDomDocument *doc,
return walkdoc(doc, &splicefunc, &cbdata, errorMessage);
}
-void
+void
replacefunc(void *cbdata,
QDomElement e)
{
@@ -317,7 +317,7 @@ docreplace(QDomDocument *doc,
return walkdoc(doc, &replacefunc, &cbdata, errorMessage);
}
-void
+void
addfunc(void *cbdata,
QDomElement e)
{
@@ -391,7 +391,7 @@ void
createRegLocalComponent(QDomElement e,
QString dirName,
QString keyPath)
-{
+{
QDomElement nrk = e.ownerDocument().createElement(WIX_TAG_REGKEY);
QDomElement nrv = e.ownerDocument().createElement(WIX_TAG_REGVAL);
nrk.setAttribute(WIX_ATTR_REG_ROOT, "HKCU");
@@ -684,7 +684,7 @@ main(int argc, char *argv[])
}
}
else if (!command.compare("add", Qt::CaseInsensitive)) {
- if (!docadd(&doc, commandargs[i], &errorMessage)) {
+ if (!docadd(&doc, commandargs[i], &errorMessage)) {
error << QString("Unable to process add command '%1': %2\n")
.arg(commandargs[i]).arg(errorMessage);
return 4;
diff --git a/src/torcontrol/AddressMap.cpp b/src/torcontrol/AddressMap.cpp
index 69d0d62..124a7f6 100644
--- a/src/torcontrol/AddressMap.cpp
+++ b/src/torcontrol/AddressMap.cpp
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file AddressMap.cpp
** \brief Stores a list of address mappings and their expiration times
*/
@@ -37,7 +37,7 @@ AddressMap::add(const QString &from, const QString &to,
}
/** Adds a new address mapping by parsing the fields in <b>mapping</b>, which
- * should be formatted as follows:
+ * should be formatted as follows:
*
* Address SP Address SP Expiry
* Expiry = DQUOTE ISOTime DQUOTE / "NEVER"
diff --git a/src/torcontrol/AddressMap.h b/src/torcontrol/AddressMap.h
index 791e964..63c4f4e 100644
--- a/src/torcontrol/AddressMap.h
+++ b/src/torcontrol/AddressMap.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file AddressMap.h
** \brief Stores a list of address mappings and their expiration times
*/
@@ -51,7 +51,7 @@ public:
/** Returns true if the address map table contains a mapping for <b>addr</b>
* that is not expired. */
bool isMapped(const QString &addr) const;
-
+
/** Returns the address to which <b>addr</b> is currently mapped. If there
* is no mapping for <b>addr</b> (or the mapping is expired), then an
* empty string is returned. */
diff --git a/src/torcontrol/BootstrapStatus.cpp b/src/torcontrol/BootstrapStatus.cpp
index fb79eb9..52fead6 100644
--- a/src/torcontrol/BootstrapStatus.cpp
+++ b/src/torcontrol/BootstrapStatus.cpp
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file BootstrapStatus.cpp
** \brief Describes the Tor software's current bootstrapping status
*/
diff --git a/src/torcontrol/BootstrapStatus.h b/src/torcontrol/BootstrapStatus.h
index 7526fdb..1004392 100644
--- a/src/torcontrol/BootstrapStatus.h
+++ b/src/torcontrol/BootstrapStatus.h
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file BootstrapStatus.h
** \brief Describes the Tor software's current bootstrap status
*/
@@ -26,7 +26,7 @@ class BootstrapStatus
{
public:
/** Currently enumerated bootstrapping states defined by Tor's control
- * protocol (Tor >= 0.2.1.0-alpha-dev. */
+ * protocol (Tor >= 0.2.1.0-alpha-dev. */
enum Status {
UnrecognizedStatus,
ConnectingToDirMirror,
@@ -74,7 +74,7 @@ public:
/** Returns a description of Tor's current bootstrapping status. */
QString description() const { return _description; }
-
+
/** Returns a description of the most recent error Tor encountered while
* attempting to bootstrap, if this event's severity is 'warn'. Otherwise,
* this returns a default-constructed QString. */
@@ -87,7 +87,7 @@ public:
tc::ConnectionStatusReason reason() const { return _reason; }
/** Returns the action that the Tor software recommended be taken in
- * response to this bootstrap status event. */
+ * response to this bootstrap status event. */
Recommendation recommendedAction() const { return _action; }
/** Returns true if this object represents a valid bootstrap status
@@ -108,21 +108,21 @@ private:
/** Current bootstrapping status value.
* \sa status
- */
+ */
Status _status;
-
+
/** Approximate percentage of Tor's bootstrapping process that is complete.
* \sa percentComplete
*/
int _percentComplete;
-
+
/** Description of Tor's current bootstrapping status.
* \sa description
*/
QString _description;
-
+
/** Description of the most recent error Tor encountered while attempting to
- * bootstrap.
+ * bootstrap.
* \sa warning
*/
QString _warning;
diff --git a/src/torcontrol/ControlCommand.cpp b/src/torcontrol/ControlCommand.cpp
index 953ee95..4ca9de7 100644
--- a/src/torcontrol/ControlCommand.cpp
+++ b/src/torcontrol/ControlCommand.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -100,13 +100,13 @@ ControlCommand::toString() const
{
int i;
QString str;
-
+
/* If this command contains data, then a "+" is prepended to the keyword */
if (_data.size() > 0) {
str = "+";
}
str += _keyword + " ";
-
+
/* Append all specified arguments separated by a space */
str += _arguments.join(" ");
diff --git a/src/torcontrol/ControlCommand.h b/src/torcontrol/ControlCommand.h
index 42aba88..10c995c 100644
--- a/src/torcontrol/ControlCommand.h
+++ b/src/torcontrol/ControlCommand.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ public:
/** Set the keyword for this control command */
void setKeyword(const QString &keyword);
-
+
/** Add an argument to this control command */
void addArgument(const QString &arg);
/** Adds all arguments in <b>args</b> to this control command. */
@@ -44,7 +44,7 @@ public:
/** Format this control command into a format conforming to Tor's v1
* protocol specification. */
QString toString() const;
-
+
private:
/** Escape special characters in the supplied string */
QString escape(const QString &str) const;
diff --git a/src/torcontrol/ControlConnection.h b/src/torcontrol/ControlConnection.h
index d2d2965..0ce8940 100644
--- a/src/torcontrol/ControlConnection.h
+++ b/src/torcontrol/ControlConnection.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -115,7 +115,7 @@ private:
/** Waits for and gets the reply from a control command. */
bool getResult(ControlReply *reply, QString *errmsg = 0);
/** Sets the result and reply from a control command. */
- void setResult(bool success, const ControlReply &reply,
+ void setResult(bool success, const ControlReply &reply,
const QString &errmsg = QString());
private:
/** Status of the receive waiter. */
diff --git a/src/torcontrol/ControlMethod.cpp b/src/torcontrol/ControlMethod.cpp
index 905bf7c..34e7ac6 100644
--- a/src/torcontrol/ControlMethod.cpp
+++ b/src/torcontrol/ControlMethod.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ ControlMethod::toString(ControlMethod::Method method)
return str;
}
-ControlMethod::Method
+ControlMethod::Method
ControlMethod::fromString(QString method)
{
if(method == QString("ControlPort"))
diff --git a/src/torcontrol/ControlMethod.h b/src/torcontrol/ControlMethod.h
index 3a9fee4..ca5019b 100644
--- a/src/torcontrol/ControlMethod.h
+++ b/src/torcontrol/ControlMethod.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/torcontrol/ControlReply.cpp b/src/torcontrol/ControlReply.cpp
index c0eaf1d..3100f49 100644
--- a/src/torcontrol/ControlReply.cpp
+++ b/src/torcontrol/ControlReply.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/torcontrol/ControlReply.h b/src/torcontrol/ControlReply.h
index c7400f3..09eaffb 100644
--- a/src/torcontrol/ControlReply.h
+++ b/src/torcontrol/ControlReply.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -34,7 +34,7 @@ public:
ReplyLine getLine(int idx = 0) const;
/** Returns all lines for this reply */
QList<ReplyLine> getLines() const;
-
+
/** Returns the status of the first line in the reply */
QString getStatus() const;
/** Returns the messasge of the first line in the reply */
diff --git a/src/torcontrol/ControlSocket.cpp b/src/torcontrol/ControlSocket.cpp
index 6a4d729..fb5daa7 100644
--- a/src/torcontrol/ControlSocket.cpp
+++ b/src/torcontrol/ControlSocket.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -34,7 +34,7 @@ ControlSocket::ControlSocket(ControlMethod::Method method)
case ControlMethod::Port:
_socket = _tcpSocket;
break;
-
+
case ControlMethod::Socket:
_socket = _localSocket;
break;
@@ -43,7 +43,7 @@ ControlSocket::ControlSocket(ControlMethod::Method method)
QObject::connect(_socket, SIGNAL(readyRead()), this, SIGNAL(readyRead()));
QObject::connect(_socket, SIGNAL(disconnected()), this, SIGNAL(disconnected()));
QObject::connect(_socket, SIGNAL(connected()), this, SIGNAL(connected()));
- QObject::connect(_socket, SIGNAL(error(QAbstractSocket::SocketError)),
+ QObject::connect(_socket, SIGNAL(error(QAbstractSocket::SocketError)),
this, SIGNAL(error(QAbstractSocket::SocketError)));
}
@@ -56,7 +56,7 @@ ControlSocket::isConnected()
case ControlMethod::Port:
return (_tcpSocket->isValid() && _tcpSocket->state() == QAbstractSocket::ConnectedState);
break;
-
+
default:
case ControlMethod::Socket:
return (_localSocket->isValid() && _localSocket->state() == QLocalSocket::ConnectedState);
@@ -65,28 +65,28 @@ ControlSocket::isConnected()
}
/** Connects to address:port */
-void
+void
ControlSocket::connectToHost(const QHostAddress &address, quint16 port)
{
_tcpSocket->connectToHost(address, port);
}
/** Disconnects from host */
-void
+void
ControlSocket::disconnectFromHost()
{
_tcpSocket->disconnectFromHost();
}
/** Connects to a unix socket file */
-void
+void
ControlSocket::connectToServer(const QString &name)
{
_localSocket->connectToServer(name);
}
/** Disconnects from the socket */
-void
+void
ControlSocket::disconnectFromServer()
{
_localSocket->disconnectFromServer();
@@ -160,11 +160,11 @@ ControlSocket::customEvent(QEvent *event)
*/
bool
ControlSocket::sendCommand(ControlCommand cmd, QString *errmsg)
-{
+{
if (!isConnected()) {
return err(errmsg, tr("Control socket is not connected."));
}
-
+
/* Format the control command */
QString strCmd = cmd.toString();
tc::debug("Control Command: %1").arg(strCmd.trimmed());
@@ -178,7 +178,7 @@ ControlSocket::sendCommand(ControlCommand cmd, QString *errmsg)
case ControlMethod::Port:
_tcpSocket->flush();
break;
-
+
case ControlMethod::Socket:
_localSocket->flush();
break;
@@ -216,7 +216,7 @@ ControlSocket::readReply(ControlReply &reply, QString *errmsg)
if (!readLine(line, errmsg)) {
return false;
}
-
+
if (line.length() < 4) {
return err(errmsg, tr("Invalid control reply. [%1]").arg(line));
}
diff --git a/src/torcontrol/ControlSocket.h b/src/torcontrol/ControlSocket.h
index 995efeb..27e65b7 100644
--- a/src/torcontrol/ControlSocket.h
+++ b/src/torcontrol/ControlSocket.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -42,7 +42,7 @@ public:
bool isConnected();
/** Interface to each socket's canReadLine implementation */
bool canReadLine();
-
+
void connectToHost(const QHostAddress &address, quint16 port);
/** Disconnects from host */
void disconnectFromHost();
@@ -52,7 +52,7 @@ public:
void disconnectFromServer();
ControlMethod::Method getMethod() { return _method; }
-
+
/** Returns the string description of <b>error</b>. */
static QString toString(const QAbstractSocket::SocketError error);
diff --git a/src/torcontrol/LogEvent.cpp b/src/torcontrol/LogEvent.cpp
index ad4dee4..7e324bb 100644
--- a/src/torcontrol/LogEvent.cpp
+++ b/src/torcontrol/LogEvent.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/torcontrol/LogEvent.h b/src/torcontrol/LogEvent.h
index 7f422e5..38d886c 100644
--- a/src/torcontrol/LogEvent.h
+++ b/src/torcontrol/LogEvent.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -35,7 +35,7 @@ public:
Warn = (1u<<1), /**< Warn level log message. */
Error = (1u<<0) /**< Error level log message. */
};
-
+
/** Default constructor */
LogEvent(Severity severity, QString message);
@@ -45,10 +45,10 @@ public:
static QString severityToString(Severity severity);
/** Returns the severity of this log event */
- Severity severity() const;
+ Severity severity() const;
/** Returns the message for this log event */
QString message() const;
-
+
private:
Severity _severity;
QString _message;
diff --git a/src/torcontrol/ProtocolInfo.cpp b/src/torcontrol/ProtocolInfo.cpp
index 07acaeb..e629852 100644
--- a/src/torcontrol/ProtocolInfo.cpp
+++ b/src/torcontrol/ProtocolInfo.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file ProtocolInfo.cpp
** \brief Container for information in a PROTOCOLINFO reply from Tor
*/
diff --git a/src/torcontrol/ProtocolInfo.h b/src/torcontrol/ProtocolInfo.h
index 1b69589..ce51c7a 100644
--- a/src/torcontrol/ProtocolInfo.h
+++ b/src/torcontrol/ProtocolInfo.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -24,10 +24,10 @@ class ProtocolInfo
public:
/** Default constructor. */
ProtocolInfo() {}
-
+
/** Returns true if this ProtocolInfo object contains no data. */
bool isEmpty() const;
-
+
/** Sets the authentication methods Tor currently accepts. <b>methods</b>
* should be a comma-delimited list of authentication methods. */
void setAuthMethods(const QString methods);
diff --git a/src/torcontrol/ReplyLine.cpp b/src/torcontrol/ReplyLine.cpp
index 2973b9d..369405f 100644
--- a/src/torcontrol/ReplyLine.cpp
+++ b/src/torcontrol/ReplyLine.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file ReplyLine.cpp
** \brief Reply from a previous control command sent to Tor
*/
@@ -29,7 +29,7 @@ ReplyLine::ReplyLine(const QString &status, const QString &msg)
}
/** Constructor */
-ReplyLine::ReplyLine(const QString &status, const QString &msg,
+ReplyLine::ReplyLine(const QString &status, const QString &msg,
const QString &data)
{
_status = status;
diff --git a/src/torcontrol/ReplyLine.h b/src/torcontrol/ReplyLine.h
index c3fec8d..6ef0bea 100644
--- a/src/torcontrol/ReplyLine.h
+++ b/src/torcontrol/ReplyLine.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file ReplyLine.h
** \brief Reply from a previous control command sent to Tor
*/
@@ -40,7 +40,7 @@ public:
void appendData(const QString &data);
/** Returns a QStringList of all data lines for this reply line. */
QStringList getData() const;
- /** Returns true if this reply contained a data portion. */
+ /** Returns true if this reply contained a data portion. */
bool hasData() const { return _data.size() > 0; }
/** Returns the entire contents of this reply line, including the status,
@@ -51,7 +51,7 @@ private:
/** Unescapes special characters in <b>str</b> and returns the unescaped
* result. */
static QString unescape(const QString &escaped);
-
+
QString _status; /**< Response status code. */
QString _message; /**< ReplyText portion of this reply line. */
QStringList _data; /**< Contents of any DataReplyLines in this line. */
diff --git a/src/torcontrol/RouterDescriptor.h b/src/torcontrol/RouterDescriptor.h
index 32dfc36..fdedae4 100644
--- a/src/torcontrol/RouterDescriptor.h
+++ b/src/torcontrol/RouterDescriptor.h
@@ -38,9 +38,9 @@ public:
/** Default constructor. */
RouterDescriptor(bool microdesc = false) : _microdesc(microdesc) {}
- /** Constructor. */
+ /** Constructor. */
RouterDescriptor(QStringList descriptor, bool microdesc = false);
-
+
/** Returns the router's name. */
QString name() const { return _name; }
/** Returns the router's IP address. */
@@ -77,7 +77,7 @@ public:
bool isEmpty() { return (_id.isEmpty() && _name.isEmpty()); }
/** Returns a string representation of the status of this router. */
QString status();
-
+
/** Returns geographic location information for this router. Note that this
* information is NOT part of the Tor directory protocol, but can be
* determined out of band and set using setLocation(). */
diff --git a/src/torcontrol/RouterStatus.cpp b/src/torcontrol/RouterStatus.cpp
index 02f13b5..49e6cb1 100644
--- a/src/torcontrol/RouterStatus.cpp
+++ b/src/torcontrol/RouterStatus.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file RouterStatus.cpp
** \brief Parses a blob of router status text from Tor
*/
diff --git a/src/torcontrol/RouterStatus.h b/src/torcontrol/RouterStatus.h
index cff3b8a..ee136b1 100644
--- a/src/torcontrol/RouterStatus.h
+++ b/src/torcontrol/RouterStatus.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file RouterStatus.h
** \brief Parses a blob of router status text from Tor
*/
@@ -46,7 +46,7 @@ public:
/** Constructor. */
RouterStatus(const QStringList &status);
-
+
/** Returns the router's hexadecimal-encoded router identity key digest. */
QString id() const { return _id; }
/** Returns the router's nickname. */
diff --git a/src/torcontrol/SendCommandEvent.cpp b/src/torcontrol/SendCommandEvent.cpp
index cf66a1a..8ee6c30 100644
--- a/src/torcontrol/SendCommandEvent.cpp
+++ b/src/torcontrol/SendCommandEvent.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -34,7 +34,7 @@ SendCommandEvent::SendWaiter::setResult(bool success, const QString &errmsg)
}
/** Waits for and gets the result of the send operation. */
-bool
+bool
SendCommandEvent::SendWaiter::getResult(QString *errmsg)
{
while(_status == Waiting) {
diff --git a/src/torcontrol/SendCommandEvent.h b/src/torcontrol/SendCommandEvent.h
index 89499f4..5a9df94 100644
--- a/src/torcontrol/SendCommandEvent.h
+++ b/src/torcontrol/SendCommandEvent.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -44,17 +44,17 @@ public:
QWaitCondition _waitCond; /**< Waits for the send to complete. */
QString _errmsg; /**< Error message if the send fails. */
};
-
+
/** Constructor. */
SendCommandEvent(const ControlCommand &cmd, SendWaiter *w = 0);
/** Returns the control command to send to Tor. */
ControlCommand command() { return _cmd; }
/** Returns a SendWaiter (if any) for the result of this send. */
SendWaiter* waiter() { return _waiter; }
-
+
private:
ControlCommand _cmd; /**< Command to send to Tor. */
- SendWaiter* _waiter; /**< SendWaiter for the result of this event. */
+ SendWaiter* _waiter; /**< SendWaiter for the result of this event. */
};
#endif
diff --git a/src/torcontrol/Stream.cpp b/src/torcontrol/Stream.cpp
index e8c2d18..7322d48 100644
--- a/src/torcontrol/Stream.cpp
+++ b/src/torcontrol/Stream.cpp
@@ -1,20 +1,20 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file Stream.cpp
** \brief Object representing a Tor stream
*/
#include "Stream.h"
-#include "Circuit.h"
+#include "Circuit.h"
#include <QStringList>
@@ -50,7 +50,7 @@ Stream::Stream(const StreamId &streamId, Status status,
int i = target.indexOf(":");
if (i >= 0)
_address = target.mid(0, i);
- if (i + 1 < target.length())
+ if (i + 1 < target.length())
_port = target.mid(i+1).toUInt();
}
@@ -63,7 +63,7 @@ Stream
Stream::fromString(const QString &stream)
{
QStringList parts = stream.split(" ", QString::SkipEmptyParts);
- if (parts.size() >= 4) {
+ if (parts.size() >= 4) {
/* Get the stream ID */
StreamId streamId = parts.at(0);
/* Get the stream status value */
@@ -72,7 +72,7 @@ Stream::fromString(const QString &stream)
CircuitId circId = parts.at(2);
/* Get the target address for this stream */
QString target = parts.at(3);
-
+
return Stream(streamId, status, circId, target);
}
return Stream();
@@ -120,7 +120,7 @@ Stream::toStatus(const QString &strStatus)
return Unknown;
}
-/** Returns a human-understandable string representation of this
+/** Returns a human-understandable string representation of this
* stream's status. */
QString
Stream::statusString() const
@@ -128,7 +128,7 @@ Stream::statusString() const
QString status;
switch (_status) {
case New: status = tr("New"); break;
- case NewResolve:
+ case NewResolve:
case SentResolve: status = tr("Resolving"); break;
case SentConnect: status = tr("Connecting"); break;
case Succeeded: status = tr("Open"); break;
@@ -147,7 +147,7 @@ Stream::isValid() const
{
return (isValidStreamId(_streamId)
&& Circuit::isValidCircuitId(_circuitId)
- && (_status != Unknown)
+ && (_status != Unknown)
&& !_address.isEmpty());
}
diff --git a/src/torcontrol/Stream.h b/src/torcontrol/Stream.h
index 3a8d9a6..f688391 100644
--- a/src/torcontrol/Stream.h
+++ b/src/torcontrol/Stream.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file Stream.h
** \brief Object representing a Tor stream
*/
@@ -46,7 +46,7 @@ public:
Detached, /**< Detached from circuit */
Remap /**< Address re-mapped to another */
};
-
+
/** Default constructor */
Stream();
/** Constructor */
@@ -63,7 +63,7 @@ public:
/** Returns true iff the Stream object's fields are all valid. */
bool isValid() const;
-
+
/** Returns the ID for this stream. */
StreamId id() const { return _streamId; }
/** Returns the status for this stream. */
diff --git a/src/torcontrol/TorEvents.cpp b/src/torcontrol/TorEvents.cpp
index 588a093..fba9c52 100644
--- a/src/torcontrol/TorEvents.cpp
+++ b/src/torcontrol/TorEvents.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file TorEvents.cpp
** \brief Parses and dispatches events from Tor
*/
@@ -138,7 +138,7 @@ TorEvents::handleEvent(const ControlReply &reply)
case ServerStatus:
handleStatusEvent(ServerStatus, line); break;
- case LogDebug:
+ case LogDebug:
case LogInfo:
case LogNotice:
case LogWarn:
@@ -163,7 +163,7 @@ TorEvents::handleBandwidthUpdate(const ReplyLine &line)
if (msg.size() >= 3) {
quint64 bytesIn = (quint64)msg.at(1).toULongLong();
quint64 bytesOut = (quint64)msg.at(2).toULongLong();
-
+
/* Post the event to each of the interested targets */
emit bandwidthUpdate(bytesIn, bytesOut);
}
@@ -194,8 +194,8 @@ TorEvents::handleCircuitStatus(const ReplyLine &line)
}
/** Handle a stream status event. The format of this message is:
- *
- * "650" SP "STREAM" SP StreamID SP StreamStatus SP CircID SP Target SP
+ *
+ * "650" SP "STREAM" SP StreamID SP StreamStatus SP CircID SP Target SP
* StreamStatus =
* "NEW" / ; New request to connect
* "NEWRESOLVE" / ; New request to resolve an address
@@ -207,7 +207,7 @@ TorEvents::handleCircuitStatus(const ReplyLine &line)
* "DETACHED" ; Detached from circuit; still retriable.
* Target = Address ":" Port
*
- * If the circuit ID is 0, then the stream is unattached.
+ * If the circuit ID is 0, then the stream is unattached.
*/
void
TorEvents::handleStreamStatus(const ReplyLine &line)
@@ -243,7 +243,7 @@ TorEvents::handleLogMessage(const ReplyLine &line)
/** Handles a new descriptor event. The format for event messages of this type
* is:
- *
+ *
* "650" SP "NEWDESC" 1*(SP ServerID)
*/
void
@@ -294,7 +294,7 @@ TorEvents::handleStatusEvent(Event e, const ReplyLine &line)
tc::Severity severity;
QHash<QString,QString> args;
QString msg = line.getMessage();
-
+
severity = tc::severityFromString(msg.section(' ', 1, 1));
status = msg.section(' ', 2, 2);
args = string_parse_keyvals(msg.section(' ', 3));
diff --git a/src/torcontrol/TorEvents.h b/src/torcontrol/TorEvents.h
index 58584ee..ccc01e0 100644
--- a/src/torcontrol/TorEvents.h
+++ b/src/torcontrol/TorEvents.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -145,7 +145,7 @@ signals:
/** Emitted when Tor decides the client's external IP address has changed
* to <b>ip</b>. If <b>hostname</b> is non-empty, Tor obtained the new
- * value for <b>ip</b> by resolving <b>hostname</b>.
+ * value for <b>ip</b> by resolving <b>hostname</b>.
*/
void externalAddressChanged(const QHostAddress &ip, const QString &hostname);
@@ -165,7 +165,7 @@ signals:
*/
void dnsUseless();
- /** Indicates Tor has started testing the reachability of its OR port
+ /** Indicates Tor has started testing the reachability of its OR port
* using the IP address <b>ip</b> and port <b>port</b>.
*/
void checkingOrPortReachability(const QHostAddress &ip, quint16 port);
@@ -216,7 +216,7 @@ private:
* pair. If either portion is invalid, a default-constructed QPair() is
* returned. */
static QPair<QHostAddress,quint16> splitAddress(const QString &address);
-
+
/** Handle a bandwidth update event */
void handleBandwidthUpdate(const ReplyLine &line);
/** Handle a circuit status event */
diff --git a/src/torcontrol/TorProcess.h b/src/torcontrol/TorProcess.h
index 8438173..0448b5a 100644
--- a/src/torcontrol/TorProcess.h
+++ b/src/torcontrol/TorProcess.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file TorProcess.h
** \brief Starts and stops a Tor process
*/
@@ -50,7 +50,7 @@ signals:
/** Emitted when Tor fails to start, perhaps because the path to Tor was
* bogus. */
void startFailed(const QString &errorMessage);
-
+
private slots:
/** Called when there is data to be read from stdout */
void onReadyRead();
diff --git a/src/torcontrol/TorService.cpp b/src/torcontrol/TorService.cpp
index 7214183..7e16f4d 100644
--- a/src/torcontrol/TorService.cpp
+++ b/src/torcontrol/TorService.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file TorService.cpp
** \brief Starts, stops, installs, and uninstalls a Tor service (Win32).
*/
@@ -23,7 +23,7 @@
#define UNKNOWN_EXIT_CODE -999999
/** List of dynamically loaded NT service functions. */
-ServiceFunctions TorService::_service_fns =
+ServiceFunctions TorService::_service_fns =
{ false,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL
@@ -91,8 +91,8 @@ TorService::openService()
return NULL;
if (!_scm)
return NULL;
- return _service_fns.OpenServiceA(_scm,
- (LPCTSTR)TOR_SERVICE_NAME,
+ return _service_fns.OpenServiceA(_scm,
+ (LPCTSTR)TOR_SERVICE_NAME,
TOR_SERVICE_ACCESS);
}
@@ -204,7 +204,7 @@ TorService::exitCode()
{
SC_HANDLE service;
int exitCode = UNKNOWN_EXIT_CODE;
-
+
service = openService();
if (service) {
SERVICE_STATUS s;
@@ -224,7 +224,7 @@ TorService::exitCode()
QProcess::ExitStatus
TorService::exitStatus()
{
- /* NT services don't really have an equivalent to QProcess::CrashExit, so
+ /* NT services don't really have an equivalent to QProcess::CrashExit, so
* this just returns QProcess::NormalExit. Tor _could_ set
* dwServiceSpecificExitCode to some magic value when it starts and then
* set it to the real exit code when Tor exits. Then we would know if the
@@ -240,10 +240,10 @@ TorService::install(const QString &torPath, const QString &torrc,
quint16 controlPort)
{
SC_HANDLE service;
-
+
if (!_scm)
return false;
-
+
service = openService();
if (!service) {
QString command = QString("\"%1\" --nt-service -f \"%2\" ControlPort %3")
@@ -253,11 +253,11 @@ TorService::install(const QString &torPath, const QString &torrc,
tc::debug("Installing the Tor service using the command line '%1'")
.arg(command);
- service = _service_fns.CreateServiceA(_scm,
+ service = _service_fns.CreateServiceA(_scm,
(LPCTSTR)TOR_SERVICE_NAME, (LPCTSTR)TOR_SERVICE_DISP,
TOR_SERVICE_ACCESS, SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START, SERVICE_ERROR_IGNORE,
- (LPCTSTR)command.toAscii().data(), NULL, NULL, NULL,
+ (LPCTSTR)command.toAscii().data(), NULL, NULL, NULL,
NULL, NULL);
if (!service) {
/* XXX This needs an actual reason message. */
@@ -267,7 +267,7 @@ TorService::install(const QString &torPath, const QString &torrc,
SERVICE_DESCRIPTION desc;
desc.lpDescription = TOR_SERVICE_DESC;
- _service_fns.ChangeServiceConfig2A(service,
+ _service_fns.ChangeServiceConfig2A(service,
SERVICE_CONFIG_DESCRIPTION, &desc);
closeHandle(service);
}
@@ -302,7 +302,7 @@ TorService::status()
SC_HANDLE service;
SERVICE_STATUS s;
DWORD stat = SERVICE_ERROR;
-
+
service = openService();
if (service && _service_fns.QueryServiceStatus(service, &s))
stat = s.dwCurrentState;
diff --git a/src/torcontrol/TorService.h b/src/torcontrol/TorService.h
index 8c4fad0..f36822f 100644
--- a/src/torcontrol/TorService.h
+++ b/src/torcontrol/TorService.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file torservice.h
** \brief Starts, stops, installs, and uninstalls a Tor service (Win32).
*/
@@ -139,9 +139,9 @@ private:
/** Closes the service <b>handle</b>. */
static void closeHandle(SC_HANDLE handle);
/** Gets the status of the Tor service. */
- DWORD status();
+ DWORD status();
- /** Handle to the service control manager. */
+ /** Handle to the service control manager. */
SC_HANDLE _scm;
/** List of dynamically loaded NT service functions. */
static ServiceFunctions _service_fns;
diff --git a/src/torcontrol/TorSignal.cpp b/src/torcontrol/TorSignal.cpp
index bdf10ad..65bd937 100644
--- a/src/torcontrol/TorSignal.cpp
+++ b/src/torcontrol/TorSignal.cpp
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/torcontrol/TorSignal.h b/src/torcontrol/TorSignal.h
index af0769f..1ab8978 100644
--- a/src/torcontrol/TorSignal.h
+++ b/src/torcontrol/TorSignal.h
@@ -1,10 +1,10 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,7 +31,7 @@ public:
Halt, /**< SIGTERM: Immediate shutdown */
NewNym /**< NEWNYM: Switch to all new clean circuits */
};
-
+
/** Returns a string representation of a signal that Tor understands. */
static QString toString(Signal signal);
};
diff --git a/src/torcontrol/tcglobal.cpp b/src/torcontrol/tcglobal.cpp
index ffbbbfc..4cbb75a 100644
--- a/src/torcontrol/tcglobal.cpp
+++ b/src/torcontrol/tcglobal.cpp
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file tcglobal.cpp
** \brief Provides common methods and constants used by the torcontrol library
*/
diff --git a/src/torcontrol/tcglobal.h b/src/torcontrol/tcglobal.h
index 6c12019..1fdf998 100644
--- a/src/torcontrol/tcglobal.h
+++ b/src/torcontrol/tcglobal.h
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file tcglobal.h
** \brief Provides common methods and constants used by the torcontrol library
*/
@@ -45,7 +45,7 @@ namespace tc {
}
}
- inline DebugMessage arg(const QString &a)
+ inline DebugMessage arg(const QString &a)
{ stream->buf = stream->buf.arg(a); return *this; }
inline DebugMessage arg(int a)
{ stream->buf = stream->buf.arg(a); return *this; }
diff --git a/src/vidalia/ControlPasswordInputDialog.cpp b/src/vidalia/ControlPasswordInputDialog.cpp
index 9fe3eee..efa4934 100644
--- a/src/vidalia/ControlPasswordInputDialog.cpp
+++ b/src/vidalia/ControlPasswordInputDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/ControlPasswordInputDialog.h b/src/vidalia/ControlPasswordInputDialog.h
index b7fa313..584806a 100644
--- a/src/vidalia/ControlPasswordInputDialog.h
+++ b/src/vidalia/ControlPasswordInputDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/CrashReporter.cpp b/src/vidalia/CrashReporter.cpp
index d085dda..5f4d81b 100644
--- a/src/vidalia/CrashReporter.cpp
+++ b/src/vidalia/CrashReporter.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
@@ -139,7 +139,7 @@ static char restartExecutableArgs[MAX_CMD_LEN + 1] = "";
static time_t startupTime = 0;
-/** Slightly modified version of the strlcat() implementation by Todd C.
+/** Slightly modified version of the strlcat() implementation by Todd C.
* Miller (see the top of this file or the LICENSE file for license details),
* that supports arguments of either wchar_t* on Windows or the usual char*
* everywhere else but retains the semantics of strlcat().
@@ -234,7 +234,7 @@ write_extra_dump_info(const _char_t *path, const _char_t *id, time_t crashTime)
return false;
}
#endif
-
+
char crashTimeString[24], startupTimeString[24];
TIME_TO_STRING(crashTimeString, 24, crashTime);
TIME_TO_STRING(startupTimeString, 24, startupTime);
diff --git a/src/vidalia/CrashReporter.h b/src/vidalia/CrashReporter.h
index fbbea94..83295e5 100644
--- a/src/vidalia/CrashReporter.h
+++ b/src/vidalia/CrashReporter.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/HelperProcess.cpp b/src/vidalia/HelperProcess.cpp
index b80f151..28cce18 100644
--- a/src/vidalia/HelperProcess.cpp
+++ b/src/vidalia/HelperProcess.cpp
@@ -3,17 +3,17 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
-** This file was originally written by Steven J. Murdoch, and
+** This file was originally written by Steven J. Murdoch, and
** modified by Matt Edman. It is distributed under the following
** license:
**
** Copyright (C) 2007, Matt Edman
-** Copyright (C) 2007, Steven J. Murdoch
+** Copyright (C) 2007, Steven J. Murdoch
** <http://www.cl.cam.ac.uk/users/sjm217/>
**
** This program is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
-** Foundation, Inc., 51 Franklin Street, Fifth Floor,
+** Foundation, Inc., 51 Franklin Street, Fifth Floor,
** Boston, MA 02110-1301, USA.
*/
@@ -45,9 +45,9 @@
#include <QString>
#include <QFileInfo>
-#ifdef Q_WS_MAC
-#include <Carbon/Carbon.h>
-#endif
+#ifdef Q_WS_MAC
+#include <Carbon/Carbon.h>
+#endif
/** Default constructor */
HelperProcess::HelperProcess(QObject *parent)
@@ -101,7 +101,7 @@ HelperProcess::start(const QString &app, const QString &args)
/** Start the specified application. */
void
-HelperProcess::start(const QString &app, const QStringList &args)
+HelperProcess::start(const QString &app, const QStringList &args)
{
// Remember the executable name of the process
QFileInfo fi(app);
@@ -137,7 +137,7 @@ HelperProcess::isDone() const
void
HelperProcess::toForeground()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_WS_MAC)
ProcessSerialNumber psn;
OSStatus st;
@@ -146,5 +146,5 @@ HelperProcess::toForeground()
} while(st == -600);
SetFrontProcess(&psn);
-#endif
+#endif
}
diff --git a/src/vidalia/HelperProcess.h b/src/vidalia/HelperProcess.h
index 62aef98..58027f6 100644
--- a/src/vidalia/HelperProcess.h
+++ b/src/vidalia/HelperProcess.h
@@ -3,17 +3,17 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
-** This file was originally written by Steven J. Murdoch, and
+** This file was originally written by Steven J. Murdoch, and
** modified by Matt Edman. It is distributed under the following
** license:
**
** Copyright (C) 2007, Matt Edman
-** Copyright (C) 2007, Steven J. Murdoch
+** Copyright (C) 2007, Steven J. Murdoch
** <http://www.cl.cam.ac.uk/users/sjm217/>
**
** This program is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
-** Foundation, Inc., 51 Franklin Street, Fifth Floor,
+** Foundation, Inc., 51 Franklin Street, Fifth Floor,
** Boston, MA 02110-1301, USA.
*/
@@ -64,7 +64,7 @@ public:
signals:
/** Invoked when start() fails. */
void startFailed(const QString &errorMessage);
-
+
private slots:
/** Invoked when underlying QProcess fails. */
void onError(QProcess::ProcessError error);
diff --git a/src/vidalia/LanguageSupport.cpp b/src/vidalia/LanguageSupport.cpp
index 7433514..08b814f 100644
--- a/src/vidalia/LanguageSupport.cpp
+++ b/src/vidalia/LanguageSupport.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -33,16 +33,16 @@ LanguageSupport::languages()
// QString::fromUtf8("\320\221\321\212\320\273\320\263\320"
// "\260\321\200\321\201\320\272\320\270"));
languages.insert("my", "Burmese");
-// languages.insert("cs",
+// languages.insert("cs",
// QString::fromUtf8("\304\215e\305\241tina"));
languages.insert("da", "dansk");
languages.insert("de", "Deutsch");
- languages.insert("es",
+ languages.insert("es",
QString::fromUtf8("espa\303\261ol"));
languages.insert("fa",
QString::fromUtf8("\331\201\330\247\330\261\330\263\333\214"));
languages.insert("fi", "suomi");
- languages.insert("fr",
+ languages.insert("fr",
QString::fromUtf8("fran\303\247ais"));
// languages.insert("he",
// QString::fromUtf8("\327\242\327\221\327\250\327\231\327\252"));
@@ -50,13 +50,13 @@ LanguageSupport::languages()
languages.insert("it", "Italiano");
languages.insert("ja",
QString::fromUtf8("\346\227\245\346\234\254\350\252\236"));
- languages.insert("nb",
+ languages.insert("nb",
QString::fromUtf8("Bokm\303\245l"));
// languages.insert("nl", "Nederlands");
languages.insert("pl", "Polski");
- languages.insert("pt",
+ languages.insert("pt",
QString::fromUtf8("Portugu\303\252s"));
- languages.insert("pt",
+ languages.insert("pt",
QString::fromUtf8("Portugu\303\252s brasileiro"));
languages.insert("ro",
QString::fromUtf8("rom\303\242n\304\203"));
@@ -68,9 +68,9 @@ LanguageSupport::languages()
languages.insert("tr", QString::fromUtf8("T\303\274rk\303\247e"));
languages.insert("vi",
QString::fromUtf8("ti\341\272\277ng Vi\341\273\207t"));
- languages.insert("zh_CN",
+ languages.insert("zh_CN",
QString::fromUtf8("\347\256\200\344\275\223\345\255\227"));
- languages.insert("zh_TW",
+ languages.insert("zh_TW",
QString::fromUtf8("\347\260\241\351\253\224\345\255\227"));
}
return languages;
@@ -86,7 +86,7 @@ LanguageSupport::defaultLanguageCode()
language = language.mid(0, language.indexOf("_"));
if (!isValidLanguageCode(language))
language = "en";
-
+
return language;
}
diff --git a/src/vidalia/LanguageSupport.h b/src/vidalia/LanguageSupport.h
index 7953314..5147c40 100644
--- a/src/vidalia/LanguageSupport.h
+++ b/src/vidalia/LanguageSupport.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/PackageInfo.cpp b/src/vidalia/PackageInfo.cpp
index d99d701..5c68f1c 100644
--- a/src/vidalia/PackageInfo.cpp
+++ b/src/vidalia/PackageInfo.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/PackageInfo.h b/src/vidalia/PackageInfo.h
index 41a98d3..4b115c4 100644
--- a/src/vidalia/PackageInfo.h
+++ b/src/vidalia/PackageInfo.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -70,7 +70,7 @@ public:
* the language <b>lang</b>.
*/
void setShortDescription(const QString &lang, const QString &desc);
-
+
/** Returns true if there is a short description of this software package
* currently set for language <b>lang</b>.
*/
diff --git a/src/vidalia/StatusTab.cpp b/src/vidalia/StatusTab.cpp
index f32924b..c53b8f9 100644
--- a/src/vidalia/StatusTab.cpp
+++ b/src/vidalia/StatusTab.cpp
@@ -19,59 +19,59 @@ StatusTab::~StatusTab()
}
-void
+void
StatusTab::setTorStatus(const QString &text)
{
ui.lblTorStatus->setText(text);
}
-void
+void
StatusTab::setTorStatus(const QPixmap &icon)
{
ui.lblTorStatusImg->setPixmap(icon);
}
-void
+void
StatusTab::setTorStatus(const QPixmap &icon, const QString &text)
{
ui.lblTorStatusImg->setPixmap(icon);
ui.lblTorStatus->setText(text);
}
-void
+void
StatusTab::setTorStatusVisible(bool visible)
{
ui.lblTorStatusImg->setVisible(visible);
ui.lblTorStatus->setVisible(visible);
}
-void
+void
StatusTab::setProgress(int progress, const QString &description)
{
ui.progressBar->setValue(progress);
ui.lblStartupProgress->setText(description);
}
-void
+void
StatusTab::setProgressVisible(bool visible)
{
ui.progressBar->setVisible(visible);
ui.lblStartupProgress->setVisible(visible);
}
-bool
+bool
StatusTab::isCheckedShowOnStartup()
{
return ui.chkShowOnStartup->isChecked();
}
-void
+void
StatusTab::checkShowOnStartup(bool check)
{
ui.chkShowOnStartup->setChecked(check);
}
-void
+void
StatusTab::hideCheckShowOnStartup()
{
ui.chkShowOnStartup->hide();
diff --git a/src/vidalia/UpdateProcess.cpp b/src/vidalia/UpdateProcess.cpp
index e930ac4..da3b1e8 100644
--- a/src/vidalia/UpdateProcess.cpp
+++ b/src/vidalia/UpdateProcess.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -143,7 +143,7 @@ UpdateProcess::readStandardError()
_packageList << pkgInfo;
}
} else if (_currentCommand == CheckForUpdates
- && ! type.compare("DEBUG")
+ && ! type.compare("DEBUG")
&& args.value("msg").startsWith("Got ")) {
/* XXX: This is an even worse fucking kludge. Thandy only reports
* download progress in a not-so-parser-friendly log message,
diff --git a/src/vidalia/UpdateProcess.h b/src/vidalia/UpdateProcess.h
index 0224d55..44acdbf 100644
--- a/src/vidalia/UpdateProcess.h
+++ b/src/vidalia/UpdateProcess.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/UpdateProgressDialog.cpp b/src/vidalia/UpdateProgressDialog.cpp
index e7b1753..bcd9d9e 100644
--- a/src/vidalia/UpdateProgressDialog.cpp
+++ b/src/vidalia/UpdateProgressDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/UpdateProgressDialog.h b/src/vidalia/UpdateProgressDialog.h
index 67a169a..aaad193 100644
--- a/src/vidalia/UpdateProgressDialog.h
+++ b/src/vidalia/UpdateProgressDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/UpdatesAvailableDialog.cpp b/src/vidalia/UpdatesAvailableDialog.cpp
index 90456d3..1d52949 100644
--- a/src/vidalia/UpdatesAvailableDialog.cpp
+++ b/src/vidalia/UpdatesAvailableDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -53,7 +53,7 @@ UpdatesAvailableDialog::loadPackagesTable(const PackageList &packageList)
int row = 0;
QString language;
QTreeWidgetItem *item;
-
+
language = Vidalia::language();
foreach (PackageInfo package, packageList) {
@@ -77,7 +77,7 @@ UpdatesAvailableDialog::loadPackagesTable(const PackageList &packageList)
void
UpdatesAvailableDialog::currentItemChanged(QTreeWidgetItem *current,
QTreeWidgetItem *previous)
-{
+{
Q_UNUSED(previous);
ui.textDetails->clear();
diff --git a/src/vidalia/UpdatesAvailableDialog.h b/src/vidalia/UpdatesAvailableDialog.h
index 6bf049f..fec2604 100644
--- a/src/vidalia/UpdatesAvailableDialog.h
+++ b/src/vidalia/UpdatesAvailableDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/VAttachButton.cpp b/src/vidalia/VAttachButton.cpp
index e8496f2..66ccad2 100644
--- a/src/vidalia/VAttachButton.cpp
+++ b/src/vidalia/VAttachButton.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ VAttachButton::~VAttachButton()
disconnect(this,0,0,0);
}
-void
+void
VAttachButton::setTab(VidaliaTab *tab)
{
_tab = tab;
@@ -45,7 +45,7 @@ VAttachButton::getTab()
return _tab;
}
-void
+void
VAttachButton::toggleAttach()
{
if(_attached) {
diff --git a/src/vidalia/VAttachButton.h b/src/vidalia/VAttachButton.h
index 038eef9..c1d220d 100644
--- a/src/vidalia/VAttachButton.h
+++ b/src/vidalia/VAttachButton.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/VMessageBox.cpp b/src/vidalia/VMessageBox.cpp
index 1600bc3..786f026 100644
--- a/src/vidalia/VMessageBox.cpp
+++ b/src/vidalia/VMessageBox.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -107,10 +107,10 @@ VMessageBox::critical(QWidget *parent, QString caption, QString text,
int button0, int button1, int button2)
{
int ret = QMessageBox::critical(parent, caption, p(text),
- VMessageBox::buttonText(button0),
- VMessageBox::buttonText(button1),
+ VMessageBox::buttonText(button0),
+ VMessageBox::buttonText(button1),
VMessageBox::buttonText(button2),
- VMessageBox::defaultButton(button0, button1, button2),
+ VMessageBox::defaultButton(button0, button1, button2),
VMessageBox::escapeButton(button0, button1, button2));
return VMessageBox::selected(ret, button0, button1, button2);
}
@@ -121,7 +121,7 @@ VMessageBox::critical(QWidget *parent, QString caption, QString text,
* QMessageBox::Escape, respectively. */
int
VMessageBox::question(QWidget *parent, QString caption, QString text,
- int button0, int button1, int button2,
+ int button0, int button1, int button2,
QString remember, VSettings *settings, QString key)
{
VMessageBox messageBox(parent);
@@ -149,8 +149,8 @@ VMessageBox::question(QWidget *parent, QString caption, QString text,
const QList<QAbstractButton *> &buttonList = messageBox.buttons();
messageBox.setDefaultButton(qobject_cast<QPushButton *>(buttonList
- .value(VMessageBox::defaultButton(button0,
- button1,
+ .value(VMessageBox::defaultButton(button0,
+ button1,
button2))));
messageBox.setEscapeButton(buttonList.value(VMessageBox::escapeButton(button0, button1, button2)));
int ret = messageBox.exec();
@@ -171,10 +171,10 @@ VMessageBox::information(QWidget *parent, QString caption, QString text,
int button0, int button1, int button2)
{
int ret = QMessageBox::information(parent, caption, p(text),
- VMessageBox::buttonText(button0),
- VMessageBox::buttonText(button1),
+ VMessageBox::buttonText(button0),
+ VMessageBox::buttonText(button1),
VMessageBox::buttonText(button2),
- VMessageBox::defaultButton(button0, button1, button2),
+ VMessageBox::defaultButton(button0, button1, button2),
VMessageBox::escapeButton(button0, button1, button2));
return VMessageBox::selected(ret, button0, button1, button2);
}
@@ -188,10 +188,10 @@ VMessageBox::warning(QWidget *parent, QString caption, QString text,
int button0, int button1, int button2)
{
int ret = QMessageBox::warning(parent, caption, p(text),
- VMessageBox::buttonText(button0),
- VMessageBox::buttonText(button1),
+ VMessageBox::buttonText(button0),
+ VMessageBox::buttonText(button1),
VMessageBox::buttonText(button2),
- VMessageBox::defaultButton(button0, button1, button2),
+ VMessageBox::defaultButton(button0, button1, button2),
VMessageBox::escapeButton(button0, button1, button2));
return VMessageBox::selected(ret, button0, button1, button2);
}
diff --git a/src/vidalia/VMessageBox.h b/src/vidalia/VMessageBox.h
index 0dd3fe5..1a4da6e 100644
--- a/src/vidalia/VMessageBox.h
+++ b/src/vidalia/VMessageBox.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -42,7 +42,7 @@ public:
Quit,
Browse
};
-
+
/** Default constructor. */
VMessageBox(QWidget *parent = 0);
@@ -51,15 +51,15 @@ public:
* button, OR the Button enum value with QMessageBox::Default or
* QMessageBox::Escape, respectively. */
static int critical(QWidget *parent, QString caption, QString text,
- int button0, int button1 = NoButton,
+ int button0, int button1 = NoButton,
int button2 = NoButton);
-
+
/** Displays an information message box with the given caption, message text,
* and visible buttons. To specify a button as a default button or an escape
* button, OR the Button enum value with QMessageBox::Default or
* QMessageBox::Escape, respectively. */
static int information(QWidget *parent, QString caption, QString text,
- int button0, int button1 = NoButton,
+ int button0, int button1 = NoButton,
int button2 = NoButton);
/** Displays a warning message box with the given caption, message text, and
@@ -67,7 +67,7 @@ public:
* button, OR the Button enum value with QMessageBox::Default or
* QMessageBox::Escape, respectively. */
static int warning(QWidget *parent, QString caption, QString text,
- int button0, int button1 = NoButton,
+ int button0, int button1 = NoButton,
int button2 = NoButton);
/** Displays a warning message box with the given caption, message text, and
@@ -75,14 +75,14 @@ public:
* button, OR the Button enum value with QMessageBox::Default or
* QMessageBox::Escape, respectively. */
static int question(QWidget *parent, QString caption, QString text,
- int button0, int button1 = NoButton,
+ int button0, int button1 = NoButton,
int button2 = NoButton,
- QString remember = QString(), VSettings *settings = 0,
+ QString remember = QString(), VSettings *settings = 0,
QString key = QString());
-
+
/** Converts a Button enum value to a translated string. */
static QString buttonText(int button);
-
+
private:
/** Returns the button (0, 1, or 2) that is OR-ed with QMessageBox::Default,
* or 0 if none are. */
diff --git a/src/vidalia/VTabWidget.cpp b/src/vidalia/VTabWidget.cpp
index 1510549..0012852 100644
--- a/src/vidalia/VTabWidget.cpp
+++ b/src/vidalia/VTabWidget.cpp
@@ -50,7 +50,7 @@ VTabWidget::retranslateUi()
}
}
-void
+void
VTabWidget::setTabButton(int pos, QTabBar::ButtonPosition butpos, QWidget *w)
{
tabBar()->setTabButton(pos, butpos, w);
diff --git a/src/vidalia/Vidalia.cpp b/src/vidalia/Vidalia.cpp
index a053e6f..f59705f 100644
--- a/src/vidalia/Vidalia.cpp
+++ b/src/vidalia/Vidalia.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -116,7 +116,7 @@ Vidalia::Vidalia(QStringList args, int &argc, char **argv)
if (!_args.contains(ARG_LOGFILE))
_log.open(stdout);
}
- if (!_args.contains(ARG_LOGLEVEL) &&
+ if (!_args.contains(ARG_LOGLEVEL) &&
!_args.contains(ARG_LOGFILE))
_log.setLogLevel(Log::Off);
@@ -141,7 +141,7 @@ Vidalia::Vidalia(QStringList args, int &argc, char **argv)
Marble::MarbleDirs::setMarbleDataPath(dataDirectory());
#ifdef Q_OS_WIN32
- Marble::MarbleDirs::setMarblePluginPath(vApp->applicationDirPath()
+ Marble::MarbleDirs::setMarblePluginPath(vApp->applicationDirPath()
+ "/plugins/marble");
#endif
#endif
@@ -204,7 +204,7 @@ Vidalia::showUsageMessageBox()
out << "Available Options:" << endl;
out << "<table>";
- out << trow(tcol("-"ARG_HELP) +
+ out << trow(tcol("-"ARG_HELP) +
tcol(tr("Displays this usage message and exits.")));
out << trow(tcol("-"ARG_RESET) +
tcol(tr("Resets ALL stored Vidalia settings.")));
@@ -220,12 +220,12 @@ Vidalia::showUsageMessageBox()
out << trow(tcol("-"ARG_GUISTYLE" <style>") +
tcol(tr("Sets Vidalia's interface style.") +
"<br>[" + QStyleFactory::keys().join("|") + "]"));
- out << trow(tcol("-"ARG_LANGUAGE" <language>") +
+ out << trow(tcol("-"ARG_LANGUAGE" <language>") +
tcol(tr("Sets Vidalia's language.") +
"<br>[" + LanguageSupport::languageCodes().join("|") + "]"));
out << "</table>";
- VMessageBox::information(0,
+ VMessageBox::information(0,
tr("Vidalia Usage Information"), usage, VMessageBox::Ok);
}
@@ -500,7 +500,7 @@ Vidalia::copyDefaultSettingsFile() const
CFStringRef pathRef;
const char *path;
- confUrlRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
+ confUrlRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
CFSTR("vidalia"), CFSTR("conf"), NULL);
if (confUrlRef == NULL)
return;
diff --git a/src/vidalia/Vidalia.h b/src/vidalia/Vidalia.h
index 0a2ab7c..98a7341 100644
--- a/src/vidalia/Vidalia.h
+++ b/src/vidalia/Vidalia.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -60,12 +60,12 @@ public:
static void showUsageMessageBox();
/** Returns true if the user wants to see usage information. */
static bool showUsage();
-
+
/** Sets the current language. */
static bool setLanguage(QString languageCode = QString());
/** Sets the current GUI style. */
static bool setStyle(QString styleKey = QString());
-
+
/** Returns the current language. */
static QString language() { return _language; }
/** Returns the current GUI style. */
@@ -78,12 +78,12 @@ public:
/** Returns Vidalia's main TorControl object. */
static Torrc* torrc() { return _torrc; }
-
+
/** Returns the location Vidalia uses for its data files. */
static QString dataDirectory();
/** Returns the default location of Vidalia's data directory. */
static QString defaultDataDirectory();
-
+
/** Returns the location of Vidalia's pid file. */
static QString pidFile();
@@ -93,7 +93,7 @@ public:
/** Writes <b>msg</b> with severity <b>level</b> to Vidalia's log. */
static Log::LogMessage log(Log::LogLevel level, QString msg);
-
+
/** Enters the main event loop and waits until exit() is called. The signal
* running() will be emitted when the event loop has started. */
static int run();
@@ -118,7 +118,7 @@ public:
signals:
/** Emitted when the application is running and the main event loop has
- * started. */
+ * started. */
void running();
protected:
@@ -135,9 +135,9 @@ private slots:
* will emit the running() signal to indicate that the application's event
* loop is running. */
void onEventLoopStarted();
-
+
private:
- /** Catches debugging messages from Qt and sends them to
+ /** Catches debugging messages from Qt and sends them to
* Vidalia's logs. */
static void qt_msg_handler(QtMsgType type, const char *msg);
diff --git a/src/vidalia/VidaliaTab.cpp b/src/vidalia/VidaliaTab.cpp
index ee2da03..67bbf0e 100644
--- a/src/vidalia/VidaliaTab.cpp
+++ b/src/vidalia/VidaliaTab.cpp
@@ -59,13 +59,13 @@ VidaliaTab::retranslateUi()
/* The default retranslateUi() implementation does nothing */
}
-void
+void
VidaliaTab::setOnTop(bool top)
{
_onTop = top;
}
-void
+void
VidaliaTab::closeEvent(QCloseEvent *event)
{
event->ignore();
diff --git a/src/vidalia/VidaliaWindow.cpp b/src/vidalia/VidaliaWindow.cpp
index 446802c..792968a 100644
--- a/src/vidalia/VidaliaWindow.cpp
+++ b/src/vidalia/VidaliaWindow.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,7 +31,7 @@ VidaliaWindow::VidaliaWindow(const QString &name, QWidget *parent,
{
_name = name;
_settings = new VSettings(name);
-}
+}
/** Destructor. */
VidaliaWindow::~VidaliaWindow()
@@ -103,7 +103,7 @@ VidaliaWindow::saveSetting(QString prop, QVariant value)
}
/** Overloaded QWidget::setVisible(). If this window is already visible and
- * <b>visible</b> is true, this window will be brought to the top and given
+ * <b>visible</b> is true, this window will be brought to the top and given
* focus. If <b>visible</b> is false, then the window state will be saved and
* this window will be hidden. */
void
diff --git a/src/vidalia/VidaliaWindow.h b/src/vidalia/VidaliaWindow.h
index b844afc..1529c5f 100644
--- a/src/vidalia/VidaliaWindow.h
+++ b/src/vidalia/VidaliaWindow.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -34,7 +34,7 @@ public:
Qt::WFlags flags = 0);
/** Destructor. */
~VidaliaWindow();
-
+
/** Associates a shortcut key sequence with a slot. */
void setShortcut(const QString &shortcut, const char *slot);
/** Saves the size and location of the window. */
@@ -59,7 +59,7 @@ protected:
public slots:
/** Shows or hides this window. */
virtual void setVisible(bool visible);
- /** Show this window. This method really just exists for subclasses to
+ /** Show this window. This method really just exists for subclasses to
* override, since QMainWindow::show() is non-virtual. */
virtual void showWindow() { QMainWindow::show(); }
diff --git a/src/vidalia/about/AboutDialog.cpp b/src/vidalia/about/AboutDialog.cpp
index 8188ec1..cd28368 100644
--- a/src/vidalia/about/AboutDialog.cpp
+++ b/src/vidalia/about/AboutDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags)
QPushButton *licenseButton;
licenseButton = ui.buttonBox->addButton(tr("License"),
QDialogButtonBox::ActionRole);
-
+
/* Get Vidalia's version number */
ui.lblVidaliaVersion->setText(QString("Vidalia %1").arg(Vidalia::version()));
@@ -50,7 +50,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags)
/* Get Qt's version number */
ui.lblQtVersion->setText(QString("Qt %1").arg(QT_VERSION_STR));
- /* Display the license information dialog when the "License" button
+ /* Display the license information dialog when the "License" button
* is clicked. */
connect(licenseButton, SIGNAL(clicked()),
new LicenseDialog(this), SLOT(exec()));
diff --git a/src/vidalia/about/AboutDialog.h b/src/vidalia/about/AboutDialog.h
index d3e3f4e..d1ed5ee 100644
--- a/src/vidalia/about/AboutDialog.h
+++ b/src/vidalia/about/AboutDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/about/LicenseDialog.cpp b/src/vidalia/about/LicenseDialog.cpp
index 01653cf..8795c8f 100644
--- a/src/vidalia/about/LicenseDialog.cpp
+++ b/src/vidalia/about/LicenseDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/about/LicenseDialog.h b/src/vidalia/about/LicenseDialog.h
index c090ba1..faf1199 100644
--- a/src/vidalia/about/LicenseDialog.h
+++ b/src/vidalia/about/LicenseDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/bwgraph/BandwidthGraph.cpp b/src/vidalia/bwgraph/BandwidthGraph.cpp
index 7ea82de..71f6f15 100644
--- a/src/vidalia/bwgraph/BandwidthGraph.cpp
+++ b/src/vidalia/bwgraph/BandwidthGraph.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -71,7 +71,7 @@ BandwidthGraph::BandwidthGraph(QStatusBar *st, QWidget *parent)
ui.frmOpacity->setVisible(false);
}
#endif
-
+
#if defined(Q_WS_X11)
ui.frmOpacity->setVisible(false);
#endif
@@ -154,7 +154,7 @@ BandwidthGraph::reset()
{
/* Set to current time */
if(_statusBar && _onTop)
- _statusBar->showMessage(tr("Since:") + " " +
+ _statusBar->showMessage(tr("Since:") + " " +
QDateTime::currentDateTime()
.toString(DATETIME_FMT));
/* Reset the graph */
@@ -167,7 +167,7 @@ BandwidthGraph::saveChanges()
{
/* Hide the settings frame and reset toggle button */
showSettingsFrame(false);
-
+
/* Save the opacity and graph style */
saveSetting(SETTING_OPACITY, ui.sldrOpacity->value());
saveSetting(SETTING_STYLE, ui.cmbGraphStyle->currentIndex());
@@ -192,14 +192,14 @@ BandwidthGraph::saveChanges()
ui.frmGraph->setShowCounters(ui.chkReceiveRate->isChecked(),
ui.chkSendRate->isChecked());
ui.frmGraph->setGraphStyle((GraphFrame::GraphStyle)ui.cmbGraphStyle->currentIndex());
-
+
/* A change in window flags causes the window to disappear, so make sure
* it's still visible. */
showNormal();
}
/** Simply restores the previously saved settings. */
-void
+void
BandwidthGraph::cancelChanges()
{
/* Hide the settings frame and reset toggle button */
@@ -214,7 +214,7 @@ void
BandwidthGraph::showSettingsFrame(bool show)
{
static QSize minSize = minimumSize();
-
+
QSize newSize = size();
if (show) {
/* Extend the bottom of the bandwidth graph and show the settings */
@@ -229,7 +229,7 @@ BandwidthGraph::showSettingsFrame(bool show)
ui.frmSettings->setVisible(false);
ui.btnToggleSettings->setChecked(false);
ui.btnToggleSettings->setText(tr("Show Settings"));
-
+
/* 6 = vertical spacing between the settings frame and graph frame */
newSize.setHeight(newSize.height() - ui.frmSettings->height() - 6);
setMinimumSize(minSize);
@@ -242,7 +242,7 @@ void
BandwidthGraph::setOpacity(int value)
{
qreal newValue = value / 100.0;
-
+
/* Opacity only supported by Mac and Win32 */
#if defined(Q_WS_MAC)
this->setWindowOpacity(newValue);
diff --git a/src/vidalia/bwgraph/BandwidthGraph.h b/src/vidalia/bwgraph/BandwidthGraph.h
index a1beda2..5017554 100644
--- a/src/vidalia/bwgraph/BandwidthGraph.h
+++ b/src/vidalia/bwgraph/BandwidthGraph.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -53,7 +53,7 @@ private slots:
void cancelChanges();
/** Called when the reset button is pressed */
void reset();
-
+
private:
/** Create and bind actions to events **/
void createActions();
@@ -66,7 +66,7 @@ private:
VidaliaSettings* _settings;
QStatusBar *_statusBar;
-
+
/** Qt Designer generated object */
Ui::BandwidthGraph ui;
};
diff --git a/src/vidalia/bwgraph/GraphFrame.cpp b/src/vidalia/bwgraph/GraphFrame.cpp
index c5d3f60..e44db9a 100644
--- a/src/vidalia/bwgraph/GraphFrame.cpp
+++ b/src/vidalia/bwgraph/GraphFrame.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -27,7 +27,7 @@ GraphFrame::GraphFrame(QWidget *parent)
_sendData = new QList<qreal>();
_painter = new QPainter();
_graphStyle = SolidLine;
-
+
/* Initialize graph values */
_recvData->prepend(0);
_sendData->prepend(0);
@@ -47,7 +47,7 @@ GraphFrame::~GraphFrame()
delete _sendData;
}
-/** Gets the width of the desktop, which is the maximum number of points
+/** Gets the width of the desktop, which is the maximum number of points
* we can plot in the graph. */
int
GraphFrame::getNumPoints()
@@ -84,7 +84,7 @@ GraphFrame::addPoints(qreal recv, qreal send)
/* Add to the total counters */
_totalSend += send;
_totalRecv += recv;
-
+
bool maxUpdated = false;
/* Check for a new maximum value */
if (send > _maxValue) {
@@ -129,7 +129,7 @@ GraphFrame::setShowCounters(bool showRecv, bool showSend)
this->update();
}
-/** Overloads default QWidget::paintEvent. Draws the actual
+/** Overloads default QWidget::paintEvent. Draws the actual
* bandwidth graph. */
void
GraphFrame::paintEvent(QPaintEvent *event)
@@ -138,14 +138,14 @@ GraphFrame::paintEvent(QPaintEvent *event)
/* Set current graph dimensions */
_rec = this->frameRect();
-
+
/* Start the painter */
_painter->begin(this);
-
+
/* We want antialiased lines and text */
_painter->setRenderHint(QPainter::Antialiasing);
_painter->setRenderHint(QPainter::TextAntialiasing);
-
+
/* Fill in the background */
_painter->fillRect(_rec, QBrush(BACK_COLOR));
_painter->drawRect(_rec);
@@ -173,7 +173,7 @@ GraphFrame::paintData()
/* Convert the bandwidth data points to graph points */
recvPoints = pointsFromData(_recvData);
sendPoints = pointsFromData(_sendData);
-
+
if (_graphStyle == AreaGraph) {
/* Plot the bandwidth data as area graphs */
if (_showRecv)
@@ -181,7 +181,7 @@ GraphFrame::paintData()
if (_showSend)
paintIntegral(sendPoints, SEND_COLOR, 0.4);
}
-
+
/* Plot the bandwidth as solid lines. If the graph style is currently an
* area graph, we end up outlining the integrals. */
if (_showRecv)
@@ -200,7 +200,7 @@ GraphFrame::pointsFromData(QList<qreal>* list)
int y = _rec.height();
qreal scale = (y - (y/10)) / _maxValue;
qreal currValue;
-
+
/* Translate all data points to points on the graph frame */
points << QPointF(x, y);
for (int i = 0; i < list->size(); i++) {
@@ -213,7 +213,7 @@ GraphFrame::pointsFromData(QList<qreal>* list)
x -= SCROLL_STEP;
}
points << QPointF(_scaleWidth, y);
- return points;
+ return points;
}
/** Plots an integral using the data points in <b>points</b>. The area will be
@@ -233,7 +233,7 @@ GraphFrame::paintIntegral(QVector<QPointF> points, QColor color, qreal alpha)
/** Iterates the input list and draws a line on the graph in the appropriate
* color. */
void
-GraphFrame::paintLine(QVector<QPointF> points, QColor color, Qt::PenStyle lineStyle)
+GraphFrame::paintLine(QVector<QPointF> points, QColor color, Qt::PenStyle lineStyle)
{
/* Save the current brush, plot the line, and restore the old brush */
QPen oldPen = _painter->pen();
@@ -259,7 +259,7 @@ GraphFrame::paintTotals()
y = rowHeight;
_painter->setPen(RECV_COLOR);
_painter->drawText(x, y,
- tr("Recv: ") + totalToStr(_totalRecv) +
+ tr("Recv: ") + totalToStr(_totalRecv) +
" ("+tr("%1 KB/s").arg(_recvData->first(), 0, 'f', 2)+")");
}
diff --git a/src/vidalia/bwgraph/GraphFrame.h b/src/vidalia/bwgraph/GraphFrame.h
index 8e29cc2..06451aa 100644
--- a/src/vidalia/bwgraph/GraphFrame.h
+++ b/src/vidalia/bwgraph/GraphFrame.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -46,7 +46,7 @@ public:
SolidLine = 0, /**< Plot bandwidth as solid lines. */
AreaGraph /**< Plot bandwidth as alpha blended area graphs. */
};
-
+
/** Default Constructor */
GraphFrame(QWidget *parent = 0);
/** Default Destructor */
@@ -84,7 +84,7 @@ private:
* of send or receive values. */
QVector<QPointF> pointsFromData(QList<qreal>* list);
/** Paints a line with the data in <b>points</b>. */
- void paintLine(QVector<QPointF> points, QColor color,
+ void paintLine(QVector<QPointF> points, QColor color,
Qt::PenStyle lineStyle = Qt::SolidLine);
/** Paints an integral using the supplied data. */
void paintIntegral(QVector<QPointF> points, QColor color, qreal alpha = 1.0);
diff --git a/src/vidalia/config/AbstractTorSettings.cpp b/src/vidalia/config/AbstractTorSettings.cpp
index e1941f9..1115e2b 100644
--- a/src/vidalia/config/AbstractTorSettings.cpp
+++ b/src/vidalia/config/AbstractTorSettings.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -68,13 +68,13 @@ bool
AbstractTorSettings::isEmptyValue(const QVariant &value) const
{
switch (value.type()) {
- case QVariant::String:
+ case QVariant::String:
return (value.toString().isEmpty());
case QVariant::StringList:
return (value.toStringList().isEmpty());
case QVariant::UInt:
case QVariant::Int:
- return (value.toUInt() == 0);
+ return (value.toUInt() == 0);
case QVariant::Invalid:
return true;
default: break;
@@ -90,7 +90,7 @@ AbstractTorSettings::localValue(const QString &key) const
return VSettings::value(key);
}
-/** Returns the value associated with <b>key</b> by querying TOr via
+/** Returns the value associated with <b>key</b> by querying TOr via
* <i>getconf key</i>. */
QVariant
AbstractTorSettings::torValue(const QString &key) const
diff --git a/src/vidalia/config/AbstractTorSettings.h b/src/vidalia/config/AbstractTorSettings.h
index 676d01a..0ce7711 100644
--- a/src/vidalia/config/AbstractTorSettings.h
+++ b/src/vidalia/config/AbstractTorSettings.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,7 +31,7 @@ public:
/** Constructor. All settings will be under the heading <b>group</b> and
* <b>torControl</b> will be used to <i>getconf</i> values from Tor. */
AbstractTorSettings(const QString &group, TorControl *torControl = 0);
-
+
/** Sets a value indicating that the server settings have changed since
* apply() was last called. */
void setChanged(bool changed);
@@ -53,7 +53,7 @@ protected:
/** Returns the value associated with <b>key</b> saved in the local
* configuration file. */
virtual QVariant localValue(const QString &key) const;
- /** Returns the value associated with <b>key</b> by querying TOr via
+ /** Returns the value associated with <b>key</b> by querying TOr via
* <i>getconf key</i>. */
virtual QVariant torValue(const QString &key) const;
/** Saves the value <b>val</b> for the setting <b>key</b> to the local
@@ -61,7 +61,7 @@ protected:
virtual void setValue(const QString &key, const QVariant &value);
virtual void setVolatileValue(const QString &key, const QVariant &value);
-
+
/** Returns true if the given QVariant contains an empty value, depending on
* the data type. For example, 0 is considered an empty integer and "" is
* an empty string. */
diff --git a/src/vidalia/config/AdvancedPage.h b/src/vidalia/config/AdvancedPage.h
index df2587f..0650376 100644
--- a/src/vidalia/config/AdvancedPage.h
+++ b/src/vidalia/config/AdvancedPage.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -23,7 +23,7 @@
#include <QFileDialog>
-class AdvancedPage : public ConfigPage
+class AdvancedPage : public ConfigPage
{
Q_OBJECT
@@ -36,7 +36,7 @@ public:
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
-
+
/** Applies the network configuration settings to Tor. Returns true if the
* settings were applied successfully. Otherwise, <b>errmsg</b> is set
* and false is returned. */
@@ -58,7 +58,7 @@ private slots:
/** Called when the user selects a different authentication method from the
* combo box. */
void authMethodChanged(int index);
- /** Called when the user clicks "Browse" to choose location of Tor config
+ /** Called when the user clicks "Browse" to choose location of Tor config
* file */
void browseTorConfig();
/** Called when the user clicks "Browse" to choose the location of Tor's
@@ -87,8 +87,8 @@ private:
/** Returns the index in the authentication methods combo box for the given
* authentication <b>method</b>. */
int authMethodToIndex(TorSettings::AuthenticationMethod method);
-
-#if 0
+
+#if 0
#if defined(Q_WS_WIN)
/** Installs or removes the Tor service as necessary */
void setupService(bool useService);
diff --git a/src/vidalia/config/AppearancePage.cpp b/src/vidalia/config/AppearancePage.cpp
index 95998e9..11a3eaf 100644
--- a/src/vidalia/config/AppearancePage.cpp
+++ b/src/vidalia/config/AppearancePage.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -89,14 +89,14 @@ AppearancePage::save(QString &errmsg)
return true;
}
-
+
/** Loads the settings for this page */
void
AppearancePage::load()
{
int index = ui.cmboLanguage->findData(_settings->getLanguageCode());
ui.cmboLanguage->setCurrentIndex(index);
-
+
index = ui.cmboStyle->findData(Vidalia::style().toLower());
ui.cmboStyle->setCurrentIndex(index);
diff --git a/src/vidalia/config/AppearancePage.h b/src/vidalia/config/AppearancePage.h
index 9dd94af..5a8f571 100644
--- a/src/vidalia/config/AppearancePage.h
+++ b/src/vidalia/config/AppearancePage.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/BridgeDownloader.cpp b/src/vidalia/config/BridgeDownloader.cpp
index 49c08a3..1cf47ea 100644
--- a/src/vidalia/config/BridgeDownloader.cpp
+++ b/src/vidalia/config/BridgeDownloader.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -27,7 +27,7 @@ BridgeDownloader::BridgeDownloader(QObject *parent)
connect(_https, SIGNAL(finished(QNetworkReply *)),
this, SLOT(httpsRequestFinished(QNetworkReply *)));
connect(_https, SIGNAL(sslErrors(QNetworkReply *, QList<QSslError>)),
- this, SLOT(sslErrors(QNetworkReply *, QList<QSslError>)));
+ this, SLOT(sslErrors(QNetworkReply *, QList<QSslError>)));
}
void
@@ -47,7 +47,7 @@ BridgeDownloader::downloadBridges(BridgeDownloadMethod method)
case DownloadMethodHttps:
startHttpsDownload();
break;
-
+
default:
break;
}
@@ -69,7 +69,7 @@ BridgeDownloader::isMethodSupported(BridgeDownloadMethod method)
void
BridgeDownloader::startHttpsDownload()
-{
+{
emit statusChanged(tr("Starting HTTPS bridge request..."));
emit downloadProgress(0, 0);
@@ -115,7 +115,7 @@ BridgeDownloader::httpsRequestFinished(QNetworkReply *reply)
if (reply->error() != QNetworkReply::NoError) {
QString errorString = reply->errorString();
vWarn("Bridge request failed: %2").arg(errorString);
-
+
emit bridgeRequestFailed(errorString);
} else {
QByteArray response = reply->readAll();
diff --git a/src/vidalia/config/BridgeDownloader.h b/src/vidalia/config/BridgeDownloader.h
index ef2d0ec..7bef313 100644
--- a/src/vidalia/config/BridgeDownloader.h
+++ b/src/vidalia/config/BridgeDownloader.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -86,7 +86,7 @@ private slots:
* statusChanged() signal is emitted with the appropriate text
* describing the new state of the request.
*/
- void httpsStateChanged(int state);
+ void httpsStateChanged(int state);
/** Called when the underlying QHttp object used to make the bridge
* request completes. <b>error</b> is set to false if the request was
@@ -100,7 +100,7 @@ private slots:
/** Called when the HTTPS connection encounters one or more
* <b>sslErrors</b>. Currently the errors are just logged and
* bridgeRequestFailed() is <i>not</i> emitted, since QHttp will also
- * emit
+ * emit
*/
void sslErrors(QNetworkReply *, const QList<QSslError> &sslErrors);
@@ -113,7 +113,7 @@ private:
/** Used to connect to the bridge database, send an HTTPS request for
* new bridge addresses and then read the response. */
QNetworkAccessManager* _https;
-
+
/** Identifier of the current bridge request */
QNetworkReply *_reply;
};
diff --git a/src/vidalia/config/BridgeDownloaderProgressDialog.cpp b/src/vidalia/config/BridgeDownloaderProgressDialog.cpp
index 8e2fb13..9150988 100644
--- a/src/vidalia/config/BridgeDownloaderProgressDialog.cpp
+++ b/src/vidalia/config/BridgeDownloaderProgressDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -22,7 +22,7 @@ BridgeDownloaderProgressDialog::BridgeDownloaderProgressDialog(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
-
+
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)),
this, SLOT(buttonClicked(QAbstractButton *)));
@@ -56,7 +56,7 @@ void
BridgeDownloaderProgressDialog::bridgeRequestFinished(const QStringList &bridges)
{
Q_UNUSED(bridges);
-
+
accept();
}
@@ -81,7 +81,7 @@ BridgeDownloaderProgressDialog::buttonClicked(QAbstractButton *button)
setStatus(tr("Retrying bridge request..."));
setDownloadProgress(0, 0);
ui.buttonBox->setStandardButtons(QDialogButtonBox::Cancel);
-
+
QTimer::singleShot(1000, this, SIGNAL(retry()));
} else {
done(standardButton);
diff --git a/src/vidalia/config/BridgeDownloaderProgressDialog.h b/src/vidalia/config/BridgeDownloaderProgressDialog.h
index 280d8c1..34f15c2 100644
--- a/src/vidalia/config/BridgeDownloaderProgressDialog.h
+++ b/src/vidalia/config/BridgeDownloaderProgressDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -41,7 +41,7 @@ public slots:
*/
void setDownloadProgress(qint64 value, qint64 maximum);
- /** Called when the bridge download completes successfully and discards
+ /** Called when the bridge download completes successfully and discards
* the progress dialog with an Accept result code. <b>bridges</b>
* contains the list of bridges downloaded, but is currently ignored.
*/
diff --git a/src/vidalia/config/BridgeUsageDialog.cpp b/src/vidalia/config/BridgeUsageDialog.cpp
index ce29d3f..18b72d1 100644
--- a/src/vidalia/config/BridgeUsageDialog.cpp
+++ b/src/vidalia/config/BridgeUsageDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/BridgeUsageDialog.h b/src/vidalia/config/BridgeUsageDialog.h
index 0f82de5..1cdc740 100644
--- a/src/vidalia/config/BridgeUsageDialog.h
+++ b/src/vidalia/config/BridgeUsageDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/ConfigPageStack.cpp b/src/vidalia/config/ConfigPageStack.cpp
index d7bd5c6..218af99 100644
--- a/src/vidalia/config/ConfigPageStack.cpp
+++ b/src/vidalia/config/ConfigPageStack.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/ConfigPageStack.h b/src/vidalia/config/ConfigPageStack.h
index 377bfd2..c769fdd 100644
--- a/src/vidalia/config/ConfigPageStack.h
+++ b/src/vidalia/config/ConfigPageStack.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -36,7 +36,7 @@ public:
void setCurrentPage(ConfigPage *page);
/** Sets the current config page index and checks its action. */
void setCurrentIndex(int index);
-
+
/** Returns a list of all pages in the stack. The order of the pages in the
* returned QList is the same as the order in which the pages were
* initially added to the stack. */
@@ -45,7 +45,7 @@ public:
public slots:
/** Displays the page associated with the activated action. */
void showPage(QAction *pageAction);
-
+
private:
/** Maps an action to a config page. */
QHash<QAction*, ConfigPage*> _pages;
diff --git a/src/vidalia/config/DefaultSettings.h b/src/vidalia/config/DefaultSettings.h
index 4710b98..7611c9f 100644
--- a/src/vidalia/config/DefaultSettings.h
+++ b/src/vidalia/config/DefaultSettings.h
@@ -3,14 +3,14 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
** \file DefaultSettings.h
-** \brief
+** \brief
*/
#ifndef _DEFAULTSETTINGS_H
@@ -25,9 +25,9 @@ class DefaultSettings
DefaultSettings();
/** Default desrtuctor */
~DefaultSettings();
-
+
/** Return the stored default value */
- QVariant getDefault(const QString &key,
+ QVariant getDefault(const QString &key,
const QVariant &defaultVal = QVariant()) const;
private:
diff --git a/src/vidalia/config/DomainValidator.cpp b/src/vidalia/config/DomainValidator.cpp
index ff16e0d..bfcc32f 100644
--- a/src/vidalia/config/DomainValidator.cpp
+++ b/src/vidalia/config/DomainValidator.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/DomainValidator.h b/src/vidalia/config/DomainValidator.h
index 8b06880..d2c2903 100644
--- a/src/vidalia/config/DomainValidator.h
+++ b/src/vidalia/config/DomainValidator.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/ExitPolicy.cpp b/src/vidalia/config/ExitPolicy.cpp
index 467ed27..a15df8a 100644
--- a/src/vidalia/config/ExitPolicy.cpp
+++ b/src/vidalia/config/ExitPolicy.cpp
@@ -3,14 +3,14 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
/*
** \file ExitPolicy.cpp
-** \brief Collection of Policy objects representing an exit policy
+** \brief Collection of Policy objects representing an exit policy
*/
#include "ExitPolicy.h"
@@ -44,7 +44,7 @@ ExitPolicy::ExitPolicy(SpecialExitPolicy exitPolicy)
}
}
-/** Parses the given string for a comma-delimited list of policies and
+/** Parses the given string for a comma-delimited list of policies and
* adds them to this this policy. */
ExitPolicy::ExitPolicy(QString exitPolicy)
{
@@ -125,13 +125,13 @@ ExitPolicy::rejectsPorts(QStringList portList)
return true;
}
-/** Returns true if this exit policy contains the given policy. */
+/** Returns true if this exit policy contains the given policy. */
bool
ExitPolicy::contains(Policy policy)
{
Policy acceptAll(Policy::AcceptAll);
Policy rejectAll(Policy::RejectAll);
-
+
/* Check for this policy item in the explicitly defined policies */
foreach (Policy p, _exitPolicy) {
if (p.matches(policy)) {
diff --git a/src/vidalia/config/ExitPolicy.h b/src/vidalia/config/ExitPolicy.h
index 420cccb..6c5528b 100644
--- a/src/vidalia/config/ExitPolicy.h
+++ b/src/vidalia/config/ExitPolicy.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,14 +31,14 @@ public:
Default, /**< Specifies the default exit policy. */
Middleman /**< Specifies a middleman-only exit policy. */
};
-
+
/** Default constructor. */
ExitPolicy();
/** Creates an exit policy of the given special type. */
ExitPolicy(SpecialExitPolicy exitPolicy);
/** Creates an exit policy from the given comma-delimited list of policies. */
ExitPolicy(QString exitPolicy);
-
+
/** Adds the ports specified in <b>portList</b> to a list of ports accepted
* by this exit policy. Ports may be given either individually or as ranges. */
void addAcceptedPorts(QStringList portList);
@@ -53,7 +53,7 @@ public:
* <b>portList</b>. Ports in <b>portList</b> may be given either individually
* or as ranges. */
bool rejectsPorts(QStringList portList);
-
+
/** Adds a rule to the exit policy. */
void addPolicy(Policy policy);
/** Removes a rule from the exit policy. */
@@ -63,10 +63,10 @@ public:
/** Returns the list of policies for this exit policy. */
QList<Policy> policyList() { return _exitPolicy; }
-
- /** Converts the exit policy to a format Tor understands. */
+
+ /** Converts the exit policy to a format Tor understands. */
QString toString();
-
+
private:
/** A collection of policies forming the exit policy. */
QList<Policy> _exitPolicy;
diff --git a/src/vidalia/config/GeneralPage.cpp b/src/vidalia/config/GeneralPage.cpp
index 0faca19..b6db202 100644
--- a/src/vidalia/config/GeneralPage.cpp
+++ b/src/vidalia/config/GeneralPage.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -31,11 +31,11 @@ GeneralPage::GeneralPage(QWidget *parent)
/* Create settings objects */
_vidaliaSettings = new VidaliaSettings;
_torSettings = new TorSettings;
-
+
/* Bind event to actions */
- connect(ui.btnBrowseTorExecutable, SIGNAL(clicked()),
+ connect(ui.btnBrowseTorExecutable, SIGNAL(clicked()),
this, SLOT(browseTorExecutable()));
- connect(ui.btnBrowseProxyExecutable, SIGNAL(clicked()),
+ connect(ui.btnBrowseProxyExecutable, SIGNAL(clicked()),
this, SLOT(browseProxyExecutable()));
connect(ui.btnUpdateNow, SIGNAL(clicked()), this, SLOT(updateNow()));
@@ -75,7 +75,7 @@ GeneralPage::browseExecutable(const QString &caption, const QString &file)
#else
QString filter = "";
#endif
-
+
QString filePath = QFileDialog::getOpenFileName(this, caption, file, filter);
return QDir::convertSeparators(filePath);
}
@@ -115,7 +115,7 @@ GeneralPage::save(QString &errmsg)
_vidaliaSettings->setProxyExecutableArguments(
ui.lineProxyExecutableArguments->text());
}
-
+
_torSettings->setExecutable(torExecutable);
_vidaliaSettings->setRunTorAtStart(ui.chkRunTorAtVidaliaStartup->isChecked());
_vidaliaSettings->setRunVidaliaOnBoot(
@@ -131,7 +131,7 @@ GeneralPage::load()
{
ui.chkRunVidaliaAtSystemStartup->setChecked(
_vidaliaSettings->runVidaliaOnBoot());
-
+
ui.lineTorExecutable->setText(_torSettings->getExecutable());
ui.chkRunTorAtVidaliaStartup->setChecked(_vidaliaSettings->runTorAtStart());
diff --git a/src/vidalia/config/GeneralPage.h b/src/vidalia/config/GeneralPage.h
index 44077e1..e7bdbff 100644
--- a/src/vidalia/config/GeneralPage.h
+++ b/src/vidalia/config/GeneralPage.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/IpValidator.cpp b/src/vidalia/config/IpValidator.cpp
index 839caa8..8a57979 100644
--- a/src/vidalia/config/IpValidator.cpp
+++ b/src/vidalia/config/IpValidator.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/IpValidator.h b/src/vidalia/config/IpValidator.h
index b52c134..4c90b5a 100644
--- a/src/vidalia/config/IpValidator.h
+++ b/src/vidalia/config/IpValidator.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/Local8BitStringValidator.cpp b/src/vidalia/config/Local8BitStringValidator.cpp
index ac960e2..ea713f5 100644
--- a/src/vidalia/config/Local8BitStringValidator.cpp
+++ b/src/vidalia/config/Local8BitStringValidator.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/Local8BitStringValidator.h b/src/vidalia/config/Local8BitStringValidator.h
index ee07703..eb5820b 100644
--- a/src/vidalia/config/Local8BitStringValidator.h
+++ b/src/vidalia/config/Local8BitStringValidator.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/NetworkPage.cpp b/src/vidalia/config/NetworkPage.cpp
index c38e875..6d3708d 100644
--- a/src/vidalia/config/NetworkPage.cpp
+++ b/src/vidalia/config/NetworkPage.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -43,7 +43,7 @@ NetworkPage::NetworkPage(QWidget *parent)
connect(ui.btnAddBridge, SIGNAL(clicked()), this, SLOT(addBridge()));
connect(ui.btnRemoveBridge, SIGNAL(clicked()), this, SLOT(removeBridge()));
- connect(ui.btnCopyBridge, SIGNAL(clicked()),
+ connect(ui.btnCopyBridge, SIGNAL(clicked()),
this, SLOT(copySelectedBridgesToClipboard()));
connect(ui.listBridges, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(bridgeContextMenuRequested(QPoint)));
@@ -174,11 +174,11 @@ void
NetworkPage::bridgeContextMenuRequested(const QPoint &pos)
{
QMenu menu(this);
-
+
QListWidgetItem *item = ui.listBridges->itemAt(pos);
if (!item)
return;
-
+
QAction *copyAction =
new QAction(QIcon(IMG_COPY), tr("Copy (Ctrl+C)"), &menu);
connect(copyAction, SIGNAL(triggered()),
@@ -207,7 +207,7 @@ NetworkPage::save(QString &errmsg)
QStringList bridgeList;
QList<quint16> reachablePorts;
bool ok;
-
+
if (ui.chkUseProxy->isChecked()) {
if (ui.lineProxyAddress->text().isEmpty()
|| ui.lineProxyPort->text().isEmpty()) {
@@ -237,7 +237,7 @@ NetworkPage::save(QString &errmsg)
user = ui.lineProxyUsername->text();
pass = ui.lineProxyPassword->text();
-
+
QVariant data;
int type;
@@ -253,7 +253,7 @@ NetworkPage::save(QString &errmsg)
_settings->setProxyAddress(addr);
_settings->setProxyUsername(user);
_settings->setProxyPassword(pass);
-
+
/* Save the reachable port settings */
_settings->setFascistFirewall(ui.chkFascistFirewall->isChecked());
foreach (QString portString,
@@ -329,7 +329,7 @@ NetworkPage::load()
ui.lineReachablePorts->setText(reachablePortStrings.join(","));
/* Load bridge settings */
- ui.chkUseBridges->setChecked(_settings->getUseBridges());
+ ui.chkUseBridges->setChecked(_settings->getUseBridges());
ui.listBridges->clear();
ui.listBridges->addItems(_settings->getBridgeList());
}
@@ -369,7 +369,7 @@ NetworkPage::findBridges()
/** Starts a new request for additional bridge addresses. */
void
NetworkPage::startBridgeRequest()
-{
+{
if (ui.chkUseProxy->isChecked() &&
ui.cmboProxyType->currentIndex() == NetworkSettings::HttpHttpsProxy) {
_bridgeDownloader->setProxy(ui.lineProxyAddress->text(),
@@ -407,9 +407,9 @@ NetworkPage::bridgeRequestFinished(const QStringList &bridges)
dlg.setInformativeText(tr("Click Help to see other methods of finding "
"new bridges."));
dlg.setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
-
+
if (dlg.exec() == QMessageBox::Help)
- emit helpRequested("bridges.finding");
+ emit helpRequested("bridges.finding");
}
}
diff --git a/src/vidalia/config/NetworkPage.h b/src/vidalia/config/NetworkPage.h
index 3111bf3..c8a2cad 100644
--- a/src/vidalia/config/NetworkPage.h
+++ b/src/vidalia/config/NetworkPage.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/NetworkSettings.h b/src/vidalia/config/NetworkSettings.h
index aa5d88a..d9362f2 100644
--- a/src/vidalia/config/NetworkSettings.h
+++ b/src/vidalia/config/NetworkSettings.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -61,7 +61,7 @@ public:
void setReachablePorts(const QList<quint16> &reachablePorts);
/** Returns the proxy type Tor is using, or NoProxy if it makes direct
- * connections. */
+ * connections. */
ProxyType getProxyType();
/** Set the type of proxy Tor should use to <b>type</b>. */
void setProxyType(ProxyType type);
@@ -73,14 +73,14 @@ public:
/** Returns the username used to login to the proxy server. */
QString getProxyUsername();
- /** Sets the proxy server username to <b>user</b>. */
+ /** Sets the proxy server username to <b>user</b>. */
void setProxyUsername(const QString &user);
/** Returns the password used to login to the proxy server. */
QString getProxyPassword();
- /** Sets the proxy server password to <b>pass</b>. */
+ /** Sets the proxy server password to <b>pass</b>. */
void setProxyPassword(const QString &pass);
-
+
/** Returns true if Tor should try to use bridge nodes to access the Tor
* network. */
bool getUseBridges();
diff --git a/src/vidalia/config/NicknameValidator.cpp b/src/vidalia/config/NicknameValidator.cpp
index 76a9aed..34fe050 100644
--- a/src/vidalia/config/NicknameValidator.cpp
+++ b/src/vidalia/config/NicknameValidator.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -19,7 +19,7 @@
/** Set of characters that are valid in a server's nickname. */
#define VALID_NICKNAME_CHARS \
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
-
+
/** Constructor. */
NicknameValidator::NicknameValidator(QObject *parent)
diff --git a/src/vidalia/config/NicknameValidator.h b/src/vidalia/config/NicknameValidator.h
index ca6c562..2008555 100644
--- a/src/vidalia/config/NicknameValidator.h
+++ b/src/vidalia/config/NicknameValidator.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/Policy.cpp b/src/vidalia/config/Policy.cpp
index 94579fd..a06b16b 100644
--- a/src/vidalia/config/Policy.cpp
+++ b/src/vidalia/config/Policy.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -35,7 +35,7 @@ Policy::Policy(QString policy)
_address = QHostAddress::Any;
_fromPort = _toPort = 0;
_mask = 0;
-
+
/* Parse the given string to override the defaults. */
fromString(policy);
}
@@ -48,7 +48,7 @@ Policy::Policy(QString action, QString address, QString ports)
_address = QHostAddress::Any;
_fromPort = _toPort = 0;
_mask = 0;
-
+
fromString(action + " " + address + ":" + ports);
}
@@ -63,7 +63,7 @@ Policy::Policy(SpecialPolicy policy)
}
/** Constructor. Creates a new policy object based on the given rules. */
-Policy::Policy(Action action, QHostAddress addr, uchar mask,
+Policy::Policy(Action action, QHostAddress addr, uchar mask,
quint16 fromPort, quint16 toPort)
{
_action = action;
@@ -105,7 +105,7 @@ Policy::fromString(QString policy)
/* Separate the action and the address/mask/port info */
QStringList ruleParts = policy.split(" ");
_action = toAction(ruleParts.at(0));
-
+
/* If some address/mask/port stuff was specified, parse it. */
if (ruleParts.size() > 1) {
QStringList addrParts = ruleParts.at(1).split(":");
@@ -171,14 +171,14 @@ QString
Policy::address() const
{
QString addrString;
-
+
if (_mask) {
addrString = _address.toString() + "/" + QString::number(_mask);
} else if (_address == QHostAddress::Any || _address.isNull()) {
addrString = "*";
} else {
addrString = _address.toString();
- }
+ }
return addrString;
}
diff --git a/src/vidalia/config/Policy.h b/src/vidalia/config/Policy.h
index 2d73533..afd356d 100644
--- a/src/vidalia/config/Policy.h
+++ b/src/vidalia/config/Policy.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -36,7 +36,7 @@ public:
AcceptAll, /**< Accepts all connections. Equivalent to "accept *:*". */
RejectAll /**< Rejects all connections. Equivalent to "reject *:*". */
};
-
+
/** Default constructor. Creates an AcceptAll policy. */
Policy();
/** Parses the given policy, represented as a string. */
@@ -60,7 +60,7 @@ public:
QString toString() const;
/** Converts a string action to an Action enum value. */
static Action toAction(QString action);
-
+
/** Returns the action taken when this policy matches an address. */
QString action() const;
/** Returns the host address (including mask, if set) for this policy. */
diff --git a/src/vidalia/config/PortValidator.cpp b/src/vidalia/config/PortValidator.cpp
index b5f4e2b..2fb8d36 100644
--- a/src/vidalia/config/PortValidator.cpp
+++ b/src/vidalia/config/PortValidator.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/PortValidator.h b/src/vidalia/config/PortValidator.h
index 1e4aa4d..f9df516 100644
--- a/src/vidalia/config/PortValidator.h
+++ b/src/vidalia/config/PortValidator.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/config/ServerPage.h b/src/vidalia/config/ServerPage.h
index 46b38af..b906a1f 100644
--- a/src/vidalia/config/ServerPage.h
+++ b/src/vidalia/config/ServerPage.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -40,7 +40,7 @@ public:
bool save(QString &errmsg);
/** Loads the settings for this page */
void load();
-
+
/** Applies the server configuration settings to Tor. Returns true if the
* settings were applied successfully. Otherwise, <b>errmsg</b> is set and
* false is returned. */
@@ -97,10 +97,10 @@ private:
GreaterThan1500, /**< > 1.5 Mbps */
CustomBwLimits /**< Custom bandwidth limits */
};
-
+
/** Returns the index of the selected item in lstExitPolicies */
int selectedIndex();
-
+
/** Saves the server's bandwidth average and burst limits. */
void saveBandwidthLimits();
/** Loads the server's bandwidth average and burst limits. */
diff --git a/src/vidalia/config/ServerSettings.h b/src/vidalia/config/ServerSettings.h
index 9f7831d..cfb10b1 100644
--- a/src/vidalia/config/ServerSettings.h
+++ b/src/vidalia/config/ServerSettings.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -35,7 +35,7 @@ public:
void setServerEnabled(bool enable);
/** Returns true if Tor is running as a server. */
bool isServerEnabled();
-
+
/** Sets to <b>enabled</b> whether Tor should be a bridge node when acting
* as a server. */
void setBridgeEnabled(bool enable);
@@ -57,12 +57,12 @@ public:
void setDirPort(quint16 dirPort);
/** Gets the server's DirPort value. */
quint16 getDirPort();
-
+
/** Sets the server's nickname. */
void setNickname(QString nickname);
/** Gets the server's nickname. */
QString getNickname();
-
+
/** Sets the server operator's contact information. */
void setContactInfo(QString info);
/** Gets the server operator's contact information. */
@@ -76,7 +76,7 @@ public:
void setExitPolicy(ExitPolicy &policy);
/** Gets the exit policy for this server. */
ExitPolicy getExitPolicy();
-
+
/** Sets the long-term average bandwidth rate (in KB/s) of this server. */
void setBandwidthAvgRate(quint32 rate);
/** Gets the long-term average bandwidth rate (in KB/s) of this server. */
diff --git a/src/vidalia/config/TorrcDialog.cpp b/src/vidalia/config/TorrcDialog.cpp
index 6f5a678..537c161 100644
--- a/src/vidalia/config/TorrcDialog.cpp
+++ b/src/vidalia/config/TorrcDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -12,7 +12,7 @@
** \file TorrcDialog.cpp
** \brief Torrc Dialog, contains the dialog for displaying and editing the torrc
**
-** Implements the dialog for editing the torrc file inside Vidalia
+** Implements the dialog for editing the torrc file inside Vidalia
*/
#include "TorrcDialog.h"
@@ -79,21 +79,21 @@ TorrcDialog::loadToolBar()
ui.verticalLayout->insertWidget(0, tb);
}
-/** Gives a shallow parse phase to the settings to catch most errors
+/** Gives a shallow parse phase to the settings to catch most errors
* and passes on the error messages from Tor if the setting's value isn't
* valid. It returns false if something went wrong.
- * If there's a problem in the setting stage, changes to that point will
+ * If there's a problem in the setting stage, changes to that point will
* remaind but won't be saved. */
-bool
+bool
TorrcDialog::parseAndSet(QString *errmsg)
{
- return Vidalia::torrc()->setRawContents(ui.teditTorrc->toPlainText(),
+ return Vidalia::torrc()->setRawContents(ui.teditTorrc->toPlainText(),
errmsg, Vidalia::torControl());
}
/** Loads the saved torrc file that Tor's using to the TextEdit widget for
* editing */
-void
+void
TorrcDialog::loadTorrc()
{
QString text = "";
@@ -113,7 +113,7 @@ TorrcDialog::loadTorrc()
/** Calls the parsing and setting routine, and if everything went right
* it saves the configuration to the torrc file through the SAVECONF control */
-void
+void
TorrcDialog::saveTorrc()
{
QString errmsg = "";
diff --git a/src/vidalia/config/TorrcDialog.h b/src/vidalia/config/TorrcDialog.h
index fb11574..e16b04f 100644
--- a/src/vidalia/config/TorrcDialog.h
+++ b/src/vidalia/config/TorrcDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -52,14 +52,14 @@ private:
void loadToolBar();
/** Loads the contents of the torrc file that Tor has loaded */
void loadTorrc();
- /** Parses the options edited and sets them through SETCONF
+ /** Parses the options edited and sets them through SETCONF
* if they pass the parsing stage */
bool parseAndSet(QString *errmsg = 0);
-
+
Ui::TorrcDialog ui; /**< Qt Designer generated object. */
/** TorControl object to comunicate with Tor */
TorControl *tc;
-
+
};
#endif // _TORRCDIALOG_H
diff --git a/src/vidalia/config/UPNPControl.cpp b/src/vidalia/config/UPNPControl.cpp
index f1003c9..5bbe250 100644
--- a/src/vidalia/config/UPNPControl.cpp
+++ b/src/vidalia/config/UPNPControl.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPControl.cpp
** \brief Singleton object for interacting with UPNP device
*/
@@ -45,7 +45,7 @@ UPNPControl::UPNPControl()
_forwardedDirPort = 0;
_error = UnknownError;
_state = IdleState;
-
+
qRegisterMetaType<UPNPControl::UPNPError>("UPNPControl::UPNPError");
qRegisterMetaType<UPNPControl::UPNPState>("UPNPControl::UPNPState");
@@ -70,7 +70,7 @@ UPNPControl::cleanup()
_instance->_controlThread->stop();
delete _instance;
_instance = 0;
-}
+}
/** Sets <b>desiredDirPort</b> and <b>desiredOrPort</b> to the currently
* forwarded DirPort and ORPort values. */
@@ -92,7 +92,7 @@ UPNPControl::setDesiredState(quint16 desiredDirPort, quint16 desiredOrPort)
_forwardedDirPort = desiredDirPort;
_forwardedORPort = desiredOrPort;
_mutex->unlock();
-
+
_controlThread->wakeup();
}
@@ -104,7 +104,7 @@ UPNPControl::setError(UPNPError upnpError)
_mutex->lock();
_error = upnpError;
_mutex->unlock();
-
+
emit error(upnpError);
}
diff --git a/src/vidalia/config/UPNPControl.h b/src/vidalia/config/UPNPControl.h
index 17d462d..651db3d 100644
--- a/src/vidalia/config/UPNPControl.h
+++ b/src/vidalia/config/UPNPControl.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPControl.h
** \brief Singleton object for interacting with UPNP device
*/
@@ -42,7 +42,7 @@ public:
/** UPnP port forwarding state. */
enum UPNPState {
IdleState,
- ErrorState,
+ ErrorState,
DiscoverState,
UpdatingORPortState,
UpdatingDirPortState,
@@ -73,10 +73,10 @@ public:
signals:
/** Emitted when the UPnP control thread status changes. */
void stateChanged(UPNPControl::UPNPState state);
-
+
/** Emitted when a UPnP error occurs. */
void error(UPNPControl::UPNPError error);
-
+
protected:
/** Constructor. Initializes and starts a thread in which all blocking UPnP
* operations will be performed. */
@@ -89,7 +89,7 @@ protected:
* \sa error
*/
void setError(UPNPError error);
-
+
/** Sets the current UPnP state to <b>state</b> and emits the stateChanged()
* signal.
* \sa stateChanged
diff --git a/src/vidalia/config/UPNPControlThread.cpp b/src/vidalia/config/UPNPControlThread.cpp
index 25f5649..38762a5 100644
--- a/src/vidalia/config/UPNPControlThread.cpp
+++ b/src/vidalia/config/UPNPControlThread.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPControlThread.cpp
** \brief Thread for configuring UPnP in the background
*/
@@ -44,8 +44,8 @@ UPNPControlThread::UPNPControlThread(UPNPControl *control)
}
/** Destructor. The UPnP control thread must be stopped prior to destroying
- * this object.
- * \sa stop()
+ * this object.
+ * \sa stop()
*/
UPNPControlThread::~UPNPControlThread()
{
@@ -93,7 +93,7 @@ UPNPControlThread::run()
/** Sets up port forwarding according the previously-configured desired state.
* The desired state is set using UPNPControl's setDesiredState() method.
- * \sa UPNPControl::setDesiredState
+ * \sa UPNPControl::setDesiredState
*/
void
UPNPControlThread::configurePorts()
@@ -183,7 +183,7 @@ UPNPControlThread::stop()
}
/** Wakes up the UPnP control thread's run() loop.
- * \sa run()
+ * \sa run()
*/
void
UPNPControlThread::wakeup()
@@ -193,14 +193,14 @@ UPNPControlThread::wakeup()
_waitMutex->unlock();
}
-/** Updates the port mapping for <b>oldPort</b>, changing it to
+/** Updates the port mapping for <b>oldPort</b>, changing it to
* <b>newPort</b>. */
UPNPControl::UPNPError
UPNPControlThread::updatePort(quint16 oldPort, quint16 newPort)
{
UPNPControl::UPNPError retval;
-#ifdef Q_OS_WIN32
+#ifdef Q_OS_WIN32
// Workaround from http://trolltech.com/developer/knowledgebase/579
WSAData wsadata;
if (WSAStartup(MAKEWORD(2,0), &wsadata) != 0) {
@@ -232,7 +232,7 @@ UPNPControlThread::updatePort(quint16 oldPort, quint16 newPort)
return retval;
}
-/** Discovers UPnP-enabled IGDs on the network. Based on
+/** Discovers UPnP-enabled IGDs on the network. Based on
* http://miniupnp.free.fr/files/download.php?file=xchat-upnp20061022.patch
* This method will block for UPNPCONTROL_DISCOVER_TIMEOUT milliseconds. */
UPNPControl::UPNPError
diff --git a/src/vidalia/config/UPNPControlThread.h b/src/vidalia/config/UPNPControlThread.h
index 8b366ab..00d9aa9 100644
--- a/src/vidalia/config/UPNPControlThread.h
+++ b/src/vidalia/config/UPNPControlThread.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPControlThread.h
** \brief Thread for configuring UPnP in the background
*/
@@ -64,7 +64,7 @@ private:
/** Discovers UPnP-enabled IGDs on the network. This method will block for
* UPNPCONTROL_DISCOVER_TIMEOUT milliseconds. */
UPNPControl::UPNPError initializeUPNP();
- /** Updates the port mapping for <b>oldPort</b>, changing it to
+ /** Updates the port mapping for <b>oldPort</b>, changing it to
* <b>newPort</b>. */
UPNPControl::UPNPError updatePort(quint16 oldPort, quint16 newPort);
/** Adds a port forwarding mapping from external:<b>port</b> to
@@ -73,7 +73,7 @@ private:
/** Removes the port mapping for <b>port</b>. Returns 0 on success or
* non-zero on failure. */
UPNPControl::UPNPError disablePort(quint16 port);
-
+
QTime _upnpInitialized; /**< Time at which the UPnP state was last set. */
bool _keepRunning; /**< True if the control thread should keep running. */
UPNPControl *_control; /**< Stores desired UPnP state. */
@@ -87,5 +87,5 @@ private:
struct IGDdatas data;
char lanaddr[16];
};
-#endif
+#endif
diff --git a/src/vidalia/config/UPNPTestDialog.cpp b/src/vidalia/config/UPNPTestDialog.cpp
index 9652027..58935f6 100644
--- a/src/vidalia/config/UPNPTestDialog.cpp
+++ b/src/vidalia/config/UPNPTestDialog.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPTestDialog.cpp
** \brief Dialog that displays the progress of a UPnP configuration test
*/
@@ -27,7 +27,7 @@ UPNPTestDialog::UPNPTestDialog(quint16 orPort, quint16 dirPort, QWidget *parent)
ui.buttonBox->setStandardButtons(QDialogButtonBox::Close
| QDialogButtonBox::Help);
-
+
ui.progressBar->setValue(0);
ui.progressBar->setFormat("");
ui.progressBar->setMinimum(0);
@@ -63,8 +63,8 @@ UPNPTestDialog::startTest()
connect(UPNPControl::instance(), SIGNAL(stateChanged(UPNPControl::UPNPState)),
this, SLOT(upnpStateChanged(UPNPControl::UPNPState)));
-
- UPNPControl::instance()->setDesiredState(_dirPort, _orPort);
+
+ UPNPControl::instance()->setDesiredState(_dirPort, _orPort);
}
/** Called when the UPnP test successfully enables port forwarding. Enables
@@ -88,7 +88,7 @@ UPNPTestDialog::testFailed()
ui.buttonBox->setStandardButtons(QDialogButtonBox::Retry
| QDialogButtonBox::Close
| QDialogButtonBox::Help);
-
+
disconnect(UPNPControl::instance(), 0, this, 0);
}
diff --git a/src/vidalia/config/UPNPTestDialog.h b/src/vidalia/config/UPNPTestDialog.h
index 2204e26..6f4540b 100644
--- a/src/vidalia/config/UPNPTestDialog.h
+++ b/src/vidalia/config/UPNPTestDialog.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file UPNPTestDialog.h
** \brief Dialog that displays the progress of a UPnP configuration test
*/
@@ -48,7 +48,7 @@ protected slots:
* Retry is clicked, another UPnP test will be conducted. If Close is clicked,
* then the dialog is closed and the original UPnP state restored. */
void clicked(QAbstractButton *button);
-
+
/** Updates the test UI based on the UPnP <b>state</b>. */
void upnpStateChanged(UPNPControl::UPNPState state);
@@ -70,17 +70,17 @@ protected:
private:
/** Pointer to the UPNPControl singleton instance. */
- UPNPControl *_upnp;
-
+ UPNPControl *_upnp;
+
/** Timer used to update the progress bar while during the device discovery
* portion of the test. */
QTimer _discoverTimer;
-
+
quint16 _oldOrPort; /**< Original (pre-test) forwarded ORPort. */
quint16 _oldDirPort; /**< Original (pre-test) forwarded DirPort. */
quint16 _orPort; /**< ORPort used during the test. */
quint16 _dirPort; /**< DirPort used during the test. */
-
+
Ui::UPNPTestDialog ui;
};
diff --git a/src/vidalia/config/VSettings.h b/src/vidalia/config/VSettings.h
index 9aaf1dc..725748e 100644
--- a/src/vidalia/config/VSettings.h
+++ b/src/vidalia/config/VSettings.h
@@ -69,7 +69,7 @@ private:
/** Stores values that last as long as Vidalia lives as a process */
QMap<QString, QVariant> _volatileSettings;
-
+
/** Defaults stored in a settings file */
QSettings *_defaultSettings;
};
diff --git a/src/vidalia/config/VidaliaSettings.cpp b/src/vidalia/config/VidaliaSettings.cpp
index b13f98f..e99e484 100644
--- a/src/vidalia/config/VidaliaSettings.cpp
+++ b/src/vidalia/config/VidaliaSettings.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -44,7 +44,7 @@
#if defined(Q_OS_WIN32)
#define STARTUP_REG_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
-#define VIDALIA_REG_KEY "Vidalia"
+#define VIDALIA_REG_KEY "Vidalia"
#endif
#define SETTING_ICON_PREF "IconPref"
@@ -329,13 +329,13 @@ VidaliaSettings::setLocalGeoIpDatabase(const QString &databaseFile)
setValue(SETTING_LOCAL_GEOIP_DATABASE, databaseFile);
}
-QString
+QString
VidaliaSettings::pluginPath() const
{
return QDir::convertSeparators(value(SETTING_PLUGIN_PATH).toString());
}
-void
+void
VidaliaSettings::setPluginPath(const QString &path)
{
setValue(SETTING_PLUGIN_PATH, path);
diff --git a/src/vidalia/config/VidaliaSettings.h b/src/vidalia/config/VidaliaSettings.h
index 09360ab..c6b8f02 100644
--- a/src/vidalia/config/VidaliaSettings.h
+++ b/src/vidalia/config/VidaliaSettings.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -48,12 +48,12 @@ public:
QString getLanguageCode();
/** Saves the preferred language code. */
void setLanguageCode(QString languageCode);
-
+
/** Gets the interface style key (e.g., "windows", "motif", etc.) */
QString getInterfaceStyle();
/** Sets the interface style key. */
void setInterfaceStyle(QString styleKey);
-
+
/** Returns true if Vidalia should start Tor when it starts. */
bool runTorAtStart();
/** Set whether to run Tor when Vidalia starts. */
@@ -64,7 +64,7 @@ public:
bool showMainWindowAtStart();
/** Sets whether to show Vidalia's main window when the application starts. */
void setShowMainWindowAtStart(bool show);
-
+
/** Returns true if Vidalia should start on system boot. */
bool runVidaliaOnBoot();
/** Set whether to run Vidalia on system boot. */
@@ -109,7 +109,7 @@ public:
QString getProxyExecutableArguments() const;
/** Sets the additional arguments to be passed to Proxy Executable */
void setProxyExecutableArguments(const QString &proxyExecutableArguments);
-
+
/** Returns true if Vidalia should automatically check for software updates.
*/
bool isAutoUpdateEnabled() const;
@@ -150,7 +150,7 @@ public:
/** Returns true if Vidalia should skip the version check for tor */
bool skipVersionCheck() const;
- /** Returns true if Vidalia should not ask if the user wants to shutdown
+ /** Returns true if Vidalia should not ask if the user wants to shutdown
* tor gracefully */
bool rememberShutdown();
/** Sets RememberShutdown to val */
diff --git a/src/vidalia/config/torrc/Torrc.h b/src/vidalia/config/torrc/Torrc.h
index 6ab7d08..22a7a13 100644
--- a/src/vidalia/config/torrc/Torrc.h
+++ b/src/vidalia/config/torrc/Torrc.h
@@ -3,12 +3,12 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file Torrc.h
** \brief Handles the interaction with the torrc file
*/
@@ -41,7 +41,7 @@ class Torrc {
/** Sets the value to the given key with a optional
* comment that will appear in the file */
void setValue(const QString &key, const QString &value, const QString &comment = "");
-
+
/** Returns the used torrc path */
QString getTorrcPath() const
{ return _torrcPath; }
diff --git a/src/vidalia/config/torrc/TorrcParser.h b/src/vidalia/config/torrc/TorrcParser.h
index 83572bb..94ef148 100644
--- a/src/vidalia/config/torrc/TorrcParser.h
+++ b/src/vidalia/config/torrc/TorrcParser.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -28,7 +28,7 @@ class TorrcLine
: _content(content), _comment(comment) {}
/** Returns the content for this line */
- QString content()
+ QString content()
{ return _content; }
/** Sets the contents for this line */
void setContent(const QString &content)
@@ -98,9 +98,9 @@ class TorOpt
: _name(opt.name()), _type(opt.type()), _default(opt.defaultValue()), _line(opt.line()) {}
/** Returns true if this option can be defined with multiple lines */
- bool isMultilined()
+ bool isMultilined()
{ return _type == LineList or _type == Dependant or _type == Virtual; }
-
+
/** Returns true if this option can be defined multiple times with
* different values */
bool isMultivalued()
@@ -117,7 +117,7 @@ class TorOpt
/** Returns the default value that tor assumes for this option */
QString defaultValue() const
{ return _default; }
-
+
/** Returns a pointer to the TorrcLine for this option */
TorrcLine *line() const
{ return _line; }
@@ -125,11 +125,11 @@ class TorOpt
/** Sets the line for this option */
void setLine(TorrcLine *line)
{ _line = line; }
-
+
/** Returns true if it's a null TorOpt */
bool isNull() const
{ return _type == NIL; }
-
+
/** Creates a null TorOpt*/
static TorOpt null()
{ return TorOpt("Nil", NIL); }
@@ -158,7 +158,7 @@ class TorrcParser
QMap<QString, QPair<QString, TorOpt> > &map);
/** Returns the TorOpt for a given option name */
TorOpt getTorOpt(const QString &name);
-
+
private:
/** List with all the current valid options for the torrc */
QList<TorOpt> _torOpts;
@@ -172,7 +172,7 @@ class TorrcParser
QList<TorrcLine *> toTorrcLines(QString contents);
/** Given a TorrcLine and the line list where it belongs, it returns
* the set of lines that define the multilined value */
- QList<TorrcLine *> findValueLines(TorrcLine *line,
+ QList<TorrcLine *> findValueLines(TorrcLine *line,
const QList<TorrcLine *> &lines) const;
/** Creates the regular expression used in parsing */
QRegExp createRegExp();
diff --git a/src/vidalia/help/browser/HelpBrowser.cpp b/src/vidalia/help/browser/HelpBrowser.cpp
index 34ee1b0..75d56d4 100644
--- a/src/vidalia/help/browser/HelpBrowser.cpp
+++ b/src/vidalia/help/browser/HelpBrowser.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -54,11 +54,11 @@ HelpBrowser::HelpBrowser(QWidget *parent)
/* Hide Search frame */
ui.frmFind->setHidden(true);
-
+
/* Set the splitter pane sizes so that only the txtBrowser pane expands
* and set to arbitrary sizes (the minimum sizes will take effect */
QList<int> sizes;
- sizes.append(MINIMUM_PANE_SIZE);
+ sizes.append(MINIMUM_PANE_SIZE);
sizes.append(MINIMUM_PANE_SIZE);
ui.splitter->setSizes(sizes);
ui.splitter->setStretchFactor(LEFT_PANE_INDEX, NO_STRETCH);
@@ -75,14 +75,14 @@ HelpBrowser::HelpBrowser(QWidget *parent)
connect(ui.actionHome, SIGNAL(triggered()), ui.txtBrowser, SLOT(home()));
connect(ui.actionBack, SIGNAL(triggered()), ui.txtBrowser, SLOT(backward()));
connect(ui.actionForward, SIGNAL(triggered()), ui.txtBrowser, SLOT(forward()));
- connect(ui.txtBrowser, SIGNAL(backwardAvailable(bool)),
+ connect(ui.txtBrowser, SIGNAL(backwardAvailable(bool)),
ui.actionBack, SLOT(setEnabled(bool)));
connect(ui.txtBrowser, SIGNAL(forwardAvailable(bool)),
ui.actionForward, SLOT(setEnabled(bool)));
connect(ui.btnFindNext, SIGNAL(clicked()), this, SLOT(findNext()));
connect(ui.btnFindPrev, SIGNAL(clicked()), this, SLOT(findPrev()));
connect(ui.btnSearch, SIGNAL(clicked()), this, SLOT(search()));
-
+
/* Load the help topics from XML */
loadContentsFromXml(":/help/" + language() + "/contents.xml");
@@ -121,7 +121,7 @@ HelpBrowser::loadContentsFromXml(QString xmlFile)
QString errorString;
QFile file(xmlFile);
QDomDocument document;
-
+
/* Load the XML contents into the DOM document */
if (!document.setContent(&file, true, &errorString)) {
ui.txtBrowser->setPlainText(tr("Error Loading Help Contents: ")+errorString);
@@ -149,7 +149,7 @@ HelpBrowser::loadContents(const QDomDocument *document, QString &errorString)
/* Create the home item */
QTreeWidgetItem *home = createTopicTreeItem(root, 0);
ui.treeContents->addTopLevelItem(home);
-
+
/* Process all top-level help topics */
QDomElement child = root.firstChildElement(ELEMENT_TOPIC);
while (!child.isNull()) {
@@ -161,7 +161,7 @@ HelpBrowser::loadContents(const QDomDocument *document, QString &errorString)
/** Parse a Topic element and handle all its children recursively. */
void
-HelpBrowser::parseHelpTopic(const QDomElement &topicElement,
+HelpBrowser::parseHelpTopic(const QDomElement &topicElement,
QTreeWidgetItem *parent)
{
/* Check that we have a valid help topic */
@@ -205,7 +205,7 @@ HelpBrowser::getResourcePath(const QDomElement &topicElement)
/** Creates a new element to be inserted into the topic tree. */
QTreeWidgetItem*
-HelpBrowser::createTopicTreeItem(const QDomElement &topicElement,
+HelpBrowser::createTopicTreeItem(const QDomElement &topicElement,
QTreeWidgetItem *parent)
{
QTreeWidgetItem *topic = new QTreeWidgetItem(parent);
@@ -259,7 +259,7 @@ HelpBrowser::currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *prev)
{
Q_UNUSED(prev);
if (current) {
- ui.txtBrowser->setSource(QUrl(current->data(0,
+ ui.txtBrowser->setSource(QUrl(current->data(0,
ROLE_TOPIC_QRC_PATH).toString()));
}
_foundBefore = false;
@@ -280,7 +280,7 @@ HelpBrowser::findTopicItem(QTreeWidgetItem *startItem, QString topic)
/* Search through all children of startItem and look for a subtopic match */
for (int i = 0; i < startItem->childCount(); i++) {
QTreeWidgetItem *item = startItem->child(i);
-
+
if (subtopic == item->data(0, ROLE_TOPIC_ID).toString().toLower()) {
/* Found a subtopic match, so expand this item */
ui.treeContents->setItemExpanded(item, true);
@@ -344,14 +344,14 @@ HelpBrowser::find(bool forward)
if (ui.lineFind->text().isEmpty()) {
return;
}
-
+
QTextDocument::FindFlags flags = 0;
QTextCursor cursor = ui.txtBrowser->textCursor();
QString searchPhrase = ui.lineFind->text();
-
+
/* Clear status bar */
this->statusBar()->clearMessage();
-
+
/* Set search direction and other flags */
if (!forward) {
flags |= QTextDocument::FindBackward;
@@ -362,13 +362,13 @@ HelpBrowser::find(bool forward)
if (ui.chkbxWholePhrase->isChecked()) {
flags |= QTextDocument::FindWholeWords;
}
-
+
/* Check if search phrase is the same as the previous */
if (searchPhrase != _lastFind) {
_foundBefore = false;
}
_lastFind = searchPhrase;
-
+
/* Set the cursor to the appropriate start location if necessary */
if (!cursor.hasSelection()) {
if (forward) {
@@ -382,26 +382,26 @@ HelpBrowser::find(bool forward)
/* Search the page */
QTextCursor found;
found = ui.txtBrowser->document()->find(searchPhrase, cursor, flags);
-
+
/* If found, move the cursor to the location */
if (!found.isNull()) {
ui.txtBrowser->setTextCursor(found);
/* If not found, display appropriate error message */
} else {
if (_foundBefore) {
- if (forward)
+ if (forward)
this->statusBar()->showMessage(tr("Search reached end of document"));
- else
+ else
this->statusBar()->showMessage(tr("Search reached start of document"));
} else {
this->statusBar()->showMessage(tr("Text not found in document"));
}
}
-
+
/* Even if not found this time, may have been found previously */
_foundBefore |= !found.isNull();
}
-
+
/** Searches all help pages for the phrase the Search box.
* Fills treeSearch with documents containing matches and sets the
* status bar text appropriately.
@@ -411,12 +411,12 @@ HelpBrowser::search()
{
/* Clear the list */
ui.treeSearch->clear();
-
+
/* Don't search if invalid document or blank search phrase */
if (ui.lineSearch->text().isEmpty()) {
return;
}
-
+
HelpTextBrowser browser;
QTextCursor found;
QTextDocument::FindFlags flags = QTextDocument::FindWholeWords;
@@ -427,7 +427,7 @@ HelpBrowser::search()
for (int i=0; i < _elementList.size(); ++i) {
/* Load page data into browser */
browser.setSource(QUrl(getResourcePath(_elementList[i])));
-
+
/* Search current document */
found = browser.document()->find(ui.lineSearch->text(), 0, flags);
@@ -446,7 +446,7 @@ HelpBrowser::search()
void
HelpBrowser::showWindow(QString topic)
{
-
+
/* Bring the window to the top */
VidaliaWindow::showWindow();
diff --git a/src/vidalia/help/browser/HelpBrowser.h b/src/vidalia/help/browser/HelpBrowser.h
index 2b9bdd5..85c431f 100644
--- a/src/vidalia/help/browser/HelpBrowser.h
+++ b/src/vidalia/help/browser/HelpBrowser.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -36,7 +36,7 @@ class HelpBrowser : public VidaliaWindow
public:
/** Default constructor **/
HelpBrowser(QWidget *parent = 0);
-
+
public slots:
/** Overrides the default QWidget::show() */
void showWindow(QString topic = QString());
@@ -56,7 +56,7 @@ private slots:
void contentsItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *prev);
/** Called when the user selects a different item in the search tree */
void searchItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *prev);
-
+
private:
/** Returns the language in which help topics should appear, or English
* ("en") if no translated help files exist for the current GUI language. */
@@ -97,4 +97,4 @@ private:
};
#endif
-
+
diff --git a/src/vidalia/help/browser/HelpTextBrowser.cpp b/src/vidalia/help/browser/HelpTextBrowser.cpp
index d580825..5afb6c6 100644
--- a/src/vidalia/help/browser/HelpTextBrowser.cpp
+++ b/src/vidalia/help/browser/HelpTextBrowser.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -39,7 +39,7 @@ HelpTextBrowser::loadResource(int type, const QUrl &name)
/* If it's an HTML file, we'll handle it ourselves */
if (type == QTextDocument::HtmlResource) {
QString helpPath = ":/help/";
-
+
/* Fall back to English if there is no translation of the specified help
* page in the current language. */
if (!name.path().contains("/")) {
@@ -48,7 +48,7 @@ HelpTextBrowser::loadResource(int type, const QUrl &name)
language = "en";
helpPath += language + "/";
}
-
+
QFile file(helpPath + name.path());
if (!file.open(QIODevice::ReadOnly)) {
return tr("Error opening help file: ") + name.path();
@@ -76,12 +76,12 @@ HelpTextBrowser::setSource(const QUrl &url)
"anonymous.")) +
p(tr("Do you want Vidalia to open the link in your Web "
"browser?")),
- VMessageBox::Yes|VMessageBox::Default,
+ VMessageBox::Yes|VMessageBox::Default,
VMessageBox::Cancel|VMessageBox::Cancel);
-
+
if (ret == VMessageBox::Cancel)
return;
-
+
bool ok = QDesktopServices::openUrl(url);
if (!ok) {
VMessageBox::information(this,
diff --git a/src/vidalia/help/browser/HelpTextBrowser.h b/src/vidalia/help/browser/HelpTextBrowser.h
index c222eee..80929d3 100644
--- a/src/vidalia/help/browser/HelpTextBrowser.h
+++ b/src/vidalia/help/browser/HelpTextBrowser.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/LogFile.cpp b/src/vidalia/log/LogFile.cpp
index a4ec760..1b45f86 100644
--- a/src/vidalia/log/LogFile.cpp
+++ b/src/vidalia/log/LogFile.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -50,7 +50,7 @@ bool
LogFile::open(QString filename, QString *errmsg)
{
QFile *newLogFile;
-
+
/* If the file is already open, then no need to open it again */
if (_file && _file->isOpen()) {
if (_file->fileName() == filename) {
@@ -62,14 +62,14 @@ LogFile::open(QString filename, QString *errmsg)
if (!createPathToFile(filename)) {
return err(errmsg, "Unable to create path to log file.");
}
-
+
/* Try to open the new log file */
newLogFile = new QFile(filename);
if (!newLogFile->open(QFile::WriteOnly|QIODevice::Append|QIODevice::Text)) {
delete newLogFile;
return err(errmsg, newLogFile->errorString());
}
-
+
/* Rotate the new log file in place of the old one */
if (_file) {
delete _file;
diff --git a/src/vidalia/log/LogFile.h b/src/vidalia/log/LogFile.h
index 6e46522..d87d12b 100644
--- a/src/vidalia/log/LogFile.h
+++ b/src/vidalia/log/LogFile.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -36,7 +36,7 @@ public:
bool open(QString filename, QString *errmsg = 0);
/** Closes an open log file. */
void close();
-
+
/** Returns true if the logfile is currently open. */
bool isOpen();
/** Returns the filename of the current log file. */
@@ -44,7 +44,7 @@ public:
/** Overloaded ostream operator. */
LogFile& operator<<(const QString &s);
-
+
private:
/** Creates a path to the given log file */
bool createPathToFile(QString filename);
diff --git a/src/vidalia/log/LogHeaderView.cpp b/src/vidalia/log/LogHeaderView.cpp
index 1b04d3a..01ad457 100644
--- a/src/vidalia/log/LogHeaderView.cpp
+++ b/src/vidalia/log/LogHeaderView.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/LogHeaderView.h b/src/vidalia/log/LogHeaderView.h
index 96491ef..a3a3e4d 100644
--- a/src/vidalia/log/LogHeaderView.h
+++ b/src/vidalia/log/LogHeaderView.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/LogMessageColumnDelegate.cpp b/src/vidalia/log/LogMessageColumnDelegate.cpp
index 3baa749..f572973 100644
--- a/src/vidalia/log/LogMessageColumnDelegate.cpp
+++ b/src/vidalia/log/LogMessageColumnDelegate.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -30,7 +30,7 @@ LogMessageColumnDelegate::paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
- QStyleOptionViewItem styleOption = option;
+ QStyleOptionViewItem styleOption = option;
styleOption.direction = Qt::LeftToRight;
QItemDelegate::paint(painter, styleOption, index);
diff --git a/src/vidalia/log/LogMessageColumnDelegate.h b/src/vidalia/log/LogMessageColumnDelegate.h
index 6f16b38..980115e 100644
--- a/src/vidalia/log/LogMessageColumnDelegate.h
+++ b/src/vidalia/log/LogMessageColumnDelegate.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/LogTreeItem.cpp b/src/vidalia/log/LogTreeItem.cpp
index e8842bc..dd68344 100644
--- a/src/vidalia/log/LogTreeItem.cpp
+++ b/src/vidalia/log/LogTreeItem.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -29,12 +29,12 @@
/** Default constructor. */
-LogTreeItem::LogTreeItem(tc::Severity type, const QString &message,
+LogTreeItem::LogTreeItem(tc::Severity type, const QString &message,
const QDateTime ×tamp)
: QTreeWidgetItem()
{
static quint32 seqnum = 0;
-
+
/* Set this message's sequence number */
_seqnum = seqnum++;
/* Set the item's log time */
@@ -80,7 +80,7 @@ LogTreeItem::setSeverity(tc::Severity type)
setBackgroundColor(i, Qt::yellow);
}
}
-
+
setTextAlignment(COL_TYPE, Qt::AlignCenter);
setText(COL_TYPE, severityToString(type));
setData(COL_TYPE, ROLE_TYPE, (uint)type);
@@ -138,7 +138,7 @@ LogTreeItem::operator<(const QTreeWidgetItem &other) const
{
LogTreeItem *that = (LogTreeItem *)&other;
int sortColumn = (treeWidget() ? treeWidget()->sortColumn() : COL_TIME);
-
+
switch (sortColumn) {
case COL_TIME:
/* Sort chronologically */
@@ -148,14 +148,14 @@ LogTreeItem::operator<(const QTreeWidgetItem &other) const
if (this->severity() == that->severity()) {
return (this->_seqnum < that->_seqnum);
}
- /* The comparison is flipped because higher severities have
+ /* The comparison is flipped because higher severities have
* lower numeric values */
return (this->severity() > that->severity());
default:
/* Sort by message, then chronologically */
QString thisMessage = this->message().toLower();
QString thatMessage = that->message().toLower();
-
+
if (thisMessage == thatMessage) {
return (this->_seqnum < that->_seqnum);
}
diff --git a/src/vidalia/log/LogTreeItem.h b/src/vidalia/log/LogTreeItem.h
index 48426b6..b003491 100644
--- a/src/vidalia/log/LogTreeItem.h
+++ b/src/vidalia/log/LogTreeItem.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -29,7 +29,7 @@ class LogTreeItem : public QTreeWidgetItem
public:
/** Default constructor. */
- LogTreeItem(tc::Severity type, const QString &message,
+ LogTreeItem(tc::Severity type, const QString &message,
const QDateTime ×tamp = QDateTime::currentDateTime());
/** Sets the item's log time. */
@@ -47,7 +47,7 @@ public:
tc::Severity severity() const;
/** Returns the message associated with this log item. */
QString message() const;
-
+
/** Returns a printable string representation of the item's contents.*/
QString toString() const;
/** Compares <b>other</b> to this log message item based on the current sort
diff --git a/src/vidalia/log/LogTreeWidget.cpp b/src/vidalia/log/LogTreeWidget.cpp
index 0936b78..eb20bea 100644
--- a/src/vidalia/log/LogTreeWidget.cpp
+++ b/src/vidalia/log/LogTreeWidget.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -109,11 +109,11 @@ QStringList
LogTreeWidget::selectedMessages()
{
QStringList messages;
-
+
/* Get all selected log items */
- QList<LogTreeItem *> items =
+ QList<LogTreeItem *> items =
qlist_cast(selectedItems());
-
+
/* Format the message items as strings and put them in a list */
foreach (LogTreeItem *item, qlist_sort(items)) {
messages << item->toString();
@@ -146,7 +146,7 @@ void
LogTreeWidget::setMaximumMessageCount(int max)
{
while (max < messageCount() && _itemHistory.size() > 0) {
- /* If the new max is less than the currently displayed number of
+ /* If the new max is less than the currently displayed number of
* items, then we'll get rid of some. */
int index = indexOfTopLevelItem(_itemHistory.takeFirst());
if (index != -1)
@@ -249,9 +249,9 @@ LogTreeWidget::filter(uint filter)
QList<LogTreeItem *>
LogTreeWidget::find(QString text, bool highlight)
{
- QList<LogTreeItem *> items =
+ QList<LogTreeItem *> items =
qlist_cast(findItems(text, Qt::MatchContains|Qt::MatchWrap, MessageColumn));
-
+
if (highlight) {
/* Deselect all items before highlighting our search results. */
deselectAll();
diff --git a/src/vidalia/log/LogTreeWidget.h b/src/vidalia/log/LogTreeWidget.h
index 2d9ada8..298038d 100644
--- a/src/vidalia/log/LogTreeWidget.h
+++ b/src/vidalia/log/LogTreeWidget.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -39,27 +39,27 @@ public:
TypeColumn = 1, /**< Message severity type column. */
MessageColumn = 2 /**< Message text column. */
};
-
+
/** Default constructor. */
LogTreeWidget(QWidget *parent = 0);
-
+
/** Returns a list of all currently selected messages. */
QStringList selectedMessages();
/** Returns a list of all messages in the tree. */
QStringList allMessages();
/** Deselects all currently selected messages. */
void deselectAll();
-
+
/** Returns the number of items currently in the tree. */
int messageCount();
/** Sets the maximum number of items in the tree. */
void setMaximumMessageCount(int max);
/** Filters the log according to the specified filter. */
void filter(uint filter);
-
+
/** Adds a log item to the tree. */
LogTreeItem* log(tc::Severity severity, const QString &message);
-
+
/** Searches the log for entries that contain the given text. */
QList<LogTreeItem *> find(QString text, bool highlight = true);
@@ -89,6 +89,6 @@ private:
bool _scrollOnNewItem; /**< Set to true if we are to scroll to the new item
after adding a message to the log. */
};
-
+
#endif
diff --git a/src/vidalia/log/MessageLog.cpp b/src/vidalia/log/MessageLog.cpp
index 0f1c0c9..2da0d32 100644
--- a/src/vidalia/log/MessageLog.cpp
+++ b/src/vidalia/log/MessageLog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -446,7 +446,7 @@ MessageLog::find()
void
MessageLog::log(tc::Severity type, const QString &message)
{
- setUpdatesEnabled(false);
+ setUpdatesEnabled(false);
/* Only add the message if it's not being filtered out */
if (_filter & (uint)type) {
/* Add the message to the list and scroll to it if necessary. */
@@ -467,7 +467,7 @@ MessageLog::log(tc::Severity type, const QString &message)
_logFile << item->toString() << "\n";
}
}
- setUpdatesEnabled(true);
+ setUpdatesEnabled(true);
}
/** Displays help information about the message log. */
diff --git a/src/vidalia/log/MessageLog.h b/src/vidalia/log/MessageLog.h
index a4bad9d..2cb5936 100644
--- a/src/vidalia/log/MessageLog.h
+++ b/src/vidalia/log/MessageLog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -34,7 +34,7 @@ public:
MessageLog(QStatusBar *st = 0, QWidget *parent = 0);
/** Default destructor **/
~MessageLog();
-
+
protected:
/** Called when the user changes the UI translation. */
virtual void retranslateUi();
@@ -65,7 +65,7 @@ private slots:
/** Called when the user clicks "Help" to see help info about the log. */
void help();
-private:
+private:
/** Create and bind actions to events **/
void createActions();
/** Set Tool Tips for various widgets **/
@@ -85,8 +85,8 @@ private:
VidaliaSettings* _settings;
/** Stores the current message filter */
uint _filter;
- /** Set to true if we will log all messages to a file. */
- bool _enableLogging;
+ /** Set to true if we will log all messages to a file. */
+ bool _enableLogging;
/* The log file used to store log messages. */
LogFile _logFile;
diff --git a/src/vidalia/log/StatusEventItem.cpp b/src/vidalia/log/StatusEventItem.cpp
index a0ec2b2..a0d398f 100644
--- a/src/vidalia/log/StatusEventItem.cpp
+++ b/src/vidalia/log/StatusEventItem.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/StatusEventItem.h b/src/vidalia/log/StatusEventItem.h
index 8aeb1cd..ebdf2ae 100644
--- a/src/vidalia/log/StatusEventItem.h
+++ b/src/vidalia/log/StatusEventItem.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/StatusEventItemDelegate.cpp b/src/vidalia/log/StatusEventItemDelegate.cpp
index 32bbcfa..1054e5e 100644
--- a/src/vidalia/log/StatusEventItemDelegate.cpp
+++ b/src/vidalia/log/StatusEventItemDelegate.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/StatusEventItemDelegate.h b/src/vidalia/log/StatusEventItemDelegate.h
index bd24c48..71f6494 100644
--- a/src/vidalia/log/StatusEventItemDelegate.h
+++ b/src/vidalia/log/StatusEventItemDelegate.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -48,7 +48,7 @@ protected:
/** Splits <b>text</b> at <b>maxLineWidth</b> pixels computed using the
* font dimensions given by <b>fontMetrics</b> and returns a QStringList
* containing at most <b>maxLines</b> of text. If the number of wrapped
- * lines is greater than or equal to <b>maxLines</b>, the last line of
+ * lines is greater than or equal to <b>maxLines</b>, the last line of
* text will be elided. If <b>maxLines</b> is less than or equal to 0, no
* eliding will be done. If <b>textHeight</b> is not NULL, it will be set
* to the height (in pixels) required to display the returned wrapped
diff --git a/src/vidalia/log/StatusEventWidget.cpp b/src/vidalia/log/StatusEventWidget.cpp
index c496aa1..b87a251 100644
--- a/src/vidalia/log/StatusEventWidget.cpp
+++ b/src/vidalia/log/StatusEventWidget.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/log/StatusEventWidget.h b/src/vidalia/log/StatusEventWidget.h
index da12c13..e756344 100644
--- a/src/vidalia/log/StatusEventWidget.h
+++ b/src/vidalia/log/StatusEventWidget.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -45,7 +45,7 @@ public:
*/
void setMaximumItemCount(int maximumItemCount);
- /** Returns the maximum number of status items that can be displayed in
+ /** Returns the maximum number of status items that can be displayed in
* this StatusEventWidget.
*/
int maximumItemCount() const;
@@ -131,7 +131,7 @@ private slots:
/** Called when Tor decides the client's external IP address has changed
* to <b>ip</b>. If <b>hostname</b> is non-empty, Tor obtained the new
- * value for <b>ip</b> by resolving <b>hostname</b>.
+ * value for <b>ip</b> by resolving <b>hostname</b>.
*/
void externalAddressChanged(const QHostAddress &ip, const QString &hostname);
@@ -140,36 +140,36 @@ private slots:
* "NXDOMAIN".
*/
void dnsHijacked();
-
+
/** Called when Tor determines that the user's DNS provider is providing
* a hijacked address even for well-known websites.
*/
void dnsUseless();
-
- /** Indicates Tor has started testing the reachability of its OR port
+
+ /** Indicates Tor has started testing the reachability of its OR port
* using the IP address <b>ip</b> and port <b>port</b>.
*/
void checkingOrPortReachability(const QHostAddress &ip, quint16 port);
-
+
/** Tor has completed testing the reachability of its OR port using
* the IP address <b>ip</b> and port <b>port</b>. If the user's OR port
* was reachable, <b>reachable</b> will be set to true.
*/
void orPortReachabilityFinished(const QHostAddress &ip, quint16 port,
bool reachable);
-
+
/** Indicates Tor has started testing the reachability of its directory
* port using the IP address <b>ip</b> and port <b>port</b>.
*/
void checkingDirPortReachability(const QHostAddress &ip, quint16 port);
-
+
/** Tor has completed testing the reachability of its directory port using
* the IP address <b>ip</b> and port <b>port</b>. If the user's directory
* port was reachable, <b>reachable</b> will be set to true.
*/
void dirPortReachabilityFinished(const QHostAddress &ip, quint16 port,
bool reachable);
-
+
/** Called when the directory authority with IP address <b>ip</b> and
* port <b>port</b> rejected the user's server descriptor. <b>reason</b>
* describes why the descriptor was rejected (e.g., malformed, skewed
diff --git a/src/vidalia/main.cpp b/src/vidalia/main.cpp
index cf87c84..9e55234 100644
--- a/src/vidalia/main.cpp
+++ b/src/vidalia/main.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -57,7 +57,7 @@ setup_crash_reporter()
return;
}
- /* Set the Vidalia executable and options used to restart Vidalia after a
+ /* Set the Vidalia executable and options used to restart Vidalia after a
* crash. We strip off the first argument in Vidalia::arguments(), since
* it's the application name again anyway. */
CrashReporter::set_restart_options(Vidalia::applicationFilePath(),
@@ -137,7 +137,7 @@ main(int argc, char *argv[])
{
Q_INIT_RESOURCE(vidalia);
QStringList args = char_array_to_stringlist(argv+1, argc-1);
-
+
/* Construct the application object. Qt strips any command-line arguments
* that it recognizes in argv, so we'll pass a stringlist of the original
* list of command-line arguments too. */
@@ -153,7 +153,7 @@ main(int argc, char *argv[])
vApp->addLibraryPath(vApp->applicationDirPath() + "/plugins/qt");
#endif
- /* Install a signal handler to clean up properly after a catching a
+ /* Install a signal handler to clean up properly after a catching a
* SIGINT or SIGTERM. */
install_signal_handler();
@@ -179,11 +179,11 @@ main(int argc, char *argv[])
.arg(get_pid());
/* Let the user know another Vidalia is running and we are going to exit
* now. */
- int ret = VMessageBox::critical(0,
+ int ret = VMessageBox::critical(0,
vApp->translate("Vidalia",
QT_TRANSLATE_NOOP("Vidalia", "Vidalia is already running")),
vApp->translate("Vidalia",
- QT_TRANSLATE_NOOP("Vidalia",
+ QT_TRANSLATE_NOOP("Vidalia",
"Another Vidalia process is possibly already running. "
"If there really is not another Vidalia process running, "
"you can choose to continue anyway.\n\n"
diff --git a/src/vidalia/network/CircuitItem.cpp b/src/vidalia/network/CircuitItem.cpp
index d74254d..d667829 100644
--- a/src/vidalia/network/CircuitItem.cpp
+++ b/src/vidalia/network/CircuitItem.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ CircuitItem::update(const Circuit &circuit)
/* Save the Circuit object */
_circuit = circuit;
-
+
/* Use a semi-meaningful value if the path is empty */
displayedPath = circuit.length() > 0 ? circuit.routerNames().join(",")
: tr("<Path Empty>");
diff --git a/src/vidalia/network/CircuitItem.h b/src/vidalia/network/CircuitItem.h
index c2c1b7e..4070768 100644
--- a/src/vidalia/network/CircuitItem.h
+++ b/src/vidalia/network/CircuitItem.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ class CircuitItem : public QTreeWidgetItem
public:
/** Default constructor */
CircuitItem(const Circuit &circuit);
-
+
/** Adds a stream to this circuit item */
void addStream(StreamItem *stream);
/** Removes the stream item from the list and frees its memory. */
@@ -45,7 +45,7 @@ public:
Circuit circuit() const { return _circuit; }
/** Returns a list of all stream items on this circuit. */
QList<StreamItem *> streams() const;
-
+
private:
Circuit _circuit; /**< Circuit associated with this item. */
};
diff --git a/src/vidalia/network/CircuitListWidget.cpp b/src/vidalia/network/CircuitListWidget.cpp
index 5e01c9a..3871503 100644
--- a/src/vidalia/network/CircuitListWidget.cpp
+++ b/src/vidalia/network/CircuitListWidget.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -75,7 +75,7 @@ CircuitListWidget::customContextMenuRequested(const QPoint &pos)
QTreeWidgetItem *item = itemAt(pos);
if (!item)
return;
-
+
if (!item->parent()) {
/* A circuit was selected */
CircuitItem *circuitItem = dynamic_cast<CircuitItem *>(item);
@@ -93,7 +93,7 @@ CircuitListWidget::customContextMenuRequested(const QPoint &pos)
menu.addSeparator();
#endif
menu.addAction(closeAct);
-
+
/* Display the context menu and find out which (if any) action was
* selected */
QAction* action = menu.exec(mapToGlobal(pos));
@@ -106,7 +106,7 @@ CircuitListWidget::customContextMenuRequested(const QPoint &pos)
StreamItem *streamItem = dynamic_cast<StreamItem *>(item);
if (!streamItem)
return;
-
+
/* Set up the stream context menu */
QAction *closeAct = new QAction(QIcon(IMG_CLOSE),
tr("Close Stream (Del)"), this);
@@ -145,7 +145,7 @@ CircuitListWidget::addCircuit(const Circuit &circuit)
{
/* Check to see if the circuit already exists in the tree */
CircuitItem *item = findCircuitItem(circuit.id());
-
+
if (!item) {
/* Add the new circuit */
item = new CircuitItem(circuit);
@@ -200,7 +200,7 @@ CircuitListWidget::scheduleCircuitRemoval(CircuitItem *circuit, int delay)
if (!_circuitRemovalList.contains(circuit)) {
_circuitRemovalList << circuit;
QTimer::singleShot(delay, this, SLOT(removeCircuit()));
- }
+ }
}
/** Schedules the given stream to be removed after the specified timeout. */
@@ -210,7 +210,7 @@ CircuitListWidget::scheduleStreamRemoval(StreamItem *stream, int delay)
if (!_streamRemovalList.contains(stream)) {
_streamRemovalList << stream;
QTimer::singleShot(delay, this, SLOT(removeStream()));
- }
+ }
}
/** Removes the first circuit scheduled to be removed. */
@@ -240,7 +240,7 @@ CircuitListWidget::removeCircuit(CircuitItem *circuit)
int index = _streamRemovalList.indexOf(stream);
_streamRemovalList.replace(index, (StreamItem *)0);
}
-
+
/* Remove the stream item from the circuit */
circuit->removeStream(stream);
}
@@ -264,7 +264,7 @@ void
CircuitListWidget::removeStream(StreamItem *stream)
{
if (stream) {
- /* Try to get the stream's parent (a circuit item) */
+ /* Try to get the stream's parent (a circuit item) */
CircuitItem *circuit = (CircuitItem *)stream->parent();
if (circuit) {
/* Remove the stream from the circuit and delete the item */
@@ -307,11 +307,11 @@ CircuitListWidget::findStreamItem(const StreamId &streamid)
{
int numCircs = topLevelItemCount();
int numStreams;
-
+
for (int i = 0; i < numCircs; i++) {
CircuitItem *circuit = (CircuitItem *)topLevelItem(i);
numStreams = circuit->childCount();
-
+
for (int j = 0; j < numStreams; j++) {
StreamItem *stream = (StreamItem *)circuit->child(j);
if (streamid == stream->id()) {
@@ -324,14 +324,14 @@ CircuitListWidget::findStreamItem(const StreamId &streamid)
/** Called when the current item selection has changed. */
void
-CircuitListWidget::onSelectionChanged(QTreeWidgetItem *cur,
+CircuitListWidget::onSelectionChanged(QTreeWidgetItem *cur,
QTreeWidgetItem *prev)
{
Q_UNUSED(prev);
if (cur) {
Circuit circuit;
-
+
if (!cur->parent()) {
/* User selected a CircuitItem, so just grab the Circuit */
circuit = ((CircuitItem *)cur)->circuit();
@@ -352,7 +352,7 @@ CircuitListWidget::circuits()
{
int numCircs = topLevelItemCount();
CircuitList circs;
-
+
for (int i = 0; i < numCircs; i++) {
CircuitItem *circ = (CircuitItem *)topLevelItem(i);
circs << circ->circuit();
diff --git a/src/vidalia/network/CircuitListWidget.h b/src/vidalia/network/CircuitListWidget.h
index a6d92c2..1405b17 100644
--- a/src/vidalia/network/CircuitListWidget.h
+++ b/src/vidalia/network/CircuitListWidget.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -29,14 +29,14 @@
class CircuitListWidget : public QTreeWidget
{
Q_OBJECT
-
+
public:
/** Circuit list columns. */
enum Columns {
ConnectionColumn = 0, /**< Column for either the circuit or stream */
StatusColumn = 1 /**< Status of the connection. */
};
-
+
/** Default constructor */
CircuitListWidget(QWidget *parent = 0);
@@ -62,14 +62,14 @@ signals:
void closeStream(StreamId streamid);
/** Emitted when the user selects a circuit to zoom to. */
void zoomToCircuit(CircuitId circid);
-
+
public slots:
/** Clears all circuits and streams from the list. */
void clearCircuits();
private slots:
/** Removes the first circuit scheduled to be removed.*/
- void removeCircuit();
+ void removeCircuit();
/** Removes the first stream scheduled to be removed. */
void removeStream();
/** Called when the current item selectio has changed. */
diff --git a/src/vidalia/network/CountryInfo.cpp b/src/vidalia/network/CountryInfo.cpp
index c7d749a..3e0cfd9 100644
--- a/src/vidalia/network/CountryInfo.cpp
+++ b/src/vidalia/network/CountryInfo.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -271,7 +271,7 @@ CountryInfo::countryLocation(const QString &countryCode)
vInfo("Loaded %1 country location entries from built-in database.").arg(db.size());
infile.close();
}
-
+
QString cc = countryCode.toLower();
if (db.contains(cc))
return db.value(cc);
diff --git a/src/vidalia/network/CountryInfo.h b/src/vidalia/network/CountryInfo.h
index f660a12..6aeefba 100644
--- a/src/vidalia/network/CountryInfo.h
+++ b/src/vidalia/network/CountryInfo.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/GeoIpDatabase.cpp b/src/vidalia/network/GeoIpDatabase.cpp
index c1e6d40..22db539 100644
--- a/src/vidalia/network/GeoIpDatabase.cpp
+++ b/src/vidalia/network/GeoIpDatabase.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -51,7 +51,7 @@ void
GeoIpDatabase::close()
{
if (isOpen()) {
- GeoIP_delete(_db);
+ GeoIP_delete(_db);
_db = 0;
}
}
diff --git a/src/vidalia/network/GeoIpDatabase.h b/src/vidalia/network/GeoIpDatabase.h
index 48697ca..31c7ccd 100644
--- a/src/vidalia/network/GeoIpDatabase.h
+++ b/src/vidalia/network/GeoIpDatabase.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/GeoIpRecord.cpp b/src/vidalia/network/GeoIpRecord.cpp
index 25d11c1..d894c4a 100644
--- a/src/vidalia/network/GeoIpRecord.cpp
+++ b/src/vidalia/network/GeoIpRecord.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -41,7 +41,7 @@ GeoIpRecord::GeoIpRecord(const QHostAddress &ip, float latitude, float longitude
GeoIpRecord::GeoIpRecord(const QHostAddress &ip, float latitude, float longitude,
const QString &city, const QString ®ion,
- const QString &country, const QString &countryCode)
+ const QString &country, const QString &countryCode)
{
_ip = ip;
_latitude = latitude;
diff --git a/src/vidalia/network/GeoIpRecord.h b/src/vidalia/network/GeoIpRecord.h
index 002085f..4165711 100644
--- a/src/vidalia/network/GeoIpRecord.h
+++ b/src/vidalia/network/GeoIpRecord.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -58,7 +58,7 @@ public:
*/
QString city() const { return _city; }
- /** Returns the full region name (e.g., state) in which this IP address
+ /** Returns the full region name (e.g., state) in which this IP address
* resides, if known. Otherwise, returns an empty QString.
*/
QString region() const { return _region; }
@@ -81,7 +81,7 @@ public:
QString toString() const;
/** Returns true if the GeoIpRecord object is valid. A valid GeoIpRecord object must
- * have valid IP address, valid latitude and longitude coordinates and a
+ * have valid IP address, valid latitude and longitude coordinates and a
* two-letter country code.
*/
bool isValid() const;
diff --git a/src/vidalia/network/GeoIpResolver.h b/src/vidalia/network/GeoIpResolver.h
index cf39153..e4fde1c 100644
--- a/src/vidalia/network/GeoIpResolver.h
+++ b/src/vidalia/network/GeoIpResolver.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/NetViewer.h b/src/vidalia/network/NetViewer.h
index 0293306..511b242 100644
--- a/src/vidalia/network/NetViewer.h
+++ b/src/vidalia/network/NetViewer.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -94,7 +94,7 @@ private slots:
void onAuthenticated();
/** Handles when we get disconnected from Tor network */
void onDisconnected();
- /** Called when the user selects a router on the network map. Displays a
+ /** Called when the user selects a router on the network map. Displays a
* dialog with detailed information for the router specified by
* <b>id</b>.*/
void displayRouterInfo(const QString &id);
@@ -105,7 +105,7 @@ private slots:
/** Called when the user clicks "Full Screen" or presses Escape on the map.
* Toggles the map between normal and a full screen viewing modes. */
void toggleFullScreen();
- /** Called when the search of a router is triggered by the signal
+ /** Called when the search of a router is triggered by the signal
* returnPressed from the search field. */
void onRouterSearch();
diff --git a/src/vidalia/network/RouterDescriptorView.cpp b/src/vidalia/network/RouterDescriptorView.cpp
index 44376d7..2ef48eb 100644
--- a/src/vidalia/network/RouterDescriptorView.cpp
+++ b/src/vidalia/network/RouterDescriptorView.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -62,7 +62,7 @@ RouterDescriptorView::contextMenuEvent(QContextMenuEvent *event)
/** Copies any selected text to the clipboard. */
void
RouterDescriptorView::copySelectedText()
-{
+{
QString selectedText = textCursor().selection().toPlainText();
selectedText.replace(":\n", ": ");
vApp->clipboard()->setText(selectedText);
@@ -74,7 +74,7 @@ quint64
RouterDescriptorView::adjustUptime(quint64 uptime, QDateTime published)
{
QDateTime now = QDateTime::currentDateTime().toUTC();
-
+
if (now < published) {
return uptime;
}
@@ -87,23 +87,23 @@ RouterDescriptorView::display(QList<RouterDescriptor> rdlist)
{
RouterDescriptor rd;
QString html = "<html><body>";
-
- for (int r = 0; r < rdlist.size(); r++) {
+
+ for (int r = 0; r < rdlist.size(); r++) {
rd = rdlist.at(r);
if (rd.isEmpty())
continue;
-
+
/* Router name and status */
html.append(p(b(rd.name()) + " (" + i(rd.status()) + ")"));
/* IP and platform */
html.append("<table>");
-
+
/* If we have location information, show that first. */
if (!rd.location().isEmpty()) {
html.append(trow(tcol(b(tr("Location:"))) + tcol(rd.location())));
}
-
+
/* Add the IP address and router platform information */
html.append(trow(tcol(b(tr("IP Address:"))) + tcol(rd.ip().toString())));
if(!rd.platform().isEmpty())
@@ -111,12 +111,12 @@ RouterDescriptorView::display(QList<RouterDescriptor> rdlist)
/* If the router is online, then show the uptime and bandwidth stats. */
if (!rd.offline() and rd.uptime() != 0) {
- qint64 minBandwidth = (qint64)qMin(rd.observedBandwidth(),
+ qint64 minBandwidth = (qint64)qMin(rd.observedBandwidth(),
qMin(rd.averageBandwidth(),
rd.burstBandwidth()));
- html.append(trow(tcol(b(tr("Bandwidth:"))) +
+ html.append(trow(tcol(b(tr("Bandwidth:"))) +
tcol(string_format_bandwidth(minBandwidth))));
- html.append(trow(tcol(b(tr("Uptime:"))) +
+ html.append(trow(tcol(b(tr("Uptime:"))) +
tcol(string_format_uptime(
adjustUptime(rd.uptime(), rd.published())))));
}
@@ -128,14 +128,14 @@ RouterDescriptorView::display(QList<RouterDescriptor> rdlist)
html.append("</table>");
- /* If there are multiple descriptors, and this isn't is the last one
+ /* If there are multiple descriptors, and this isn't is the last one
* then separate them with a short horizontal line. */
if (r+1 != rdlist.size()) {
html.append("<center><hr width=\"50%\"/></center>");
}
}
html.append("</body></html>");
- setHtml(html);
+ setHtml(html);
}
/** Displays the given router descriptor. */
diff --git a/src/vidalia/network/RouterDescriptorView.h b/src/vidalia/network/RouterDescriptorView.h
index 94af97a..f7d08c3 100644
--- a/src/vidalia/network/RouterDescriptorView.h
+++ b/src/vidalia/network/RouterDescriptorView.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/RouterInfoDialog.cpp b/src/vidalia/network/RouterInfoDialog.cpp
index f3074d1..1731103 100644
--- a/src/vidalia/network/RouterInfoDialog.cpp
+++ b/src/vidalia/network/RouterInfoDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -58,7 +58,7 @@ RouterInfoDialog::setRouterInfo(const QStringList &desc,
}
ui.lblLastUpdated->setText(string_format_datetime(status.published()) + " GMT");
-
+
if(rd.uptime() == 0) {
ui.lblUptimeLabel->setVisible(false);
ui.lblUptime->setVisible(false);
diff --git a/src/vidalia/network/RouterInfoDialog.h b/src/vidalia/network/RouterInfoDialog.h
index 96f3117..889e08a 100644
--- a/src/vidalia/network/RouterInfoDialog.h
+++ b/src/vidalia/network/RouterInfoDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/RouterListItem.cpp b/src/vidalia/network/RouterListItem.cpp
index c2a8c85..e26cb94 100644
--- a/src/vidalia/network/RouterListItem.cpp
+++ b/src/vidalia/network/RouterListItem.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -58,7 +58,7 @@ RouterListItem::update(const RouterDescriptor &rd)
delete _rd;
}
_rd = new RouterDescriptor(rd);
-
+
/* Determine the status value (used for sorting) and icon */
if (_rd->offline()) {
_statusValue = -1;
@@ -69,7 +69,7 @@ RouterListItem::update(const RouterDescriptor &rd)
statusIcon = QIcon(IMG_NODE_SLEEPING);
setToolTip(STATUS_COLUMN, tr("Hibernating"));
} else {
- _statusValue = (qint64)qMin(_rd->observedBandwidth(),
+ _statusValue = (qint64)qMin(_rd->observedBandwidth(),
qMin(_rd->averageBandwidth(),
_rd->burstBandwidth()));
if (_statusValue >= 400*1024) {
@@ -83,7 +83,7 @@ RouterListItem::update(const RouterDescriptor &rd)
}
setToolTip(STATUS_COLUMN, tr("%1 KB/s").arg(_statusValue/1024));
}
-
+
/* Make the new information visible */
setIcon(STATUS_COLUMN, statusIcon);
setText(NAME_COLUMN, _rd->name());
@@ -113,7 +113,7 @@ RouterListItem::operator<(const QTreeWidgetItem &other) const
{
const RouterListItem *a = this;
const RouterListItem *b = (RouterListItem *)&other;
-
+
if (_list) {
Qt::SortOrder order = _list->header()->sortIndicatorOrder();
switch (_list->sortColumn()) {
diff --git a/src/vidalia/network/RouterListItem.h b/src/vidalia/network/RouterListItem.h
index f50f53a..4397947 100644
--- a/src/vidalia/network/RouterListItem.h
+++ b/src/vidalia/network/RouterListItem.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/RouterListWidget.cpp b/src/vidalia/network/RouterListWidget.cpp
index 851a5ea..50a1d0c 100644
--- a/src/vidalia/network/RouterListWidget.cpp
+++ b/src/vidalia/network/RouterListWidget.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -36,7 +36,7 @@ RouterListWidget::RouterListWidget(QWidget *parent)
sortItems(StatusColumn, Qt::DescendingOrder);
/* Find out when the selected item has changed. */
- connect(this, SIGNAL(itemSelectionChanged()),
+ connect(this, SIGNAL(itemSelectionChanged()),
this, SLOT(onSelectionChanged()));
}
@@ -173,14 +173,14 @@ RouterListWidget::searchNextRouter(const QString routerNickname)
/* currentIndex().row() = -1 if no item is selected. */
int startIndex = currentIndex().row() + 1;
/* Search for a router whose name start with routerNickname. Case-insensitive search. */
- QModelIndexList qmIndList = model()->match(model()->index(startIndex, NameColumn),
- Qt::DisplayRole,
+ QModelIndexList qmIndList = model()->match(model()->index(startIndex, NameColumn),
+ Qt::DisplayRole,
QVariant(routerNickname),
1,
(Qt::MatchStartsWith | Qt::MatchWrap));
if (qmIndList.count() > 0) {
setCurrentIndex(qmIndList.at(0));
- /* If item at currentIndex() was already selected but not visible,
+ /* If item at currentIndex() was already selected but not visible,
* make it visible. */
scrollToItem(itemFromIndex(currentIndex()));
}
@@ -192,7 +192,7 @@ void
RouterListWidget::keyPressEvent(QKeyEvent *event)
{
int index;
-
+
QString key = event->text();
if (!key.isEmpty() && key.at(0).isLetterOrNumber()) {
/* A text key was pressed, so search for routers that begin with that key. */
@@ -203,7 +203,7 @@ RouterListWidget::keyPressEvent(QKeyEvent *event)
NameColumn);
if (list.size() > 0) {
QList<QTreeWidgetItem *> s = selectedItems();
-
+
/* A match was found, so deselect any previously selected routers,
* select the new match, and make sure it's visible. If there was
* already a router selected that started with the search key, go to the
@@ -222,7 +222,7 @@ RouterListWidget::keyPressEvent(QKeyEvent *event)
}
}
-/** Finds the list item whose key ID matches <b>id</b>. Returns 0 if not
+/** Finds the list item whose key ID matches <b>id</b>. Returns 0 if not
* found. */
RouterListItem*
RouterListWidget::findRouterById(QString id)
@@ -256,7 +256,7 @@ RouterListWidget::addRouter(const RouterDescriptor &rd)
return item;
}
-/** Called when the selected items have changed. This emits the
+/** Called when the selected items have changed. This emits the
* routerSelected() signal with the descriptor for the selected router.
*/
void
diff --git a/src/vidalia/network/RouterListWidget.h b/src/vidalia/network/RouterListWidget.h
index 95b471e..e16646e 100644
--- a/src/vidalia/network/RouterListWidget.h
+++ b/src/vidalia/network/RouterListWidget.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -47,7 +47,7 @@ public:
/** Adds a new descriptor the list. */
RouterListItem* addRouter(const RouterDescriptor &rd);
- /** Finds the list item whose key ID matches <b>id</b>. Returns 0 if not
+ /** Finds the list item whose key ID matches <b>id</b>. Returns 0 if not
* found. */
RouterListItem* findRouterById(QString id);
/** Deselects all currently selected routers. */
@@ -66,7 +66,7 @@ signals:
public slots:
/** Clears the list of router items. */
void clearRouters();
- /** Called when the search of a router is triggered by the signal
+ /** Called when the search of a router is triggered by the signal
* textChanged from the search field. */
void onRouterSearch(const QString routerNickname);
diff --git a/src/vidalia/network/StreamItem.cpp b/src/vidalia/network/StreamItem.cpp
index 27823f4..5083b81 100644
--- a/src/vidalia/network/StreamItem.cpp
+++ b/src/vidalia/network/StreamItem.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -23,7 +23,7 @@ StreamItem::StreamItem(const Stream &stream)
/* Set the stream's displayed target information */
setText(CircuitListWidget::ConnectionColumn, stream.target());
setToolTip(CircuitListWidget::ConnectionColumn, stream.target());
-
+
/* Update the status and target */
update(stream);
}
diff --git a/src/vidalia/network/StreamItem.h b/src/vidalia/network/StreamItem.h
index 2842423..ea8d906 100644
--- a/src/vidalia/network/StreamItem.h
+++ b/src/vidalia/network/StreamItem.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -32,7 +32,7 @@ public:
void update(const Stream &stream);
/** Returns the ID of the stream associated with this tree item. */
StreamId id() const { return _stream.id(); }
-
+
private:
Stream _stream;
};
diff --git a/src/vidalia/network/TorMapImageView.h b/src/vidalia/network/TorMapImageView.h
index ca26c94..7f34525 100644
--- a/src/vidalia/network/TorMapImageView.h
+++ b/src/vidalia/network/TorMapImageView.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -75,7 +75,7 @@ private:
/** Computes a bounding box around all currently displayed circuit paths on
* the map. */
QRectF circuitBoundingBox();
-
+
/** Stores map locations for tor routers */
QHash<QString, QPair<QPointF,bool>* > _routers;
/** Stores circuit information */
diff --git a/src/vidalia/network/TorMapWidget.cpp b/src/vidalia/network/TorMapWidget.cpp
index aa8abd7..2c12424 100644
--- a/src/vidalia/network/TorMapWidget.cpp
+++ b/src/vidalia/network/TorMapWidget.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -57,7 +57,7 @@ TorMapWidget::TorMapWidget(QWidget *parent)
inputHandler()->setMouseButtonPopupEnabled(Qt::RightButton, false);
// Hack to disable Marble's menus
- disconnect(inputHandler(), SIGNAL(lmbRequest(int,int)),
+ disconnect(inputHandler(), SIGNAL(lmbRequest(int,int)),
0,0);
connect(inputHandler(), SIGNAL(lmbRequest(int,int)),
@@ -145,7 +145,7 @@ TorMapWidget::removeCircuit(const CircuitId &circid)
repaint();
}
-/** Selects and highlights the circuit with the id <b>circid</b>
+/** Selects and highlights the circuit with the id <b>circid</b>
* on the map. */
void
TorMapWidget::selectCircuit(const CircuitId &circid)
@@ -185,7 +185,7 @@ TorMapWidget::clear()
repaint();
}
-
+
/** Zooms the map to fit entirely within the constraints of the current
* viewport size. */
void
diff --git a/src/vidalia/network/TorMapWidget.h b/src/vidalia/network/TorMapWidget.h
index bfc946b..c03dedc 100644
--- a/src/vidalia/network/TorMapWidget.h
+++ b/src/vidalia/network/TorMapWidget.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/TorMapWidgetPopupMenu.cpp b/src/vidalia/network/TorMapWidgetPopupMenu.cpp
index 983b16e..bd53dbc 100644
--- a/src/vidalia/network/TorMapWidgetPopupMenu.cpp
+++ b/src/vidalia/network/TorMapWidgetPopupMenu.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/TorMapWidgetPopupMenu.h b/src/vidalia/network/TorMapWidgetPopupMenu.h
index 4381b72..546b9ae 100644
--- a/src/vidalia/network/TorMapWidgetPopupMenu.h
+++ b/src/vidalia/network/TorMapWidgetPopupMenu.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/network/ZImageView.cpp b/src/vidalia/network/ZImageView.cpp
index c0cad4f..697977b 100644
--- a/src/vidalia/network/ZImageView.cpp
+++ b/src/vidalia/network/ZImageView.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -82,13 +82,13 @@ ZImageView::drawScaledImage()
// aspect ratio as the screen, so we cut the _view region out of the _image
// and scale it to the screen dimensions and paint it.
- // There is a slight catch in that the _view may be larger than the image in
+ // There is a slight catch in that the _view may be larger than the image in
// one or both directions. In that case, we need to reduce the _view region
// to lie within the image, then paint the background around it. Copying
// a region from an image where the region is bigger than the image results
// in the parts outside the image being black, which is not what we want.
- // The view has the same aspect ratio as the screen, so the vertical and
+ // The view has the same aspect ratio as the screen, so the vertical and
// horizontal scale factors will be equal.
double scaleFactor = double(sRect.width()) / double(_view.width());
@@ -108,12 +108,12 @@ ZImageView::drawScaledImage()
}
// Figure out the size that the 'r' region will be when drawn to the screen.
- QSize scaleTo(int(double(r.width()) * scaleFactor),
+ QSize scaleTo(int(double(r.width()) * scaleFactor),
int(double(r.height()) * scaleFactor));
/** Make a copy of the image so we don't ruin the original */
QImage i = _image.copy();
-
+
/** Create a QPainter that draws directly on the copied image and call the
* virtual function to draw whatever the subclasses need to on the image. */
QPainter painter;
@@ -132,7 +132,7 @@ ZImageView::drawScaledImage()
// We don't want to paint the background
// because this isn't double buffered and that would flicker.
// We could double buffer it, but that would cost ~3 MB of memory.
-
+
QPainter p(this);
if (extraWidth > 0) {
p.fillRect(0, 0, extraWidth, sRect.height(), background);
@@ -149,14 +149,14 @@ ZImageView::drawScaledImage()
// Finally, paint the image copy.
p.drawImage(extraWidth, extraHeight, i);
}
-
+
/** Updates the displayed viewport. */
void
ZImageView::updateViewport(int screendx, int screendy)
{
/* The gist of this is to find the biggest and smallest possible viewports,
- * then use the _zoom factor to interpolate between them. Also pan the
- * viewport, but constrain each dimension to lie within the image or to be
+ * then use the _zoom factor to interpolate between them. Also pan the
+ * viewport, but constrain each dimension to lie within the image or to be
* centered if the image is too small in that direction. */
QRect sRect = rect();
@@ -166,9 +166,9 @@ ZImageView::updateViewport(int screendx, int screendy)
float sh = float(sRect.height());
float iw = float(iRect.width());
float ih = float(iRect.height());
-
- // Get the initial max and min sizes for the viewport. These won't have the
- // correct aspect ratio. They will actually be the least upper bound and
+
+ // Get the initial max and min sizes for the viewport. These won't have the
+ // correct aspect ratio. They will actually be the least upper bound and
// greatest lower bound of the set containing the screen and image rects.
float maxw = float(std::max<int>(sRect.width(), iRect.width())) + _padding;
float maxh = float(std::max<int>(sRect.height(), iRect.height())) + _padding;
@@ -194,7 +194,7 @@ ZImageView::updateViewport(int screendx, int screendy)
newminw = minw;
newminh = newminw / aspect;
}
-
+
// Now interpolate between max and min.
float vw = (1.0f - _zoom) * (newmaxw - newminw) + newminw;
float vh = (1.0f - _zoom) * (newmaxh - newminh) + newminh;
@@ -207,7 +207,7 @@ ZImageView::updateViewport(int screendx, int screendy)
// Convert the pan delta from screen coordinates to view coordinates.
float vdx = vw * (float(screendx) / sw);
float vdy = vh * (float(screendy) / sh);
-
+
// Constrain the center of the viewport to the image rect.
_desiredX = qBound(0.0f, _desiredX + vdx, iw);
_desiredY = qBound(0.0f, _desiredY + vdy, ih);
@@ -222,10 +222,10 @@ ZImageView::updateViewport(int screendx, int screendy)
//
// If the viewport is smaller than the image in either direction, then make
// sure the edge of the viewport isn't past the edge of the image.
-
+
vdx = 0;
vdy = 0;
-
+
if (iw <= vw) {
vdx = (iw / 2.0f) - vx; // Center horizontally.
} else {
@@ -238,7 +238,7 @@ ZImageView::updateViewport(int screendx, int screendy)
vdx = iw - vr;
}
}
-
+
if (ih <= vh) {
vdy = (ih / 2.0f) - vy; // Center vertically.
} else {
@@ -316,7 +316,7 @@ ZImageView::mousePressEvent(QMouseEvent *e)
}
/** Responds to the user releasing a mouse button. */
-void
+void
ZImageView::mouseReleaseEvent(QMouseEvent *e)
{
e->accept();
@@ -332,8 +332,8 @@ void
ZImageView::mouseDoubleClickEvent(QMouseEvent *e)
{
e->accept();
-
- QPoint center = rect().center();
+
+ QPoint center = rect().center();
int dx = e->x() - center.x();
int dy = e->y() - center.y();
updateViewport(dx, dy);
diff --git a/src/vidalia/network/ZImageView.h b/src/vidalia/network/ZImageView.h
index 436b3d9..66dd9ce 100644
--- a/src/vidalia/network/ZImageView.h
+++ b/src/vidalia/network/ZImageView.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -30,7 +30,7 @@ public:
ZImageView(QWidget *parent = 0);
/** Sets the displayed image. */
void setImage(QImage& pixmap);
-
+
public slots:
/** Resets the center zoom point back to the center of the viewport. */
void resetZoomPoint();
@@ -63,12 +63,12 @@ protected:
/** Update the viewport. This will set _view to a region that,
* when copied from the image and scaled to the screen size, will
* show what is expected. The _view may be larger in one or more
- * directions than the image, and you must deal with the
+ * directions than the image, and you must deal with the
* non-overlapping regions. */
void updateViewport(int screendx=0, int screendy=0);
/** Redraws the scaled image in the viewport. */
void drawScaledImage();
-
+
private:
float _zoom; /**< The current zoom level. */
QImage _image; /**< The displayed image. */
@@ -77,7 +77,7 @@ private:
int _mouseX; /**< The x-coordinate of the current mouse position. */
int _mouseY; /**< The y-coordinate of the current mouse position. */
-
+
QRect _view; /**< The displayed viewport. */
float _desiredX; /**< The X value we desire (???). */
float _desiredY; /**< The Y value we desire (???). */
diff --git a/src/vidalia/plugin/DebugDialog.cpp b/src/vidalia/plugin/DebugDialog.cpp
index 683ed6a..a6105c4 100644
--- a/src/vidalia/plugin/DebugDialog.cpp
+++ b/src/vidalia/plugin/DebugDialog.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/plugin/DebugDialog.h b/src/vidalia/plugin/DebugDialog.h
index 7f6ff0a..3367e64 100644
--- a/src/vidalia/plugin/DebugDialog.h
+++ b/src/vidalia/plugin/DebugDialog.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/plugin/PluginEngine.cpp b/src/vidalia/plugin/PluginEngine.cpp
index b3c35c1..8fb2833 100644
--- a/src/vidalia/plugin/PluginEngine.cpp
+++ b/src/vidalia/plugin/PluginEngine.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -48,7 +48,7 @@ PluginEngine::PluginEngine(QObject *parent)
loadAllPlugins();
}
-PluginEngine::~PluginEngine()
+PluginEngine::~PluginEngine()
{
foreach(PluginWrapper *wrapper, wrappers)
wrapper->stop();
@@ -63,7 +63,7 @@ PluginEngine::loadAllPlugins()
QDir path = QDir(settings.pluginPath());
DebugDialog::outputDebug(QString("PluginPath=%1").arg(path.absolutePath()));
-
+
foreach(QString pdir, path.entryList(QDir::NoDotAndDotDot|QDir::AllDirs)) {
QFileInfo finfo(QString("%1%2%3")
.arg(path.absolutePath())
@@ -86,7 +86,7 @@ PluginEngine::tryLoadPlugin(QDir path)
.arg(path.absolutePath()));
return;
}
-
+
PluginWrapper *wrapper = new PluginWrapper(QString("%1%2info.xml")
.arg(path.absolutePath())
.arg(QDir::separator()), this);
@@ -111,13 +111,13 @@ PluginEngine::getAllActions()
return actions;
}
-QScriptValue
+QScriptValue
PluginEngine::importExtension(QScriptContext *context, QScriptEngine *engine)
{
return engine->importExtension(context->argument(0).toString());
}
-//QScriptValue
+//QScriptValue
//PluginEngine::includeScript(QScriptContext *context, QScriptEngine *engine)
//{
// VidaliaSettings settings;
@@ -134,7 +134,7 @@ PluginEngine::importExtension(QScriptContext *context, QScriptEngine *engine)
// return engine->toScriptValue(true);
//}
-//bool
+//bool
//PluginEngine::loadFile(QString fileName, QScriptEngine *engine)
//{
// static QSet<QString> loadedFiles;
diff --git a/src/vidalia/plugin/PluginEngine.h b/src/vidalia/plugin/PluginEngine.h
index eea0d81..605f3c6 100644
--- a/src/vidalia/plugin/PluginEngine.h
+++ b/src/vidalia/plugin/PluginEngine.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
diff --git a/src/vidalia/plugin/PluginWrapper.cpp b/src/vidalia/plugin/PluginWrapper.cpp
index 476b1db..15634b5 100644
--- a/src/vidalia/plugin/PluginWrapper.cpp
+++ b/src/vidalia/plugin/PluginWrapper.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file PluginWrapper.cpp
** \brief Wrapper for the plugin scripts
*/
@@ -46,7 +46,7 @@ PluginWrapper::PluginWrapper(const QString &info_path, PluginEngine *engine, QOb
.arg(res.errorMessage())
.arg(name()));
}
- } else
+ } else
DebugDialog::outputDebug(tr("%1: Error opening file %2")
.arg(name()).arg(path));
}
@@ -171,19 +171,19 @@ PluginWrapper::checkExceptions()
return false;
}
-bool
+bool
PluginWrapper::hasGUI()
{
return _gui;
}
-bool
+bool
PluginWrapper::isPersistent()
{
return _persistent;
}
-QString
+QString
PluginWrapper::name() const
{
if(_name.isEmpty())
@@ -191,25 +191,25 @@ PluginWrapper::name() const
return _name;
}
-QString
+QString
PluginWrapper::date() const
{
return _date;
}
-QString
+QString
PluginWrapper::author() const
{
return _author;
}
-QString
+QString
PluginWrapper::nspace() const
{
return _nspace;
}
-QStringList
+QStringList
PluginWrapper::files() const
{
return _files;
diff --git a/src/vidalia/plugin/PluginWrapper.h b/src/vidalia/plugin/PluginWrapper.h
index 1253bee..288c62f 100644
--- a/src/vidalia/plugin/PluginWrapper.h
+++ b/src/vidalia/plugin/PluginWrapper.h
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file PluginWrapper.h
** \brief Wrapper for the plugin scripts
*/
diff --git a/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp b/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
index 2de8cf6..44f6c02 100644
--- a/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
+++ b/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
@@ -1,14 +1,14 @@
/*
** This file is part of Vidalia, and is subject to the license terms in the
-** LICENSE file, found in the top level directory of this distribution. If
+** LICENSE file, found in the top level directory of this distribution. If
** you did not receive the LICENSE file with this file, you may obtain it
** from the Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
-/*
+/*
** \file HelperProcessPrototype.cpp
** \brief Prototype for the HelperProcess class
*/
@@ -25,7 +25,7 @@ HelperProcessPrototype::constructor(QScriptContext *context, QScriptEngine *engi
return engine->newQObject(new HelperProcess(), QScriptEngine::ScriptOwnership);
}
-int
+int
HelperProcessPrototype::metaTypeId()
{
return qMetaTypeId<HelperProcess *>();
@@ -37,7 +37,7 @@ HelperProcessPrototype::name()
return QString("HelperProcess");
}
-void
+void
HelperProcessPrototype::start(const QString &app, const QString &args)
{
HelperProcess *obj = qscriptvalue_cast<HelperProcess *>(thisObject());
@@ -46,7 +46,7 @@ HelperProcessPrototype::start(const QString &app, const QString &args)
obj->start(app, args);
}
-void
+void
HelperProcessPrototype::start(const QString &app, const QStringList &args)
{
HelperProcess *obj = qscriptvalue_cast<HelperProcess *>(thisObject());
@@ -55,7 +55,7 @@ HelperProcessPrototype::start(const QString &app, const QStringList &args)
obj->start(app, args);
}
-bool
+bool
HelperProcessPrototype::isDone() const
{
HelperProcess *obj = qscriptvalue_cast<HelperProcess *>(thisObject());
diff --git a/src/vidalia/plugin/prototypes/TorControlPrototype.cpp b/src/vidalia/plugin/prototypes/TorControlPrototype.cpp
index 742a428..c963645 100644
--- a/src/vidalia/plugin/prototypes/TorControlPrototype.cpp
+++ b/src/vidalia/plugin/prototypes/TorControlPrototype.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -68,7 +68,7 @@ type##Prototype::func \
TorControlPrototype::TorControlPrototype()
: QObject(), QScriptable() {}
-int
+int
TorControlPrototype::metaTypeId() {
return qMetaTypeId<TorControl *>();
}
@@ -78,7 +78,7 @@ TorControlPrototype::name() {
return QString("TorControl");
}
-DEF_TYPE0(TorControl, void,
+DEF_TYPE0(TorControl, void,
start(const QString &tor, const QStringList &args),
start(tor, args))
@@ -134,7 +134,7 @@ DEF_TYPE1(TorControl, bool,
// return MERGE2(info, errmsg);
//}
-//BootstrapStatus
+//BootstrapStatus
//TorControlPrototype::bootstrapStatus(QString *errmsg)
//{
// BootstrapStatus status;
@@ -192,7 +192,7 @@ DEF_TYPE1(TorControl, bool,
// TODO: make it a QVariant(QList<QVariant>() << QVariant(QString) <<
// QVariant(QString) ...
-QStringList
+QStringList
TorControlPrototype::getSocksAddressList(QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -206,7 +206,7 @@ DEF_TYPE1(TorControl, quint16,
getSocksPort(&errmsg))
// TODO: same as getSocksAddressList but with quint16
-QList<quint16>
+QList<quint16>
TorControlPrototype::getSocksPortList(QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -248,7 +248,7 @@ DEF_TYPE1(TorControl, bool,
//DEF_TYPE2(TorControl, bool, QHash<QString,QString>,
// getConf(QHash<QString,QString> &map),
// getConf(map, &errmsg))
-bool
+bool
TorControlPrototype::getConf(QHash<QString,QString> &map, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -258,7 +258,7 @@ TorControlPrototype::getConf(QHash<QString,QString> &map, QString *errmsg)
}
// TODO: this one too
-bool
+bool
TorControlPrototype::getConf(QHash<QString,QStringList> &map, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -272,7 +272,7 @@ DEF_TYPE2(TorControl, bool, QString,
getConf(key, ans, &errmsg))
// TODO: same as the last one with StringList
-bool
+bool
TorControlPrototype::getConf(QString key, QStringList &value, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -282,7 +282,7 @@ TorControlPrototype::getConf(QString key, QStringList &value, QString *errmsg)
}
// TODO: idem
-QVariantMap
+QVariantMap
TorControlPrototype::getConf(const QStringList &keys, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -292,7 +292,7 @@ TorControlPrototype::getConf(const QStringList &keys, QString *errmsg)
}
// TODO: possibly useless
-//QVariant
+//QVariant
//TorControlPrototype::getConf(const QString &key, QString *errmsg)
//{
// TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -310,7 +310,7 @@ DEF_TYPE1(TorControl, bool,
saveConf(&errmsg))
// TODO: another stringlist one
-bool
+bool
TorControlPrototype::resetConf(QStringList keys, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -324,7 +324,7 @@ DEF_TYPE1(TorControl, bool,
resetConf(key, &errmsg))
// TODO: you know
-QStringList
+QStringList
TorControlPrototype::getRouterDescriptorText(const QString &id, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -334,7 +334,7 @@ TorControlPrototype::getRouterDescriptorText(const QString &id, QString *errmsg)
}
// TODO: QVariantize RouterDescriptor
-RouterDescriptor
+RouterDescriptor
TorControlPrototype::getRouterDescriptor(const QString &id, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -344,7 +344,7 @@ TorControlPrototype::getRouterDescriptor(const QString &id, QString *errmsg)
}
// TODO: QVariantize RouterStatus
-RouterStatus
+RouterStatus
TorControlPrototype::getRouterStatus(const QString &id, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -354,7 +354,7 @@ TorControlPrototype::getRouterStatus(const QString &id, QString *errmsg)
}
// TODO: QVariantize NetworkStatus
-NetworkStatus
+NetworkStatus
TorControlPrototype::getNetworkStatus(QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -364,7 +364,7 @@ TorControlPrototype::getNetworkStatus(QString *errmsg)
}
// TODO: QVariantize DescriptorAnnotations
-DescriptorAnnotations
+DescriptorAnnotations
TorControlPrototype::getDescriptorAnnotations(const QString &id, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -374,7 +374,7 @@ TorControlPrototype::getDescriptorAnnotations(const QString &id, QString *errmsg
}
// TODO: QVariantize CircuitList
-CircuitList
+CircuitList
TorControlPrototype::getCircuits(QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -384,7 +384,7 @@ TorControlPrototype::getCircuits(QString *errmsg)
}
// TODO: QVariantize StreamList
-StreamList
+StreamList
TorControlPrototype::getStreams(QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -394,7 +394,7 @@ TorControlPrototype::getStreams(QString *errmsg)
}
// TODO: QVariantize AddressMap
-AddressMap
+AddressMap
TorControlPrototype::getAddressMap(AddressMap::AddressMapType type, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -408,7 +408,7 @@ DEF_TYPE1(TorControl, QString,
ipToCountry(ip, &errmsg))
// TODO: migrate CircuitId
-bool
+bool
TorControlPrototype::closeCircuit(const CircuitId &circId, bool ifUnused, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
@@ -418,7 +418,7 @@ TorControlPrototype::closeCircuit(const CircuitId &circId, bool ifUnused, QStrin
}
// TODO: migrate StreamId
-bool
+bool
TorControlPrototype::closeStream(const StreamId &streamId, QString *errmsg)
{
TorControl *obj = qscriptvalue_cast<TorControl *>(thisObject());
diff --git a/src/vidalia/plugin/prototypes/TorControlPrototype.h b/src/vidalia/plugin/prototypes/TorControlPrototype.h
index eb0cc6b..071b90b 100644
--- a/src/vidalia/plugin/prototypes/TorControlPrototype.h
+++ b/src/vidalia/plugin/prototypes/TorControlPrototype.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -25,7 +25,7 @@
class TorControlPrototype : public QObject, QScriptable
{
Q_OBJECT
-
+
public:
TorControlPrototype();
@@ -55,14 +55,14 @@ public:
Q_INVOKABLE QVariant authenticate(const QByteArray cookie);
/** Sends an authentication password to Tor. */
Q_INVOKABLE QVariant authenticate(const QString &password = QString());
-
+
/** Sends a PROTOCOLINFO command to Tor and parses the response. */
// Q_INVOKABLE QVariant protocolInfo();
/** Returns the Tor software's current bootstrap phase and status. */
// Q_INVOKABLE BootstrapStatus bootstrapStatus(QString *errmsg = 0);
- /** Returns true if Tor either has an open circuit or (on Tor >=
+ /** Returns true if Tor either has an open circuit or (on Tor >=
* 0.2.0.1-alpha) has previously decided it's able to establish a circuit. */
Q_INVOKABLE bool isCircuitEstablished();
@@ -82,11 +82,11 @@ public:
/** Sends a signal to Tor */
Q_INVOKABLE QVariant signal(TorSignal::Signal sig);
-
+
/** Returns an address on which Tor is listening for application
* requests. If none are available, a null QHostAddress is returned. */
// Q_INVOKABLE QVariant getSocksAddress();
- /** Returns a (possibly empty) list of all currently configured
+ /** Returns a (possibly empty) list of all currently configured
* SocksListenAddress entries. */
Q_INVOKABLE QStringList getSocksAddressList(QString *errmsg = 0);
/** Returns a valid SOCKS port for Tor, or 0 if Tor is not accepting
@@ -135,7 +135,7 @@ public:
/** Sends a GETCONF message to Tor with the single key and returns a QString
* containing the value returned by Tor */
Q_INVOKABLE QVariant getHiddenServiceConf(const QString &key);
-
+
/** Asks Tor to save the current configuration to its torrc */
Q_INVOKABLE QVariant saveConf();
/** Tells Tor to reset the given configuration keys back to defaults. */
@@ -171,7 +171,7 @@ public:
Q_INVOKABLE CircuitList getCircuits(QString *errmsg = 0);
/** Gets a list of current streams. */
Q_INVOKABLE StreamList getStreams(QString *errmsg = 0);
-
+
/** Gets a list of address mappings of the type specified by <b>type</b>
* (defaults to <i>AddressMapAll</i>. */
Q_INVOKABLE AddressMap getAddressMap(
@@ -281,7 +281,7 @@ signals:
/** Emitted when Tor decides the client's external IP address has changed
* to <b>ip</b>. If <b>hostname</b> is non-empty, Tor obtained the new
- * value for <b>ip</b> by resolving <b>hostname</b>.
+ * value for <b>ip</b> by resolving <b>hostname</b>.
*/
void externalAddressChanged(const QHostAddress &ip, const QString &hostname);
@@ -306,7 +306,7 @@ signals:
*/
void dnsUseless();
- /** Indicates Tor has started testing the reachability of its OR port
+ /** Indicates Tor has started testing the reachability of its OR port
* using the IP address <b>ip</b> and port <b>port</b>.
*/
void checkingOrPortReachability(const QHostAddress &ip, quint16 port);
diff --git a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp
index 8f71a37..6d902a3 100644
--- a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp
+++ b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
@@ -35,7 +35,7 @@ VidaliaTabPrototype::constructor(QScriptContext *context, QScriptEngine *engine)
return engine->newQObject(new VidaliaTab(title, name), QScriptEngine::ScriptOwnership);
}
-int
+int
VidaliaTabPrototype::metaTypeId()
{
return qMetaTypeId<VidaliaTab *>();
@@ -56,7 +56,7 @@ VidaliaTabPrototype::setLayout(QLayout *layout)
obj->setLayout(layout);
}
-QVariant
+QVariant
VidaliaTabPrototype::getSetting(QString name, QVariant defaultValue)
{
VidaliaTab *obj = qscriptvalue_cast<VidaliaTab *>(thisObject());
@@ -65,7 +65,7 @@ VidaliaTabPrototype::getSetting(QString name, QVariant defaultValue)
return obj->getSetting(name, defaultValue);
}
-void
+void
VidaliaTabPrototype::saveSetting(QString name, QVariant value)
{
VidaliaTab *obj = qscriptvalue_cast<VidaliaTab *>(thisObject());
diff --git a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h
index dcc355b..2a79a28 100644
--- a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h
+++ b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h
@@ -3,8 +3,8 @@
** LICENSE file, found in the top level directory of this distribution. If you
** did not receive the LICENSE file with this file, you may obtain it from the
** Vidalia source package distributed by the Vidalia Project at
-** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-** including this file, may be copied, modified, propagated, or distributed
+** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
+** including this file, may be copied, modified, propagated, or distributed
** except according to the terms described in the LICENSE file.
*/
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits