1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-21 11:57:44 +00:00
novus/apps/mdlviewer/src/main.cpp
Joshua Goins 0cf37355cb Switch to KXmlGuiWindow
This will eventually use more KStandardAction, and gets rid of our
custom code which is just doing a worse job than KXmlGui.
2024-05-27 18:18:54 -04:00

34 lines
No EOL
1 KiB
C++

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#include <KLocalizedString>
#include <QApplication>
#include <physis.hpp>
#include <physis_logger.h>
#include "aboutdata.h"
#include "mainwindow.h"
#include "settings.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain(QByteArrayLiteral("novus"));
customizeAboutData(QStringLiteral("novus"), QStringLiteral("zone.xiv.mdlviewer"), QStringLiteral("MDLViewer"), i18n("Program to view FFXIV MDL files."));
// Default to a sensible message pattern
if (qEnvironmentVariableIsEmpty("QT_MESSAGE_PATTERN")) {
qputenv("QT_MESSAGE_PATTERN", "[%{time yyyy-MM-dd h:mm:ss.zzz}] %{if-category}[%{category}] %{endif}[%{type}] %{message}");
}
setup_physis_logging();
const QString gameDir{getGameDirectory()};
const std::string gameDirStd{gameDir.toStdString()};
MainWindow w(physis_gamedata_initialize(gameDirStd.c_str()));
w.show();
return app.exec();
}