summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/contacts/qcontactmanager.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/contacts/qcontactmanager.cpp b/src/contacts/qcontactmanager.cpp
index a704333c45..9fd812c415 100644
--- a/src/contacts/qcontactmanager.cpp
+++ b/src/contacts/qcontactmanager.cpp
@@ -132,6 +132,10 @@ QTM_BEGIN_NAMESPACE
Returns a list of available manager ids that can be used when constructing
a QContactManager. If an empty id is specified to the constructor, the
first value in this list will be used instead.
+
+ The QTCONTACTS_MANAGER_OVERRIDE environment variable may be set to
+ override the default engine.
+
\since 1.0
*/
QStringList QContactManager::availableManagers()
@@ -151,6 +155,13 @@ QStringList QContactManager::availableManagers()
}
#endif
+ // and prefer the override engine if specified in the environment
+ QString overrideManagerName = qgetenv("QTCONTACTS_MANAGER_OVERRIDE");
+ if (!overrideManagerName.isEmpty() && ret.contains(overrideManagerName)) {
+ ret.removeAll(overrideManagerName);
+ ret.prepend(overrideManagerName);
+ }
+
return ret;
}