summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/utils.cpp')
-rw-r--r--src/libs/installer/utils.cpp46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/libs/installer/utils.cpp b/src/libs/installer/utils.cpp
index 7961147b0..fb477f24e 100644
--- a/src/libs/installer/utils.cpp
+++ b/src/libs/installer/utils.cpp
@@ -51,6 +51,9 @@
#include <time.h>
#endif
+/*!
+ \internal
+*/
void QInstaller::uiDetachedWait(int ms)
{
QTime timer;
@@ -110,7 +113,11 @@ bool QInstaller::startDetached(const QString &program, const QStringList &argume
return success;
}
-// Returns ["en-us", "en"] for "en-us"
+/*!
+ \internal
+
+ Returns ["en-us", "en"] for "en-us".
+*/
QStringList QInstaller::localeCandidates(const QString &locale_)
{
QStringList candidates;
@@ -129,6 +136,10 @@ QStringList QInstaller::localeCandidates(const QString &locale_)
static uint verbLevel = 0;
+/*!
+ Sets to verbose output if \a v is set to \c true. Calling this multiple
+ times increases or decreases the verbosity level accordingly.
+*/
void QInstaller::setVerbose(bool v)
{
if (v)
@@ -137,21 +148,33 @@ void QInstaller::setVerbose(bool v)
verbLevel--;
}
+/*!
+ Returns \c true if the installer is set to verbose output.
+*/
bool QInstaller::isVerbose()
{
return verbLevel > 0 ? true : false;
}
+/*!
+ Returns the current verbosity level.
+*/
uint QInstaller::verboseLevel()
{
return verbLevel;
}
+/*!
+ \internal
+*/
std::ostream &QInstaller::operator<<(std::ostream &os, const QString &string)
{
return os << qPrintable(string);
}
+/*!
+ \internal
+*/
QByteArray QInstaller::calculateHash(QIODevice *device, QCryptographicHash::Algorithm algo)
{
Q_ASSERT(device);
@@ -166,6 +189,9 @@ QByteArray QInstaller::calculateHash(QIODevice *device, QCryptographicHash::Algo
return QByteArray(); // never reached
}
+/*!
+ \internal
+*/
QByteArray QInstaller::calculateHash(const QString &path, QCryptographicHash::Algorithm algo)
{
QFile file(path);
@@ -174,6 +200,9 @@ QByteArray QInstaller::calculateHash(const QString &path, QCryptographicHash::Al
return calculateHash(&file, algo);
}
+/*!
+ \internal
+*/
QString QInstaller::replaceVariables(const QHash<QString, QString> &vars, const QString &str)
{
QString res;
@@ -194,6 +223,9 @@ QString QInstaller::replaceVariables(const QHash<QString, QString> &vars, const
return res;
}
+/*!
+ \internal
+*/
QString QInstaller::replaceWindowsEnvironmentVariables(const QString &str)
{
const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
@@ -357,6 +389,9 @@ static QVector<Char*> qWinCmdLine(Char *cmdParam, int length, int &argc)
return argv;
}
+/*!
+ \internal
+*/
QStringList QInstaller::parseCommandLineArgs(int argc, char **argv)
{
Q_UNUSED(argc)
@@ -421,12 +456,19 @@ static QString qt_create_commandline(const QString &program, const QStringList &
return args;
}
+/*!
+ \internal
+*/
QString QInstaller::createCommandline(const QString &program, const QStringList &arguments)
{
return qt_create_commandline(program, arguments);
}
-//copied from qsystemerror.cpp in Qt
+/*!
+ \internal
+
+ Copied from qsystemerror.cpp in Qt.
+*/
QString QInstaller::windowsErrorString(int errorCode)
{
QString ret;