refactor: refresh shared library

This commit is contained in:
2024-04-12 18:27:47 +03:00
parent 332d78eb25
commit dbfb3562a6
28 changed files with 130 additions and 144 deletions

View File

@ -84,8 +84,7 @@ bool AWConfigHelper::exportConfiguration(QObject *_nativeConfig, const QString &
// extensions
for (auto &item : m_dirs) {
QStringList items
= QDir(QString("%1/%2").arg(m_baseDir, item)).entryList({"*.desktop"}, QDir::Files);
QStringList items = QDir(QString("%1/%2").arg(m_baseDir, item)).entryList({"*.desktop"}, QDir::Files);
settings.beginGroup(item);
for (auto &it : items)
copyExtensions(it, item, settings, false);

View File

@ -161,7 +161,7 @@ void AWFormatterHelper::initFormatters()
// check if already exists
auto values = m_formattersClasses.values();
if (std::any_of(values.cbegin(), values.cend(),
[&filePath](const AWAbstractFormatter *item) { return (item->fileName() == filePath); }))
[&filePath](const AWAbstractFormatter *item) { return (item->filePath() == filePath); }))
continue;
auto metadata = readMetadata(filePath);

View File

@ -71,7 +71,7 @@ bool AWUpdateHelper::checkVersion()
qCInfo(LOG_AW) << "Found version" << version << "actual one is" << m_foundVersion;
if ((version != m_foundVersion) && (!QString(CHANGELOG).isEmpty())) {
sendNotification(i18nc("Changelog of %1", VERSION), QString(CHANGELOG).replace('@', '\n'));
sendNotification(i18n("Changelog of %1", VERSION), QString(CHANGELOG).replace('@', '\n'));
return true;
} else if (version != m_foundVersion) {
qCWarning(LOG_AW) << "No changelog information provided";
@ -106,7 +106,7 @@ void AWUpdateHelper::showUpdates(const QVersionNumber &_version)
qCDebug(LOG_AW) << "Version" << _version;
QString text;
text += i18nc("Current version : %1", VERSION);
text += i18n("Current version : %1", VERSION);
text += QString(COMMIT_SHA).isEmpty() ? "\n" : QString(" (%1)\n").arg(QString(COMMIT_SHA));
text += i18n("New version : %1", _version.toString()) + "\n\n";
text += i18n("Click \"Ok\" to download");