[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2265: Use the getConf() method that returns a QVariant when loadin (in trunk: . src/vidalia/config)
Author: edmanm
Date: 2007-12-27 11:34:50 -0500 (Thu, 27 Dec 2007)
New Revision: 2265
Modified:
trunk/
trunk/src/vidalia/config/abstracttorsettings.cpp
Log:
r2378@lysithea: edmanm | 2007-12-26 23:42:50 -0500
Use the getConf() method that returns a QVariant when loading a configuration
value from Tor for the settings dialog. We previously were cramming everything
into a QString, which would screw up multi-line configuration values (they
would end up as a single QString with "\n"s, instead of a proper QStringList).
Fixes the bug arma noticed where three bridges would appear as one item in the
settings dialog.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2378] on 0108964c-5b0b-4c9e-969f-e2288315d100
Modified: trunk/src/vidalia/config/abstracttorsettings.cpp
===================================================================
--- trunk/src/vidalia/config/abstracttorsettings.cpp 2007-12-27 16:34:35 UTC (rev 2264)
+++ trunk/src/vidalia/config/abstracttorsettings.cpp 2007-12-27 16:34:50 UTC (rev 2265)
@@ -107,16 +107,15 @@
QVariant
AbstractTorSettings::torValue(const QString &key) const
{
- QVariant value;
QVariant defaultVal;
- QString confValue;
+ QVariant confValue;
defaultVal = defaultValue(key);
- if (_torControl && _torControl->getConf(key, confValue)) {
- value.setValue(confValue);
- value.convert(defaultVal.type());
+ if (_torControl) {
+ confValue = _torControl->getConf(key);
+ confValue.convert(defaultVal.type());
}
- return (isEmptyValue(value) ? localValue(key) : value);
+ return (isEmptyValue(confValue) ? localValue(key) : confValue);
}
/** If Vidalia is connected to Tor, this returns the value associated with