summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-03-02 15:55:03 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-03-11 10:43:27 +0000
commit462bbae2a52219f067e81bf1fe8402be32f648cc (patch)
tree590372bd934fa1bcfecb6a07685eba648e3eaa77
parent750c2b6a0d345add0d4f0ebc54824be0e4e02eb3 (diff)
Doc: move systeminfo scripting docs to a separate file
Reformat the docs in systeminfo.cpp as C++ code docs. Edit for style. Change-Id: Idec8aaae072a97f889b4d48051341ff766da4247 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
-rw-r--r--doc/config/ifw.qdocconf1
-rw-r--r--doc/systeminfo.qdoc141
-rw-r--r--src/libs/installer/systeminfo.cpp44
3 files changed, 164 insertions, 22 deletions
diff --git a/doc/config/ifw.qdocconf b/doc/config/ifw.qdocconf
index 2087c30a6..3d9b1d7d4 100644
--- a/doc/config/ifw.qdocconf
+++ b/doc/config/ifw.qdocconf
@@ -133,7 +133,6 @@ defines += ABSTRACTTASK_H \
SETTINGS_H \
SETTINGSOPERATION_H \
SIMPLEMOVEFILEOPERATION_H \
- SYSTEMINFO_H \
TESTREPOSITORY_H \
UI_PROXYCREDENTIALSDIALOG_H \
UI_SERVERAUTHENTICATIONDIALOG_H \
diff --git a/doc/systeminfo.qdoc b/doc/systeminfo.qdoc
new file mode 100644
index 000000000..ed6cd0a3c
--- /dev/null
+++ b/doc/systeminfo.qdoc
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \qmltype systemInfo
+ \inqmlmodule scripting
+
+ \brief Provides information about the operating system.
+*/
+
+/*!
+ \qmlproperty string systemInfo::currentCpuArchitecture
+
+ The architecture of the CPU that the application is running on, in text format.
+
+ Possible values include
+ \list
+ \li "i386"
+ \li "x86_64"
+ \endlist
+
+ Note that this function depends on what the OS will report and may not detect the actual CPU
+ architecture if the OS hides that information or is unable to provide it. For example, a 32-bit
+ OS running on a 64-bit CPU is usually unable to determine whether the CPU is actually capable
+ of running 64-bit programs.
+
+ \sa QSysInfo::currentCpuArchitecture()
+*/
+
+/*!
+ \qmlproperty string systemInfo::kernelType
+
+ The type of the operating system kernel the installer was compiled for. It is also the
+ kernel the installer is running on, unless the host operating system is running a form of
+ compatibility or virtualization layer.
+
+ For Windows, Linux, and OS X this will return
+ \list
+ \li "winnt"
+ \li "linux"
+ \li "darwin"
+ \endlist
+
+ On Unix systems, it returns the same as the output of \c {uname -s} (lowercased).
+
+ \sa QSysInfo::kernelType()
+*/
+
+/*!
+ \qmlproperty string systemInfo::kernelVersion
+
+ Example values are
+
+ \list
+ \li "6.1.7601" for Windows 7 with Service Pack 1
+ \li "3.16.6-2-desktop" for openSUSE 13.2 kernel 3.16.6-2
+ \li "12.5.0" last release of OS X "Mountain Lion"
+ \endlist
+
+ The release version of the operating system kernel. On Windows, it returns the version of the
+ NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r}
+ command would return.
+
+ \sa QSysInfo::kernelVersion()
+*/
+
+/*!
+ \qmlproperty string systemInfo::productType
+
+ The product name of the operating system this application is running in.
+
+ Example values are
+
+ \list
+ \li "windows"
+ \li "opensuse" (for the Linux openSUSE distribution)
+ \li "osx"
+ \endlist
+
+ \sa QSysInfo::productType()
+*/
+
+/*!
+ \qmlproperty string systemInfo::productVersion
+
+ The product version of the operating system in string form. If the version could not be
+ determined, this function returns "unknown".
+
+ Example values are
+
+ \list
+ \li "7" for Windows 7
+ \li "13.2" for openSUSE 13.2
+ \li "10.8" for OS X Mountain Lion
+ \endlist
+
+ \sa QSysInfo::productVersion()
+*/
+
+/*!
+ \qmlproperty string systemInfo::prettyProductName
+
+ A prettier form of systemInfo::productType and systemInfo::productVersion, containing other
+ tokens like the operating system type, codenames and other information. The result of this
+ function is suitable for displaying to the user.
+
+ Example values are
+
+ \list
+ \li "Windows 7"
+ \li "openSUSE 13.2 (Harlequin) (x86_64)"
+ \li "OS X Mountain Lion (10.8)"
+ \endlist
+
+
+ \sa QSysInfo::prettyProductName()
+*/
diff --git a/src/libs/installer/systeminfo.cpp b/src/libs/installer/systeminfo.cpp
index b278252d9..2fc0a9be5 100644
--- a/src/libs/installer/systeminfo.cpp
+++ b/src/libs/installer/systeminfo.cpp
@@ -38,30 +38,32 @@
namespace QInstaller {
/*!
- \qmltype systemInfo
- \inqmlmodule scripting
+ \inmodule QtInstallerFramework
+ \class QInstaller::SystemInfo
\brief Provides information about the operating system.
*/
-
+/*!
+ Creates a system info object with the parent \a parent.
+*/
SystemInfo::SystemInfo(QObject *parent) : QObject(parent)
{
}
/*!
- \qmlproperty string systemInfo::currentCpuArchitecture
+ \property SystemInfo::currentCpuArchitecture
The architecture of the CPU that the application is running on, in text format.
- Possible values include
+ Possible values include:
\list
\li "i386"
\li "x86_64"
\endlist
- Note that this function depends on what the OS will report and may not detect the actual CPU
+ \note This function depends on what the OS will report and may not detect the actual CPU
architecture if the OS hides that information or is unable to provide it. For example, a 32-bit
OS running on a 64-bit CPU is usually unable to determine whether the CPU is actually capable
of running 64-bit programs.
@@ -74,13 +76,13 @@ QString SystemInfo::currentCpuArchitecture() const
}
/*!
- \qmlproperty string systemInfo::kernelType
+ \property SystemInfo::kernelType
The type of the operating system kernel the installer was compiled for. It is also the
kernel the installer is running on, unless the host operating system is running a form of
compatibility or virtualization layer.
- For Windows, Linux, and OS X this will return
+ For Windows, Linux, and OS X this will return:
\list
\li "winnt"
\li "linux"
@@ -97,9 +99,13 @@ QString SystemInfo::kernelType() const
}
/*!
- \qmlproperty string systemInfo::kernelVersion
+ \property SystemInfo::kernelVersion
- Example values are
+ The release version of the operating system kernel. On Windows, it returns the version of the
+ NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r}
+ command would return.
+
+ Example values are:
\list
\li "6.1.7601" for Windows 7 with Service Pack 1
@@ -107,10 +113,6 @@ QString SystemInfo::kernelType() const
\li "12.5.0" last release of OS X "Mountain Lion"
\endlist
- The release version of the operating system kernel. On Windows, it returns the version of the
- NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r}
- command would return.
-
\sa QSysInfo::kernelVersion()
*/
QString SystemInfo::kernelVersion() const
@@ -119,11 +121,11 @@ QString SystemInfo::kernelVersion() const
}
/*!
- \qmlproperty string systemInfo::productType
+ \property SystemInfo::productType
The product name of the operating system this application is running in.
- Example values are
+ Example values are:
\list
\li "windows"
@@ -139,12 +141,12 @@ QString SystemInfo::productType() const
}
/*!
- \qmlproperty string systemInfo::productVersion
+ \property SystemInfo::productVersion
The product version of the operating system in string form. If the version could not be
determined, this function returns "unknown".
- Example values are
+ Example values are:
\list
\li "7" for Windows 7
@@ -160,13 +162,13 @@ QString SystemInfo::productVersion() const
}
/*!
- \qmlproperty string systemInfo::prettyProductName
+ \property SystemInfo::prettyProductName
- A prettier form of systemInfo::productType and systemInfo::productVersion, containing other
+ A prettier form of SystemInfo::productType and SystemInfo::productVersion, containing other
tokens like the operating system type, codenames and other information. The result of this
function is suitable for displaying to the user.
- Example values are
+ Example values are:
\list
\li "Windows 7"