CorePlugin: Use static VariableManager functions where appropriate

Change-Id: Ie3d34a829522e15b2a56c0fcc696e60163a9be32
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2013-08-29 15:08:04 +02:00
parent 24ccd50015
commit e1823072a1
4 changed files with 6 additions and 6 deletions

View File

@@ -2520,7 +2520,7 @@ QString EditorManager::windowTitleVcsTopic()
void EditorManager::updateVariable(const QByteArray &variable)
{
if (VariableManager::instance()->isFileVariable(variable, kCurrentDocumentPrefix)) {
if (VariableManager::isFileVariable(variable, kCurrentDocumentPrefix)) {
QString value;
IDocument *document = currentDocument();
if (document) {

View File

@@ -276,7 +276,7 @@ Utils::AbstractMacroExpander *VariableManager::macroExpander()
* Returns the variable manager instance, for connecting to signals. All other methods are static
* and should be called as class methods, not through the instance.
*/
VariableManager *VariableManager::instance()
QObject *VariableManager::instance()
{
return variableManagerInstance;
}

View File

@@ -50,7 +50,7 @@ class CORE_EXPORT VariableManager : public QObject
Q_OBJECT
public:
static VariableManager *instance();
static QObject *instance();
static void insert(const QByteArray &variable, const QString &value);
static bool remove(const QByteArray &variable);

View File

@@ -117,18 +117,18 @@ void QtSupportPlugin::updateVariable(const QByteArray &variable)
ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject();
if (!project || !project->activeTarget()) {
Core::VariableManager::instance()->remove(variable);
Core::VariableManager::remove(variable);
return;
}
const BaseQtVersion *qtVersion = QtKitInformation::qtVersion(project->activeTarget()->kit());
if (!qtVersion) {
Core::VariableManager::instance()->remove(variable);
Core::VariableManager::remove(variable);
return;
}
QString value = qtVersion->qmakeProperty(variable == kHostBins ? "QT_HOST_BINS" : "QT_INSTALL_BINS");
Core::VariableManager::instance()->insert(variable, value);
Core::VariableManager::insert(variable, value);
}
Q_EXPORT_PLUGIN(QtSupportPlugin)