chore: implement fixes suggested by static analysis
These are potentially blocking the basic QR parsing and versioning features from landing. See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/57 See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/58master
parent
dadd9d3973
commit
98f73c57a5
18
src/main.cpp
18
src/main.cpp
|
@ -35,17 +35,23 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
|||
QApplication app(argc, argv);
|
||||
KLocalizedString::setApplicationDomain("keysmith");
|
||||
|
||||
QCoreApplication::setOrganizationName("KDE");
|
||||
QCoreApplication::setOrganizationDomain("kde.org");
|
||||
QCoreApplication::setApplicationName("Keysmith");
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("KDE"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("Keysmith"));
|
||||
QGuiApplication::setApplicationDisplayName(i18nc("@title", "Keysmith"));
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
|
||||
|
||||
qmlRegisterUncreatableType<model::SimpleAccountListModel>("Keysmith.Models", 1, 0, "AccountListModel", "Use the Keysmith singleton to obtain an AccountListModel");
|
||||
qmlRegisterUncreatableType<model::PasswordRequest>("Keysmith.Models", 1, 0, "PasswordRequestModel", "Use the Keysmith singleton to obtain an PasswordRequestModel");
|
||||
qmlRegisterUncreatableType<model::AccountView>("Keysmith.Models", 1, 0, "Account", "Use an AccountListModel from the Keysmith singleton to obtain an Account");
|
||||
qmlRegisterUncreatableType<model::SimpleAccountListModel>("Keysmith.Models", 1, 0, "AccountListModel",
|
||||
QStringLiteral("Use the Keysmith singleton to obtain an AccountListModel")
|
||||
);
|
||||
qmlRegisterUncreatableType<model::PasswordRequest>("Keysmith.Models", 1, 0, "PasswordRequestModel",
|
||||
QStringLiteral("Use the Keysmith singleton to obtain an PasswordRequestModel")
|
||||
);
|
||||
qmlRegisterUncreatableType<model::AccountView>("Keysmith.Models", 1, 0, "Account",
|
||||
QStringLiteral("Use an AccountListModel from the Keysmith singleton to obtain an Account")
|
||||
);
|
||||
qmlRegisterType<model::AccountInput>("Keysmith.Models", 1, 0, "ValidatedAccountInput");
|
||||
qmlRegisterType<model::SortedAccountsListModel>("Keysmith.Models", 1, 0, "SortedAccountListModel");
|
||||
qmlRegisterType<model::AccountNameValidator>("Keysmith.Validators", 1, 0, "AccountNameValidator");
|
||||
|
|
Loading…
Reference in New Issue