mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-16 22:55:29 +08:00
Misc
add config file to resource system move language folder
This commit is contained in:
@@ -28,7 +28,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
||||
currArgs = args;
|
||||
|
||||
// using "-f" option to make the client output flushed after every print.
|
||||
// single '\r' might appears. Don't use QProcess::Text there or '\r' is ignored.
|
||||
// single '\r' might appear. Don't use QProcess::Text there or '\r' is ignored.
|
||||
start(path, args, QProcess::Unbuffered | QProcess::ReadWrite);
|
||||
if(waitForStarted(10000))
|
||||
{
|
||||
|
||||
+15
-4
@@ -123,13 +123,24 @@ bool Util::chooseLanguage(QSettings* guiSettings, QMainWindow* window)
|
||||
delete langSettings;
|
||||
bool isOk = false;
|
||||
QString selectedText = QInputDialog::getItem(window, "", "Choose a language:", langMap.keys(), 0, false, &isOk);
|
||||
if(isOk)
|
||||
if(!isOk)
|
||||
return false;
|
||||
if(langMap[selectedText] == "(ext)")
|
||||
{
|
||||
guiSettings->beginGroup("lang");
|
||||
guiSettings->setValue("language", langMap[selectedText]);
|
||||
QString extPath = QFileDialog::getOpenFileName(nullptr, "Select the translation file:");
|
||||
if(extPath.isEmpty())
|
||||
return false;
|
||||
|
||||
guiSettings->beginGroup("language");
|
||||
guiSettings->setValue("extPath", extPath);
|
||||
guiSettings->endGroup();
|
||||
guiSettings->sync();
|
||||
}
|
||||
|
||||
guiSettings->beginGroup("language");
|
||||
guiSettings->setValue("name", langMap[selectedText]);
|
||||
guiSettings->endGroup();
|
||||
guiSettings->sync();
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <QSettings>
|
||||
#include <QMainWindow>
|
||||
#include <QInputDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QDockWidget>
|
||||
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
Reference in New Issue
Block a user