mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 16:45:24 +08:00
update
This commit is contained in:
28
example/src/helper/InitalizrHelper.cpp
Normal file
28
example/src/helper/InitalizrHelper.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "InitalizrHelper.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
InitalizrHelper::InitalizrHelper(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
InitalizrHelper::~InitalizrHelper() = default;
|
||||
|
||||
|
||||
void InitalizrHelper::generate(const QString& name,const QString& path){
|
||||
if(name.isEmpty()){
|
||||
error(tr("The name cannot be empty"));
|
||||
return;
|
||||
}
|
||||
if(path.isEmpty()){
|
||||
error(tr("The creation path cannot be empty"));
|
||||
return;
|
||||
}
|
||||
QDir projectDir(path);
|
||||
if(!projectDir.exists()){
|
||||
error(tr("The path does not exist"));
|
||||
return;
|
||||
}
|
||||
return success();
|
||||
}
|
Reference in New Issue
Block a user