Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.

This commit is contained in:
2023-04-28 22:25:29 +02:00
parent 30e6180c82
commit d699ce79f7
481 changed files with 2310 additions and 130206 deletions
+10 -6
View File
@@ -1,6 +1,7 @@
#include "mainwindow.h"
#include <QApplication>
#include <QDesktopWidget>
//#include <QDesktopWidget>
#include <QSharedPointer>
#include <QTranslator>
#include <QLibraryInfo>
#include <QMessageBox>
@@ -17,7 +18,7 @@ int main(int argc, char *argv[])
if (!a.lock())
{
QMessageBox::warning(NULL, "Prodejna is running", "Prodejna is allready running. Only one instance can be started.");
QMessageBox::warning(nullptr, "Prodejna is running", "Prodejna is allready running. Only one instance can be started.");
return -42;
}
@@ -34,16 +35,19 @@ int main(int argc, char *argv[])
#endif
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
if (qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
qDebug() << "Cannot load translation";
}
a.installTranslator(&qtTranslator);
QTranslator myappTranslator;
myappTranslator.load(":/translations/prodejna_" + QLocale::system().name());
if (myappTranslator.load(":/translations/prodejna_" + QLocale::system().name())) {
qDebug() << "Cannot load translation";
}
a.installTranslator(&myappTranslator);
MainWindow w;
w.move(QApplication::desktop()->screen()->rect().center() - w.rect().center());
w.showMaximized();
return a.exec();