- 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:
@@ -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
|
||||
Reference in New Issue
Block a user