summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller
diff options
context:
space:
mode:
Diffstat (limited to 'installerbuilder/libinstaller')
-rw-r--r--installerbuilder/libinstaller/3rdparty/kdtools/kdupdaterupdatefinder.cpp19
-rw-r--r--installerbuilder/libinstaller/component.cpp10
-rw-r--r--installerbuilder/libinstaller/createshortcutoperation.cpp8
-rw-r--r--installerbuilder/libinstaller/downloadarchivesjob.cpp1
-rw-r--r--installerbuilder/libinstaller/elevatedexecuteoperation.cpp20
-rw-r--r--installerbuilder/libinstaller/getrepositoriesmetainfojob.cpp5
-rw-r--r--installerbuilder/libinstaller/getrepositorymetainfojob.cpp5
-rw-r--r--installerbuilder/libinstaller/macrelocateqt.cpp7
-rw-r--r--installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp16
-rw-r--r--installerbuilder/libinstaller/operationrunner.cpp4
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp6
-rw-r--r--installerbuilder/libinstaller/packagemanagercore_p.cpp58
-rw-r--r--installerbuilder/libinstaller/packagemanagergui.cpp31
-rw-r--r--installerbuilder/libinstaller/performinstallationform.cpp1
-rw-r--r--installerbuilder/libinstaller/progresscoordinator.cpp8
-rw-r--r--installerbuilder/libinstaller/qprocesswrapper.cpp2
-rw-r--r--installerbuilder/libinstaller/qtpatch.cpp28
-rw-r--r--installerbuilder/libinstaller/qtpatchoperation.cpp6
-rw-r--r--installerbuilder/libinstaller/registerdocumentationoperation.cpp4
-rw-r--r--installerbuilder/libinstaller/setdemospathonqtoperation.cpp8
-rw-r--r--installerbuilder/libinstaller/setexamplespathonqtoperation.cpp8
-rw-r--r--installerbuilder/libinstaller/setimportspathonqtcoreoperation.cpp15
-rw-r--r--installerbuilder/libinstaller/setpathonqtcoreoperation.cpp15
-rw-r--r--installerbuilder/libinstaller/setpluginpathonqtcoreoperation.cpp18
-rw-r--r--installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp12
-rw-r--r--installerbuilder/libinstaller/updater.cpp5
26 files changed, 142 insertions, 178 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/kdupdaterupdatefinder.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/kdupdaterupdatefinder.cpp
index f1e73ef79..a08d481b7 100644
--- a/installerbuilder/libinstaller/3rdparty/kdtools/kdupdaterupdatefinder.cpp
+++ b/installerbuilder/libinstaller/3rdparty/kdtools/kdupdaterupdatefinder.cpp
@@ -552,21 +552,22 @@ void UpdateFinder::Private::createUpdateObjects(const UpdateSourceInfo &sourceIn
if (info.data.contains(QLatin1String("RequiredCompatLevel")) &&
info.data.value(QLatin1String("RequiredCompatLevel")).toInt() != application->compatLevel())
{
- qDebug() << "Update \"" << info.data.value( QLatin1String( "Name" ) ).toString() << "\" at \""
- << sourceInfo.name << "\"(\"" << sourceInfo.url.toString() << "\") requires a different compat level";
+ qDebug().nospace() << "Update \"" << info.data.value( QLatin1String( "Name" ) ).toString()
+ << "\" at \"" << sourceInfo.name << "\"(\"" << sourceInfo.url.toString()
+ << "\") requires a different compat level";
continue; // Compatibility level mismatch
}
// If another update of the same name exists, then use the update coming from
// a higher priority.
if (!checkForUpdatePriority(sourceInfo, info)) {
- qDebug() << "Skipping Update \""
- << info.data.value(QLatin1String("Name")).toString()
- << "\" from \""
- << sourceInfo.name
- << "\"(\""
- << sourceInfo.url.toString()
- << "\") because an update with the same name was found from a higher priority location";
+ qDebug().nospace() << "Skipping Update \""
+ << info.data.value(QLatin1String("Name")).toString()
+ << "\" from \""
+ << sourceInfo.name
+ << "\"(\""
+ << sourceInfo.url.toString()
+ << "\") because an update with the same name was found from a higher priority location";
continue;
}
diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp
index e64bf24b8..b0284286e 100644
--- a/installerbuilder/libinstaller/component.cpp
+++ b/installerbuilder/libinstaller/component.cpp
@@ -34,7 +34,6 @@
#include "common/errors.h"
#include "common/fileutils.h"
-#include "common/utils.h"
#include "fsengineclient.h"
#include "lib7z_facade.h"
#include "packagemanagercore.h"
@@ -689,7 +688,7 @@ void Component::addDownloadableArchive(const QString &path)
Q_ASSERT(isFromOnlineRepository());
const QString versionPrefix = value(scRemoteVersion);
- verbose() << "addDownloadable " << path << std::endl;
+ qDebug() << "addDownloadable" << path;
d->m_downloadableArchives.append(versionPrefix + path);
}
@@ -935,8 +934,7 @@ bool Component::forcedInstallation() const
void Component::setSelected(bool selected)
{
Q_UNUSED(selected)
- verbose() << Q_FUNC_INFO << qPrintable(QString(QLatin1String("on \"%1\" is deprecated!!!")).arg(
- d->m_componentName)) << std::endl;
+ qDebug() << Q_FUNC_INFO << QString::fromLatin1("on \"%1\" is deprecated!!!").arg(d->m_componentName);
}
void Component::addDependency(const QString &newDependency)
@@ -1000,7 +998,7 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
if (valueFromScript.isValid())
return valueFromScript.toBool();
- verbose() << "value from script is not valid " << std::endl;
+ qDebug() << "value from script is not valid";
return false;
}
@@ -1039,7 +1037,7 @@ bool Component::isDefault() const
}
if (valueFromScript.isValid())
return valueFromScript.toBool();
- verbose() << "value from script is not valid " << std::endl;
+ qDebug() << "value from script is not valid";
return false;
}
diff --git a/installerbuilder/libinstaller/createshortcutoperation.cpp b/installerbuilder/libinstaller/createshortcutoperation.cpp
index 95bca56bd..1c7e35039 100644
--- a/installerbuilder/libinstaller/createshortcutoperation.cpp
+++ b/installerbuilder/libinstaller/createshortcutoperation.cpp
@@ -37,7 +37,6 @@
#include "createshortcutoperation.h"
#include "common/errors.h"
#include "common/fileutils.h"
-#include "common/utils.h"
#include <QDir>
#include <QFileInfo>
@@ -192,9 +191,8 @@ bool CreateShortcutOperation::undoOperation()
const QString& linkLocation = args.at(1);
// first remove the link
- if (!deleteFileNowOrLater(linkLocation)) {
- verbose() << QString(QLatin1String("Can't delete: %1")).arg(linkLocation) << std::endl;
- }
+ if (!deleteFileNowOrLater(linkLocation))
+ qDebug() << "Can't delete:" << linkLocation;
const QString linkPath = QFileInfo(linkLocation).absolutePath();
@@ -203,7 +201,7 @@ bool CreateShortcutOperation::undoOperation()
QString possibleToDeleteDir = QDir::homePath() + QStringList(pathParts.mid(0, i)).join(QLatin1String("/"));
removeSystemGeneratedFiles(possibleToDeleteDir);
if (!possibleToDeleteDir.isEmpty() && QDir().rmdir(possibleToDeleteDir))
- verbose() << QString(QLatin1String("deleted directory: %1")).arg(possibleToDeleteDir) << std::endl;
+ qDebug() << "Deleted directory:" << possibleToDeleteDir;
else
break;
}
diff --git a/installerbuilder/libinstaller/downloadarchivesjob.cpp b/installerbuilder/libinstaller/downloadarchivesjob.cpp
index f0827dbe3..205443a99 100644
--- a/installerbuilder/libinstaller/downloadarchivesjob.cpp
+++ b/installerbuilder/libinstaller/downloadarchivesjob.cpp
@@ -33,7 +33,6 @@
#include "downloadarchivesjob.h"
#include "common/binaryformatenginehandler.h"
-#include "common/utils.h"
#include "component.h"
#include "cryptosignatureverifier.h"
#include "messageboxhandler.h"
diff --git a/installerbuilder/libinstaller/elevatedexecuteoperation.cpp b/installerbuilder/libinstaller/elevatedexecuteoperation.cpp
index 776a6caf1..a7962c686 100644
--- a/installerbuilder/libinstaller/elevatedexecuteoperation.cpp
+++ b/installerbuilder/libinstaller/elevatedexecuteoperation.cpp
@@ -33,11 +33,11 @@
#include "elevatedexecuteoperation.h"
#include "environment.h"
-#include "common/utils.h"
#include "qprocesswrapper.h"
-#include <QThread>
-#include <QProcessEnvironment>
+#include <QtCore/QThread>
+#include <QtCore/QProcessEnvironment>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -140,8 +140,7 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments)
process = new QProcessWrapper();
if (!workingDirectory.isEmpty()) {
process->setWorkingDirectory(workingDirectory);
- QInstaller::verbose() << " ElevatedExecuteOperation setWorkingDirectory: " << workingDirectory
- << std::endl;
+ qDebug() << "ElevatedExecuteOperation setWorkingDirectory:" << workingDirectory;
}
QProcessEnvironment penv;
@@ -164,16 +163,14 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments)
#ifdef Q_OS_WIN
if (args.count() == 1) {
process->setNativeArguments(args.front());
- QInstaller::verbose() << " ElevatedExecuteOperation setNativeArguments to start: " << args.front()
- << std::endl;
+ qDebug() << "ElevatedExecuteOperation setNativeArguments to start:" << args.front();
process->start(QString(), QStringList());
} else
#endif
{
process->start(args.front(), args.mid(1));
}
- QInstaller::verbose() << args.front() << " started, arguments: " << QStringList(args.mid(1))
- .join(QLatin1String(" ")) << std::endl;
+ qDebug() << args.front() << "started, arguments:" << QStringList(args.mid(1)).join(QLatin1String(" "));
bool success = false;
//we still like the none blocking possibility to perform this operation without threads
@@ -234,12 +231,11 @@ void ElevatedExecuteOperation::Private::readProcessOutput()
Q_ASSERT(process);
Q_ASSERT(QThread::currentThread() == process->thread());
if (QThread::currentThread() != process->thread()) {
- QInstaller::verbose() << Q_FUNC_INFO << QLatin1String(" can only be called from the same thread as "
- "the process is.") << std::endl;
+ qDebug() << Q_FUNC_INFO << "can only be called from the same thread as the process is.";
}
const QByteArray output = process->readAll();
if (!output.isEmpty()) {
- QInstaller::verbose() << QString::fromLocal8Bit(output) << std::endl;
+ qDebug() << output;
emit q->outputTextChanged(QString::fromLocal8Bit(output));
}
}
diff --git a/installerbuilder/libinstaller/getrepositoriesmetainfojob.cpp b/installerbuilder/libinstaller/getrepositoriesmetainfojob.cpp
index 63ceae278..184d26a15 100644
--- a/installerbuilder/libinstaller/getrepositoriesmetainfojob.cpp
+++ b/installerbuilder/libinstaller/getrepositoriesmetainfojob.cpp
@@ -32,10 +32,11 @@
**************************************************************************/
#include "getrepositoriesmetainfojob.h"
-#include "common/utils.h"
#include "getrepositorymetainfojob.h"
#include "qinstallerglobal.h"
+#include <QtCore/QDebug>
+
using namespace KDUpdater;
using namespace QInstaller;
@@ -174,7 +175,7 @@ void GetRepositoriesMetaInfoJob::jobFinished(KDJob *j)
if (job->error() == KDJob::Canceled
|| (job->error() >= KDJob::UserDefinedError && job->error() < QInstaller::UserIgnoreError)) {
emit infoMessage(j, job->errorString());
- verbose() << job->errorString() << std::endl;
+ qDebug() << job->errorString();
emitFinishedWithError(job->error(), job->errorString());
return;
}
diff --git a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
index f6bc0144b..41171fa87 100644
--- a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
+++ b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
@@ -34,7 +34,6 @@
#include "constants.h"
#include "common/errors.h"
-#include "common/utils.h"
#include "cryptosignatureverifier.h"
#include "lib7z_facade.h"
#include "messageboxhandler.h"
@@ -139,7 +138,7 @@ Repository GetRepositoryMetaInfoJob::repository() const
void GetRepositoryMetaInfoJob::setRepository(const Repository &r)
{
m_repository = r;
- verbose() << "Setting repository with URL : " << r.url().toString() << std::endl;
+ qDebug() << "Setting repository with URL:" << r.url().toString();
}
int GetRepositoryMetaInfoJob::silentRetries() const
@@ -356,7 +355,7 @@ void GetRepositoryMetaInfoJob::fetchNextMetaInfo()
nextVersion = m_packageVersions.takeLast();
}
- verbose() << "fetching metadata of " << next << " in version " << nextVersion << std::endl;
+ qDebug() << "fetching metadata of" << next << "in version" << nextVersion;
bool online = true;
if (m_repository.url().scheme().isEmpty())
diff --git a/installerbuilder/libinstaller/macrelocateqt.cpp b/installerbuilder/libinstaller/macrelocateqt.cpp
index 551935dad..6aac7216e 100644
--- a/installerbuilder/libinstaller/macrelocateqt.cpp
+++ b/installerbuilder/libinstaller/macrelocateqt.cpp
@@ -31,10 +31,9 @@
**
**************************************************************************/
#include "macrelocateqt.h"
-
-#include "common/utils.h"
#include "macreplaceinstallnamesoperation.h"
+#include <QtCore/QDebug>
#include <QtCore/QFile>
@@ -56,7 +55,7 @@ bool Relocator::apply(const QString &qtInstallDir, const QString &targetDir)
m_errorMessage = QLatin1String("targetDir can't be empty");
return false;
}
- verbose() << "Relocator::apply(" << qtInstallDir << ")" << std::endl;
+ qDebug() << Q_FUNC_INFO << qtInstallDir;
m_errorMessage.clear();
m_installDir.clear();
@@ -74,7 +73,7 @@ bool Relocator::apply(const QString &qtInstallDir, const QString &targetDir)
//to get realy only the first subdirectory as an indicator like the old behaviour was till Mobility don't use this qt patch hack
indicator = indicator.left(indicator.indexOf(QLatin1String("/"), 1));
- verbose() << "Relocator uses indicator: " << indicator << std::endl;
+ qDebug() << "Relocator uses indicator:" << indicator;
QString replacement = targetDir;
diff --git a/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp b/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp
index ad8342b4a..8e7f38626 100644
--- a/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp
+++ b/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp
@@ -32,10 +32,10 @@
**************************************************************************/
#include "macreplaceinstallnamesoperation.h"
-#include "common/utils.h"
#include "qprocesswrapper.h"
#include <QtCore/QBuffer>
+#include <QtCore/QDebug>
#include <QtCore/QDirIterator>
@@ -61,7 +61,6 @@ bool MacReplaceInstallNamesOperation::performOperation()
// 5. other directory containing frameworks
// 6. ...
- verbose() << arguments().join(QLatin1String(";")) << std::endl;
if (arguments().count() < 3) {
setError(InvalidArguments);
setErrorString(tr("Invalid arguments in %0: %1 arguments given, 3 expected.").arg(name())
@@ -138,7 +137,7 @@ bool MacReplaceInstallNamesOperation::apply(const QString &indicator, const QStr
void MacReplaceInstallNamesOperation::extractExecutableInfo(const QString &fileName, QString &frameworkId,
QStringList &frameworks, QString &originalBuildDir)
{
- verbose() << "Relocator calling otool -l for " << fileName << std::endl;
+ qDebug() << "Relocator calling otool -l for" << fileName;
QProcessWrapper otool;
otool.start(QLatin1String("otool"), QStringList() << QLatin1String("-l") << fileName);
if (!otool.waitForStarted()) {
@@ -190,10 +189,10 @@ void MacReplaceInstallNamesOperation::extractExecutableInfo(const QString &fileN
}
if (originalBuildDir.endsWith(QLatin1Char('/')))
originalBuildDir.chop(1);
- verbose() << "originalBuildDir is: " << originalBuildDir << std::endl;
+ qDebug() << "originalBuildDir is:" << originalBuildDir;
}
}
- verbose() << "END - Relocator calling otool -l for " << fileName << std::endl;
+ qDebug() << "END - Relocator calling otool -l for" << fileName;
}
void MacReplaceInstallNamesOperation::relocateBinary(const QString &fileName)
@@ -203,9 +202,8 @@ void MacReplaceInstallNamesOperation::relocateBinary(const QString &fileName)
QString originalBuildDir;
extractExecutableInfo(fileName, frameworkId, frameworks, originalBuildDir);
- verbose() << "got following informations(fileName, frameworkId, frameworks, orginalBuildDir): " << std::endl;
- verbose() << fileName << ", " << frameworkId << ", " << frameworks.join(QLatin1String("|")) << ", "
- << originalBuildDir << std::endl;
+ qDebug() << QString::fromLatin1("got following informations(fileName: %1, frameworkId: %2, frameworks: %3,"
+ "orginalBuildDir: %4)").arg(fileName, frameworkId, frameworks.join(QLatin1String("|")), originalBuildDir);
QStringList args;
if (frameworkId.contains(m_indicator) || QFileInfo(frameworkId).fileName() == frameworkId) {
@@ -256,7 +254,7 @@ void MacReplaceInstallNamesOperation::relocateFramework(const QString &directory
bool MacReplaceInstallNamesOperation::execCommand(const QString &cmd, const QStringList &args)
{
- verbose() << "Relocator::execCommand " << cmd << " " << args << std::endl;
+ qDebug() << Q_FUNC_INFO << cmd << " " << args;
QProcessWrapper process;
process.start(cmd, args);
diff --git a/installerbuilder/libinstaller/operationrunner.cpp b/installerbuilder/libinstaller/operationrunner.cpp
index 7fcf45bf0..f15a15528 100644
--- a/installerbuilder/libinstaller/operationrunner.cpp
+++ b/installerbuilder/libinstaller/operationrunner.cpp
@@ -95,8 +95,8 @@ void OperationRunner::setVerbose(bool verbose)
int OperationRunner::runOperation(const QStringList &arguments)
{
if (!init()) {
- verbose() << "Could not init the package manager core - without this not all operations "
- << "are working as expected." << std::endl;
+ qDebug() << "Could not init the package manager core - without this not all operations are working "
+ "as expected.";
}
bool isPerformType = arguments.contains(QLatin1String("--runoperation"));
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index 5e03e6fc8..4f2521231 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -1485,7 +1485,7 @@ bool PackageManagerCore::run()
d->runPackageUpdater();
return true;
} catch (const Error &err) {
- verbose() << "Caught Installer Error: " << err.message() << std::endl;
+ qDebug() << "Caught Installer Error:" << err.message();
return false;
}
}
@@ -1514,7 +1514,7 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
if (isVerbose()) {
static QString lastLocalPath;
if (lastLocalPath != localPath)
- verbose() << "Url is : " << localPath << std::endl;
+ qDebug() << "Url is:" << localPath;
lastLocalPath = localPath;
}
@@ -1584,7 +1584,7 @@ void PackageManagerCore::storeReplacedComponents(QHash<QString, Component *> &co
// if one component has a replaces which is not existing in the current component list anymore,
// just ignore it
if (!component) {
- qDebug() << componentName << " - Does not exist in the repositories anymore.";
+ qDebug() << componentName << "- Does not exist in the repositories anymore.";
continue;
}
if (!d->componentsToReplace(data.runMode).contains(componentName)) {
diff --git a/installerbuilder/libinstaller/packagemanagercore_p.cpp b/installerbuilder/libinstaller/packagemanagercore_p.cpp
index 06dece2cf..f572703c5 100644
--- a/installerbuilder/libinstaller/packagemanagercore_p.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore_p.cpp
@@ -36,7 +36,6 @@
#include "common/binaryformat.h"
#include "common/errors.h"
#include "common/fileutils.h"
-#include "common/utils.h"
#include "component.h"
#include "fsengineclient.h"
#include "messageboxhandler.h"
@@ -384,7 +383,7 @@ void PackageManagerCorePrivate::clearComponentsToInstall()
bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component *> &components)
{
if (components.isEmpty()) {
- verbose() << "components list is empty in " << Q_FUNC_INFO << std::endl;
+ qDebug() << "components list is empty in" << Q_FUNC_INFO;
return true;
}
@@ -401,7 +400,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component
if (m_toInstallComponentIds.contains(component->name())) {
QString errorMessage = QString::fromLatin1("Recursion detected component(%1) already added with "
"reason: \"%2\"").arg(component->name(), installReason(component));
- verbose() << qPrintable(errorMessage) << std::endl;
+ qDebug() << qPrintable(errorMessage);
m_componentsToInstallError.append(errorMessage);
Q_ASSERT_X(!m_toInstallComponentIds.contains(component->name()), Q_FUNC_INFO,
qPrintable(errorMessage));
@@ -452,7 +451,7 @@ bool PackageManagerCorePrivate::appendComponentToInstall(Component *component)
if (!dependencyComponent)
errorMessage = QString::fromLatin1("Can't find missing dependency (%1) for %2.");
errorMessage = errorMessage.arg(dependencyComponentName, component->name());
- verbose() << qPrintable(errorMessage) << std::endl;
+ qDebug() << qPrintable(errorMessage);
m_componentsToInstallError.append(errorMessage);
Q_ASSERT_X(false, Q_FUNC_INFO, qPrintable(errorMessage));
return false;
@@ -463,7 +462,7 @@ bool PackageManagerCorePrivate::appendComponentToInstall(Component *component)
if (m_visitedComponents.value(component).contains(dependencyComponent)) {
QString errorMessage = QString::fromLatin1("Recursion detected component(%1) already "
"added with reason: \"%2\"").arg(component->name(), installReason(component));
- verbose() << qPrintable(errorMessage) << std::endl;
+ qDebug() << qPrintable(errorMessage);
m_componentsToInstallError = errorMessage;
Q_ASSERT_X(!m_visitedComponents.value(component).contains(dependencyComponent), Q_FUNC_INFO,
qPrintable(errorMessage));
@@ -1015,9 +1014,10 @@ void PackageManagerCorePrivate::registerPathesForUninstallation(
void PackageManagerCorePrivate::writeUninstallerBinary(QFile *const input, qint64 size, bool writeBinaryLayout)
{
- verbose() << "Writing uninstaller: " << (uninstallerName() + QLatin1String(".new")) << std::endl;
+ QString uninstallerRenamedName = uninstallerName() + QLatin1String(".new");
+ qDebug() << "Writing uninstaller:" << uninstallerRenamedName;
- KDSaveFile out(uninstallerName() + QLatin1String(".new"));
+ KDSaveFile out(uninstallerRenamedName);
openForWrite(&out, out.fileName()); // throws an exception in case of error
if (!input->seek(0))
@@ -1143,7 +1143,7 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
op = createOwnedOperation(QLatin1String("Mkdir"));
op->setArguments(QStringList() << (targetAppDirPath + QLatin1String("/../Resources/qt_menu.nib")));
if (!op->performOperation()) {
- verbose() << "ERROR in Mkdir operation: " << op->errorString() << std::endl;
+ qDebug() << "ERROR in Mkdir operation:" << op->errorString();
}
op = createOwnedOperation(QLatin1String("CopyDirectory"));
@@ -1215,7 +1215,7 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
bool replacementExists = false;
const QString installerBaseBinary = m_core->replaceVariables(m_installerBaseBinaryUnreplaced);
if (!installerBaseBinary.isEmpty() && QFileInfo(installerBaseBinary).exists()) {
- verbose() << "Got a replacement installer base binary: " << installerBaseBinary << std::endl;
+ qDebug() << "Got a replacement installer base binary:" << installerBaseBinary;
QFile replacementBinary(installerBaseBinary);
try {
@@ -1226,14 +1226,14 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
newBinaryWritten = true;
replacementExists = true;
} catch (const Error &error) {
- verbose() << error.message() << std::endl;
+ qDebug() << error.message();
}
if (!replacementBinary.remove()) {
// Is there anything more sensible we can do with this error? I think not. It's not serious
// enough for throwing/ aborting the process.
- verbose() << "Could not remove installer base binary (" << installerBaseBinary
- << ") after updating the uninstaller: " << replacementBinary.errorString() << std::endl;
+ qDebug() << QString::fromLatin1("Could not remove installer base binary (%1) after updating "
+ "the uninstaller: %2").arg(installerBaseBinary, replacementBinary.errorString());
}
m_installerBaseBinaryUnreplaced.clear();
}
@@ -1292,7 +1292,7 @@ void PackageManagerCorePrivate::writeUninstaller(OperationList performedOperatio
if (newBinaryWritten) {
const bool restart = replacementExists && isUpdater() && (!statusCanceledOrFailed());
deferredRename(uninstallerName() + QLatin1String(".new"), uninstallerName(), restart);
- verbose() << "Maintenance tool restart: " << (restart ? "true." : "false.") << std::endl;
+ qDebug() << "Maintenance tool restart:" << (restart ? "true." : "false.");
}
} catch (const Error &err) {
setStatus(PackageManagerCore::Failure);
@@ -1381,7 +1381,7 @@ void PackageManagerCorePrivate::runInstaller()
ProgressCoordinator::instance()->emitLabelAndDetailTextChanged(tr("Preparing the installation..."));
const QList<Component*> componentsToInstall = m_core->orderedComponentsToInstall();
- verbose() << "Install size: " << componentsToInstall.size() << " components" << std::endl;
+ qDebug() << "Install size:" << componentsToInstall.size() << "components";
if (!adminRightsGained) {
foreach (Component *component, m_core->orderedComponentsToInstall()) {
@@ -1441,8 +1441,7 @@ void PackageManagerCorePrivate::runInstaller()
setStatus(PackageManagerCore::Failure);
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("installationError"), tr("Error"), err.message());
- verbose() << "ROLLING BACK operations=" << m_performedOperationsCurrentSession.count()
- << std::endl;
+ qDebug() << "ROLLING BACK operations=" << m_performedOperationsCurrentSession.count();
}
m_core->rollBackInstallation();
@@ -1477,7 +1476,7 @@ void PackageManagerCorePrivate::runPackageUpdater()
adminRightsGained = m_core->gainAdminRights();
const QList<Component *> componentsToInstall = m_core->orderedComponentsToInstall();
- verbose() << "Install size: " << componentsToInstall.size() << " components " << std::endl;
+ qDebug() << "Install size:" << componentsToInstall.size() << "components";
bool updateAdminRights = false;
if (!adminRightsGained) {
@@ -1605,8 +1604,7 @@ void PackageManagerCorePrivate::runPackageUpdater()
setStatus(PackageManagerCore::Failure);
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("installationError"), tr("Error"), err.message());
- verbose() << "ROLLING BACK operations=" << m_performedOperationsCurrentSession.count()
- << std::endl;
+ qDebug() << "ROLLING BACK operations=" << m_performedOperationsCurrentSession.count();
}
m_core->rollBackInstallation();
@@ -1659,10 +1657,10 @@ void PackageManagerCorePrivate::runUninstaller()
try {
QInstaller::removeDirectory(startMenuDir);
} catch (const Error &error) {
- verbose() << "Could not remove " << startMenuDir << ": " << error.message() << std::endl;
+ qDebug() << QString::fromLatin1("Could not remove %1: %2").arg(startMenuDir, error.message());
}
} else {
- verbose() << "Start menu dir not set." << std::endl;
+ qDebug() << "Start menu dir not set.";
}
// this will also delete the TargetDir on Windows
@@ -1670,7 +1668,7 @@ void PackageManagerCorePrivate::runUninstaller()
if (QVariant(m_core->value(scRemoveTargetDir)).toBool()) {
// on !Windows, we need to remove TargetDir manually
- verbose() << "Complete uninstallation is chosen" << std::endl;
+ qDebug() << "Complete uninstallation is chosen";
const QString target = targetDir();
if (!target.isEmpty()) {
if (updateAdminRights && !adminRightsGained) {
@@ -1730,7 +1728,7 @@ void PackageManagerCorePrivate::installComponent(Component *component, double pr
bool becameAdmin = false;
if (!adminRightsGained && operation->value(QLatin1String("admin")).toBool()) {
becameAdmin = m_core->gainAdminRights();
- verbose() << operation->name() << " as admin: " << becameAdmin << std::endl;
+ qDebug() << operation->name() << "as admin:" << becameAdmin;
}
connectOperationToInstaller(operation, progressOperationSize);
@@ -1742,9 +1740,9 @@ void PackageManagerCorePrivate::installComponent(Component *component, double pr
bool ignoreError = false;
bool ok = PackageManagerCorePrivate::performOperationThreaded(operation);
while (!ok && !ignoreError && m_core->status() != PackageManagerCore::Canceled) {
- verbose() << QString(QLatin1String("operation '%1' with arguments: '%2' failed: %3"))
+ qDebug() << QString::fromLatin1("Operation '%1' with arguments: '%2' failed: %3")
.arg(operation->name(), operation->arguments().join(QLatin1String("; ")),
- operation->errorString()) << std::endl;;
+ operation->errorString());
const QMessageBox::StandardButton button =
MessageBoxHandler::warning(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("installationErrorWithRetry"), tr("Installer Error"),
@@ -1909,7 +1907,7 @@ void PackageManagerCorePrivate::runUndoOperations(const OperationList &undoOpera
becameAdmin = m_core->gainAdminRights();
connectOperationToInstaller(undoOperation, progressSize);
- verbose() << "undo operation=" << undoOperation->name() << std::endl;
+ qDebug() << "undo operation=" << undoOperation->name();
performOperationThreaded(undoOperation, PackageManagerCorePrivate::Undo);
const QString componentName = undoOperation->value(QLatin1String("component")).toString();
@@ -2083,7 +2081,7 @@ bool PackageManagerCorePrivate::addUpdateResourcesFromRepositories(bool parseChe
try {
openForRead(&updatesFile, updatesFile.fileName());
} catch(const Error &e) {
- verbose() << tr("Error opening Updates.xml: ") << e.message() << std::endl;
+ qDebug() << "Error opening Updates.xml:" << e.message();
setStatus(PackageManagerCore::Failure, tr("Could not add temporary update source information."));
return false;
}
@@ -2093,8 +2091,8 @@ bool PackageManagerCorePrivate::addUpdateResourcesFromRepositories(bool parseChe
QString error;
QDomDocument doc;
if (!doc.setContent(&updatesFile, &error, &line, &column)) {
- verbose() << tr("Parse error in File %4 : %1 at line %2 col %3").arg(error,
- QString::number(line), QString::number(column), updatesFile.fileName()) << std::endl;
+ qDebug() << QString::fromLatin1("Parse error in File %4 : %1 at line %2 col %3").arg(error,
+ QString::number(line), QString::number(column), updatesFile.fileName());
setStatus(PackageManagerCore::Failure, tr("Could not add temporary update source information."));
return false;
}
@@ -2165,7 +2163,7 @@ bool PackageManagerCorePrivate::appendComponentToUninstall(Component *component)
bool PackageManagerCorePrivate::appendComponentsToUninstall(const QList<Component*> &components)
{
if (components.isEmpty()) {
- verbose() << "components list is empty in " << Q_FUNC_INFO << std::endl;
+ qDebug() << "components list is empty in" << Q_FUNC_INFO;
return true;
}
diff --git a/installerbuilder/libinstaller/packagemanagergui.cpp b/installerbuilder/libinstaller/packagemanagergui.cpp
index 4c07dea36..21bdab0ce 100644
--- a/installerbuilder/libinstaller/packagemanagergui.cpp
+++ b/installerbuilder/libinstaller/packagemanagergui.cpp
@@ -316,7 +316,7 @@ void PackageManagerGui::clickButton(int wb, int delay)
QTimer::singleShot(delay, b, SLOT(click()));
} else {
// TODO: we should probably abort immediately here (faulty test script)
- verbose() << "Button " << wb << " not found!" << std::endl;
+ qDebug() << "Button" << wb << "not found!";
}
}
@@ -378,7 +378,7 @@ void PackageManagerGui::loadControlScript(const QString &scriptPath)
d->m_controlScript = comp;
d->m_controlScript.construct();
- verbose() << "Loaded control script " << qPrintable(scriptPath) << std::endl;
+ qDebug() << "Loaded control script" << scriptPath;
}
void PackageManagerGui::slotCurrentPageChanged(int id)
@@ -392,12 +392,11 @@ void PackageManagerGui::callControlScriptMethod(const QString &methodName)
QScriptValue method = d->m_controlScript.property(QLatin1String("prototype")).property(methodName);
if (!method.isValid()) {
- verbose() << "Control script callback " << qPrintable(methodName) << " does not exist."
- << std::endl;
+ qDebug() << "Control script callback" << methodName << "does not exist.";
return;
}
- verbose() << "Calling control script callback " << qPrintable(methodName) << std::endl;
+ qDebug() << "Calling control script callback" << methodName;
method.call(d->m_controlScript);
@@ -519,7 +518,7 @@ QWidget *PackageManagerGui::pageWidgetByObjectName(const QString &name) const
return p;
}
}
- verbose() << "No page found for object name " << name << std::endl;
+ qDebug() << "No page found for object name" << name;
return 0;
}
@@ -578,7 +577,7 @@ void PackageManagerGui::setModified(bool value)
void PackageManagerGui::showFinishedPage()
{
- verbose() << "SHOW FINISHED PAGE" << std::endl;
+ qDebug() << "SHOW FINISHED PAGE";
if (d->m_autoSwitchPage)
next();
else
@@ -1436,7 +1435,7 @@ StartMenuDirectoryPage::StartMenuDirectoryPage(PackageManagerCore *core)
QStringList dirs = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
if (core->value(QLatin1String("AllUsers")) == QLatin1String("true")) {
- verbose() << "AllUsers set. Using HKEY_LOCAL_MACHINE" << std::endl;
+ qDebug() << "AllUsers set. Using HKEY_LOCAL_MACHINE";
QSettings system(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\"
"Explorer\\Shell Folders"), QSettings::NativeFormat);
startMenuPath = system.value(QLatin1String("Common Programs"), QString()).toString();
@@ -1446,8 +1445,8 @@ StartMenuDirectoryPage::StartMenuDirectoryPage(PackageManagerCore *core)
dirs += dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
}
- verbose() << "StartMenuPath: \t" << startMenuPath << std::endl;
- verbose() << "DesktopDir: \t" << core->value(QLatin1String("DesktopDir")) << std::endl;
+ qDebug() << "StartMenuPath: \t" << startMenuPath;
+ qDebug() << "DesktopDir: \t" << core->value(QLatin1String("DesktopDir"));
m_listWidget = new QListWidget(this);
if (!dirs.isEmpty()) {
@@ -1587,8 +1586,8 @@ void ReadyForInstallationPage::entering()
// there is no better way atm to check this
if (vol.size() == 0 && vol.availableSpace() == 0) {
- verbose() << "Could not determine available space on device " << target << ". Continue silently."
- << std::endl;
+ qDebug() << QString::fromLatin1("Could not determine available space on device %1. Continue silently."
+ ).arg(target);
return;
}
@@ -1603,8 +1602,8 @@ void ReadyForInstallationPage::entering()
const bool tempInstFailure = tempOnSameVolume && available < realRequiredSpace
+ realRequiredTempSpace;
- verbose() << "Disk space check on " << target << ": required: " << required
- << ", available: " << available << ", size: " << vol.size() << std::endl;
+ qDebug() << QString::fromLatin1("Disk space check on %1: required: %2, available: %3, size: %4").arg(
+ target, QString::number(required), QString::number(available), QString::number(vol.size()));
QString tempString;
if (tempAvailable < realRequiredTempSpace || tempInstFailure) {
@@ -1852,8 +1851,6 @@ FinishedPage::FinishedPage(PackageManagerCore *core)
void FinishedPage::entering()
{
- verbose() << "FINISHED ENTERING: " << std::endl;
-
if (m_commitButton) {
disconnect(m_commitButton, SIGNAL(clicked()), this, SLOT(handleFinishClicked()));
m_commitButton = 0;
@@ -1927,7 +1924,7 @@ void FinishedPage::handleFinishClicked()
if (!m_runItCheckBox->isChecked() || program.isEmpty())
return;
- verbose() << "STARTING " << program << std::endl;
+ qDebug() << "starting" << program;
QProcess::startDetached(program);
}
diff --git a/installerbuilder/libinstaller/performinstallationform.cpp b/installerbuilder/libinstaller/performinstallationform.cpp
index 7d367d85a..1bb71c130 100644
--- a/installerbuilder/libinstaller/performinstallationform.cpp
+++ b/installerbuilder/libinstaller/performinstallationform.cpp
@@ -35,7 +35,6 @@
#include "lazyplaintextedit.h"
#include "progresscoordinator.h"
-#include <common/utils.h>
#include <QtGui/QLabel>
#include <QtGui/QProgressBar>
diff --git a/installerbuilder/libinstaller/progresscoordinator.cpp b/installerbuilder/libinstaller/progresscoordinator.cpp
index 041689224..4237a768b 100644
--- a/installerbuilder/libinstaller/progresscoordinator.cpp
+++ b/installerbuilder/libinstaller/progresscoordinator.cpp
@@ -120,11 +120,11 @@ void ProgressCoordinator::partProgressChanged(double fraction)
//Q_ASSERT(newCurrentCompletePercentage >= 0);
//Q_ASSERT(newCurrentCompletePercentage <= 100);
if (newCurrentCompletePercentage < 0) {
- qDebug() << newCurrentCompletePercentage << " is smaller then 0 - this should happen max once";
+ qDebug() << newCurrentCompletePercentage << "is smaller then 0 - this should happen max once";
newCurrentCompletePercentage = 0;
}
if (newCurrentCompletePercentage > 100) {
- qDebug() << newCurrentCompletePercentage << " is bigger then 100 - this should happen max once";
+ qDebug() << newCurrentCompletePercentage << "is bigger then 100 - this should happen max once";
newCurrentCompletePercentage = 100;
}
@@ -152,12 +152,12 @@ void ProgressCoordinator::partProgressChanged(double fraction)
//Q_ASSERT(newCurrentCompletePercentage >= 0);
//Q_ASSERT(newCurrentCompletePercentage <= 100);
if (newCurrentCompletePercentage < 0) {
- qDebug() << newCurrentCompletePercentage << " is smaller then 0 - this should happen max once";
+ qDebug() << newCurrentCompletePercentage << "is smaller then 0 - this should happen max once";
newCurrentCompletePercentage = 0;
}
if (newCurrentCompletePercentage > 100) {
- qDebug() << newCurrentCompletePercentage << " is bigger then 100 - this should happen max once";
+ qDebug() << newCurrentCompletePercentage << "is bigger then 100 - this should happen max once";
newCurrentCompletePercentage = 100;
}
diff --git a/installerbuilder/libinstaller/qprocesswrapper.cpp b/installerbuilder/libinstaller/qprocesswrapper.cpp
index 2d93c2842..739f96d8a 100644
--- a/installerbuilder/libinstaller/qprocesswrapper.cpp
+++ b/installerbuilder/libinstaller/qprocesswrapper.cpp
@@ -183,7 +183,7 @@ bool startDetached(const QString &program, const QStringList &args, const QStrin
bool QProcessWrapper::startDetached(const QString &program, const QStringList &arguments,
const QString &workingDirectory, qint64 *pid)
{
- qDebug() << Q_FUNC_INFO;
+ qDebug() << Q_FUNC_INFO << program << arguments;
QProcessWrapper w;
if (w.d->createSocket()) {
const QPair<bool, qint64> result = callRemoteMethod<QPair<bool, qint64> >(w.d->stream,
diff --git a/installerbuilder/libinstaller/qtpatch.cpp b/installerbuilder/libinstaller/qtpatch.cpp
index 6fabe22a8..9bebe9ed6 100644
--- a/installerbuilder/libinstaller/qtpatch.cpp
+++ b/installerbuilder/libinstaller/qtpatch.cpp
@@ -32,8 +32,6 @@
**************************************************************************/
#include "qtpatch.h"
-#include "common/utils.h"
-
#include <QString>
#include <QStringList>
#include <QFileInfo>
@@ -41,7 +39,7 @@
#include <QTextStream>
#include <QVector>
#include <QTime>
-#include <QDebug>
+#include <QtCore/QDebug>
#include <QCoreApplication>
#include <QByteArrayMatcher>
@@ -101,7 +99,7 @@ QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteA
process.start(qmake.absoluteFilePath(), args, QIODevice::ReadOnly);
if (process.waitForFinished(2000)) {
if (process.exitStatus() == QProcess::CrashExit) {
- QInstaller::verbose() << qmakePath << " was crashed" << std::endl;
+ qDebug() << qmakePath << "was crashed";
return qmakeValueHash;
}
QByteArray output = process.readAllStandardOutput();
@@ -123,13 +121,13 @@ QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteA
uiDetachedWait(waitTimeInMilliSeconds);
}
if (process.state() > QProcess::NotRunning ) {
- QInstaller::verbose() << "qmake process is still running, need to kill it." << std::endl;
+ qDebug() << "qmake process is still running, need to kill it.";
process.kill();
}
}
if (qmakeValueHash.isEmpty())
- QInstaller::verbose() << "Can't get any query output from qmake." << std::endl;
+ qDebug() << "Can't get any query output from qmake.";
return qmakeValueHash;
}
@@ -139,14 +137,14 @@ bool QtPatch::patchBinaryFile(const QString &fileName,
{
QFile file(fileName);
if (!file.exists()) {
- QInstaller::verbose() << "qpatch: warning: file `" << qPrintable(fileName) << "' not found" << std::endl;
+ qDebug() << "qpatch: warning: file" << fileName << "not found";
return false;
}
openFileForPatching(&file);
if (!file.isOpen()) {
- QInstaller::verbose() << "qpatch: warning: file `" << qPrintable(fileName) << "' can not open." << std::endl;
- QInstaller::verbose() << qPrintable(file.errorString()) << std::endl;
+ qDebug() << "qpatch: warning: file" << qPrintable(fileName) << "can not open.";
+ qDebug() << qPrintable(file.errorString());
return false;
}
@@ -162,7 +160,7 @@ bool QtPatch::patchBinaryFile(QIODevice *device,
const QByteArray &newQtPath)
{
if (!(device->openMode() == QIODevice::ReadWrite)) {
- QInstaller::verbose() << "qpatch: warning: This function needs an open device for writing." << std::endl;
+ qDebug() << "qpatch: warning: This function needs an open device for writing.";
return false;
}
const QByteArray source = device->readAll();
@@ -194,9 +192,8 @@ bool QtPatch::patchTextFile(const QString &fileName,
QFile file(fileName);
if (!file.open(QFile::ReadOnly)) {
- QInstaller::verbose() << "qpatch: warning: Open the file '"
- << qPrintable(fileName) << "' stopped: "
- << qPrintable(file.errorString()) << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: Open the file '%1' stopped: %2").arg(
+ fileName, file.errorString());
return false;
}
@@ -210,7 +207,7 @@ bool QtPatch::patchTextFile(const QString &fileName,
}
if (!file.open(QFile::WriteOnly | QFile::Truncate)) {
- QInstaller::verbose() << "qpatch: error: file `" << qPrintable(fileName) << "' not writable" << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: error: file '%1' not writable").arg(fileName);
return false;
}
@@ -230,6 +227,7 @@ bool QtPatch::openFileForPatching(QFile *file)
}
return file->openMode() == QFile::ReadWrite;
}
- QInstaller::verbose() << "qpatch: error: File `" << qPrintable(file->fileName()) << "' is open, so it can not open it again." << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: error: File '%1 is open, so it can not open it again.").arg(
+ file->fileName());
return false;
}
diff --git a/installerbuilder/libinstaller/qtpatchoperation.cpp b/installerbuilder/libinstaller/qtpatchoperation.cpp
index 1cd5c3538..5f78b52c7 100644
--- a/installerbuilder/libinstaller/qtpatchoperation.cpp
+++ b/installerbuilder/libinstaller/qtpatchoperation.cpp
@@ -37,7 +37,6 @@
#endif
#include "constants.h"
-#include "common/utils.h"
#include "packagemanagercore.h"
#include <QMap>
@@ -45,7 +44,7 @@
#include <QFile>
#include <QTextStream>
#include <QDir>
-#include <QDebug>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -250,8 +249,7 @@ bool QtPatchOperation::performOperation()
it.next();
bool isPatched = QtPatch::patchBinaryFile(&file, it.key(), it.value());
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: file '" << qPrintable(fileName)
- << "' could not patched" << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: file '%1' could not patched").arg(fileName);
}
}
} //foreach (QString fileName, filesToPatch)
diff --git a/installerbuilder/libinstaller/registerdocumentationoperation.cpp b/installerbuilder/libinstaller/registerdocumentationoperation.cpp
index a45e218bd..a0ec54f1b 100644
--- a/installerbuilder/libinstaller/registerdocumentationoperation.cpp
+++ b/installerbuilder/libinstaller/registerdocumentationoperation.cpp
@@ -37,7 +37,7 @@
#include <QString>
#include <QFileInfo>
#include <QDir>
-#include <QDebug>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -98,7 +98,7 @@ bool RegisterDocumentationOperation::performOperation()
if (!settingsDir.exists())
settingsDir.mkpath(settingsDir.absolutePath());
const QString collectionFile = settingsDir.absolutePath() + QLatin1String("/helpcollection.qhc");
- qDebug() << "collectionFile: " << collectionFile;
+ qDebug() << "collectionFile:" << collectionFile;
if (!QFileInfo(helpFile).exists()) {
setError(UserDefinedError);
diff --git a/installerbuilder/libinstaller/setdemospathonqtoperation.cpp b/installerbuilder/libinstaller/setdemospathonqtoperation.cpp
index 19018b189..3d484d800 100644
--- a/installerbuilder/libinstaller/setdemospathonqtoperation.cpp
+++ b/installerbuilder/libinstaller/setdemospathonqtoperation.cpp
@@ -33,10 +33,10 @@
#include "setdemospathonqtoperation.h"
#include "qtpatch.h"
-#include "common/utils.h"
#include <QtCore/QDir>
#include <QtCore/QSettings>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -82,8 +82,7 @@ bool SetDemosPathOnQtOperation::performOperation()
QByteArray oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_DEMOS"));
bool oldQtPathFromQMakeIsEmpty = oldValue.isEmpty();
if (oldQtPathFromQMakeIsEmpty) {
- verbose() << "qpatch: warning: It was not able to get the old values from " << qPrintable(qmakePath)
- << std::endl;
+ qDebug() << "qpatch: warning: It was not able to get the old values from" << qmakePath;
}
if (255 < newValue.size()) {
@@ -104,8 +103,7 @@ bool SetDemosPathOnQtOperation::performOperation()
bool isPatched = QtPatch::patchBinaryFile(qmakePath, oldValue, newValue);
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the demo path in "
- << qPrintable(qmakePath) << std::endl;
+ qDebug() << "qpatch: warning: could not patched the demo path in" << qmakePath;
}
return true;
diff --git a/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp b/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
index cdd42d8a7..5821ac838 100644
--- a/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
+++ b/installerbuilder/libinstaller/setexamplespathonqtoperation.cpp
@@ -32,11 +32,11 @@
**************************************************************************/
#include "setexamplespathonqtoperation.h"
-#include "common/utils.h"
#include "qtpatch.h"
#include <QtCore/QDir>
#include <QtCore/QSettings>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -82,8 +82,7 @@ bool SetExamplesPathOnQtOperation::performOperation()
QByteArray oldValue = qmakeValueHash.value(QLatin1String("QT_INSTALL_EXAMPLES"));
bool oldQtPathFromQMakeIsEmpty = oldValue.isEmpty();
if (oldQtPathFromQMakeIsEmpty) {
- verbose() << "qpatch: warning: It was not able to get the old values from " << qPrintable(qmakePath)
- << std::endl;
+ qDebug() << "qpatch: warning: It was not able to get the old values from" << qmakePath;
}
if (255 < newValue.size()) {
@@ -105,8 +104,7 @@ bool SetExamplesPathOnQtOperation::performOperation()
bool isPatched = QtPatch::patchBinaryFile(qmakePath, oldValue, newValue);
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the example path in "
- << qPrintable(qmakePath) << std::endl;
+ qDebug() << "qpatch: warning: could not patched the example path in" << qmakePath;
}
return true;
diff --git a/installerbuilder/libinstaller/setimportspathonqtcoreoperation.cpp b/installerbuilder/libinstaller/setimportspathonqtcoreoperation.cpp
index 284b6f65d..90337174f 100644
--- a/installerbuilder/libinstaller/setimportspathonqtcoreoperation.cpp
+++ b/installerbuilder/libinstaller/setimportspathonqtcoreoperation.cpp
@@ -32,11 +32,11 @@
**************************************************************************/
#include "setimportspathonqtcoreoperation.h"
-#include "common/utils.h"
#include "qtpatch.h"
#include <QtCore/QByteArrayMatcher>
#include <QtCore/QDir>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -46,7 +46,7 @@ namespace {
QFileInfo fileInfo(binaryPath);
if (!fileInfo.exists()) {
- verbose() << "qpatch: warning: file `" << qPrintable(binaryPath) << "' not found" << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: file '%1' not found").arg(binaryPath);
return QByteArray();
}
@@ -59,9 +59,9 @@ namespace {
}
Q_ASSERT(file.isOpen());
if (!file.isOpen()) {
- verbose() << "qpatch: warning: file `" << qPrintable(binaryPath) << "' can not open as ReadOnly."
- << std::endl;
- verbose() << file.errorString() << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: file '%1' can not open as ReadOnly.").arg(
+ binaryPath);
+ qDebug() << file.errorString();
return QByteArray();
}
@@ -107,7 +107,7 @@ bool SetImportsPathOnQtCoreOperation::performOperation()
const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
if (255 < newValue.size()) {
- verbose() << "qpatch: error: newQtDir needs to be less than 255 characters." << std::endl;
+ qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters.";
return false;
}
QStringList libraryFiles;
@@ -126,8 +126,7 @@ bool SetImportsPathOnQtCoreOperation::performOperation()
bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the imports path in "
- << qPrintable(coreLibrary) << std::endl;
+ qDebug() << "qpatch: warning: could not patched the imports path in" << coreLibrary;
}
}
}
diff --git a/installerbuilder/libinstaller/setpathonqtcoreoperation.cpp b/installerbuilder/libinstaller/setpathonqtcoreoperation.cpp
index c0a88d032..8ea4eaa5e 100644
--- a/installerbuilder/libinstaller/setpathonqtcoreoperation.cpp
+++ b/installerbuilder/libinstaller/setpathonqtcoreoperation.cpp
@@ -31,11 +31,11 @@
**************************************************************************/
#include "setpathonqtcoreoperation.h"
-#include "common/utils.h"
#include "qtpatch.h"
#include <QtCore/QByteArrayMatcher>
#include <QtCore/QDir>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -45,11 +45,10 @@ namespace {
QFileInfo fileInfo(binaryPath);
if (!fileInfo.exists()) {
- verbose() << "qpatch: warning: file '" << qPrintable(binaryPath) << "' not found" << std::endl;
+ qDebug() << "qpatch: warning: file '" << binaryPath << "' not found";
return QByteArray();
}
-
QFile file(binaryPath);
int readOpenCount = 0;
while (!file.open(QFile::ReadOnly) && readOpenCount < 20000) {
@@ -58,9 +57,8 @@ namespace {
}
Q_ASSERT(file.isOpen());
if (!file.isOpen()) {
- verbose() << "qpatch: warning: file '" << qPrintable(binaryPath) << "' can not open as ReadOnly."
- << std::endl;
- verbose() << file.errorString() << std::endl;
+ qDebug() << "qpatch: warning: file '" << binaryPath << "' can not open as ReadOnly.";
+ qDebug() << file.errorString();
return QByteArray();
}
@@ -131,7 +129,7 @@ bool SetPathOnQtCoreOperation::performOperation()
}
if (255 < newValue.size()) {
- verbose() << "qpatch: error: newQtDir needs to be less than 255 characters." << std::endl;
+ qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters.";
return false;
}
QStringList libraryFiles;
@@ -151,8 +149,7 @@ bool SetPathOnQtCoreOperation::performOperation()
bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the plugin path in "
- << qPrintable(coreLibrary) << std::endl;
+ qDebug() << "qpatch: warning: could not patched the plugin path in" << coreLibrary;
}
}
}
diff --git a/installerbuilder/libinstaller/setpluginpathonqtcoreoperation.cpp b/installerbuilder/libinstaller/setpluginpathonqtcoreoperation.cpp
index 88c4376fe..d6ad59a73 100644
--- a/installerbuilder/libinstaller/setpluginpathonqtcoreoperation.cpp
+++ b/installerbuilder/libinstaller/setpluginpathonqtcoreoperation.cpp
@@ -32,11 +32,11 @@
**************************************************************************/
#include "setpluginpathonqtcoreoperation.h"
-#include "common/utils.h"
#include "qtpatch.h"
#include <QtCore/QByteArrayMatcher>
#include <QtCore/QDir>
+#include <QtCore/QDebug>
using namespace QInstaller;
@@ -46,7 +46,7 @@ namespace {
QFileInfo fileInfo(binaryPath);
if (!fileInfo.exists()) {
- verbose() << "qpatch: warning: file '" << qPrintable(binaryPath) << "' not found" << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: file '%1' not found").arg(binaryPath);
return QByteArray();
}
@@ -58,9 +58,9 @@ namespace {
}
Q_ASSERT(file.isOpen());
if (!file.isOpen()) {
- verbose() << "qpatch: warning: file '" << qPrintable(binaryPath) << "' can not open as ReadOnly."
- << std::endl;
- verbose() << file.errorString() << std::endl;
+ qDebug() << QString::fromLatin1("qpatch: warning: file '%1' can not open as ReadOnly.").arg(
+ binaryPath);
+ qDebug() << file.errorString();
return QByteArray();
}
@@ -106,7 +106,7 @@ bool SetPluginPathOnQtCoreOperation::performOperation()
const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8();
if (255 < newValue.size()) {
- verbose() << "qpatch: error: newQtDir needs to be less than 255 characters." << std::endl;
+ qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters.";
return false;
}
QStringList libraryFiles;
@@ -124,10 +124,8 @@ bool SetPluginPathOnQtCoreOperation::performOperation()
QByteArray adjutedNewValue = QByteArray("qt_plugpath=%1").replace("%1", newValue);
bool isPatched = QtPatch::patchBinaryFile(coreLibrary, oldValue, adjutedNewValue);
- if (!isPatched) {
- QInstaller::verbose() << "qpatch: warning: could not patched the plugin path in "
- << qPrintable(coreLibrary) << std::endl;
- }
+ if (!isPatched)
+ qDebug() << "qpatch: warning: could not patched the plugin path in" << coreLibrary;
}
}
diff --git a/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp b/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp
index 6e3ec8f21..9c4a17948 100644
--- a/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp
+++ b/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp
@@ -73,13 +73,13 @@ bool removeInstallerRegisteredQtVersions(QSettings &settings, const QStringList
qDebug() << Q_FUNC_INFO << settings.fileName();
settings.beginGroup(QLatin1String(QtVersionsSectionName));
int qtVersionSizeValue = settings.value(QLatin1String("size")).toInt();
- qDebug() << QLatin1String("qtVersionSizeValue: ") << qtVersionSizeValue;
+ qDebug() << "qtVersionSizeValue:" << qtVersionSizeValue;
//read all settings for Qt Versions
QHash<QString, QVariant> oldSettingsAsHash;
foreach (const QString &key, settings.allKeys())
oldSettingsAsHash.insert(key, settings.value(key));
- qDebug() << QLatin1String("settings.allKeys(): ") << settings.allKeys();
+ qDebug() << "settings.allKeys():" << settings.allKeys();
//get the installer added Qt Version settings ids
QList<int> toRemoveIds;
@@ -96,7 +96,7 @@ bool removeInstallerRegisteredQtVersions(QSettings &settings, const QStringList
}
}
}
- qDebug() << QLatin1String("toRemoveIds: ") << toRemoveIds;
+ qDebug() << "toRemoveIds:" << toRemoveIds;
//now write only the other Qt Versions to QtCreator settings
it.toFront();
@@ -118,12 +118,8 @@ bool removeInstallerRegisteredQtVersions(QSettings &settings, const QStringList
}
QString newKey = QString::number(qtVersionIdMapper.value(numberAtTheBeginning)) + restOfTheKey;
if (newKey.endsWith(QLatin1String("Id"))) {
- qDebug() << QLatin1String("settings.setValue(newKey, qtVersionIdMapper.value(numberAtTheBeginning)): ")
- << newKey << QLatin1String("||") << qtVersionIdMapper.value(numberAtTheBeginning);
settings.setValue(newKey, qtVersionIdMapper.value(numberAtTheBeginning));
} else {
- qDebug() << QLatin1String("settings.setValue(newKey, it.value()): ")
- << newKey << QLatin1String("||") << it.value();
settings.setValue(newKey, it.value());
}
}
@@ -132,8 +128,6 @@ bool removeInstallerRegisteredQtVersions(QSettings &settings, const QStringList
settings.setValue(QLatin1String("size"), qtVersionIdMapper.count());
settings.endGroup(); //QtVersionsSectionName
- qDebug() << QLatin1String("qtVersionIdMapper.count(): ") << qtVersionIdMapper.count();
- qDebug() << QLatin1String("qtVersionSizeValue - toRemoveIds.count(): ") << qtVersionSizeValue - toRemoveIds.count();
if (qtVersionIdMapper.count() != qtVersionSizeValue - toRemoveIds.count()) {
return false;
}
diff --git a/installerbuilder/libinstaller/updater.cpp b/installerbuilder/libinstaller/updater.cpp
index 2e4b54e97..7b37521da 100644
--- a/installerbuilder/libinstaller/updater.cpp
+++ b/installerbuilder/libinstaller/updater.cpp
@@ -38,6 +38,7 @@
#include "init.h"
#include "packagemanagercore.h"
+#include <QtCore/QDebug>
#include <QtXml/QDomDocument>
#include <iostream>
@@ -62,7 +63,7 @@ bool Updater::checkForUpdates()
content.registerEmbeddedQResources();
if (content.magicmaker() == MagicInstallerMarker) {
- verbose() << tr("Impossible to use an installer to check for updates!") << std::endl;
+ qDebug() << "Impossible to use an installer to check for updates!";
return false;
}
@@ -76,7 +77,7 @@ bool Updater::checkForUpdates()
const QList<QInstaller::Component *> components = core.updaterComponents();
if (components.isEmpty()) {
- verbose() << tr("There are currently no updates available.") << std::endl;
+ qDebug() << "There are currently no updates available.";
return false;
}