mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-09 05:27:57 +00:00
Initial ProjectModel implementation
This commit is contained in:
@@ -20,18 +20,18 @@ QString SysStringToQString(const boo::SystemString& str)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool MkPath(const QString& path, QWidget* parent)
|
||||
bool MkPath(const QString& path, UIMessenger& messenger)
|
||||
{
|
||||
QFileInfo fInfo(path);
|
||||
return MkPath(fInfo.dir(), fInfo.fileName(), parent);
|
||||
return MkPath(fInfo.dir(), fInfo.fileName(), messenger);
|
||||
}
|
||||
|
||||
bool MkPath(const QDir& dir, const QString& file, QWidget* parent)
|
||||
bool MkPath(const QDir& dir, const QString& file, UIMessenger& messenger)
|
||||
{
|
||||
if (!dir.mkpath(file))
|
||||
{
|
||||
QString msg = QString(parent->tr("A directory at '%1/%2' could not be created.")).arg(dir.path()).arg(file);
|
||||
QMessageBox::critical(parent, parent->tr("Unable to create directory"), msg);
|
||||
QString msg = QString(QObject::tr("A directory at '%1/%2' could not be created.")).arg(dir.path()).arg(file);
|
||||
messenger.critical(QObject::tr("Unable to create directory"), msg);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user