mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-30 13:51:33 -08:00
port of EQL/Qt4 to Qt5
This commit is contained in:
commit
0591f54ce8
339 changed files with 99935 additions and 0 deletions
37
src/main.cpp
Normal file
37
src/main.cpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// copyright (c) Polos Ruetz
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtCore>
|
||||
#include <iostream>
|
||||
#include "eql.h"
|
||||
|
||||
int catch_all_qexec() {
|
||||
int ret = 0;
|
||||
CL_CATCH_ALL_BEGIN(ecl_process_env()) {
|
||||
ret = QApplication::exec(); }
|
||||
CL_CATCH_ALL_END;
|
||||
return ret; }
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
EQL::ini(argv); // best initialized here
|
||||
|
||||
QApplication qapp(argc, argv);
|
||||
QStringList args(QCoreApplication::arguments());
|
||||
if(args.contains("-h") || (args.contains("--help"))) {
|
||||
std::cout << "Usage: eql [file] [-qtpl] [-qgui] [-quic file.ui [:ui-package] [:maximized]] [-slime] [-norc]" << std::endl;
|
||||
exit(0); }
|
||||
|
||||
QTextCodec* utf8 = QTextCodec::codecForName("UTF-8");
|
||||
QTextCodec::setCodecForLocale(utf8);
|
||||
|
||||
EQL eql;
|
||||
eql.printVersion();
|
||||
if(args.contains("-v") || args.contains("--version")) {
|
||||
std::cout << std::endl;
|
||||
exit(0); }
|
||||
eql.exec(args);
|
||||
|
||||
if(EQL::qexec) {
|
||||
return catch_all_qexec(); }
|
||||
return 0; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue