create config dir instead of complaining it doesn't exist
This commit is contained in:
parent
6c67c11481
commit
1284519280
5
main.cpp
5
main.cpp
@ -44,9 +44,12 @@ int main(int argc, char *argv[])
|
|||||||
QDir dir;
|
QDir dir;
|
||||||
if(!dir.exists(configDirectoryPath))
|
if(!dir.exists(configDirectoryPath))
|
||||||
{
|
{
|
||||||
QMessageBox::warning(nullptr, "Directory not found", configDirectoryPath + " was not found!");
|
if(!dir.mkdir(configDirectoryPath))
|
||||||
|
{
|
||||||
|
QMessageBox::warning(nullptr, "Failed to create dir", configDirectoryPath + " was not found and could not be created!");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QSettings settings(configDirectoryPath + "qsrun.config", QSettings::NativeFormat);
|
QSettings settings(configDirectoryPath + "qsrun.config", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user