mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-03 00:34:28 +08:00
Non-ASCII path support(partial)
I didn't find other solutions on the Internet. I found the plugins are loaded when creating MainWindow, so this solution should be fine?
This commit is contained in:
@@ -9,6 +9,17 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// A trick to handle non-ascii path
|
||||
// The application cannot find the plugins when the path contains non ascii characters.
|
||||
// However, the plugins will be load after creating MainWindow(or QApplication?).
|
||||
// QDir will handle the path correctly.
|
||||
QDir* pluginDir = new QDir;
|
||||
if(pluginDir->cd("plugins")) // has plugins folder
|
||||
{
|
||||
qputenv("QT_PLUGIN_PATH", pluginDir->absolutePath().toLocal8Bit());
|
||||
}
|
||||
delete pluginDir;
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
||||
QDir *langPath = new QDir();
|
||||
|
||||
Reference in New Issue
Block a user