diff options
author | Eike Ziller <[email protected]> | 2020-06-17 12:23:44 +0200 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2020-06-18 06:39:54 +0000 |
commit | 7c5ed6f7d99362af743f30916d031d441abc1984 (patch) | |
tree | 7b8ef47da6e256e79f2e0034c0334350907c3057 /src/plugins/android | |
parent | c70c6ded30610afff34447a65da905e993e0e9b6 (diff) |
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 <[email protected]>
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/android')
-rw-r--r-- | src/plugins/android/androidmanifesteditorwidget.cpp | 10 | ||||
-rw-r--r-- | src/plugins/android/androidplugin.cpp | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp index 61d7007140d..de38f3200a0 100644 --- a/src/plugins/android/androidmanifesteditorwidget.cpp +++ b/src/plugins/android/androidmanifesteditorwidget.cpp @@ -34,7 +34,6 @@ #include "splashiconcontainerwidget.h" #include <coreplugin/icore.h> -#include <coreplugin/infobar.h> #include <coreplugin/editormanager/ieditor.h> #include <qtsupport/qtkitinformation.h> @@ -53,6 +52,7 @@ #include <utils/algorithm.h> #include <utils/fileutils.h> +#include <utils/infobar.h> #include <utils/stylehelper.h> #include <utils/utilsicons.h> @@ -721,13 +721,13 @@ void AndroidManifestEditorWidget::updateSdkVersions() void AndroidManifestEditorWidget::updateInfoBar(const QString &errorMessage, int line, int column) { - Core::InfoBar *infoBar = m_textEditorWidget->textDocument()->infoBar(); + Utils::InfoBar *infoBar = m_textEditorWidget->textDocument()->infoBar(); QString text; if (line < 0) text = tr("Could not parse file: \"%1\".").arg(errorMessage); else text = tr("%2: Could not parse file: \"%1\".").arg(errorMessage).arg(line); - Core::InfoBarEntry infoBarEntry(infoBarId, text); + Utils::InfoBarEntry infoBarEntry(infoBarId, text); infoBarEntry.setCustomButtonInfo(tr("Goto error"), [this]() { m_textEditorWidget->gotoLine(m_errorLine, m_errorColumn); }); @@ -741,7 +741,7 @@ void AndroidManifestEditorWidget::updateInfoBar(const QString &errorMessage, int void AndroidManifestEditorWidget::hideInfoBar() { - Core::InfoBar *infoBar = m_textEditorWidget->textDocument()->infoBar(); + Utils::InfoBar *infoBar = m_textEditorWidget->textDocument()->infoBar(); infoBar->removeInfo(infoBarId); m_timerParseCheck.stop(); } @@ -753,7 +753,7 @@ void AndroidManifestEditorWidget::setInvalidServiceInfo() Core::Id id(kServicesInvalid); if (m_textEditorWidget->textDocument()->infoBar()->containsInfo(id)) return; - Core::InfoBarEntry info(id, + Utils::InfoBarEntry info(id, tr("Services invalid. " "Manifest cannot be saved. Correct the service definitions before saving.")); m_textEditorWidget->textDocument()->infoBar()->addInfo(info); diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index 7b5a99f6587..187146a6367 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -47,8 +47,8 @@ #endif #include <coreplugin/icore.h> -#include <coreplugin/infobar.h> #include <utils/checkablemessagebox.h> +#include <utils/infobar.h> #include <projectexplorer/devicesupport/devicemanager.h> #include <projectexplorer/buildconfiguration.h> @@ -194,12 +194,12 @@ void AndroidPlugin::askUserAboutAndroidSetup() || !Core::ICore::infoBar()->canInfoBeAdded(kSetupAndroidSetting)) return; - Core::InfoBarEntry info( - kSetupAndroidSetting, - tr("Would you like to configure Android options? This will ensure " - "Android kits can be usable and all essential packages are installed. " - "To do it later, select Options > Devices > Android."), - Core::InfoBarEntry::GlobalSuppression::Enabled); + Utils::InfoBarEntry + info(kSetupAndroidSetting, + tr("Would you like to configure Android options? This will ensure " + "Android kits can be usable and all essential packages are installed. " + "To do it later, select Options > Devices > Android."), + Utils::InfoBarEntry::GlobalSuppression::Enabled); info.setCustomButtonInfo(tr("Configure Android"), [this] { Core::ICore::infoBar()->removeInfo(kSetupAndroidSetting); Core::ICore::infoBar()->globallySuppressInfo(kSetupAndroidSetting); |