fixed wrong web library navigation after opening a remote comic

This commit is contained in:
Luis Ángel San Martín
2014-08-19 10:31:02 +02:00
commit acf04b5cd8
752 changed files with 70761 additions and 0 deletions

24
common/custom_widgets.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "custom_widgets.h"
#include <QDir>
#include <QFileInfo>
void delTree(QDir dir)
{
dir.setFilter(QDir::AllDirs|QDir::Files|QDir::Hidden|QDir::NoDotAndDotDot);
QFileInfoList list = dir.entryInfoList();
for (int i = 0; i < list.size(); ++i)
{
QFileInfo fileInfo = list.at(i);
QString path = fileInfo.filePath();
if(fileInfo.isDir())
{
delTree(QDir(fileInfo.absoluteFilePath()));
dir.rmdir(fileInfo.absoluteFilePath());
}
else
{
dir.remove(fileInfo.absoluteFilePath());
}
}
}