NOISSUE Refactors and moving of things

This commit is contained in:
Petr Mrázek
2015-01-27 22:31:07 +01:00
parent 593111b144
commit 791221e923
88 changed files with 1894 additions and 1668 deletions

View File

@ -30,31 +30,6 @@ qint64 BaseExternalTool::pid(QProcess *process)
#endif
}
QString BaseExternalTool::getSave() const
{
QDir saves(m_instance->minecraftRoot() + "/saves");
QStringList worlds = saves.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
QMutableListIterator<QString> it(worlds);
while (it.hasNext())
{
it.next();
if (!QDir(saves.absoluteFilePath(it.value())).exists("level.dat"))
{
it.remove();
}
}
bool ok = true;
const QString save = QInputDialog::getItem(
MMC->activeWindow(), tr("MCEdit"), tr("Choose which world to open:"),
worlds, 0, false, &ok);
if (ok)
{
return saves.absoluteFilePath(save);
}
return QString();
}
BaseDetachedTool::BaseDetachedTool(InstancePtr instance, QObject *parent)
: BaseExternalTool(instance, parent)
{