[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3467: Matt learned new Qt trickses from Marble. (vidalia/trunk/src/torcontrol)
Author: edmanm
Date: 2009-01-20 19:47:25 -0500 (Tue, 20 Jan 2009)
New Revision: 3467
Modified:
vidalia/trunk/src/torcontrol/torcontrol.cpp
vidalia/trunk/src/torcontrol/torcontrol.h
Log:
Matt learned new Qt trickses from Marble.
Modified: vidalia/trunk/src/torcontrol/torcontrol.cpp
===================================================================
--- vidalia/trunk/src/torcontrol/torcontrol.cpp 2009-01-21 00:07:21 UTC (rev 3466)
+++ vidalia/trunk/src/torcontrol/torcontrol.cpp 2009-01-21 00:47:25 UTC (rev 3467)
@@ -27,20 +27,20 @@
* it an object to use to handle asynchronous events. */
_controlConn = new ControlConnection(&_torEvents);
QObject::connect(_controlConn, SIGNAL(connected()),
- this, SLOT(onConnected()));
+ this, SIGNAL(connected()));
QObject::connect(_controlConn, SIGNAL(connectFailed(QString)),
- this, SLOT(onConnectFailed(QString)));
+ this, SIGNAL(connectFailed(QString)));
QObject::connect(_controlConn, SIGNAL(disconnected()),
this, SLOT(onDisconnected()));
/* Create an object used to start and stop a Tor process. */
_torProcess = new TorProcess(this);
QObject::connect(_torProcess, SIGNAL(started()),
- this, SLOT(onStarted()));
+ this, SIGNAL(started()));
QObject::connect(_torProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SLOT(onStopped(int, QProcess::ExitStatus)));
QObject::connect(_torProcess, SIGNAL(startFailed(QString)),
- this, SLOT(onStartFailed(QString)));
+ this, SIGNAL(startFailed(QString)));
QObject::connect(_torProcess, SIGNAL(log(QString, QString)),
this, SLOT(onLogStdout(QString, QString)));
@@ -90,21 +90,6 @@
}
}
-/** Emits a signal that the Tor process started */
-void
-TorControl::onStarted()
-{
- emit started();
-}
-
-/** Emits a signal that the Tor process failed to start and includes an error
- * message (hopefully) indicating why. */
-void
-TorControl::onStartFailed(QString errmsg)
-{
- emit startFailed(errmsg);
-}
-
/** Stop the Tor process. */
bool
TorControl::stop(QString *errmsg)
@@ -160,22 +145,6 @@
_controlConn->connect(address, port);
}
-/** Emits a signal that the control socket successfully established a
- * connection to Tor. */
-void
-TorControl::onConnected()
-{
- /* Let interested parties know that the control socket connected */
- emit connected();
-}
-
-/** Emits a signal that the control connection to Tor failed. */
-void
-TorControl::onConnectFailed(QString errmsg)
-{
- emit connectFailed(errmsg);
-}
-
/** Disconnect from Tor's control port */
void
TorControl::disconnect()
Modified: vidalia/trunk/src/torcontrol/torcontrol.h
===================================================================
--- vidalia/trunk/src/torcontrol/torcontrol.h 2009-01-21 00:07:21 UTC (rev 3466)
+++ vidalia/trunk/src/torcontrol/torcontrol.h 2009-01-21 00:47:25 UTC (rev 3467)
@@ -248,11 +248,7 @@
/* The slots below simply relay signals from the appropriate member objects */
private slots:
- void onStarted();
- void onStartFailed(QString errmsg);
void onStopped(int exitCode, QProcess::ExitStatus exitStatus);
- void onConnected();
- void onConnectFailed(QString errmsg);
void onDisconnected();
void onLogStdout(QString severity, QString message);
void onAuthenticated();