summaryrefslogtreecommitdiff
path: root/kde-misc/kcollectd/files/kcollectd-0.9-boost.patch
blob: 7823ab7dbac1ec88d589859cde50770bc452f37d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- kcollectd-0.9.orig/kcollectd/kcollectd.cc
+++ kcollectd-0.9/kcollectd/kcollectd.cc
@@ -73,7 +73,7 @@
       gui->show();
     }
   } 
-  catch(basic_filesystem_error<path> &e) {
+  catch(const std::exception &e) {
     KMessageBox::error(0, i18n("Failed to read collectd-structure at \'%1\'\n"
 		"Terminating.", QString(RRD_BASEDIR)));
     exit(1);

--- kcollectd-0.9.orig/kcollectd/gui.cc
+++ kcollectd-0.9/kcollectd/gui.cc
@@ -127,21 +127,21 @@
   const directory_iterator end_itr;
   for (directory_iterator host(rrdpath); host != end_itr; ++host ) {
     if (is_directory(*host)) {
-      QTreeWidgetItem *hostitem = mkItem(listview, host->leaf());
+      QTreeWidgetItem *hostitem = mkItem(listview, host->path().filename().string());
       hostitem->setFlags(hostitem->flags() & ~Qt::ItemIsSelectable);
       for (directory_iterator sensor(*host); sensor != end_itr; ++sensor ) {
 	if (is_directory(*sensor)) {
-	  QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->leaf());
+	  QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->path().filename().string());
 	  sensoritem->setFlags(sensoritem->flags() & ~Qt::ItemIsSelectable);
 	  for (directory_iterator rrd(*sensor); rrd != end_itr; ++rrd ) {
 	    if (is_regular(*rrd) && extension(*rrd) == ".rrd") {
 	      QTreeWidgetItem *rrditem = mkItem(sensoritem, basename(*rrd));
 	      rrditem->setFlags(rrditem->flags() & ~Qt::ItemIsSelectable);
 	      std::ostringstream info;
-	      info << host->leaf() << delimiter
-		   << sensor->leaf() << delimiter
+	      info << host->path().filename().string() << delimiter
+		   << sensor->path().filename().string() << delimiter
 		   << basename(*rrd);
-	      get_datasources(rrd->string(), info.str(), rrditem);
+	      get_datasources(rrd->path().string(), info.str(), rrditem);
 	    }
 	  }
 	}