Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
the0cp committed Aug 12, 2021
1 parent 1304ba3 commit 1845a7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions systest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sysTest::sysTest(QWidget *parent)
//state.endGroup();

ui -> outputDir -> setReadOnly(true);
QString qconfigPath = QCoreApplication::applicationDirPath() + "/sysTest.ini";
QString qconfigPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/sysTest.ini";
QSettings *config = new QSettings(qconfigPath, QSettings::IniFormat);

if(config -> value("settings/output").toInt() == -1)
Expand Down Expand Up @@ -42,7 +42,7 @@ sysTest::~sysTest()
void sysTest::initTree()
{
ui -> selectCmd -> header() -> setSectionResizeMode(QHeaderView::ResizeToContents);
QString qconfigPath = QCoreApplication::applicationDirPath() + "/sysTest.ini";
QString qconfigPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/sysTest.ini";
QSettings *config = new QSettings(qconfigPath, QSettings::IniFormat);
QSettings settings("Theodore Cooper", "Theo's System Test Tool");

Expand Down Expand Up @@ -260,7 +260,7 @@ void sysTest::on_browse_clicked()
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks);
//output_path.replace("/", "\\");
QString qconfigPath = QCoreApplication::applicationDirPath() + "/sysTest.ini";
QString qconfigPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/sysTest.ini";
QSettings *config = new QSettings(qconfigPath, QSettings::IniFormat);
if(config -> value("settings/output").toInt() == -1)
{
Expand Down
2 changes: 1 addition & 1 deletion testhread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ const QString tesThread::disk()

QString tesThread::getDir()
{
QString qconfigPath = QCoreApplication::applicationDirPath() + "/sysTest.ini";
QString qconfigPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/sysTest.ini";
QSettings *config = new QSettings(qconfigPath, QSettings::IniFormat);
QString qresDir = config -> value("settings/output").toString() + "/Result";

Expand Down
1 change: 1 addition & 0 deletions testhread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QProcess>
#include <QSettings>
#include <QCoreApplication>
#include <QStandardPaths>
#include <QDebug>
#include <QTreeWidgetItem>
#include <QFile>
Expand Down

0 comments on commit 1845a7b

Please sign in to comment.