Skip to content

Commit

Permalink
Adapt to qt-creator changes in MessagaManager
Browse files Browse the repository at this point in the history
  • Loading branch information
hgraeber committed Jul 30, 2021
1 parent 442437d commit d800033
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions editorconfigdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ EditorConfigData::EditorConfigData(const QString &name, QObject *parent) :
editorconfig_handle_destroy(handle);
}
else if (ret > 0) {
Core::MessageManager::write(
Core::MessageManager::writeFlashing(
QString::fromUtf8("editorconfig: Parse error in file \"%1\", line %2")
.arg(QString::fromUtf8(editorconfig_handle_get_err_file(handle))).arg(ret),
Core::MessageManager::Flash);
.arg(QString::fromUtf8(editorconfig_handle_get_err_file(handle))).arg(ret));
}
else {
Core::MessageManager::write(
Core::MessageManager::writeFlashing(
QString::fromUtf8("editorconfig: %1")
.arg(QString::fromUtf8(editorconfig_get_error_msg(ret))),
Core::MessageManager::Flash);
.arg(QString::fromUtf8(editorconfig_get_error_msg(ret))));
}
}

Expand Down Expand Up @@ -133,6 +131,5 @@ bool EditorConfigData::overrideCodec(const QTextCodec *&codec) const {
}

void EditorConfigData::message(const QString &msg) const {
Core::MessageManager::write(QStringLiteral("%1: %2").arg(file_name, msg),
Core::MessageManager::Silent);
Core::MessageManager::writeSilently(QStringLiteral("%1: %2").arg(file_name, msg));
}
2 changes: 1 addition & 1 deletion editorconfigplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool EditorConfigPlugin::initialize(const QStringList &arguments, QString *error
uiLanguages.prepend(overrideLanguage);
QString creatorTrPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH + "/translations");
foreach (QString locale, uiLanguages) {
Core::MessageManager::write(QString("Translation Path: \"%1\"").arg(creatorTrPath));
Core::MessageManager::writeSilently(QString("Translation Path: \"%1\"").arg(creatorTrPath));

locale = QLocale(locale).name();
if (translator.load(QLatin1String("editorconfig_") + locale, creatorTrPath)) {
Expand Down

0 comments on commit d800033

Please sign in to comment.