forked from qt-creator/qt-creator
TextEditor: Do not pop up general messages pane
General messages pane should only be opened on direct user interaction. Task-number: QTCREATORBUG-24430 Change-Id: I62f6849ca5a32f0a75c5a91a667ee704d3632d1a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -281,7 +281,7 @@ static void updateEditorText(QPlainTextEdit *editor, const QString &text)
|
|||||||
|
|
||||||
static void showError(const QString &error)
|
static void showError(const QString &error)
|
||||||
{
|
{
|
||||||
Core::MessageManager::write(
|
Core::MessageManager::writeFlashing(
|
||||||
QString(QT_TRANSLATE_NOOP("TextEditor", "Error in text formatting: %1"))
|
QString(QT_TRANSLATE_NOOP("TextEditor", "Error in text formatting: %1"))
|
||||||
.arg(error.trimmed()));
|
.arg(error.trimmed()));
|
||||||
}
|
}
|
||||||
|
@@ -236,10 +236,8 @@ void Highlighter::addCustomHighlighterPath(const Utils::FilePath &path)
|
|||||||
void Highlighter::downloadDefinitions(std::function<void()> callback) {
|
void Highlighter::downloadDefinitions(std::function<void()> callback) {
|
||||||
auto downloader =
|
auto downloader =
|
||||||
new KSyntaxHighlighting::DefinitionDownloader(highlightRepository());
|
new KSyntaxHighlighting::DefinitionDownloader(highlightRepository());
|
||||||
connect(downloader, &KSyntaxHighlighting::DefinitionDownloader::done,
|
connect(downloader, &KSyntaxHighlighting::DefinitionDownloader::done, [downloader, callback]() {
|
||||||
[downloader, callback]() {
|
Core::MessageManager::writeFlashing(tr("Highlighter updates: done"));
|
||||||
Core::MessageManager::write(tr("Highlighter updates: done"),
|
|
||||||
Core::MessageManager::ModeSwitch);
|
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
reload();
|
reload();
|
||||||
if (callback)
|
if (callback)
|
||||||
@@ -248,10 +246,9 @@ void Highlighter::downloadDefinitions(std::function<void()> callback) {
|
|||||||
connect(downloader,
|
connect(downloader,
|
||||||
&KSyntaxHighlighting::DefinitionDownloader::informationMessage,
|
&KSyntaxHighlighting::DefinitionDownloader::informationMessage,
|
||||||
[](const QString &message) {
|
[](const QString &message) {
|
||||||
Core::MessageManager::write(tr("Highlighter updates:") + ' ' +
|
Core::MessageManager::writeSilently(tr("Highlighter updates:") + ' ' + message);
|
||||||
message,
|
|
||||||
Core::MessageManager::ModeSwitch);
|
|
||||||
});
|
});
|
||||||
|
Core::MessageManager::writeDisrupting(tr("Highlighter updates: starting"));
|
||||||
downloader->start();
|
downloader->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user