[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars
From:       Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date:       2011-01-21 8:22:12
Message-ID: 20110121082212.6F27DAC8B8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1216077 by mutlaqja:

Comply with INDI wire protocol for sending enableBLOB. Delete temp files are fitsviewer shows them. Thank \
Gerry for reporting this!

CCMAIL:kstars-devel@kde.org
CCMAIL:gerryr@rozeware.com



 M  +5 -1      fitsviewer/fitsviewer.cpp  
 M  +11 -7     indi/devicemanager.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/fitsviewer/fitsviewer.cpp #1216076:1216077
@@ -151,11 +151,15 @@
 bool FITSViewer::initFITS()
 {
     /* Display image in the central widget */
-    if (image->loadFits(currentURL.path()) == -1) {
+    if (image->loadFits(currentURL.path()) == -1)
+    {
+        QFile::remove(currentURL.path());
         close();
         return false;
     }
 
+    QFile::remove(currentURL.path());
+
     /* Clear history */
     history->clear();
     /* Set new file caption */
--- trunk/KDE/kdeedu/kstars/kstars/indi/devicemanager.cpp #1216076:1216077
@@ -133,21 +133,25 @@
     QTextStream serverFP(&serverSocket);
     QString openTag;
 
-    if (device.isEmpty() == false)
-    {
+    if (device.isEmpty())
+        return;
+
         if (property.isEmpty() == false)
             openTag = QString("<enableBLOB device='%1' name='%2'>").arg(device).arg(property);
         else
             openTag = QString("<enableBLOB device='%1'>").arg(device);
-    }
-    else
-        openTag = QString("<enableBLOB>");
 
     if (enable)
+    {
         serverFP << QString("%1Also</enableBLOB>\n").arg(openTag);
+        kDebug() << QString("%1Also</enableBLOB>\n").arg(openTag);
+    }
     else
+    {
         serverFP << QString("%1Never</enableBLOB>\n").arg(openTag);
+        kDebug() << QString("%1Never</enableBLOB>\n").arg(openTag);
 }
+}
 
 void DeviceManager::connectionSuccess()
 {
@@ -157,8 +161,6 @@
         delLilXML(XMLParser);
     XMLParser = newLilXML();
 
-    enableBLOB(true);
-
     serverFP << QString("<getProperties version='%1'/>\n").arg(INDIVERSION);
 }
 
@@ -381,6 +383,8 @@
 	indi_dev.append(dp);
 	emit newDevice(dp);
 
+        enableBLOB(true, device_name);
+
 	connect(dp->stdDev, SIGNAL(newTelescope()), parent->ksw->indiDriver(), SLOT(newTelescopeDiscovered()), \
Qt::QueuedConnection);  
     	/* ok */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic