CP2130 Configurator (cp2130-conf) is an application that can be used to configure CP2130 devices, including VID, PID, as well as other descriptors. Most importantly, the application allows you to configure pin functions and states.
Currently, the library QCoreApplication is included just to invoke QCoreApplication::installTranslator() in a procedural fashion. However, QApplication implements the same function in an object-oriented manner, as a function of the object itself. Thus, main() could be rewritten:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator translator;
if (!translator.load("cp2130-conf_" + QLocale::system().name(), ":/translations/translations")) { // It the locale translation does not exist or cannot be loaded
translator.load("cp2130-conf_en_US", ":/translations/translations"); // Fall back to the en-US translation
}
a.installTranslator(&translator); // Replaces QCoreApplication::installTranslator(&translator)
MainWindow w;
w.show();
return a.exec();
}
This approach is more object-oriented, and QCoreApplication doesn't need to be included.
Currently, the library QCoreApplication is included just to invoke QCoreApplication::installTranslator() in a procedural fashion. However, QApplication implements the same function in an object-oriented manner, as a function of the object itself. Thus, main() could be rewritten:
This approach is more object-oriented, and QCoreApplication doesn't need to be included.