summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/adminauthorization_win.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-06-13 12:03:49 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-06-19 17:30:37 +0200
commitb8c0d6d49b2eb65524e393baf0e15b70e447dcc3 (patch)
tree83f13f51dac79bd6ee8980271405bfc0ab25e974 /src/libs/installer/adminauthorization_win.cpp
parent246e13d6920f1fd869267537d6ccde4149192898 (diff)
Fix AdminAuthorization implementation.
- execute() does the magic of getting privileges and starting the process - hasAdminRights() simply returns if we started privileged.. Change-Id: I0940a02556fe240af0ee7dfb068f7f8009eb683e Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer/adminauthorization_win.cpp')
-rw-r--r--src/libs/installer/adminauthorization_win.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/libs/installer/adminauthorization_win.cpp b/src/libs/installer/adminauthorization_win.cpp
index 528f3403d..4d85ad980 100644
--- a/src/libs/installer/adminauthorization_win.cpp
+++ b/src/libs/installer/adminauthorization_win.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2012-2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Installer Framework.
@@ -53,6 +53,8 @@
# endif
#endif
+namespace QInstaller {
+
struct DeCoInitializer
{
DeCoInitializer()
@@ -67,17 +69,6 @@ struct DeCoInitializer
bool neededCoInit;
};
-AdminAuthorization::AdminAuthorization()
-{
-}
-
-bool AdminAuthorization::authorize()
-{
- setAuthorized();
- emit authorized();
- return true;
-}
-
bool AdminAuthorization::hasAdminRights()
{
SID_IDENTIFIER_AUTHORITY authority = { SECURITY_NT_AUTHORITY };
@@ -150,3 +141,5 @@ bool AdminAuthorization::execute(QWidget *, const QString &program, const QStrin
}
return false;
}
+
+} // namespace QInstaller