From 0741c7de6dd9b8b9d531ea9accc554e88c55526e Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Sat, 12 May 2012 11:53:56 +0400 Subject: [PATCH] Renamed TaskHub::popup to requestPopup and removed boolean flag. * TaskHub does not pop up itself because it is not a widget. * popup(true) is never used and may lead to bad user experience. * use boolean flag goes agains Qt API design guidelines. Change-Id: Idf28a8d4af66022961d94f1d1cdeeaf155b67c52 Reviewed-by: Daniel Teske --- src/plugins/analyzerbase/analyzerruncontrol.cpp | 2 +- src/plugins/projectexplorer/taskhub.cpp | 4 ++-- src/plugins/projectexplorer/taskhub.h | 2 +- src/plugins/qmljseditor/qmljseditorplugin.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/analyzerbase/analyzerruncontrol.cpp b/src/plugins/analyzerbase/analyzerruncontrol.cpp index 5cb91674a5c..49ea6a14a34 100644 --- a/src/plugins/analyzerbase/analyzerruncontrol.cpp +++ b/src/plugins/analyzerbase/analyzerruncontrol.cpp @@ -179,7 +179,7 @@ void AnalyzerRunControl::addTask(Task::TaskType type, const QString &description TaskHub *hub = ProjectExplorerPlugin::instance()->taskHub(); hub->addTask(Task(type, description, Utils::FileName::fromUserInput(file), line, Core::Id(Constants::ANALYZERTASK_ID))); - hub->popup(false); + hub->requestPopup(); } } // namespace Analyzer diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp index 643c16dd374..0c8b914225b 100644 --- a/src/plugins/projectexplorer/taskhub.cpp +++ b/src/plugins/projectexplorer/taskhub.cpp @@ -151,9 +151,9 @@ void TaskHub::setCategoryVisibility(const Core::Id &categoryId, bool visible) emit categoryVisibilityChanged(categoryId, visible); } -void TaskHub::popup(bool withFocus) +void TaskHub::requestPopup() { - emit popupRequested(withFocus); + emit popupRequested(false); } QIcon TaskHub::taskTypeIcon(Task::TaskType t) const diff --git a/src/plugins/projectexplorer/taskhub.h b/src/plugins/projectexplorer/taskhub.h index 801054452ab..671e4f8dd22 100644 --- a/src/plugins/projectexplorer/taskhub.h +++ b/src/plugins/projectexplorer/taskhub.h @@ -58,7 +58,7 @@ public: void showTaskInEditor(unsigned int id); void setCategoryVisibility(const Core::Id &categoryId, bool visible); - void popup(bool withFocus); + void requestPopup(); QIcon taskTypeIcon(ProjectExplorer::Task::TaskType t) const; signals: diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 46b8ecb455f..649ed1b0779 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -367,7 +367,7 @@ void QmlJSEditorPlugin::runSemanticScan() m_qmlTaskManager->updateSemanticMessagesNow(); TaskHub *hub = ProjectExplorerPlugin::instance()->taskHub(); hub->setCategoryVisibility(Constants::TASK_CATEGORY_QML_ANALYSIS, true); - hub->popup(false); + hub->requestPopup(); } void QmlJSEditorPlugin::checkCurrentEditorSemanticInfoUpToDate()