Big updates to the UI.

This commit is contained in:
Adam Treat
2023-04-10 23:34:34 -04:00
parent be65e91c7d
commit a56a258099
7 changed files with 273 additions and 90 deletions

22
llm.cpp
View File

@@ -3,6 +3,7 @@
#include <QCoreApplication>
#include <QDir>
#include <QFile>
#include <QProcess>
#include <QResource>
#include <fstream>
@@ -143,3 +144,24 @@ void LLM::responseStopped()
m_responseInProgress = false;
emit responseInProgressChanged();
}
bool LLM::checkForUpdates() const
{
#if defined(Q_OS_LINUX)
QString tool("MaintenanceTool");
#elif defined(Q_OS_WINDOWS)
QString tool("MaintenanceTool.exe");
#elif defined(Q_OS_DARWIN)
QString tool("MaintenanceTool.app/Contents/MacOS/MaintenanceTool");
#endif
QString fileName = QCoreApplication::applicationDirPath()
+ QDir::separator() + ".." + QDir::separator() + tool;
if (!QFileInfo::exists(fileName)) {
qDebug() << "Couldn't find tool at" << fileName << "so cannot check for updates!";
return false;
}
return QProcess::startDetached(fileName);
}