// clang-format off // SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company // clang-format on // SPDX-FileContributor: Andrew Hayzen // // SPDX-License-Identifier: MIT OR Apache-2.0 #pragma once #include #include #include #include #include #include #include namespace rust { namespace cxxqtlib1 { class ApplicationArgsData : public QObject { public: explicit ApplicationArgsData(const QVector& args, QObject* parent = nullptr); char** data(); int& size(); private: QVector m_ownedVector; int m_size = 0; std::vector m_vector; }; ::std::unique_ptr qcoreapplicationNew(const QVector& args); template void qapplicationAddLibraryPath(T& app, const QString& path) { app.addLibraryPath(path); } template QString qapplicationApplicationName(const T& app) { return app.applicationName(); } template QString qapplicationApplicationVersion(const T& app) { return app.applicationVersion(); } template ::std::int32_t qapplicationExec(T& app) { return static_cast<::std::int32_t>(app.exec()); } template QStringList qapplicationLibraryPaths(const T& app) { return app.libraryPaths(); } template QString qapplicationOrganizationDomain(const T& app) { return app.organizationDomain(); } template QString qapplicationOrganizationName(const T& app) { return app.organizationName(); } template void qapplicationSetApplicationName(T& app, const QString& name) { app.setApplicationName(name); } template void qapplicationSetApplicationVersion(T& app, const QString& version) { app.setApplicationVersion(version); } template void qapplicationSetLibraryPaths(T& app, const QStringList& paths) { app.setLibraryPaths(paths); } template void qapplicationSetOrganizationDomain(T& app, const QString& domain) { app.setOrganizationDomain(domain); } template void qapplicationSetOrganizationName(T& app, const QString& name) { app.setOrganizationName(name); } template void qapplicationRemoveLibraryPath(T& app, const QString& path) { app.removeLibraryPath(path); } } }