- Remove demo/icons/Logos.qrc, replaced by demo/resources/CGAL.qrc, that

also contains :/cgal/help/about_CGAL.html
- Add include/CGAL/Qt/debug.h and src/CGALQt/debug.cpp, that will contain
  debug tools/functions. For the moment, they just define:
      void traverse_resources(const QString& name);
  that must be used like that:
      CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
  or
      CGAL::Qt:traverse_resources(":"); // view all resources
  and displays the resources tree on std::cerr.
This commit is contained in:
Laurent Rineau
2008-07-04 13:10:02 +00:00
parent 44c9e23466
commit 9f2384e77d
9 changed files with 67 additions and 8 deletions
+32
View File
@@ -0,0 +1,32 @@
#include <CGAL/Qt/debug.h>
#include <QDir>
#include <iostream>
namespace CGAL {
namespace Qt {
void traverse_resources(const QString& name, const QString& dirname, int indent)
{
std::cerr << qPrintable(QString(indent, ' '))
<< qPrintable(name);
QString fullname =
dirname.isEmpty() ?
name :
dirname + "/" + name;
QDir dir(fullname);
if(dir.exists()) {
std::cerr << "/\n";
Q_FOREACH(QString path, dir.entryList())
{
traverse_resources(path, fullname, indent + 2);
}
}
else {
std::cerr << "\n";
}
}
} // namesapce Qt
} // namespace CGAL