mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 02:01:19 +00:00
Fix OSX keys issues.
This commit is contained in:
parent
295912fbb3
commit
17b70b47ce
10
app/main.cpp
10
app/main.cpp
@ -24,7 +24,16 @@ QString getNamedArgument(QStringList args, QString name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// Some environmental variable are necessary on certain platforms.
|
||||||
|
|
||||||
|
// This disables QT appmenu under Ubuntu, which is not working with QML apps.
|
||||||
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC)
|
||||||
|
// This allows UTF-8 characters usage in OSX.
|
||||||
|
setenv("LC_CTYPE", "UTF-8", 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
FileIO fileIO;
|
FileIO fileIO;
|
||||||
@ -60,6 +69,7 @@ int main(int argc, char *argv[])
|
|||||||
QStringList importPathList = engine.importPathList();
|
QStringList importPathList = engine.importPathList();
|
||||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
||||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../PlugIns");
|
||||||
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/../../../qmltermwidget");
|
||||||
engine.setImportPathList(importPathList);
|
engine.setImportPathList(importPathList);
|
||||||
|
|
||||||
engine.load(QUrl("qrc:/main.qml"));
|
engine.load(QUrl("qrc:/main.qml"));
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b03e96edb5d984040b1816edee8f1f51eadbaff9
|
Subproject commit 4b3fd2729bac10a8e292bcf027737509d10e9c74
|
Loading…
x
Reference in New Issue
Block a user