qtcdebugger: Made error message more helpful.

Reviewed-by: Friedemann Kleint <friedemann.kleint@nokia.com>
This commit is contained in:
Robert Loehning
2010-04-13 16:43:08 +02:00
parent c58469ce87
commit 3351f942f6

View File

@@ -111,6 +111,8 @@ bool openRegistryKey(HKEY category, // HKEY_LOCAL_MACHINE, etc.
const LONG rc = RegOpenKeyEx(category, key, 0, accessRights, keyHandle); const LONG rc = RegOpenKeyEx(category, key, 0, accessRights, keyHandle);
if (rc != ERROR_SUCCESS) { if (rc != ERROR_SUCCESS) {
*errorMessage = msgFunctionFailed("RegOpenKeyEx", rc); *errorMessage = msgFunctionFailed("RegOpenKeyEx", rc);
if (readWrite)
*errorMessage += "You need administrator privileges to edit the registry.";
return false; return false;
} }
return true; return true;