main: allow overriding config dir from commandline
Αυτή η υποβολή περιλαμβάνεται σε:
γονέας
883b71e8a8
υποβολή
3fbbc7d653
5
main.cpp
5
main.cpp
@ -42,16 +42,17 @@ int main(int argc, char *argv[])
|
||||
parser.addHelpOption();
|
||||
parser.process(app.arguments());
|
||||
configDirectoryPath = parser.value("config");
|
||||
if(!dir.exists(configDirectoryPath))
|
||||
if(!configDirectoryPath.isEmpty() && !dir.exists(configDirectoryPath))
|
||||
{
|
||||
QMessageBox::warning(nullptr, "Directory not found", configDirectoryPath + " was not found");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if(configDirectoryPath.isEmpty())
|
||||
{
|
||||
configDirectoryPath = QDir::homePath() + "/.config/qsrun/";
|
||||
}
|
||||
|
||||
qRegisterMetaType<QVector<QString>>("QVector<QString>");
|
||||
|
||||
if(!dir.exists(configDirectoryPath))
|
||||
|
Φόρτωση…
Αναφορά σε νέο ζήτημα
Block a user