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 <daniel.teske@nokia.com>
This commit is contained in:
Konstantin Tokarev
2012-05-12 11:53:56 +04:00
committed by Daniel Teske
parent 34206b0385
commit 0741c7de6d
4 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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()