summaryrefslogtreecommitdiffstats
path: root/tools/shared/windows/registry.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-06 18:00:42 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-06 18:00:42 (GMT)
commit34bfad76d1afe4a0ee27496e740c8566387dc16c (patch)
treec4304699a1a2d4a729bddfb3102a5ba3ad9a2cd8 /tools/shared/windows/registry.cpp
parent16c3df54960b776f35f59288b888e829e7e81002 (diff)
parent608b66b5af75ae6982be428439eea735c00cc455 (diff)
downloadQt-34bfad76d1afe4a0ee27496e740c8566387dc16c.zip
Qt-34bfad76d1afe4a0ee27496e740c8566387dc16c.tar.gz
Qt-34bfad76d1afe4a0ee27496e740c8566387dc16c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'tools/shared/windows/registry.cpp')
-rw-r--r--tools/shared/windows/registry.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp
index 67d9b56..f520910 100644
--- a/tools/shared/windows/registry.cpp
+++ b/tools/shared/windows/registry.cpp
@@ -40,8 +40,11 @@
****************************************************************************/
#include <QtCore/qstringlist.h>
-#include "registry.h"
+#include "registry_p.h"
+QT_BEGIN_NAMESPACE
+
+#ifdef Q_OS_WIN32
/*!
Returns the path part of a registry key.
e.g.
@@ -73,12 +76,13 @@ static QString keyName(const QString &rKey)
return rKey;
QString res(rKey.mid(idx + 1));
- if (res == "Default" || res == ".")
- res = "";
+ if (res == QLatin1String("Default") || res == QLatin1String("."))
+ res = QString();
return res;
}
+#endif
-QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
+QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey)
{
QString result;
@@ -128,7 +132,7 @@ QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
break;
l.append(s);
}
- result = l.join(", ");
+ result = l.join(QLatin1String(", "));
break;
}
@@ -153,9 +157,13 @@ QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
}
RegCloseKey(handle);
+#else
+ Q_UNUSED(parentHandle);
+ Q_UNUSED(rSubkey)
#endif
return result;
}
+QT_END_NAMESPACE