mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
revert 0b4701c42f
This commit is contained in:
parent
76422854a4
commit
924337ee93
3 changed files with 0 additions and 67 deletions
|
|
@ -1,7 +1,5 @@
|
|||
#include "settingscache.h"
|
||||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
|
||||
SettingsCache::SettingsCache()
|
||||
{
|
||||
|
|
@ -381,31 +379,3 @@ void SettingsCache::setPixmapCacheSize(const int _pixmapCacheSize)
|
|||
settings->setValue("personal/pixmapCacheSize", pixmapCacheSize);
|
||||
emit pixmapCacheSizeChanged(pixmapCacheSize);
|
||||
}
|
||||
|
||||
void SettingsCache::copyPath(const QString &src, const QString &dst)
|
||||
{
|
||||
// test source && return if inexistent
|
||||
QDir dir(src);
|
||||
if (! dir.exists())
|
||||
return;
|
||||
// test destination && create if inexistent
|
||||
QDir tmpDir(dst);
|
||||
if (!tmpDir.exists())
|
||||
{
|
||||
tmpDir.setPath(QDir::rootPath());
|
||||
if (!tmpDir.mkdir(dst) && !tmpDir.exists()) {
|
||||
// TODO: this is probably not good.
|
||||
qDebug() << "copyPath(): Failed to create dir: " << dst;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (QString d, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) {
|
||||
QString dst_path = dst + QDir::separator() + d;
|
||||
dir.mkpath(dst_path);
|
||||
copyPath(src+ QDir::separator() + d, dst_path);
|
||||
}
|
||||
|
||||
foreach (QString f, dir.entryList(QDir::Files)) {
|
||||
QFile::copy(src + QDir::separator() + f, dst + QDir::separator() + f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue