Commit e1823072 authored by hjk's avatar hjk

CorePlugin: Use static VariableManager functions where appropriate

Change-Id: Ie3d34a829522e15b2a56c0fcc696e60163a9be32
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 24ccd500
......@@ -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) {
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment