[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1558: Fix a warning we get with Qt 4.2.x when the user specifies a (trunk/src/control)



Author: edmanm
Date: 2006-12-25 19:57:56 -0500 (Mon, 25 Dec 2006)
New Revision: 1558

Modified:
   trunk/src/control/torcontrol.cpp
Log:
Fix a warning we get with Qt 4.2.x when the user specifies an empty torrc
filename in the Advanced settings page.


Modified: trunk/src/control/torcontrol.cpp
===================================================================
--- trunk/src/control/torcontrol.cpp	2006-12-25 23:53:49 UTC (rev 1557)
+++ trunk/src/control/torcontrol.cpp	2006-12-26 00:57:56 UTC (rev 1558)
@@ -92,8 +92,11 @@
     
     /* Make sure our torrc and the full path to it exists. If it doesn't,
      * then touch it. */
-    touch_file(settings.getTorrc(), true);
-
+    QString torrc = settings.getTorrc();
+    if (!torrc.isEmpty()) {
+      touch_file(torrc, true);
+    }
+    
 #if defined(Q_OS_WIN32)
     if (TorService::isSupported() && _torService->isInstalled()) {
       _torService->start();