Move InfoBar to Utils

The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2020-06-17 12:23:44 +02:00
parent c70c6ded30
commit 7c5ed6f7d9
41 changed files with 166 additions and 156 deletions

View File

@@ -28,17 +28,17 @@
#include "icore.h"
#include "documentmanager.h"
#include "idocument.h"
#include "infobar.h"
#include <coreplugin/dialogs/addtovcsdialog.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <vcsbase/vcsbaseconstants.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/infobar.h>
#include <utils/optional.h>
#include <utils/qtcassert.h>
#include <vcsbase/vcsbaseconstants.h>
#include <QDir>
#include <QString>
@@ -296,12 +296,12 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
}
return versionControl;
} else {
InfoBar *infoBar = curDocument ? curDocument->infoBar() : nullptr;
Utils::InfoBar *infoBar = curDocument ? curDocument->infoBar() : nullptr;
if (infoBar && infoBar->canInfoBeAdded(vcsWarning)) {
InfoBarEntry info(vcsWarning,
tr("%1 repository was detected but %1 is not configured.")
.arg(versionControl->displayName()),
InfoBarEntry::GlobalSuppression::Enabled);
Utils::InfoBarEntry info(vcsWarning,
tr("%1 repository was detected but %1 is not configured.")
.arg(versionControl->displayName()),
Utils::InfoBarEntry::GlobalSuppression::Enabled);
d->m_unconfiguredVcs = versionControl;
info.setCustomButtonInfo(ICore::msgShowOptionsDialog(), []() {
QTC_ASSERT(d->m_unconfiguredVcs, return);