[tor-commits] [vidalia/master] Remove trailing whitespace and wrongly used tabs instead of spaces
chiiph at torproject.org
chiiph at torproject.org
Sun Apr 15 21:00:17 UTC 2012
commit 4a5b382ff7c4c137dc0aaec0fac529900a9d6ef5
Author: Tomás Touceda <chiiph at torproject.org>
Date: Sun Apr 15 15:52:20 2012 -0300
Remove trailing whitespace and wrongly used tabs instead of spaces
---
pkg/build-geoip-cache.sh | 8 +-
pkg/package.sh | 8 +-
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 | 26 ++--
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/Circuit.cpp | 12 +-
src/torcontrol/Circuit.h | 12 +-
src/torcontrol/ControlCommand.cpp | 10 +-
src/torcontrol/ControlCommand.h | 10 +-
src/torcontrol/ControlConnection.cpp | 40 +++---
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.cpp | 6 +-
src/torcontrol/RouterDescriptor.h | 14 +-
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/TorControl.cpp | 4 +-
src/torcontrol/TorControl.h | 26 ++--
src/torcontrol/TorEvents.cpp | 22 ++--
src/torcontrol/TorEvents.h | 10 +-
src/torcontrol/TorProcess.cpp | 24 ++--
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 | 10 +-
src/vidalia/CrashReporter.h | 4 +-
src/vidalia/HelperProcess.cpp | 18 ++--
src/vidalia/HelperProcess.h | 12 +-
src/vidalia/LanguageSupport.cpp | 26 ++--
src/vidalia/LanguageSupport.h | 4 +-
src/vidalia/MainWindow.cpp | 138 ++++++++++----------
src/vidalia/MainWindow.h | 4 +-
src/vidalia/PackageInfo.cpp | 4 +-
src/vidalia/PackageInfo.h | 6 +-
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/VClickLabel.cpp | 4 +-
src/vidalia/VClickLabel.h | 10 +-
src/vidalia/VMessageBox.cpp | 28 ++--
src/vidalia/VMessageBox.h | 20 ++--
src/vidalia/Vidalia.cpp | 16 +-
src/vidalia/Vidalia.h | 20 ++--
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.h | 8 +-
src/vidalia/config/AbstractTorSettings.cpp | 10 +-
src/vidalia/config/AbstractTorSettings.h | 10 +-
src/vidalia/config/AdvancedPage.cpp | 30 ++--
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/ConfigDialog.cpp | 30 ++--
src/vidalia/config/ConfigDialog.h | 4 +-
src/vidalia/config/ConfigPage.h | 8 +-
src/vidalia/config/ConfigPageStack.cpp | 4 +-
src/vidalia/config/ConfigPageStack.h | 8 +-
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 | 6 +-
src/vidalia/config/NetworkSettings.cpp | 18 ++--
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.cpp | 58 ++++----
src/vidalia/config/ServerPage.h | 10 +-
src/vidalia/config/ServerSettings.cpp | 40 +++---
src/vidalia/config/ServerSettings.h | 12 +-
src/vidalia/config/Service.cpp | 4 +-
src/vidalia/config/Service.h | 4 +-
src/vidalia/config/ServiceList.cpp | 4 +-
src/vidalia/config/ServiceList.h | 4 +-
src/vidalia/config/ServicePage.cpp | 6 +-
src/vidalia/config/ServicePage.h | 4 +-
src/vidalia/config/ServiceSettings.cpp | 4 +-
src/vidalia/config/ServiceSettings.h | 4 +-
src/vidalia/config/TorSettings.cpp | 28 ++--
src/vidalia/config/TorSettings.h | 20 ++--
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.cpp | 6 +-
src/vidalia/config/VSettings.h | 6 +-
src/vidalia/config/VidaliaSettings.cpp | 8 +-
src/vidalia/config/VidaliaSettings.h | 12 +-
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/help/content/po2html.sh | 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.cpp | 8 +-
src/vidalia/network/GeoIpResolver.h | 4 +-
src/vidalia/network/NetViewer.cpp | 18 ++--
src/vidalia/network/NetViewer.h | 8 +-
src/vidalia/network/RouterDescriptorView.cpp | 28 ++--
src/vidalia/network/RouterDescriptorView.h | 4 +-
src/vidalia/network/RouterInfoDialog.cpp | 4 +-
src/vidalia/network/RouterInfoDialog.h | 4 +-
src/vidalia/network/RouterListItem.cpp | 12 +-
src/vidalia/network/RouterListItem.h | 4 +-
src/vidalia/network/RouterListWidget.cpp | 14 +-
src/vidalia/network/RouterListWidget.h | 6 +-
src/vidalia/network/StreamItem.cpp | 6 +-
src/vidalia/network/StreamItem.h | 6 +-
src/vidalia/network/TorMapImageView.cpp | 50 ++++----
src/vidalia/network/TorMapImageView.h | 6 +-
src/vidalia/network/TorMapWidget.cpp | 12 +-
src/vidalia/network/TorMapWidget.h | 4 +-
src/vidalia/network/TorMapWidgetInputHandler.cpp | 4 +-
src/vidalia/network/TorMapWidgetInputHandler.h | 4 +-
src/vidalia/network/TorMapWidgetPopupMenu.cpp | 4 +-
src/vidalia/network/TorMapWidgetPopupMenu.h | 4 +-
src/vidalia/network/ZImageView.cpp | 52 ++++----
src/vidalia/network/ZImageView.h | 12 +-
233 files changed, 1422 insertions(+), 1422 deletions(-)
diff --git a/pkg/build-geoip-cache.sh b/pkg/build-geoip-cache.sh
index 31696b6..06939e5 100755
--- a/pkg/build-geoip-cache.sh
+++ b/pkg/build-geoip-cache.sh
@@ -1,13 +1,13 @@
#!/bin/sh
##
## $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/pkg/package.sh b/pkg/package.sh
index b5e628d..caf54e7 100755
--- a/pkg/package.sh
+++ b/pkg/package.sh
@@ -1,13 +1,13 @@
#!/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/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..90589c5 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 */
@@ -87,14 +87,14 @@ copy_dir(const QString &source, const QString &dest)
if (fileInfo.isDir()) {
/* This is a directory, make it and recurse */
if (!dst.mkdir(fileName))
- return false;
+ return false;
if (!copy_dir(srcFilePath, dstFilePath))
- return false;
+ return false;
} else if (fileInfo.isFile()) {
/* This is a file, copy it */
if (!QFile::copy(srcFilePath, dstFilePath))
- return false;
- }
+ 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 59b22fa..12ff1ea 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"
@@ -80,11 +80,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()) {
@@ -94,9 +94,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 843174c..21fe11f 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/Circuit.cpp b/src/torcontrol/Circuit.cpp
index 3b6cb80..5fd97bc 100644
--- a/src/torcontrol/Circuit.cpp
+++ b/src/torcontrol/Circuit.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 Circuit.cpp
** \brief Object representing a Tor circuit
*/
@@ -29,7 +29,7 @@ Circuit::Circuit()
/** Parses the string given in Tor control protocol format for a circuit. The
* format is:
- *
+ *
* CircuitID SP CircStatus [SP Path]
*
* If the status is "LAUNCHED", the Path is empty. Server names in the path
@@ -62,7 +62,7 @@ Circuit::Circuit(const QString &circuit)
_isValid = true;
}
return;
-
+
err:
tc::warn("Improperly formatted circuit: '%1'").arg(circuit);
_isValid = false;
diff --git a/src/torcontrol/Circuit.h b/src/torcontrol/Circuit.h
index 33f12ef..406979b 100644
--- a/src/torcontrol/Circuit.h
+++ b/src/torcontrol/Circuit.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.
*/
@@ -41,12 +41,12 @@ public:
/** Default constructor. */
Circuit();
- /** Constructor. */
+ /** Constructor. */
Circuit(const CircuitId &circuit);
-
+
/** Returns true if this circuit is valid. */
bool isValid() const { return _isValid; }
-
+
/** Returns the ID for this circuit */
CircuitId id() const { return _circId; }
/** Returns the status of this circuit */
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.cpp b/src/torcontrol/ControlConnection.cpp
index 365da32..8ca998f 100644
--- a/src/torcontrol/ControlConnection.cpp
+++ b/src/torcontrol/ControlConnection.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.
*/
@@ -78,7 +78,7 @@ ControlConnection::connect(const QString &addr)
"control thread is already running.");
return;
}
-
+
_path = addr;
_connectAttempt = 0;
setStatus(Connecting);
@@ -96,7 +96,7 @@ ControlConnection::connect()
_connectAttempt++;
tc::debug("Connecting to Tor (Attempt %1 of %2)").arg(_connectAttempt)
.arg(MAX_CONNECT_ATTEMPTS);
-
+
_connMutex.lock();
switch(_method) {
case ControlMethod::Socket:
@@ -274,11 +274,11 @@ ControlConnection::send(const ControlCommand &cmd, QString *errmsg)
_connMutex.lock();
if (!_sock || !_sock->isConnected()) {
_connMutex.unlock();
- return err(errmsg, tr("Control socket is not connected."));
+ return err(errmsg, tr("Control socket is not connected."));
}
QCoreApplication::postEvent(_sock, new SendCommandEvent(cmd, _sendWaiter));
_connMutex.unlock();
-
+
return _sendWaiter->getResult(errmsg);
}
@@ -289,21 +289,21 @@ ControlConnection::onReadyRead()
QMutexLocker locker(&_connMutex);
ReceiveWaiter *waiter;
QString errmsg;
-
+
while (_sock->canReadLine()) {
ControlReply reply;
if (_sock->readReply(reply, &errmsg)) {
if (reply.getStatus() == "650") {
/* Asynchronous event message */
tc::debug("Control Event: %1").arg(reply.toString());
-
+
if (_events) {
_events->handleEvent(reply);
}
} else {
/* Response to a previous command */
tc::debug("Control Reply: %1").arg(reply.toString());
-
+
_recvMutex.lock();
if (!_recvQueue.isEmpty()) {
waiter = _recvQueue.dequeue();
@@ -328,21 +328,21 @@ ControlConnection::run()
_connectTimer = new QTimer();
_connectTimer->setSingleShot(true);
-
+
QObject::connect(_sock, SIGNAL(readyRead()), this, SLOT(onReadyRead()),
Qt::DirectConnection);
QObject::connect(_sock, SIGNAL(disconnected()), this, SLOT(onDisconnected()),
Qt::DirectConnection);
QObject::connect(_sock, SIGNAL(connected()), this, SLOT(onConnected()),
Qt::DirectConnection);
- QObject::connect(_sock, SIGNAL(error(QAbstractSocket::SocketError)),
+ QObject::connect(_sock, SIGNAL(error(QAbstractSocket::SocketError)),
this, SLOT(onError(QAbstractSocket::SocketError)),
Qt::DirectConnection);
QObject::connect(_connectTimer, SIGNAL(timeout()), this, SLOT(connect()),
Qt::DirectConnection);
_connMutex.unlock();
-
+
/* Attempt to connect to Tor */
connect();
tc::debug("Starting control connection event loop.");
@@ -364,7 +364,7 @@ ControlConnection::run()
_recvMutex.lock();
while (!_recvQueue.isEmpty()) {
ReceiveWaiter *w = _recvQueue.dequeue();
- w->setResult(false, ControlReply(),
+ w->setResult(false, ControlReply(),
tr("Control socket is not connected."));
}
_recvMutex.unlock();
@@ -375,8 +375,8 @@ ControlConnection::run()
* ControlConnection::ReceiveWaiter
*/
/** Waits for and gets the reply from a control command. */
-bool
-ControlConnection::ReceiveWaiter::getResult(ControlReply *reply,
+bool
+ControlConnection::ReceiveWaiter::getResult(ControlReply *reply,
QString *errmsg)
{
forever {
@@ -397,14 +397,14 @@ ControlConnection::ReceiveWaiter::getResult(ControlReply *reply,
}
/** Sets the result and reply from a control command. */
-void
-ControlConnection::ReceiveWaiter::setResult(bool success,
- const ControlReply &reply,
+void
+ControlConnection::ReceiveWaiter::setResult(bool success,
+ const ControlReply &reply,
const QString &errmsg)
{
_mutex.lock();
_status = (success ? Success : Failed);
- _reply = reply;
+ _reply = reply;
_errmsg = errmsg;
_mutex.unlock();
_waitCond.wakeAll();
diff --git a/src/torcontrol/ControlConnection.h b/src/torcontrol/ControlConnection.h
index 5a56ced..a0e87a4 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.cpp b/src/torcontrol/RouterDescriptor.cpp
index 21643f2..26051c1 100644
--- a/src/torcontrol/RouterDescriptor.cpp
+++ b/src/torcontrol/RouterDescriptor.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/RouterDescriptor.h b/src/torcontrol/RouterDescriptor.h
index d0c3400..fdedae4 100644
--- a/src/torcontrol/RouterDescriptor.h
+++ b/src/torcontrol/RouterDescriptor.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 RouterDescriptor.h
** \brief Parses a blob of router descriptor text from Tor
*/
@@ -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 8472324..71c05df 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.
*/
@@ -38,7 +38,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)
{
forever {
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/TorControl.cpp b/src/torcontrol/TorControl.cpp
index 57785e0..dffd7cc 100644
--- a/src/torcontrol/TorControl.cpp
+++ b/src/torcontrol/TorControl.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/torcontrol/TorControl.h b/src/torcontrol/TorControl.h
index cc486a1..85dcf86 100644
--- a/src/torcontrol/TorControl.h
+++ b/src/torcontrol/TorControl.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 TorControl.h
** \brief Object for interacting with the Tor process and control interface
*/
@@ -49,7 +49,7 @@ typedef QHash<QString,QString> DescriptorAnnotations;
class TorControl : public QObject
{
Q_OBJECT
-
+
public:
/** Default constructor */
TorControl(ControlMethod::Method method = ControlMethod::Port);
@@ -79,14 +79,14 @@ public:
bool authenticate(const QByteArray cookie, QString *errmsg = 0);
/** Sends an authentication password to Tor. */
bool authenticate(const QString &password = QString(), QString *errmsg = 0);
-
+
/** Sends a PROTOCOLINFO command to Tor and parses the response. */
ProtocolInfo protocolInfo(QString *errmsg = 0);
/** Returns the Tor software's current bootstrap phase and status. */
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. */
bool isCircuitEstablished();
@@ -106,11 +106,11 @@ public:
/** Sends a signal to Tor */
bool signal(TorSignal::Signal sig, QString *errmsg = 0);
-
+
/** Returns an address on which Tor is listening for application
* requests. If none are available, a null QHostAddress is returned. */
QHostAddress getSocksAddress(QString *errmsg = 0);
- /** Returns a (possibly empty) list of all currently configured
+ /** Returns a (possibly empty) list of all currently configured
* SocksListenAddress entries. */
QStringList getSocksAddressList(QString *errmsg = 0);
/** Returns a valid SOCKS port for Tor, or 0 if Tor is not accepting
@@ -160,7 +160,7 @@ public:
/** Sends a GETCONF message to Tor with the single key and returns a QString
* containing the value returned by Tor */
QString getHiddenServiceConf(const QString &key, QString *errmsg = 0);
-
+
/** Asks Tor to save the current configuration to its torrc */
bool saveConf(QString *errmsg = 0);
/** Tells Tor to reset the given configuration keys back to defaults. */
@@ -198,7 +198,7 @@ public:
CircuitList getCircuits(QString *errmsg = 0);
/** Gets a list of current streams. */
StreamList getStreams(QString *errmsg = 0);
-
+
/** Gets a list of address mappings of the type specified by <b>type</b>
* (defaults to <i>AddressMapAll</i>. */
AddressMap getAddressMap(
@@ -311,7 +311,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);
@@ -336,7 +336,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/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.cpp b/src/torcontrol/TorProcess.cpp
index 7275f7a..5db0c8a 100644
--- a/src/torcontrol/TorProcess.cpp
+++ b/src/torcontrol/TorProcess.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 TorProcess.cpp
** \brief Starts and stops a Tor process
*/
@@ -31,9 +31,9 @@ TorProcess::TorProcess(QObject *parent)
: QProcess(parent)
{
openStdout();
- connect(this, SIGNAL(readyReadStandardOutput()),
+ connect(this, SIGNAL(readyReadStandardOutput()),
this, SLOT(onReadyRead()));
- connect(this, SIGNAL(error(QProcess::ProcessError)),
+ connect(this, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(onError(QProcess::ProcessError)));
}
@@ -53,7 +53,7 @@ TorProcess::formatArguments(const QStringList &args)
* signal started() will be emitted. If Tor fails to start,
* startFailed(errmsg) will be emitted, with an appropriate error message. */
void
-TorProcess::start(const QString &app, const QStringList &args)
+TorProcess::start(const QString &app, const QStringList &args)
{
QString exe = app;
#if defined(Q_OS_WIN32)
@@ -61,12 +61,12 @@ TorProcess::start(const QString &app, const QStringList &args)
* quoted before being passed to it. */
exe = "\"" + exe + "\"";
#endif
-
+
/* Attempt to start Tor with the given command-line arguments */
QStringList env = QProcess::systemEnvironment();
#if !defined(Q_OS_WIN32)
/* Add "/usr/sbin" to an existing $PATH
- * XXX What if they have no path? Would always just making one with
+ * XXX What if they have no path? Would always just making one with
* "/usr/sbin" smart? Should we add anything else? */
for (int i = 0; i < env.size(); i++) {
QString envVar = env.at(i);
@@ -93,7 +93,7 @@ TorProcess::stop(QString *errmsg)
tc::debug("Stopping the Tor process.");
/* Tell the process to stop */
#if defined(Q_OS_WIN32)
- /* Tor on Windows doesn't understand a WM_CLOSE message (which is what
+ /* Tor on Windows doesn't understand a WM_CLOSE message (which is what
* QProcess::terminate() sends it), so we have to kill it harshly. */
kill();
#else
@@ -103,7 +103,7 @@ TorProcess::stop(QString *errmsg)
if (!waitForFinished(5000)) {
tc::error("Tor failed to stop: %1").arg(errorString());
if (errmsg) {
- *errmsg =
+ *errmsg =
tr("Process %1 failed to stop. [%2]").arg(pid()).arg(errorString());
}
return false;
@@ -149,7 +149,7 @@ TorProcess::onReadyRead()
{
int i, j;
QString line;
-
+
while (canReadLine()) {
line = readLine();
if (!line.isEmpty()) {
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 554b668..fdce4b7 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 193027b..00aa9c8 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..c65f890 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().
@@ -174,7 +174,7 @@ append_string(_char_t *dst, const _char_t *src, size_t siz)
}
*d = TEXT('\0');
- return(dlen + (s - src)); /* count does not include NUL */
+ return(dlen + (s - src)); /* count does not include NUL */
}
/** Writes the formatted string "<b>key</b>=</b>val\n" to the file handle
@@ -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 5c791bf..19a3286 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);
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 649c01e..3fafd6b 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,21 +33,21 @@ 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("ca",
+ languages.insert("ca",
QString::fromUtf8("catal\303\240"));
languages.insert("da", "dansk");
languages.insert("de", "Deutsch");
- languages.insert("es",
+ languages.insert("es",
QString::fromUtf8("espa\303\261ol"));
- languages.insert("el",
+ languages.insert("el",
QString::fromUtf8("\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254"));
// languages.insert("eo", "Esperanto");
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"));
@@ -58,13 +58,13 @@ LanguageSupport::languages()
// QString::fromUtf8("\346\227\245\346\234\254\350\252\236"));
languages.insert("ko",
QString::fromUtf8("\355\225\234\352\265\255\354\226\264"));
- 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_BR",
+ languages.insert("pt_BR",
QString::fromUtf8("Portugu\303\252s brasileiro"));
languages.insert("ro",
QString::fromUtf8("rom\303\242n\304\203"));
@@ -78,9 +78,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;
@@ -96,7 +96,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/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index e116269..77ad68c 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.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.
*/
@@ -137,7 +137,7 @@ MainWindow::MainWindow()
updateTorStatus(Stopped);
/* Create a new TorControl object, used to communicate with Tor */
- _torControl = Vidalia::torControl();
+ _torControl = Vidalia::torControl();
connect(_torControl, SIGNAL(started()), this, SLOT(started()));
connect(_torControl, SIGNAL(startFailed(QString)),
this, SLOT(startFailed(QString)));
@@ -145,7 +145,7 @@ MainWindow::MainWindow()
this, SLOT(stopped(int, QProcess::ExitStatus)));
connect(_torControl, SIGNAL(connected()), this, SLOT(connected()));
connect(_torControl, SIGNAL(disconnected()), this, SLOT(disconnected()));
- connect(_torControl, SIGNAL(connectFailed(QString)),
+ connect(_torControl, SIGNAL(connectFailed(QString)),
this, SLOT(connectFailed(QString)));
connect(_torControl, SIGNAL(authenticated()), this, SLOT(authenticated()));
connect(_torControl, SIGNAL(authenticationFailed(QString)),
@@ -222,7 +222,7 @@ MainWindow::MainWindow()
ui.chkShowOnStartup->setChecked(settings.showMainWindowAtStart());
if (ui.chkShowOnStartup->isChecked())
- show();
+ show();
/* Optimistically hope that the tray icon gets added. */
_trayIcon.show();
@@ -365,7 +365,7 @@ MainWindow::aboutToQuit()
vNotice("Cleaning up before exiting.");
if (_torControl->isVidaliaRunningTor()) {
- /* Kill our Tor process now */
+ /* Kill our Tor process now */
_torControl->stop();
}
@@ -397,7 +397,7 @@ MainWindow::aboutToQuit()
#endif
if (_imProcess->state() == QProcess::Running)
- _imProcess->terminate();
+ _imProcess->terminate();
}
/* Disconnect all of the TorControl object's signals */
@@ -427,7 +427,7 @@ MainWindow::close()
/** Create and bind actions to events. Setup for initial
* tray menu configuration. */
-void
+void
MainWindow::createActions()
{
_actionStartStopTor = new QAction(tr("Start Tor"), this);
@@ -437,7 +437,7 @@ MainWindow::createActions()
connect(_actionExit, SIGNAL(triggered()), this, SLOT(close()));
_actionShowBandwidth = new QAction(tr("Bandwidth Graph"), this);
- connect(_actionShowBandwidth, SIGNAL(triggered()),
+ connect(_actionShowBandwidth, SIGNAL(triggered()),
_bandwidthGraph, SLOT(showWindow()));
connect(ui.lblBandwidthGraph, SIGNAL(clicked()),
_bandwidthGraph, SLOT(showWindow()));
@@ -453,7 +453,7 @@ MainWindow::createActions()
ui.lblMessageLog, SLOT(disableFlashing()));
_actionShowNetworkMap = new QAction(tr("Network Map"), this);
- connect(_actionShowNetworkMap, SIGNAL(triggered()),
+ connect(_actionShowNetworkMap, SIGNAL(triggered()),
_netViewer, SLOT(showWindow()));
connect(ui.lblViewNetwork, SIGNAL(clicked()),
_netViewer, SLOT(showWindow()));
@@ -463,7 +463,7 @@ MainWindow::createActions()
_actionShowConfig = new QAction(tr("Settings"), this);
connect(_actionShowConfig, SIGNAL(triggered()), this, SLOT(showConfigDialog()));
-
+
_actionShowAbout = new QAction(tr("About"), this);
connect(_actionShowAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
@@ -511,9 +511,9 @@ MainWindow::createTrayIcon()
#endif
}
-/** Creates a QMenu object that contains QActions which compose the system
+/** Creates a QMenu object that contains QActions which compose the system
* tray menu. */
-QMenu*
+QMenu*
MainWindow::createTrayMenu()
{
QMenu *menu = new QMenu(this);
@@ -525,7 +525,7 @@ MainWindow::createTrayMenu()
menu->addAction(_actionNewIdentity);
menu->addSeparator();
menu->addAction(_actionShowControlPanel);
-
+
#if !defined(Q_WS_MAC)
/* These aren't added to the dock menu on Mac, since they are in the
* standard Mac locations in the menu bar. */
@@ -585,7 +585,7 @@ MainWindow::createMenuBar()
viewMenu->addAction(_actionShowBandwidth);
viewMenu->addAction(_actionShowMessageLog);
viewMenu->addAction(_actionShowNetworkMap);
-
+
QMenu *helpMenu = _menuBar->addMenu(tr("Help"));
_actionShowHelp->setText(tr("Vidalia Help"));
helpMenu->addAction(_actionShowHelp);
@@ -767,7 +767,7 @@ MainWindow::onCheckForBrowser()
/* The browser isn't running, exit Vidalia */
vApp->quit();
-#endif
+#endif
}
/** Called when the web browser failed to start, for example, because the path
@@ -776,7 +776,7 @@ void
MainWindow::onBrowserFailed(QString errmsg)
{
Q_UNUSED(errmsg);
-
+
/* Display an error message and see if the user wants some help */
VMessageBox::warning(this, tr("Error starting web browser"),
tr("Vidalia was unable to start the configured web browser"),
@@ -789,7 +789,7 @@ void
MainWindow::onIMFailed(QString errmsg)
{
Q_UNUSED(errmsg);
-
+
/* Display an error message and see if the user wants some help */
VMessageBox::warning(this, tr("Error starting IM client"),
tr("Vidalia was unable to start the configured IM client"),
@@ -811,7 +811,7 @@ void
MainWindow::onProxyFailed(QString errmsg)
{
Q_UNUSED(errmsg);
-
+
/* Display an error message and see if the user wants some help */
VMessageBox::warning(this, tr("Error starting proxy server"),
tr("Vidalia was unable to start the configured proxy server"),
@@ -824,7 +824,7 @@ void
MainWindow::bootstrapStatusChanged(const BootstrapStatus &bs)
{
int percentComplete = STARTUP_PROGRESS_BOOTSTRAPPING + bs.percentComplete();
- bool warn = (bs.severity() == tc::WarnSeverity &&
+ bool warn = (bs.severity() == tc::WarnSeverity &&
bs.recommendedAction() != BootstrapStatus::RecommendIgnore);
QString description;
@@ -909,7 +909,7 @@ MainWindow::updateTorStatus(TorStatus status)
QString statusText, actionText;
QString trayIconFile, statusIconFile;
TorStatus prevStatus = _status;
-
+
vNotice("Tor status changed from '%1' to '%2'.")
.arg(toString(prevStatus)).arg(toString(status));
_status = status;
@@ -936,14 +936,14 @@ MainWindow::updateTorStatus(TorStatus status)
setStartupProgressVisible(false);
} else if (status == Stopping) {
if (_delayedShutdownStarted) {
- statusText = tr("Your relay is shutting down.\n"
+ statusText = tr("Your relay is shutting down.\n"
"Click 'Stop' again to stop your relay now.");
} else {
statusText = tr("Tor is shutting down");
}
trayIconFile = IMG_TOR_STOPPING;
statusIconFile = IMG_TOR_STOPPING_48;
-
+
ui.lblStartStopTor->setStatusTip(tr("Stop Tor Now"));
} else if (status == Started) {
actionText = tr("Stop Tor");
@@ -954,7 +954,7 @@ MainWindow::updateTorStatus(TorStatus status)
ui.lblStartStopTor->setText(actionText);
ui.lblStartStopTor->setPixmap(QPixmap(IMG_STOP_TOR_48));
ui.lblStartStopTor->setStatusTip(actionText);
-
+
/* XXX: This might need to be smarter if we ever start connecting other
* slots to these triggered() and clicked() signals. */
QObject::disconnect(_actionStartStopTor, SIGNAL(triggered()), this, 0);
@@ -1035,7 +1035,7 @@ MainWindow::setStartupProgress(int progressValue,
/** Attempts to start Tor. If Tor fails to start, then startFailed() will be
* called with an error message containing the reason. */
-void
+void
MainWindow::start()
{
TorSettings settings;
@@ -1095,7 +1095,7 @@ MainWindow::start()
QString expDataDirectory = expand_filename(dataDirectory);
if (!dataDirectory.isEmpty())
args << "DataDirectory" << expDataDirectory;
-
+
if(settings.getControlMethod() == ControlMethod::Port) {
if(settings.autoControlPort()) {
QString portconf = QString("%1/port.conf").arg(expDataDirectory);
@@ -1117,7 +1117,7 @@ MainWindow::start()
}
args << "__OwningControllerProcess" << QString::number(QCoreApplication::applicationPid());
-
+
/* Add the control port authentication arguments */
switch (settings.getAuthenticationMethod()) {
case TorSettings::PasswordAuth:
@@ -1170,7 +1170,7 @@ MainWindow::startFailed(QString errmsg)
* that Qt gives us in this instance is almost always "Unknown Error". That
* will make users sad. */
Q_UNUSED(errmsg);
-
+
updateTorStatus(Stopped);
/* Display an error message and see if the user wants some help */
@@ -1194,7 +1194,7 @@ MainWindow::startFailed(QString errmsg)
/** Slot: Called when the Tor process is started. It will connect the control
* socket and set the icons and tooltips accordingly. */
-void
+void
MainWindow::started()
{
TorSettings settings;
@@ -1214,7 +1214,7 @@ MainWindow::started()
QFile file(QString("%1/port.conf").arg(expand_filename(dataDirectory)));
int tries = 0, maxtries = 5;
while((!file.open(QIODevice::ReadOnly | QIODevice::Text)) and
- (tries++ < maxtries)) {
+ (tries++ < maxtries)) {
vWarn(QString("This is try number: %1.").arg(tries));
#if defined(Q_WS_WIN)
Sleep(1000);
@@ -1271,9 +1271,9 @@ void
MainWindow::connectFailed(QString errmsg)
{
/* Ok, ok. It really isn't going to connect. I give up. */
- int response = VMessageBox::warning(this,
+ int response = VMessageBox::warning(this,
tr("Connection Error"), p(errmsg),
- VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape,
+ VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape,
VMessageBox::Retry, VMessageBox::Help);
@@ -1310,16 +1310,16 @@ MainWindow::stop()
"open connections from clients.\n\n"
"Would you like to shutdown gracefully and "
"give clients time to find a new relay?"),
- VMessageBox::Yes|VMessageBox::Default,
- VMessageBox::No,
+ VMessageBox::Yes|VMessageBox::Default,
+ VMessageBox::No,
VMessageBox::Cancel|VMessageBox::Escape);
if (response == VMessageBox::Yes)
_delayedShutdownStarted = true;
else if (response == VMessageBox::Cancel)
return false;
}
-
- prevStatus = updateTorStatus(Stopping);
+
+ prevStatus = updateTorStatus(Stopping);
if (_delayedShutdownStarted) {
/* Start a delayed shutdown */
rc = _torControl->signal(TorSignal::Shutdown, &errmsg);
@@ -1328,15 +1328,15 @@ MainWindow::stop()
_isIntentionalExit = true;
rc = _torControl->stop(&errmsg);
}
-
+
if (!rc) {
/* We couldn't tell Tor to stop, for some reason. */
int response = VMessageBox::warning(this, tr("Error Shutting Down"),
- p(tr("Vidalia was unable to stop the Tor software."))
+ p(tr("Vidalia was unable to stop the Tor software."))
+ p(errmsg),
- VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape,
+ VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape,
VMessageBox::Help);
-
+
if (response == VMessageBox::Help) {
/* Show some troubleshooting help */
showHelpDialog("troubleshooting.stop");
@@ -1351,7 +1351,7 @@ MainWindow::stop()
/** Slot: Called when the Tor process has exited. It will adjust the tray
* icons and tooltips accordingly. */
-void
+void
MainWindow::stopped(int exitCode, QProcess::ExitStatus exitStatus)
{
updateTorStatus(Stopped);
@@ -1368,11 +1368,11 @@ MainWindow::stopped(int exitCode, QProcess::ExitStatus exitStatus)
"unexpectedly.\n\n"
"Please check the message log for recent "
"warning or error messages."),
- VMessageBox::Ok|VMessageBox::Escape,
+ VMessageBox::Ok|VMessageBox::Escape,
VMessageBox::ShowLog|VMessageBox::Default,
VMessageBox::Help);
if (ret == VMessageBox::ShowLog)
- _messageLog->showWindow();
+ _messageLog->showWindow();
else if (ret == VMessageBox::Help)
showHelpDialog("troubleshooting.torexited");
}
@@ -1407,7 +1407,7 @@ MainWindow::disconnected()
* connection as "Tor is stopped". */
updateTorStatus(Stopped);
}
-
+
/*XXX We should warn here if we get disconnected when we didn't intend to */
_actionNewIdentity->setEnabled(false);
ui.lblNewIdentity->setEnabled(false);
@@ -1423,12 +1423,12 @@ MainWindow::authenticate()
TorSettings::AuthenticationMethod authMethod;
TorSettings settings;
ProtocolInfo pi;
-
+
updateTorStatus(Authenticating);
setStartupProgress(STARTUP_PROGRESS_AUTHENTICATING,
tr("Authenticating to Tor"));
- authMethod = settings.getAuthenticationMethod();
+ authMethod = settings.getAuthenticationMethod();
pi = _torControl->protocolInfo();
if (!pi.isEmpty()) {
QStringList authMethods = pi.authMethods();
@@ -1439,7 +1439,7 @@ MainWindow::authenticate()
else if (authMethods.contains("NULL"))
authMethod = TorSettings::NullAuth;
}
-
+
if (authMethod == TorSettings::CookieAuth) {
/* Try to load an auth cookie and send it to Tor */
QByteArray cookie = loadControlCookie(pi.cookieAuthFile());
@@ -1454,7 +1454,7 @@ MainWindow::authenticate()
"'control_auth_cookie' yourself?")),
VMessageBox::Browse|VMessageBox::Default,
VMessageBox::Cancel|VMessageBox::Escape);
-
+
if (ret == VMessageBox::Cancel)
goto cancel;
QString cookieDir = QFileDialog::getOpenFileName(this,
@@ -1503,14 +1503,14 @@ MainWindow::authenticated()
QString errmsg;
updateTorStatus(Authenticated);
-
+
/* If Tor doesn't have bootstrapping events, then update the current
* status string and bump the progress bar along a bit. */
if (_torControl->getTorVersion() < 0x020101) {
setStartupProgress(STARTUP_PROGRESS_CIRCUITBUILD,
tr("Connecting to the Tor network"));
}
-
+
/* Let people click on their beloved "New Identity" button */
_actionNewIdentity->setEnabled(true);
ui.lblNewIdentity->setEnabled(true);
@@ -1550,7 +1550,7 @@ void
MainWindow::authenticationFailed(QString errmsg)
{
bool retry = false;
-
+
vWarn("Authentication failed: %1").arg(errmsg);
/* Parsing log messages is evil, but we're left with little option */
@@ -1601,21 +1601,21 @@ MainWindow::authenticationFailed(QString errmsg)
}
} else {
/* Something else went wrong */
- int ret = VMessageBox::warning(this,
+ int ret = VMessageBox::warning(this,
tr("Authentication Error"),
p(tr("Vidalia was unable to authenticate to the Tor software. "
- "(%1)").arg(errmsg)) +
+ "(%1)").arg(errmsg)) +
p(tr("Please check your control port authentication "
"settings.")),
VMessageBox::ShowSettings|VMessageBox::Default,
VMessageBox::Cancel|VMessageBox::Escape);
-
+
if (ret == VMessageBox::ShowSettings)
showConfigDialog(ConfigDialog::Advanced);
}
-
+
if (_torControl->isRunning())
- if (_isVidaliaRunningTor)
+ if (_isVidaliaRunningTor)
stop();
else
disconnect();
@@ -1642,14 +1642,14 @@ MainWindow::loadControlCookie(QString cookiePath)
QString dataDir = settings.getDataDirectory();
if (!dataDir.isEmpty())
pathList << dataDir;
-
+
#if defined(Q_WS_WIN)
pathList << expand_filename("%APPDATA%\\Tor");
#else
pathList << expand_filename("~/.tor");
#endif
}
-
+
/* Search for the cookie file */
foreach (QString path, pathList) {
QString cookieFile = QFileInfo(path).isFile() ?
@@ -1657,7 +1657,7 @@ MainWindow::loadControlCookie(QString cookiePath)
vDebug("Checking for authentication cookie in '%1'").arg(cookieFile);
if (!QFileInfo(cookieFile).exists())
continue;
-
+
authCookie.setFileName(cookieFile);
if (authCookie.open(QIODevice::ReadOnly)) {
vInfo("Reading authentication cookie from '%1'").arg(cookieFile);
@@ -1787,7 +1787,7 @@ MainWindow::warnDangerousPort(quint16 port, bool rejected)
case 109:
case 110:
case 143:
- application = tr("(probably an email client)");
+ application = tr("(probably an email client)");
break;
default:
@@ -1899,7 +1899,7 @@ MainWindow::newIdentity()
QString errmsg;
/* Send the NEWNYM signal. If message balloons are supported and the NEWNYM
- * is successful, we will show the result as a balloon. Otherwise, we'll
+ * is successful, we will show the result as a balloon. Otherwise, we'll
* just use a message box. */
if (_torControl->signal(TorSignal::NewNym, &errmsg)) {
/* NEWNYM signal was successful */
@@ -1911,7 +1911,7 @@ MainWindow::newIdentity()
/* Disable the New Identity button for MIN_NEWIDENTITY_INTERVAL */
_actionNewIdentity->setEnabled(false);
ui.lblNewIdentity->setEnabled(false);
- QTimer::singleShot(MIN_NEWIDENTITY_INTERVAL,
+ QTimer::singleShot(MIN_NEWIDENTITY_INTERVAL,
this, SLOT(enableNewIdentity()));
if (QSystemTrayIcon::supportsMessages())
@@ -1920,7 +1920,7 @@ MainWindow::newIdentity()
VMessageBox::information(this, title, message, VMessageBox::Ok);
} else {
/* NEWNYM signal failed */
- VMessageBox::warning(this,
+ VMessageBox::warning(this,
tr("Failed to Create New Identity"), errmsg, VMessageBox::Ok);
}
}
@@ -2106,7 +2106,7 @@ MainWindow::installUpdatesFailed(const QString &errmsg)
VMessageBox::warning(this, tr("Installation Failed"),
p(tr("Vidalia was unable to install your software updates."))
- + p(tr("The following error occurred:"))
+ + p(tr("The following error occurred:"))
+ p(errmsg),
VMessageBox::Ok);
@@ -2140,11 +2140,11 @@ MainWindow::updateBrowserEnv() {
env << QString("TOR_SOCKS_PORT=%1").arg(port);
vInfo(QString("Using automatic ControlPort and SocksPort configuration:\n"
- " ControlPort=%1\n SocksPort=%2\n Host=%3\n Configuration file:%4")
- .arg(_autoControlPort)
- .arg(port)
- .arg(addrPort.at(0))
- .arg(QString("%1/port.conf").arg(expand_filename(settings.getDataDirectory()))));
+ " ControlPort=%1\n SocksPort=%2\n Host=%3\n Configuration file:%4")
+ .arg(_autoControlPort)
+ .arg(port)
+ .arg(addrPort.at(0))
+ .arg(QString("%1/port.conf").arg(expand_filename(settings.getDataDirectory()))));
}
if(settings.getAuthenticationMethod() == TorSettings::PasswordAuth) {
diff --git a/src/vidalia/MainWindow.h b/src/vidalia/MainWindow.h
index f13fee8..a434e66 100644
--- a/src/vidalia/MainWindow.h
+++ b/src/vidalia/MainWindow.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/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/VClickLabel.cpp b/src/vidalia/VClickLabel.cpp
index 3166ee2..0165de4 100644
--- a/src/vidalia/VClickLabel.cpp
+++ b/src/vidalia/VClickLabel.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/VClickLabel.h b/src/vidalia/VClickLabel.h
index 23a2b74..c9c0766 100644
--- a/src/vidalia/VClickLabel.h
+++ b/src/vidalia/VClickLabel.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:
virtual QSize sizeHint() const;
/** Returns the minimum size hint for this widget's current contents. */
virtual QSize minimumSizeHint() const;
-
+
/** Sets the label text to <b>text</b>. */
void setText(const QString &text);
/** Sets the widget's image to <b>img</b>. */
@@ -42,7 +42,7 @@ public:
const QString& text() const { return _text; }
const QPixmap& pixmap() const { return _pixmap; }
-
+
Q_PROPERTY(QString text READ text WRITE setText USER true);
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap USER true);
@@ -55,7 +55,7 @@ public slots:
signals:
/** Emitted when the widget is left-clicked. */
void clicked();
-
+
protected:
/** Overloaded paint event to draw a pixmap and a text label. */
virtual void paintEvent(QPaintEvent *e);
diff --git a/src/vidalia/VMessageBox.cpp b/src/vidalia/VMessageBox.cpp
index 0dbf927..70e4934 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.
*/
@@ -99,10 +99,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);
}
@@ -116,10 +116,10 @@ VMessageBox::question(QWidget *parent, QString caption, QString text,
int button0, int button1, int button2)
{
int ret = QMessageBox::question(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);
}
@@ -133,10 +133,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);
}
@@ -150,10 +150,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 fc96405..6eee884 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.
*/
@@ -39,7 +39,7 @@ public:
Quit,
Browse
};
-
+
/** Default constructor. */
VMessageBox(QWidget *parent = 0);
@@ -48,15 +48,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
@@ -64,7 +64,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
@@ -72,12 +72,12 @@ 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);
-
+
/** 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/Vidalia.cpp b/src/vidalia/Vidalia.cpp
index 53b41c9..0252ada 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.
*/
@@ -115,7 +115,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);
@@ -136,7 +136,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
@@ -198,7 +198,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.")));
@@ -214,12 +214,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);
}
@@ -494,7 +494,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 b7d09f4..cc00480 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.
*/
@@ -59,12 +59,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. */
@@ -74,12 +74,12 @@ public:
/** Returns Vidalia's main TorControl object. */
static TorControl* torControl() { return _torControl; }
-
+
/** 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();
@@ -89,7 +89,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();
@@ -114,7 +114,7 @@ public:
signals:
/** Emitted when the application is running and the main event loop has
- * started. */
+ * started. */
void running();
protected:
@@ -131,9 +131,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/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 c6c896a..4b2d7c8 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.
*/
@@ -70,7 +70,7 @@ BandwidthGraph::BandwidthGraph(QWidget *parent, Qt::WFlags flags)
ui.frmOpacity->setVisible(false);
}
#endif
-
+
#if defined(Q_WS_X11)
ui.frmOpacity->setVisible(false);
#endif
@@ -151,7 +151,7 @@ void
BandwidthGraph::reset()
{
/* Set to current time */
- ui.statusbar->showMessage(tr("Since:") + " " +
+ ui.statusbar->showMessage(tr("Since:") + " " +
QDateTime::currentDateTime()
.toString(DATETIME_FMT));
/* Reset the graph */
@@ -164,7 +164,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());
@@ -189,14 +189,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 */
@@ -211,7 +211,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 */
@@ -226,7 +226,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);
@@ -239,7 +239,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 35989fb..ea6e263 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.
*/
@@ -57,7 +57,7 @@ private slots:
void cancelChanges();
/** Called when the reset button is pressed */
void reset();
-
+
private:
/** Create and bind actions to events **/
void createActions();
@@ -68,7 +68,7 @@ private:
TorControl* _torControl;
/** A VidaliaSettings object that handles getting/saving settings */
VidaliaSettings* _settings;
-
+
/** Qt Designer generated object */
Ui::BandwidthGraph ui;
};
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 5f1b8aa..9b3846f 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 4c5d1b7..9656428 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.
*/
@@ -27,7 +27,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);
@@ -49,13 +49,13 @@ 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
* settings file. */
virtual void setValue(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.cpp b/src/vidalia/config/AdvancedPage.cpp
index 3b62af1..fffdcf3 100644
--- a/src/vidalia/config/AdvancedPage.cpp
+++ b/src/vidalia/config/AdvancedPage.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.
*/
@@ -136,7 +136,7 @@ AdvancedPage::save(QString &errmsg)
if (controlAddress.isNull()) {
errmsg = tr("'%1' is not a valid IP address.")
.arg(ui.lineControlAddress->text());
- return false;
+ return false;
}
_settings->setControlMethod(ControlMethod::Port);
} else {
@@ -147,9 +147,9 @@ AdvancedPage::save(QString &errmsg)
}
_settings->setControlMethod(ControlMethod::Socket);
}
-
+
/* Validate the selected authentication options */
- TorSettings::AuthenticationMethod authMethod =
+ TorSettings::AuthenticationMethod authMethod =
indexToAuthMethod(ui.cmbAuthMethod->currentIndex());
if (authMethod == TorSettings::PasswordAuth
&& ui.linePassword->text().isEmpty()
@@ -176,13 +176,13 @@ AdvancedPage::save(QString &errmsg)
/* Only remember the torrc and datadir values if Vidalia started Tor, or
* if the user changed the displayed values. */
- if (Vidalia::torControl()->isVidaliaRunningTor() or
+ if (Vidalia::torControl()->isVidaliaRunningTor() or
!Vidalia::torControl()->isConnected()) {
QString torrc = ui.lineTorConfig->text();
if (torrc != _settings->getTorrc()) {
_settings->setTorrc(torrc);
if(Vidalia::torControl()->isConnected()) {
- QMessageBox::StandardButtons res = QMessageBox::question(this, tr("Warning"),
+ QMessageBox::StandardButtons res = QMessageBox::question(this, tr("Warning"),
tr("You changed torrc path, would you like to restart Tor?"),
QMessageBox::Yes | QMessageBox::No);
if(res == QMessageBox::Yes)
@@ -291,7 +291,7 @@ void
AdvancedPage::browseTorConfig()
{
/* Prompt the user to select a file or create a new one */
- QString filename = QFileDialog::getOpenFileName(this,
+ QString filename = QFileDialog::getOpenFileName(this,
tr("Select Tor Configuration File"),
QFileInfo(ui.lineTorConfig->text()).filePath(),
tr("Tor Configuration File (torrc);;All Files (*)"));
@@ -310,7 +310,7 @@ AdvancedPage::browseTorConfig()
tr("%1 does not exist. Would you like to create it?")
.arg(filename),
VMessageBox::Yes, VMessageBox::No);
-
+
if (response == VMessageBox::No) {
/* Don't create it. Just bail. */
return;
@@ -338,7 +338,7 @@ AdvancedPage::browseTorDataDirectory()
tr("Select a Directory to Use for Tor Data"),
ui.lineTorDataDirectory->text());
- if (!dataDir.isEmpty())
+ if (!dataDir.isEmpty())
ui.lineTorDataDirectory->setText(dataDir);
}
@@ -354,7 +354,7 @@ AdvancedPage::browseSocketPath()
tr("Select a file to use for Tor socket path"),
start);
- if (!socketPath.isEmpty())
+ if (!socketPath.isEmpty())
ui.lineSocketPath->setText(socketPath);
}
@@ -370,12 +370,12 @@ AdvancedPage::setupService(bool useService)
if (!useService && isInstalled) {
/* Uninstall if we don't want to use it anymore */
Vidalia::torControl()->stop();
-
+
if (!service.remove()) {
VMessageBox::critical(this,
tr("Unable to remove Tor Service"),
tr("Vidalia was unable to remove the Tor service.\n\n"
- "You may need to remove it manually."),
+ "You may need to remove it manually."),
VMessageBox::Ok, VMessageBox::Cancel);
}
} else if (useService && !isInstalled) {
@@ -394,14 +394,14 @@ AdvancedPage::setupService(bool useService)
#endif
/** Called when the user presses the Edit current torrc button */
-void
+void
AdvancedPage::displayTorrcDialog()
{
TorrcDialog rcdialog(this);
rcdialog.exec();
}
-void
+void
AdvancedPage::toggleControl(bool)
{
if(ui.rdoControlPort->isChecked()) {
diff --git a/src/vidalia/config/AdvancedPage.h b/src/vidalia/config/AdvancedPage.h
index 4510310..d18d0d4 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
@@ -84,8 +84,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/ConfigDialog.cpp b/src/vidalia/config/ConfigDialog.cpp
index bb711dc..5bc34a4 100644
--- a/src/vidalia/config/ConfigDialog.cpp
+++ b/src/vidalia/config/ConfigDialog.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 ConfigDialog.cpp
** \brief Contains a series of Vidalia and Tor configuration pages
*/
@@ -44,12 +44,12 @@ ConfigDialog::ConfigDialog(QWidget* parent)
{
/* Invoke the Qt Designer generated QObject setup routine */
ui.setupUi(this);
-
+
/* Override the QDialogButtonBox button text so we can use our own
* translations. */
QPushButton *button = ui.buttonBox->button(QDialogButtonBox::Ok);
if (button) {
- Vidalia::createShortcut(QKeySequence(Qt::Key_Return),
+ Vidalia::createShortcut(QKeySequence(Qt::Key_Return),
this, button, SLOT(click()));
}
button = ui.buttonBox->button(QDialogButtonBox::Cancel);
@@ -57,7 +57,7 @@ ConfigDialog::ConfigDialog(QWidget* parent)
Vidalia::createShortcut("Esc", this, button, SLOT(click()));
Vidalia::createShortcut("Ctrl+W", this, button, SLOT(click()));
}
-
+
/* Connect the button box signals to the appropriate slots */
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
@@ -106,9 +106,9 @@ ConfigDialog::ConfigDialog(QWidget* parent)
/* Create the toolbar */
ui.toolBar->addActions(grp->actions());
ui.toolBar->addSeparator();
- connect(grp, SIGNAL(triggered(QAction *)),
+ connect(grp, SIGNAL(triggered(QAction *)),
ui.stackPages, SLOT(showPage(QAction *)));
-
+
/* Create and bind the Help button */
QAction *helpAct = new QAction(QIcon(IMAGE_HELP), tr("Help"), ui.toolBar);
helpAct->setData("Help");
@@ -126,7 +126,7 @@ ConfigDialog::ConfigDialog(QWidget* parent)
/** Creates a new action associated with a config page. */
QAction*
-ConfigDialog::createPageAction(const QIcon &img, const QString &text,
+ConfigDialog::createPageAction(const QIcon &img, const QString &text,
const QString &data, QActionGroup *group)
{
QAction *action = new QAction(img, text, group);
@@ -186,16 +186,16 @@ void
ConfigDialog::saveChanges()
{
QString errmsg;
-
+
/* Call each config page's save() method to save its data */
foreach (ConfigPage *page, ui.stackPages->pages()) {
if (!page->save(errmsg)) {
/* Display the offending page */
ui.stackPages->setCurrentPage(page);
-
+
/* Show the user what went wrong */
- VMessageBox::warning(this,
- tr("Error Saving Settings"),
+ VMessageBox::warning(this,
+ tr("Error Saving Settings"),
p(tr("Vidalia was unable to save your %1 settings.")
.arg(tr(qPrintable(page->title()), "ConfigDialog"))) + p(errmsg),
VMessageBox::Ok);
@@ -244,7 +244,7 @@ ConfigDialog::applyChanges()
appliedChanges = true;
}
if (appliedChanges)
- saveConf();
+ saveConf();
close();
}
@@ -267,7 +267,7 @@ void
ConfigDialog::help()
{
Page currentPage = static_cast<Page>(ui.stackPages->currentIndex());
-
+
switch (currentPage) {
case Network:
help("config.network"); break;
diff --git a/src/vidalia/config/ConfigDialog.h b/src/vidalia/config/ConfigDialog.h
index 499a9ae..4804c1e 100644
--- a/src/vidalia/config/ConfigDialog.h
+++ b/src/vidalia/config/ConfigDialog.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/ConfigPage.h b/src/vidalia/config/ConfigPage.h
index 2a237c1..0046606 100644
--- a/src/vidalia/config/ConfigPage.h
+++ b/src/vidalia/config/ConfigPage.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 ConfigPage : public QWidget
public:
/** Default Constructor */
- ConfigPage(QWidget *parent = 0, const QString title = QString())
+ ConfigPage(QWidget *parent = 0, const QString title = QString())
: QWidget(parent), _title(title) {}
/** Returns the title of this configuration page. */
@@ -54,7 +54,7 @@ public:
/** Subclassed pages can overload this method to revert any cancelled
* settings. */
virtual void revert() {}
-
+
virtual void retranslateUi() {}
signals:
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/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 0302817..e0651dd 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.
*/
@@ -41,7 +41,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)));
@@ -167,11 +167,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()),
@@ -201,7 +201,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()) {
@@ -231,7 +231,7 @@ NetworkPage::save(QString &errmsg)
user = ui.lineProxyUsername->text();
pass = ui.lineProxyPassword->text();
-
+
QVariant data;
int type;
@@ -247,7 +247,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,
@@ -324,7 +324,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());
}
@@ -364,7 +364,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(),
@@ -401,9 +401,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 2193be7..073e006 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.
*/
@@ -31,7 +31,7 @@ class NetworkPage : public ConfigPage
public:
/** Default Constructor */
NetworkPage(QWidget *parent = 0);
-
+
/** Saves the changes on this page */
bool save(QString &errmsg);
/** Loads the settings for this page */
diff --git a/src/vidalia/config/NetworkSettings.cpp b/src/vidalia/config/NetworkSettings.cpp
index 0229442..aaef16d 100644
--- a/src/vidalia/config/NetworkSettings.cpp
+++ b/src/vidalia/config/NetworkSettings.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.
*/
@@ -66,9 +66,9 @@ NetworkSettings::apply(QString *errmsg)
quint32 torVersion = torControl()->getTorVersion();
conf.insert(SETTING_REACHABLE_ADDRESSES,
- (getFascistFirewall() ?
+ (getFascistFirewall() ?
localValue(SETTING_REACHABLE_ADDRESSES).toStringList().join(",") : ""));
-
+
QString socks4, socks5, http, https;
QString addr, user, pass, auth;
@@ -78,7 +78,7 @@ NetworkSettings::apply(QString *errmsg)
if (!user.isEmpty() || !pass.isEmpty())
auth = QString("%1:%2").arg(user).arg(pass);
-
+
switch (getProxyType()) {
case NoProxy:
break;
@@ -189,7 +189,7 @@ NetworkSettings::setReachablePorts(const QList<quint16> &reachablePorts)
}
/** Returns the proxy type Tor is using, or NoProxy if it makes direct
- * connections. */
+ * connections. */
NetworkSettings::ProxyType
NetworkSettings::getProxyType()
{
@@ -225,7 +225,7 @@ NetworkSettings::getProxyUsername()
return value(SETTING_PROXY_USERNAME).toString();
}
-/** Sets the proxy server username to <b>user</b>. */
+/** Sets the proxy server username to <b>user</b>. */
void
NetworkSettings::setProxyUsername(const QString &user)
{
@@ -239,7 +239,7 @@ NetworkSettings::getProxyPassword()
return value(SETTING_PROXY_PASSWORD).toString();
}
-/** Sets the proxy server password to <b>pass</b>. */
+/** Sets the proxy server password to <b>pass</b>. */
void
NetworkSettings::setProxyPassword(const QString &pass)
{
@@ -315,7 +315,7 @@ NetworkSettings::ProxyType
NetworkSettings::proxyTypeFromString(const QString &type)
{
QString str = type.toLower();
-
+
if (str == "socks4")
return Socks4Proxy;
if (str == "socks5")
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.cpp b/src/vidalia/config/ServerPage.cpp
index 5fa20a9..6fabc90 100644
--- a/src/vidalia/config/ServerPage.cpp
+++ b/src/vidalia/config/ServerPage.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,8 +48,8 @@
#define HIGHBW_MAX_RATE (10240*1024)
/** Minimum allowed bandwidth rate (20KB) */
#define MIN_BANDWIDTH_RATE 20
-/** Maximum bandwidth rate. This is limited to 2147483646 bytes,
- * or 2097151 kilobytes. (2147483646/1024) */
+/** Maximum bandwidth rate. This is limited to 2147483646 bytes,
+ * or 2097151 kilobytes. (2147483646/1024) */
#define MAX_BANDWIDTH_RATE 2097151
/** Ports represented by the "Websites" checkbox. (80) */
@@ -62,7 +62,7 @@
* (703,1863,5050,5190,5222,8300,8888) */
#define PORTS_IM (QStringList() << "706" << "1863" << "5050" << "5190" \
<< "5222" << "5223" << "8300" << "8888")
-/** Ports represented by the "Internet Relay Chat" checkbox.
+/** Ports represented by the "Internet Relay Chat" checkbox.
* (6660-6669,6697,7000-7001) */
#define PORTS_IRC (QStringList() << "6660-6669" << "6697" << "7000-7001")
@@ -73,7 +73,7 @@ ServerPage::ServerPage(QWidget *parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
-
+
/* Create ServerSettings object */
_settings = new ServerSettings(Vidalia::torControl());
@@ -83,9 +83,9 @@ ServerPage::ServerPage(QWidget *parent)
connect(ui.btnUpnpHelp, SIGNAL(clicked()), this, SLOT(upnpHelp()));
connect(ui.cmboRate, SIGNAL(currentIndexChanged(int)),
this, SLOT(rateChanged(int)));
- connect(ui.lineAvgRateLimit, SIGNAL(editingFinished()),
+ connect(ui.lineAvgRateLimit, SIGNAL(editingFinished()),
this, SLOT(customRateChanged()));
- connect(ui.lineMaxRateLimit, SIGNAL(editingFinished()),
+ connect(ui.lineMaxRateLimit, SIGNAL(editingFinished()),
this, SLOT(customRateChanged()));
connect(ui.rdoClientMode, SIGNAL(toggled(bool)),
this, SLOT(serverModeChanged(bool)));
@@ -199,7 +199,7 @@ ServerPage::loadBridgeIdentity()
tc->getInfo("address", address);
tc->getInfo("fingerprint", fingerprint);
tc->getConf("ORPort", orPort);
-
+
if (!address.isEmpty() && !orPort.isEmpty() && orPort != "0")
bridge = address + ":" + orPort + " ";
if (!fingerprint.isEmpty())
@@ -224,14 +224,14 @@ ServerPage::serverModeChanged(bool enabled)
bool bridgeEnabled = ui.rdoBridgeMode->isChecked();
bool relayEnabled = ui.rdoServerMode->isChecked() ||
ui.rdoNonExitMode->isChecked();
-
+
/* Show the tab menu only if the user is running a normal relay or a bridge
* relay. */
ui.tabsMenu->setVisible(relayEnabled || bridgeEnabled);
-
+
/* Disable the Exit Policies tab when bridge relay mode is selected */
ui.tabsMenu->setTabEnabled(2, !bridgeEnabled);
-
+
/* Display the widgets that show the user their bridge identity if bridge
* relay mode is selected. */
ui.lblYourBridgeRelayIs->setVisible(bridgeEnabled);
@@ -259,7 +259,7 @@ ServerPage::serverModeChanged(bool enabled)
ui.lineDirPort->setEnabled(!bridgeEnabled);
}
- /* Disable the Exit Policies tab when bridge or non-exit relay mode is
+ /* Disable the Exit Policies tab when bridge or non-exit relay mode is
* selected */
ui.tabsMenu->setTabEnabled(2, !bridgeEnabled and !ui.rdoNonExitMode->isChecked());
}
@@ -296,7 +296,7 @@ ServerPage::save(QString &errmsg)
/* Force the bandwidth rate limits to validate */
customRateChanged();
- if (ui.rdoServerMode->isChecked() ||
+ if (ui.rdoServerMode->isChecked() ||
ui.rdoNonExitMode->isChecked() ||
ui.rdoBridgeMode->isChecked()) {
/* A server must have an ORPort and a nickname */
@@ -313,7 +313,7 @@ ServerPage::save(QString &errmsg)
ui.lineMaxRateLimit->setText(QString::number(5242880/1024) /* 5MB */);
}
}
-
+
/* "Server" is enabled whether we're a bridge or normal relay. "Bridge" is
* only enabled if we're a bridge (obviously). */
_settings->setServerEnabled(ui.rdoServerMode->isChecked()
@@ -402,23 +402,23 @@ ServerPage::loadBandwidthLimits()
quint32 avgRate = _settings->getBandwidthAvgRate();
quint32 maxRate = _settings->getBandwidthBurstRate();
- if (avgRate == CABLE256_AVG_RATE &&
+ if (avgRate == CABLE256_AVG_RATE &&
maxRate == CABLE256_MAX_RATE) {
/* Cable/DSL 256 Kbps */
- ui.cmboRate->setCurrentIndex(CableDsl256);
- } else if (avgRate == CABLE512_AVG_RATE &&
+ ui.cmboRate->setCurrentIndex(CableDsl256);
+ } else if (avgRate == CABLE512_AVG_RATE &&
maxRate == CABLE512_MAX_RATE) {
/* Cable/DSL 512 Kbps */
ui.cmboRate->setCurrentIndex(CableDsl512);
- } else if (avgRate == CABLE768_AVG_RATE &&
+ } else if (avgRate == CABLE768_AVG_RATE &&
maxRate == CABLE768_MAX_RATE) {
/* Cable/DSL 768 Kbps */
ui.cmboRate->setCurrentIndex(CableDsl768);
- } else if (avgRate == T1_AVG_RATE &&
+ } else if (avgRate == T1_AVG_RATE &&
maxRate == T1_MAX_RATE) {
/* T1/Cable/DSL 1.5 Mbps */
ui.cmboRate->setCurrentIndex(T1CableDsl1500);
- } else if (avgRate == HIGHBW_AVG_RATE &&
+ } else if (avgRate == HIGHBW_AVG_RATE &&
maxRate == HIGHBW_MAX_RATE) {
/* > 1.5 Mbps */
ui.cmboRate->setCurrentIndex(GreaterThan1500);
@@ -472,7 +472,7 @@ void
ServerPage::loadExitPolicies()
{
ExitPolicy exitPolicy = _settings->getExitPolicy();
-
+
if (exitPolicy.contains(Policy(Policy::RejectAll))) {
/* If the policy ends with reject *:*, check if the policy explicitly
* accepts these ports */
@@ -504,7 +504,7 @@ ServerPage::saveExitPolicies()
} else {
exitPolicy = new ExitPolicy();
bool rejectUnchecked = ui.chkMisc->isChecked();
-
+
/* If misc is checked, then reject unchecked items and leave the default exit
* policy alone. Else, accept only checked items and end with reject *:*,
* replacing the default exit policy. */
@@ -545,12 +545,12 @@ ServerPage::saveExitPolicies()
void
ServerPage::rateChanged(int index)
{
- /* If the "Custom" option is selected, show the custom bandwidth
+ /* If the "Custom" option is selected, show the custom bandwidth
* limits form. */
ui.frmCustomRate->setVisible(index == CustomBwLimits);
}
-/** Called when the user edits the long-term average or maximum bandwidth limit.
+/** Called when the user edits the long-term average or maximum bandwidth limit.
* This ensures that the average bandwidth rate is greater than MIN_RATE
* (20KB/s) and that the max rate is greater than the average rate. */
void
@@ -559,7 +559,7 @@ ServerPage::customRateChanged()
/* Make sure the average rate isn't too low or too high */
quint32 avgRate = (quint32)ui.lineAvgRateLimit->text().toUInt();
if (avgRate < MIN_BANDWIDTH_RATE) {
- ui.lineAvgRateLimit->setText(QString::number(MIN_BANDWIDTH_RATE));
+ ui.lineAvgRateLimit->setText(QString::number(MIN_BANDWIDTH_RATE));
}
if (avgRate > MAX_BANDWIDTH_RATE) {
ui.lineAvgRateLimit->setText(QString::number(MAX_BANDWIDTH_RATE));
@@ -582,7 +582,7 @@ ServerPage::testUpnp()
#if defined(USE_MINIUPNPC)
UPNPTestDialog dlg(ui.lineServerPort->text().toUInt(),
ui.lineDirPort->text().toUInt(), this);
-
+
connect(&dlg, SIGNAL(help()), this, SLOT(upnpHelp()));
dlg.exec();
@@ -625,11 +625,11 @@ ServerPage::displayBridgeUsage()
bool ok;
keyvals = string_parse_keyvals(info, &ok);
- if (!ok || !keyvals.contains("TimeStarted")
+ if (!ok || !keyvals.contains("TimeStarted")
|| !keyvals.contains("CountrySummary"))
goto err;
- timeStarted = QDateTime::fromString(keyvals.value("TimeStarted"),
+ timeStarted = QDateTime::fromString(keyvals.value("TimeStarted"),
"yyyy-MM-dd HH:mm:ss");
if (!timeStarted.isValid())
goto err;
diff --git a/src/vidalia/config/ServerPage.h b/src/vidalia/config/ServerPage.h
index 54549a2..82b8bc6 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. */
@@ -92,10 +92,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.cpp b/src/vidalia/config/ServerSettings.cpp
index 1c1e687..e4b7ead 100644
--- a/src/vidalia/config/ServerSettings.cpp
+++ b/src/vidalia/config/ServerSettings.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.
*/
@@ -73,7 +73,7 @@ ServerSettings::ServerSettings(TorControl *torControl)
setDefault(SETTING_RELAY_BANDWIDTH_BURST, 10485760);
setDefault(SETTING_EXITPOLICY,
ExitPolicy(ExitPolicy::Middleman).toString());
- setDefault(SETTING_ENABLE_UPNP, false);
+ setDefault(SETTING_ENABLE_UPNP, false);
setDefault(SETTING_BRIDGE_RELAY, false);
setDefault(SETTING_PUBLISH_SERVER_DESCRIPTOR, "1");
}
@@ -95,24 +95,24 @@ ServerSettings::confValues()
(isServerEnabled() ? localValue(SETTING_ORPORT).toString()
: "0"));
/* Server DirPort */
- conf.insert(SETTING_DIRPORT,
- (isDirectoryMirror() ? localValue(SETTING_DIRPORT).toString()
+ conf.insert(SETTING_DIRPORT,
+ (isDirectoryMirror() ? localValue(SETTING_DIRPORT).toString()
: "0"));
/* Server Exit Policy */
- conf.insert(SETTING_EXITPOLICY,
+ conf.insert(SETTING_EXITPOLICY,
((isBridgeEnabled() || isNonExitEnabled()) ? "reject *:*"
: localValue(SETTING_EXITPOLICY).toString()));
-
+
/* Server bandwidth settings */
- conf.insert((torVersion >= 0x020001 ? SETTING_RELAY_BANDWIDTH_RATE
+ conf.insert((torVersion >= 0x020001 ? SETTING_RELAY_BANDWIDTH_RATE
: SETTING_BANDWIDTH_RATE),
QString::number(localValue(SETTING_BANDWIDTH_RATE).toUInt()) + " bytes");
conf.insert((torVersion >= 0x020001 ? SETTING_RELAY_BANDWIDTH_BURST
: SETTING_BANDWIDTH_BURST),
QString::number(localValue(SETTING_BANDWIDTH_BURST).toUInt()) + " bytes");
-
+
/* Server Contact Information */
- QString contact =
+ QString contact =
localValue(SETTING_CONTACT).toString().trimmed();
QString defaultContact = defaultValue(SETTING_CONTACT).toString();
if ((contact == defaultContact) ||
@@ -121,7 +121,7 @@ ServerSettings::confValues()
contact = "";
}
conf.insert(SETTING_CONTACT, scrub_email_addr(contact));
-
+
/* Set if we're a bridge relay */
if (isBridgeEnabled()) {
conf.insert(SETTING_BRIDGE_RELAY, "1");
@@ -135,7 +135,7 @@ ServerSettings::confValues()
}
/** Applies the current server configuration settings to Tor. If <b>errmsg</b>
- * is specified and an error occurs while applying the settings, it will be
+ * is specified and an error occurs while applying the settings, it will be
* set to a string describing the error. */
bool
ServerSettings::apply(QString *errmsg)
@@ -146,11 +146,11 @@ ServerSettings::apply(QString *errmsg)
if (isServerEnabled()) {
rc = torControl()->setConf(confValues(), errmsg);
- } else {
+ } else {
QStringList resetKeys;
quint32 torVersion = torControl()->getTorVersion();
- resetKeys << SETTING_ORPORT
- << SETTING_NICKNAME
+ resetKeys << SETTING_ORPORT
+ << SETTING_NICKNAME
<< SETTING_DIRPORT
<< SETTING_CONTACT
<< SETTING_EXITPOLICY
@@ -221,8 +221,8 @@ ServerSettings::torValue(const QString &key) const
return AbstractTorSettings::torValue(key);
}
-/** Enables or disables running Tor as a server.
- * \param enable Whether to enable or disable the Tor server.
+/** Enables or disables running Tor as a server.
+ * \param enable Whether to enable or disable the Tor server.
*/
void
ServerSettings::setServerEnabled(bool enable)
@@ -258,7 +258,7 @@ ServerSettings::isBridgeEnabled()
{
return value(SETTING_BRIDGE_RELAY).toBool() && isServerEnabled();
}
-
+
/** Sets to <b>enabled</b> whether Tor should be a non-exit node when acting as
* a server. */
void
@@ -315,7 +315,7 @@ ServerSettings::getNickname()
{
QString nickname = value(SETTING_NICKNAME).toString();
/* Ensure the nickname contains only valid characters and is not too long. */
- return ensure_valid_chars(nickname,
+ return ensure_valid_chars(nickname,
VALID_NICKNAME_CHARS).left(MAX_NICKNAME_LEN);
}
@@ -407,7 +407,7 @@ ServerSettings::setPublishServerDescriptor(bool publish)
bool
ServerSettings::publishServerDescriptor() const
{
- return (value(SETTING_PUBLISH_SERVER_DESCRIPTOR).toString() != "0");
+ return (value(SETTING_PUBLISH_SERVER_DESCRIPTOR).toString() != "0");
}
/** Returns true if UPnP support is available and enabled. */
diff --git a/src/vidalia/config/ServerSettings.h b/src/vidalia/config/ServerSettings.h
index 9479c5a..26ab9dc 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/Service.cpp b/src/vidalia/config/Service.cpp
index c880529..e06aa98 100644
--- a/src/vidalia/config/Service.cpp
+++ b/src/vidalia/config/Service.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/Service.h b/src/vidalia/config/Service.h
index 6c6a790..33941e8 100644
--- a/src/vidalia/config/Service.h
+++ b/src/vidalia/config/Service.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/ServiceList.cpp b/src/vidalia/config/ServiceList.cpp
index fd644f0..284c5ce 100644
--- a/src/vidalia/config/ServiceList.cpp
+++ b/src/vidalia/config/ServiceList.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/ServiceList.h b/src/vidalia/config/ServiceList.h
index a5c216d..53ae777 100644
--- a/src/vidalia/config/ServiceList.h
+++ b/src/vidalia/config/ServiceList.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/ServicePage.cpp b/src/vidalia/config/ServicePage.cpp
index ac412f9..3ee1a86 100644
--- a/src/vidalia/config/ServicePage.cpp
+++ b/src/vidalia/config/ServicePage.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.
*/
@@ -495,7 +495,7 @@ ServicePage::serviceSelectionChanged()
ui.copyButton->setEnabled(b);
}
}
-
+
QString selDir = _services->value(ui.serviceWidget->currentRow()).
serviceDirectory();
QList<QString> strList = _torServices->keys();
diff --git a/src/vidalia/config/ServicePage.h b/src/vidalia/config/ServicePage.h
index 70c53cf..e32f3a1 100644
--- a/src/vidalia/config/ServicePage.h
+++ b/src/vidalia/config/ServicePage.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/ServiceSettings.cpp b/src/vidalia/config/ServiceSettings.cpp
index 3c6fa91..77a9905 100644
--- a/src/vidalia/config/ServiceSettings.cpp
+++ b/src/vidalia/config/ServiceSettings.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/ServiceSettings.h b/src/vidalia/config/ServiceSettings.h
index 946dc62..0ee445c 100644
--- a/src/vidalia/config/ServiceSettings.h
+++ b/src/vidalia/config/ServiceSettings.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/TorSettings.cpp b/src/vidalia/config/TorSettings.cpp
index 3070c09..ff7cf68 100644
--- a/src/vidalia/config/TorSettings.cpp
+++ b/src/vidalia/config/TorSettings.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 @@ TorSettings::TorSettings(TorControl *torControl)
setDefault(SETTING_DATA_DIRECTORY, "");
setDefault(SETTING_CONTROL_PASSWORD, "");
setDefault(SETTING_USE_RANDOM_PASSWORD, true);
- setDefault(SETTING_WARN_PLAINTEXT_PORTS, QList<QVariant>() << 23 << 109
+ setDefault(SETTING_WARN_PLAINTEXT_PORTS, QList<QVariant>() << 23 << 109
<< 110 << 143);
setDefault(SETTING_REJECT_PLAINTEXT_PORTS, QList<QVariant>());
setDefault(SETTING_BOOTSTRAP, false);
@@ -111,8 +111,8 @@ TorSettings::apply(QString *errmsg)
conf.insert(TOR_ARG_SOCKSPORT, "auto");
else
conf.insert(TOR_ARG_SOCKSPORT, "9050");
-
- AuthenticationMethod authMethod =
+
+ AuthenticationMethod authMethod =
toAuthenticationMethod(localValue(SETTING_AUTH_METHOD).toString());
switch (authMethod) {
case CookieAuth:
@@ -120,7 +120,7 @@ TorSettings::apply(QString *errmsg)
conf.insert(TOR_ARG_HASHED_PASSWORD, "");
break;
case PasswordAuth:
- hashedPassword = useRandomPassword()
+ hashedPassword = useRandomPassword()
? hashPassword(randomPassword())
: hashPassword(getControlPassword());
if (hashedPassword.isEmpty()) {
@@ -188,7 +188,7 @@ TorSettings::getTorrc() const
}
/** Sets the torrc that will be used when starting Tor.
- * \param torrc The torrc to use.
+ * \param torrc The torrc to use.
*/
void
TorSettings::setTorrc(const QString &torrc)
@@ -226,14 +226,14 @@ TorSettings::setControlPort(quint16 port)
}
/** Get the path for ControlSocket */
-QString
+QString
TorSettings::getSocketPath() const
{
return value(SETTING_SOCKET_PATH).toString();
}
/** Set the path for ControlSocket */
-void
+void
TorSettings::setSocketPath(const QString &path)
{
setValue(SETTING_SOCKET_PATH, path);
@@ -247,7 +247,7 @@ TorSettings::getControlMethod() const
}
/** Set the control method */
-void
+void
TorSettings::setControlMethod(ControlMethod::Method method)
{
setValue(SETTING_CONTROL_METHOD, ControlMethod::toString(method));
@@ -388,7 +388,7 @@ TorSettings::toString(AuthenticationMethod method) const
* description of the authentication method given in <b>authMethod</b>. */
TorSettings::AuthenticationMethod
TorSettings::toAuthenticationMethod(const QString &authMethod) const
-{
+{
QString str = authMethod.toLower();
if (str == toString(NullAuth))
return NullAuth;
@@ -412,7 +412,7 @@ QString
TorSettings::hashPassword(const QString &password)
{
QByteArray salt;
-
+
/* Generate an 8 octet salt value. Bail if we fail to generate enough
* random bytes (unlikely). */
while (salt.size() < 8) {
@@ -459,13 +459,13 @@ TorSettings::bootstrapFrom() const
return QDir::convertSeparators(value(SETTING_BOOTSTRAP_FROM).toString());
}
-bool
+bool
TorSettings::autoControlPort() const
{
return value(SETTING_AUTOCONTROL).toBool();
}
-void
+void
TorSettings::setAutoControlPort(const bool autoControl)
{
setValue(SETTING_AUTOCONTROL, autoControl);
diff --git a/src/vidalia/config/TorSettings.h b/src/vidalia/config/TorSettings.h
index 5038c3d..75d9754 100644
--- a/src/vidalia/config/TorSettings.h
+++ b/src/vidalia/config/TorSettings.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,32 +35,32 @@ public:
PasswordAuth, /**< Use a hashed password for authentication. */
UnknownAuth /**< Unknown authentication method. */
};
-
+
/** Default constructor. */
TorSettings(TorControl *torControl = 0);
- /** Applies any changes to Tor's control port or authentication settings. */
+ /** Applies any changes to Tor's control port or authentication settings. */
bool apply(QString *errmsg = 0);
/** Gets the name and path of Tor's executable. */
QString getExecutable() const;
/** Sets the name and path of Tor's executable. */
void setExecutable(const QString &torExecutable);
-
+
/** Gets the location of Tor's data directory. */
QString getDataDirectory() const;
/** Sets the location to use for Tor's data directory. */
void setDataDirectory(const QString &dataDir);
-
+
/** Gets the torrc to use when starting Tor. */
QString getTorrc() const;
/** Sets the torrc to use when starting Tor. */
void setTorrc(const QString &torrc);
-
+
/** Get Tor's control interface address. */
QHostAddress getControlAddress() const;
/** Set Tor's control interface address. */
void setControlAddress(const QHostAddress &addr);
-
+
/** Get the control port. */
quint16 getControlPort() const;
/** Set the control port. */
@@ -84,7 +84,7 @@ public:
/** Set the path for ControlSocket */
void setSocketPath(const QString &path);
-
+
/** Returns the plaintext (i.e., not hashed) control password used when
* authenticating to Tor. */
QString getControlPassword() const;
@@ -121,7 +121,7 @@ public:
/** Generates a random control password consisting of PASSWORD_LEN
* characters. */
static QString randomPassword();
- /** Returns the hash of <b>password</b> as given by the command
+ /** Returns the hash of <b>password</b> as given by the command
* "tor --hash-password foo". */
static QString hashPassword(const QString &password);
diff --git a/src/vidalia/config/TorrcDialog.cpp b/src/vidalia/config/TorrcDialog.cpp
index 7f6a9c4..3a08710 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"
@@ -61,12 +61,12 @@ TorrcDialog::~TorrcDialog()
}
-/** 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)
{
if(!errmsg) errmsg = new QString("");
@@ -77,7 +77,7 @@ TorrcDialog::parseAndSet(QString *errmsg)
QString key, val;
QStringList parts, lines;
-
+
if(ui.rdoAll->isChecked())
lines = ui.teditTorrc->toPlainText().split('\n', QString::SkipEmptyParts);
else {
@@ -127,7 +127,7 @@ TorrcDialog::parseAndSet(QString *errmsg)
/** Loads the saved torrc file that Tor's using to the TextEdit widget for
* editing */
-void
+void
TorrcDialog::loadTorrc()
{
if(tc && tc->isConnected()) {
@@ -149,7 +149,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 0d60804..372c672 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.
*/
@@ -51,14 +51,14 @@ private slots:
private:
/** 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.cpp b/src/vidalia/config/VSettings.cpp
index aab0f9b..283cd81 100644
--- a/src/vidalia/config/VSettings.cpp
+++ b/src/vidalia/config/VSettings.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 VSettings.cpp
-** \brief Stores and retrieves settings from Vidalia's configuration file.
+** \brief Stores and retrieves settings from Vidalia's configuration file.
*/
#include "VSettings.h"
diff --git a/src/vidalia/config/VSettings.h b/src/vidalia/config/VSettings.h
index ed31255..251e9f8 100644
--- a/src/vidalia/config/VSettings.h
+++ b/src/vidalia/config/VSettings.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.
*/
@@ -59,7 +59,7 @@ protected:
private:
/** Association of setting key names to default setting values. */
- QHash<QString, QVariant> _defaults;
+ QHash<QString, QVariant> _defaults;
};
#endif
diff --git a/src/vidalia/config/VidaliaSettings.cpp b/src/vidalia/config/VidaliaSettings.cpp
index 7d317dc..d5bfdfb 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.
*/
@@ -47,10 +47,10 @@
#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 "IconDisplayPreference"
+#define SETTING_ICON_PREF "IconDisplayPreference"
/** Default Constructor */
VidaliaSettings::VidaliaSettings()
diff --git a/src/vidalia/config/VidaliaSettings.h b/src/vidalia/config/VidaliaSettings.h
index 6967740..4ecf2d3 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.
*/
@@ -46,12 +46,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. */
@@ -62,7 +62,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. */
@@ -117,7 +117,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;
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/help/content/po2html.sh b/src/vidalia/help/content/po2html.sh
index 3adb742..ab7d8cf 100755
--- a/src/vidalia/help/content/po2html.sh
+++ b/src/vidalia/help/content/po2html.sh
@@ -6,12 +6,12 @@
# This is Free Software (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.txt
#
-# This script will convert translated po files back to html.
+# This script will convert translated po files back to html.
#
### Start config ###
-# Location of the translated po files. Do not add the trailing slash.
+# Location of the translated po files. Do not add the trailing slash.
translated="/home/runa/tor/vidalia/src/vidalia/help/content/po"
# Location of the original and translated html files. Do not add the
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 7e3e9c2..796f28d 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.
*/
@@ -453,7 +453,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. */
@@ -472,7 +472,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 f9905e1..08cecd4 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(QWidget *parent = 0, Qt::WFlags flags = 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 7e9ad28..5c08f57 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.cpp b/src/vidalia/network/GeoIpResolver.cpp
index f2c5100..9752dd9 100644
--- a/src/vidalia/network/GeoIpResolver.cpp
+++ b/src/vidalia/network/GeoIpResolver.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.
*/
@@ -64,7 +64,7 @@ GeoIpResolver::resolveUsingLocalDatabase(const QHostAddress &ip)
QString countryCode = _database.countryCodeByAddr(ip);
if (! countryCode.isEmpty()) {
QPair<float,float> coords = CountryInfo::countryLocation(countryCode);
- return GeoIpRecord(ip, coords.first, coords.second,
+ return GeoIpRecord(ip, coords.first, coords.second,
CountryInfo::countryName(countryCode),
countryCode);
}
@@ -81,6 +81,6 @@ GeoIpResolver::resolve(const QHostAddress &ip)
if (_useLocalDatabase)
return resolveUsingLocalDatabase(ip);
#endif
- return resolveUsingTor(ip);
+ return resolveUsingTor(ip);
}
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.cpp b/src/vidalia/network/NetViewer.cpp
index 2ce6b46..535c127 100644
--- a/src/vidalia/network/NetViewer.cpp
+++ b/src/vidalia/network/NetViewer.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.
*/
@@ -110,12 +110,12 @@ NetViewer::NetViewer(QWidget *parent)
* needs to be called to get rid of any descriptors that were removed. */
_refreshTimer.setInterval(60*60*1000);
connect(&_refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
-
+
/* Connect the necessary slots and signals */
connect(ui.actionHelp, SIGNAL(triggered()), this, SLOT(help()));
connect(ui.actionRefresh, SIGNAL(triggered()), this, SLOT(refresh()));
connect(ui.treeRouterList, SIGNAL(routerSelected(QList<RouterDescriptor>)),
- this, SLOT(routerSelected(QList<RouterDescriptor>)));
+ this, SLOT(routerSelected(QList<RouterDescriptor>)));
connect(ui.treeRouterList, SIGNAL(zoomToRouter(QString)),
_map, SLOT(zoomToRouter(QString)));
connect(ui.treeCircuitList, SIGNAL(circuitSelected(Circuit)),
@@ -217,7 +217,7 @@ NetViewer::refresh()
/* Ok, they can refresh again. */
ui.actionRefresh->setEnabled(true);
-}
+}
/** Clears the lists and the map */
void
@@ -281,7 +281,7 @@ NetViewer::addStream(const Stream &stream)
if (stream.status() == Stream::New) {
QString target = stream.targetAddress();
if (! QHostAddress(target).isNull() && _addressMap.isMapped(target)) {
- /* Replace the IP address in the stream event with the original
+ /* Replace the IP address in the stream event with the original
* hostname */
ui.treeCircuitList->addStream(
Stream(stream.id(), stream.status(), stream.circuitId(),
@@ -312,7 +312,7 @@ void
NetViewer::loadNetworkStatus()
{
NetworkStatus networkStatus = _torControl->getNetworkStatus();
-
+
foreach(RouterStatus rs, networkStatus) {
if (!rs.isRunning())
continue;
@@ -401,13 +401,13 @@ NetViewer::routerSelected(const QList<RouterDescriptor> &routers)
_map->selectRouter(routers[0].id());
}
-/** 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
NetViewer::displayRouterInfo(const QString &id)
{
- RouterInfoDialog dlg(_map->isFullScreen() ? static_cast<QWidget*>(_map)
+ RouterInfoDialog dlg(_map->isFullScreen() ? static_cast<QWidget*>(_map)
: static_cast<QWidget*>(this));
/* Fetch the specified router's descriptor */
diff --git a/src/vidalia/network/NetViewer.h b/src/vidalia/network/NetViewer.h
index 1d1f85f..6b4026a 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.
*/
@@ -90,7 +90,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);
@@ -122,7 +122,7 @@ private:
GeoIpResolver _geoip;
/** Stores a list of address mappings from Tor. */
AddressMap _addressMap;
-
+
/** Widget that displays the Tor network map. */
#if defined(USE_MARBLE)
TorMapWidget* _map;
diff --git a/src/vidalia/network/RouterDescriptorView.cpp b/src/vidalia/network/RouterDescriptorView.cpp
index 6d9370c..bb4b19d 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,35 +87,35 @@ 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())));
html.append(trow(tcol(b(tr("Platform:"))) + tcol(rd.platform())));
/* If the router is online, then show the uptime and bandwidth stats. */
if (!rd.offline()) {
- 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())))));
}
@@ -126,14 +126,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 806d3e9..727acd4 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.
*/
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 db558bf..5bf29e7 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());
@@ -111,7 +111,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 e35bc22..22d2829 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()));
}
@@ -158,7 +158,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. */
@@ -169,7 +169,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
@@ -188,7 +188,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)
@@ -222,7 +222,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 04d7263..efa4c6f 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. */
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.cpp b/src/vidalia/network/TorMapImageView.cpp
index 6c04d89..1675df6 100644
--- a/src/vidalia/network/TorMapImageView.cpp
+++ b/src/vidalia/network/TorMapImageView.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.
*/
@@ -59,7 +59,7 @@ static float plen[] = {
0.6213, 0.5722, 0.5322
};
-/** Distance of corresponding parallel from equator */
+/** Distance of corresponding parallel from equator */
static float pdfe[] = {
0.0000, 0.0620, 0.1240, 0.1860,
0.2480, 0.3100, 0.3720, 0.4340,
@@ -88,7 +88,7 @@ TorMapImageView::addRouter(const RouterDescriptor &desc, const GeoIpRecord &geoi
{
QString id = desc.id();
QPointF routerCoord = toMapSpace(geoip.latitude(), geoip.longitude());
-
+
/* Add data the hash of known routers, and plot the point on the map */
if (_routers.contains(id))
_routers.value(id)->first = routerCoord;
@@ -101,25 +101,25 @@ void
TorMapImageView::addCircuit(const CircuitId &circid, const QStringList &path)
{
QPainterPath *circPainterPath = new QPainterPath;
-
+
/* Build the new circuit */
for (int i = 0; i < path.size()-1; i++) {
QString fromNode = path.at(i);
QString toNode = path.at(i+1);
-
+
/* Add the coordinates of the hops to the circuit */
if (_routers.contains(fromNode) && _routers.contains(toNode)) {
/* Find the two endpoints for this path segment */
QPointF fromPos = _routers.value(fromNode)->first;
QPointF endPos = _routers.value(toNode)->first;
-
- /* Draw the path segment */
+
+ /* Draw the path segment */
circPainterPath->moveTo(fromPos);
circPainterPath->lineTo(endPos);
circPainterPath->moveTo(endPos);
}
}
-
+
/** Add the data to the hash of known circuits and plot the circuit on the map */
if (_circuits.contains(circid)) {
/* This circuit is being updated, so just update the path, making sure we
@@ -156,7 +156,7 @@ TorMapImageView::selectRouter(const QString &id)
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
TorMapImageView::selectCircuit(const CircuitId &circid)
@@ -199,17 +199,17 @@ TorMapImageView::clear()
delete circuitPair;
}
}
-
+
/** Draws the routers and paths onto the map image. */
void
TorMapImageView::paintImage(QPainter *painter)
{
painter->setRenderHint(QPainter::Antialiasing);
-
+
/* Draw the router points */
foreach(QString router, _routers.keys()) {
QPair<QPointF,bool> *routerPair = _routers.value(router);
- painter->setPen((routerPair->second ? PEN_SELECTED : PEN_ROUTER));
+ painter->setPen((routerPair->second ? PEN_SELECTED : PEN_ROUTER));
painter->drawPoint(routerPair->first);
}
/* Draw the circuit paths */
@@ -231,29 +231,29 @@ TorMapImageView::toMapSpace(float latitude, float longitude)
float lat;
float lon;
-
+
lat = floor(longitude * (deg * lerp(abs(int(latitude)), plen))
- + width/2 + MAP_LEFT);
-
+ + width/2 + MAP_LEFT);
+
if (latitude < 0) {
lon = floor((height/2) + (lerp(abs(int(latitude)), pdfe) * (height/2))
- + MAP_TOP);
+ + MAP_TOP);
} else {
lon = floor((height/2) - (lerp(abs(int(latitude)), pdfe) * (height/2))
- + MAP_TOP);
+ + MAP_TOP);
}
return QPointF(lat, lon);
}
-
+
/** Linearly interpolates using the values in the Robinson projection table */
float
TorMapImageView::lerp(float input, float *table)
{
int x = int(floor(input / 5));
- return ((table[x+1] - table[x]) /
- (((x+1)*5) - (x*5))) * (input - x*5) + table[x];
+ return ((table[x+1] - table[x]) /
+ (((x+1)*5) - (x*5))) * (input - x*5) + table[x];
}
/** Returns the minimum size of the widget */
@@ -270,7 +270,7 @@ void
TorMapImageView::zoomToFit()
{
QRectF rect = circuitBoundingBox();
-
+
if (rect.isNull()) {
/* If there are no circuits, zoom all the way out */
resetZoomPoint();
@@ -279,7 +279,7 @@ TorMapImageView::zoomToFit()
/* Zoom in on the displayed circuits */
float zoomLevel = 1.0 - qMax(rect.height()/float(MAP_HEIGHT),
rect.width()/float(MAP_WIDTH));
-
+
zoom(rect.center().toPoint(), zoomLevel+0.2);
}
}
@@ -305,12 +305,12 @@ void
TorMapImageView::zoomToRouter(const QString &id)
{
QPair<QPointF,bool> *routerPair;
-
+
if (_routers.contains(id)) {
deselectAll();
routerPair = _routers.value(id);
routerPair->second = true; /* Set the router point to "selected" */
- zoom(routerPair->first.toPoint(), 1.0);
+ zoom(routerPair->first.toPoint(), 1.0);
}
}
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 e222218..6d0696d 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.
*/
@@ -53,7 +53,7 @@ TorMapWidget::TorMapWidget(QWidget *parent)
/* We can't call setInputHandler() until MarbleWidget has called its
* internal _q_initGui() method, which doesn't happen until a
* QTimer::singleShot(0, this, SLOT(_q_initGui())) timer set in its
- * constructor times out. So force that event to process now. */
+ * constructor times out. So force that event to process now. */
vApp->processEvents(QEventLoop::ExcludeUserInputEvents
| QEventLoop::ExcludeSocketNotifiers);
@@ -74,7 +74,7 @@ TorMapWidget::addRouter(const RouterDescriptor &desc, const GeoIpRecord &geoip)
qreal lon = geoip.longitude();
qreal lat = geoip.latitude();
quint64 bw;
-
+
bw = qMin(desc.averageBandwidth(), desc.burstBandwidth());
bw = qMin(bw, desc.observedBandwidth());
@@ -167,7 +167,7 @@ TorMapWidget::selectRouter(const QString &id)
#endif
}
-/** 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)
@@ -214,7 +214,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 f371198..cf0a8ea 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/TorMapWidgetInputHandler.cpp b/src/vidalia/network/TorMapWidgetInputHandler.cpp
index 467594b..0e1dcd2 100644
--- a/src/vidalia/network/TorMapWidgetInputHandler.cpp
+++ b/src/vidalia/network/TorMapWidgetInputHandler.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/TorMapWidgetInputHandler.h b/src/vidalia/network/TorMapWidgetInputHandler.h
index 066a4dc..bca2b4c 100644
--- a/src/vidalia/network/TorMapWidgetInputHandler.h
+++ b/src/vidalia/network/TorMapWidgetInputHandler.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 a98c7e6..3e877e2 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 c83ded3..0954b3d 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..2ce0005 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),
- int(double(r.height()) * 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;
@@ -123,8 +123,8 @@ ZImageView::drawScaledImage()
/** Rescale the image copy */
i = i.copy(r).scaled(scaleTo,
- Qt::KeepAspectRatioByExpanding,
- Qt::SmoothTransformation);
+ Qt::KeepAspectRatioByExpanding,
+ Qt::SmoothTransformation);
int extraWidth = int(double(sRect.width() - i.width()) / 2.0);
int extraHeight = int(double(sRect.height() - i.height()) / 2.0);
@@ -132,31 +132,31 @@ 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);
p.fillRect(sRect.width() - extraWidth, 0,
- sRect.width(), sRect.height(), background);
+ sRect.width(), sRect.height(), background);
}
if (extraHeight > 0) {
p.fillRect(0, 0, sRect.width(), extraHeight, background);
p.fillRect(0, sRect.height() - extraHeight,
- sRect.width(), sRect.height(), background);
+ sRect.width(), sRect.height(), background);
}
// 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 (???). */
More information about the tor-commits
mailing list