23 #include "wadseekershow.h"
25 #include "application.h"
26 #include "configuration/doomseekerconfig.h"
27 #include "gui/mainwindow.h"
28 #include "gui/wadseekerinterface.h"
29 #include "serverapi/server.h"
30 #include "templatedpathresolver.h"
34 #include <QMessageBox>
48 bool WadseekerShow::checkWadseekerValidity(QWidget *parent)
50 if (WadseekerInterface::isInstantiated())
52 QMessageBox::warning(parent, tr(
"Wadseeker cannot be launched"),
53 tr(
"Another instance of Wadseeker is already running."), QMessageBox::Ok);
58 QDir targetDir(targetDirPath);
59 QFileInfo targetDirFileInfo(targetDirPath);
61 if (targetDirPath.isEmpty() || !targetDir.exists() || !targetDirFileInfo.isWritable())
63 QString error = tr(
"Wadseeker will not work correctly:\n\n"
64 "The target directory is either not configured, is invalid or cannot be written to.\n\n"
65 "Please review your Configuration and/or refer to the online help available from "
67 QMessageBox::warning(parent, tr(
"Wadseeker cannot be launched"),
68 error, QMessageBox::Ok);
77 if (staticInstance ==
nullptr)
79 return staticInstance;