Move to Qt5 and Qt5Multimedia
This commit is contained in:
@@ -91,11 +91,14 @@ void showMessage(const QString & message, enum QMessageBox::Icon icon = QMessage
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(companion);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("OpenTX Simulator");
|
||||
app.setOrganizationName("OpenTX");
|
||||
app.setOrganizationDomain("open-tx.org");
|
||||
|
||||
g.init();
|
||||
|
||||
#ifdef __APPLE__
|
||||
app.setStyle(new MyProxyStyle);
|
||||
#endif
|
||||
@@ -108,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
app.installTranslator(&qtTranslator);
|
||||
*/
|
||||
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
// QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
|
||||
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
|
||||
uint32_t sdlFlags = 0;
|
||||
@@ -131,7 +134,7 @@ int main(int argc, char *argv[])
|
||||
registerSimulators();
|
||||
registerOpenTxFirmwares();
|
||||
|
||||
eedir = QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
|
||||
eedir = QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/data/OpenTX/Simulator");
|
||||
if (!eedir.exists("OpenTX")) {
|
||||
eedir.mkdir("OpenTX");
|
||||
}
|
||||
@@ -203,7 +206,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (options.positional().isEmpty()) {
|
||||
eepromFileName = QString("eeprom-%1.bin").arg(radioId);
|
||||
eepromFileName = eedir.filePath(eepromFileName.toAscii());
|
||||
eepromFileName = eedir.filePath(eepromFileName.toLatin1());
|
||||
}
|
||||
else {
|
||||
eepromFileName = options.positional()[0];
|
||||
@@ -230,7 +233,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
dialog->show();
|
||||
dialog->start(eepromFileName.toAscii().constData());
|
||||
dialog->start(eepromFileName.toLatin1().constData());
|
||||
|
||||
int result = app.exec();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user