summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-02-18 13:55:25 +0200
committerKatja Marttila <katja.marttila@qt.io>2020-02-20 07:37:12 +0000
commit6163fc05768b6a7d05530ef5c33d8f024ebd6b6d (patch)
treecabc13d262a32fa5b7417fbbead9bf60a4cf795c /src/libs
parent276d8aafe9410f82c6c342f060332e5bba44fecd (diff)
CLI: decrease the amount of default debug prints
Debug prints can be suppressed or extended with logging rules. Make the default usage so that only relevant information will be shown to user, such as uninstall/install progress, server information, warning messages and package name, version and displayname. Change-Id: I09be754a36dd97530d75cdea3edb5fc77e67a856 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/component.cpp4
-rw-r--r--src/libs/installer/consumeoutputoperation.cpp4
-rw-r--r--src/libs/installer/createdesktopentryoperation.cpp6
-rw-r--r--src/libs/installer/createshortcutoperation.cpp2
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp6
-rw-r--r--src/libs/installer/fileutils.cpp12
-rw-r--r--src/libs/installer/installercalculator.cpp6
-rw-r--r--src/libs/installer/installiconsoperation.cpp4
-rw-r--r--src/libs/installer/lib7z_facade.cpp2
-rw-r--r--src/libs/installer/link.cpp16
-rw-r--r--src/libs/installer/messageboxhandler.cpp2
-rw-r--r--src/libs/installer/metadatajob.cpp22
-rw-r--r--src/libs/installer/packagemanagercore.cpp6
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp56
-rw-r--r--src/libs/installer/packagemanagergui.cpp24
-rw-r--r--src/libs/installer/qtpatch.cpp20
-rw-r--r--src/libs/installer/scriptengine_p.h2
-rw-r--r--src/libs/installer/settings.cpp4
-rw-r--r--src/libs/installer/settingsoperation.cpp4
-rw-r--r--src/libs/kdtools/filedownloader.cpp2
-rw-r--r--src/libs/kdtools/filedownloaderfactory.cpp2
-rw-r--r--src/libs/kdtools/updateoperation.cpp4
22 files changed, 105 insertions, 105 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 6cd48db4b..7ad68d24d 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -553,7 +553,7 @@ void Component::loadComponentScript(const QString &fileName)
} catch (const Error &error) {
if (packageManagerCore()->settings().allowUnstableComponents()) {
setUnstable(Component::Component::ScriptLoadingFailed, error.message());
- qCWarning(QInstaller::lcGeneral) << error.message();
+ qCWarning(QInstaller::lcInstallerInstallLog) << error.message();
} else {
throw error;
}
@@ -1332,7 +1332,7 @@ bool Component::isDefault() const
}
if (!valueFromScript.isError())
return valueFromScript.toBool();
- qCWarning(QInstaller::lcGeneral) << "Value from script is not valid."
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Value from script is not valid."
<< (valueFromScript.toString().isEmpty()
? QString::fromLatin1("Unknown error.") : valueFromScript.toString());
return false;
diff --git a/src/libs/installer/consumeoutputoperation.cpp b/src/libs/installer/consumeoutputoperation.cpp
index 3203f84d4..eeeb4d2f7 100644
--- a/src/libs/installer/consumeoutputoperation.cpp
+++ b/src/libs/installer/consumeoutputoperation.cpp
@@ -100,7 +100,7 @@ bool ConsumeOutputOperation::performOperation()
process.start(executable.absoluteFilePath(), processArguments, QIODevice::ReadOnly);
if (process.waitForFinished(10000)) {
if (process.exitStatus() == QProcess::CrashExit) {
- qCWarning(QInstaller::lcGeneral) << executable.absoluteFilePath()
+ qCWarning(QInstaller::lcInstallerInstallLog) << executable.absoluteFilePath()
<< processArguments << "crashed with exit code"
<< process.exitCode() << "standard output: "
<< process.readAllStandardOutput() << "error output: "
@@ -125,7 +125,7 @@ bool ConsumeOutputOperation::performOperation()
}
if (executableOutput.isEmpty()) {
- qCWarning(QInstaller::lcGeneral) << "Cannot get any query output from executable"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot get any query output from executable"
<< executable.absoluteFilePath();
}
core->setValue(installerKeyName, QString::fromLocal8Bit(executableOutput));
diff --git a/src/libs/installer/createdesktopentryoperation.cpp b/src/libs/installer/createdesktopentryoperation.cpp
index 0904f434e..e0f48e7af 100644
--- a/src/libs/installer/createdesktopentryoperation.cpp
+++ b/src/libs/installer/createdesktopentryoperation.cpp
@@ -159,7 +159,7 @@ bool CreateDesktopEntryOperation::undoOperation()
// first remove the link
QFile file(filename);
if (file.exists() && !file.remove()) {
- qCWarning(QInstaller::lcGeneral) << "Cannot delete file" << filename
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot delete file" << filename
<< ":" << file.errorString();
return true;
}
@@ -170,13 +170,13 @@ bool CreateDesktopEntryOperation::undoOperation()
QFile backupFile(value(QLatin1String("backupOfExistingDesktopEntry")).toString());
if (!backupFile.exists()) {
// do not treat this as a real error: The backup file might have been just nuked by the user.
- qCWarning(QInstaller::lcGeneral) << "Cannot restore original desktop entry at" << filename
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot restore original desktop entry at" << filename
<< ": Backup file" << backupFile.fileName() << "does not exist anymore.";
return true;
}
if (!backupFile.rename(filename)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot restore the file" << filename
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot restore the file" << filename
<< ":" << backupFile.errorString();
}
diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp
index 5a6acd2ba..509a3ef4e 100644
--- a/src/libs/installer/createshortcutoperation.cpp
+++ b/src/libs/installer/createshortcutoperation.cpp
@@ -277,7 +277,7 @@ bool CreateShortcutOperation::undoOperation()
const QString &linkLocation = arguments().at(1);
if (!deleteFileNowOrLater(linkLocation) )
- qCWarning(QInstaller::lcGeneral) << "Cannot delete:" << linkLocation;
+ qCWarning(QInstaller::lcInstallerUninstallLog) << "Cannot delete:" << linkLocation;
QDir dir; // remove all directories we created
const QStringList directoriesToDelete = value(QLatin1String("createddirs")).toStringList();
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp
index f589ed4c1..d755a5320 100644
--- a/src/libs/installer/extractarchiveoperation.cpp
+++ b/src/libs/installer/extractarchiveoperation.cpp
@@ -121,7 +121,7 @@ bool ExtractArchiveOperation::performOperation()
setValue(QLatin1String("files"), file.fileName());
file.close();
} else {
- qCWarning(QInstaller::lcGeneral) << "Cannot open file for writing " << file.fileName() << ":" << file.errorString();
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot open file for writing " << file.fileName() << ":" << file.errorString();
}
// TODO: Use backups for rollback, too? Doesn't work for uninstallation though.
@@ -178,7 +178,7 @@ void ExtractArchiveOperation::startUndoProcess(const QStringList &files)
void ExtractArchiveOperation::deleteDataFile(const QString &fileName)
{
if (fileName.isEmpty()) {
- qCWarning(QInstaller::lcGeneral) << Q_FUNC_INFO << "data file name cannot be empty.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << Q_FUNC_INFO << "data file name cannot be empty.";
return;
}
QFile file(fileName);
@@ -188,7 +188,7 @@ void ExtractArchiveOperation::deleteDataFile(const QString &fileName)
if (directory.exists() && directory.isEmpty())
directory.rmdir(directory.path());
} else {
- qCWarning(QInstaller::lcGeneral) << "Cannot remove data file" << file.fileName();
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot remove data file" << file.fileName();
}
}
diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp
index 7829083e4..c72a45c1e 100644
--- a/src/libs/installer/fileutils.cpp
+++ b/src/libs/installer/fileutils.cpp
@@ -189,7 +189,7 @@ void QInstaller::removeFiles(const QString &path, bool ignoreErrors)
QDir::toNativeSeparators(f.fileName()), f.errorString());
if (!ignoreErrors)
throw Error(errorMessage);
- qCWarning(QInstaller::lcGeneral).noquote() << errorMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << errorMessage;
}
}
}
@@ -232,7 +232,7 @@ void QInstaller::removeDirectory(const QString &path, bool ignoreErrors)
errnoToQString(errno));
if (!ignoreErrors)
throw Error(errorMessage);
- qCWarning(QInstaller::lcGeneral).noquote() << errorMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << errorMessage;
}
}
}
@@ -313,14 +313,14 @@ bool QInstaller::setDefaultFilePermissions(const QString &fileName, DefaultFileP
bool QInstaller::setDefaultFilePermissions(QFile *file, DefaultFilePermissions permissions)
{
if (!file->exists()) {
- qCWarning(QInstaller::lcGeneral) << "Target" << file->fileName() << "does not exists.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Target" << file->fileName() << "does not exists.";
return false;
}
if (file->permissions() == static_cast<QFileDevice::Permission>(permissions))
return true;
if (!file->setPermissions(static_cast<QFileDevice::Permission>(permissions))) {
- qCWarning(QInstaller::lcGeneral) << "Cannot set default permissions for target"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot set default permissions for target"
<< file->fileName() << ":" << file->errorString();
return false;
}
@@ -530,13 +530,13 @@ void QInstaller::setApplicationIcon(const QString &application, const QString &i
{
QFile iconFile(icon);
if (!iconFile.open(QIODevice::ReadOnly)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot use" << icon << "as an application icon:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot use" << icon << "as an application icon:"
<< iconFile.errorString();
return;
}
if (QImageReader::imageFormat(icon) != "ico") {
- qCWarning(QInstaller::lcGeneral) << "Cannot use" << icon << "as an application icon, "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot use" << icon << "as an application icon, "
"unsupported format" << QImageReader::imageFormat(icon).constData();
return;
}
diff --git a/src/libs/installer/installercalculator.cpp b/src/libs/installer/installercalculator.cpp
index 6a7e66692..edf5e7662 100644
--- a/src/libs/installer/installercalculator.cpp
+++ b/src/libs/installer/installercalculator.cpp
@@ -117,7 +117,7 @@ bool InstallerCalculator::appendComponentsToInstall(const QList<Component *> &co
foreach (Component *component, components){
if (m_toInstallComponentIds.contains(component->name())) {
const QString errorMessage = recursionError(component);
- qCWarning(QInstaller::lcGeneral).noquote() << errorMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << errorMessage;
m_componentsToInstallError.append(errorMessage);
Q_ASSERT_X(!m_toInstallComponentIds.contains(component->name()), Q_FUNC_INFO,
qPrintable(errorMessage));
@@ -169,7 +169,7 @@ bool InstallerCalculator::appendComponentToInstall(Component *component, const Q
const QString errorMessage = QCoreApplication::translate("InstallerCalculator",
"Cannot find missing dependency \"%1\" for \"%2\".").arg(dependencyComponentName,
component->name());
- qCWarning(QInstaller::lcGeneral).noquote() << errorMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << errorMessage;
m_componentsToInstallError.append(errorMessage);
if (component->packageManagerCore()->settings().allowUnstableComponents()) {
component->setUnstable(Component::UnstableError::MissingDependency, errorMessage);
@@ -205,7 +205,7 @@ bool InstallerCalculator::appendComponentToInstall(Component *component, const Q
&& !m_toInstallComponentIds.contains(component->name()))) {
if (m_visitedComponents.value(component).contains(dependencyComponent)) {
const QString errorMessage = recursionError(component);
- qCWarning(QInstaller::lcGeneral).noquote() << errorMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << errorMessage;
m_componentsToInstallError = errorMessage;
Q_ASSERT_X(!m_visitedComponents.value(component).contains(dependencyComponent),
Q_FUNC_INFO, qPrintable(errorMessage));
diff --git a/src/libs/installer/installiconsoperation.cpp b/src/libs/installer/installiconsoperation.cpp
index 1b227a05b..7b02bb964 100644
--- a/src/libs/installer/installiconsoperation.cpp
+++ b/src/libs/installer/installiconsoperation.cpp
@@ -266,10 +266,10 @@ bool InstallIconsOperation::undoOperation()
}
if (!warningMessages.isEmpty()) {
- qCWarning(QInstaller::lcGeneral) << "Undo of operation" << name() << "with arguments"
+ qCWarning(QInstaller::lcInstallerUninstallLog) << "Undo of operation" << name() << "with arguments"
<< arguments().join(QLatin1String(", ")) << "had some problems.";
foreach (const QString &message, warningMessages) {
- qCWarning(QInstaller::lcGeneral).noquote() << message;
+ qCWarning(QInstaller::lcInstallerUninstallLog).noquote() << message;
}
}
diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp
index e31a826ca..ede0b1f62 100644
--- a/src/libs/installer/lib7z_facade.cpp
+++ b/src/libs/installer/lib7z_facade.cpp
@@ -274,7 +274,7 @@ struct DirectoryGuard
return;
QDir dir(m_path);
if (!dir.rmdir(m_path))
- qCWarning(QInstaller::lcGeneral) << "Cannot delete directory " << m_path;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot delete directory " << m_path;
}
/*!
diff --git a/src/libs/installer/link.cpp b/src/libs/installer/link.cpp
index f5a0903ae..ff9f49696 100644
--- a/src/libs/installer/link.cpp
+++ b/src/libs/installer/link.cpp
@@ -89,7 +89,7 @@ public:
OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, nullptr);
if (m_dirHandle == INVALID_HANDLE_VALUE) {
- qCWarning(QInstaller::lcGeneral) << "Cannot open" << path << ":"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot open" << path << ":"
<< QInstaller::windowsErrorString(GetLastError());
}
}
@@ -139,12 +139,12 @@ QString readWindowsSymLink(const QString &path)
Link createJunction(const QString &linkPath, const QString &targetPath)
{
if (!QDir().mkpath(linkPath)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot create the mount directory" << linkPath;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot create the mount directory" << linkPath;
return Link(linkPath);
}
FileHandleWrapper dirHandle(linkPath);
if (dirHandle.handle() == INVALID_HANDLE_VALUE) {
- qCWarning(QInstaller::lcGeneral) << "Cannot open" << linkPath << ":"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot open" << linkPath << ":"
<< QInstaller::windowsErrorString(GetLastError());
return Link(linkPath);
}
@@ -178,7 +178,7 @@ Link createJunction(const QString &linkPath, const QString &targetPath)
if (!::DeviceIoControl(dirHandle.handle(), FSCTL_SET_REPARSE_POINT, reparseStructData,
reparseStructData->ReparseDataLength + REPARSE_DATA_BUFFER_HEADER_SIZE, nullptr, 0,
&bytesReturned, nullptr)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot set the reparse point for" << linkPath << "to" << targetPath
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot set the reparse point for" << linkPath << "to" << targetPath
<< ":" << QInstaller::windowsErrorString(GetLastError());
}
return Link(linkPath);
@@ -200,7 +200,7 @@ bool removeJunction(const QString &path)
REPARSE_GUID_DATA_BUFFER_HEADER_SIZE, nullptr, 0,
&bytesReturned, nullptr)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot remove the reparse point" << path << ":"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot remove the reparse point" << path << ":"
<< QInstaller::windowsErrorString(GetLastError());
return false;
}
@@ -214,7 +214,7 @@ Link createLnSymlink(const QString &linkPath, const QString &targetPath)
int linkedError = symlink(QFileInfo(targetPath).absoluteFilePath().toUtf8(),
QFileInfo(linkPath).absoluteFilePath().toUtf8());
if (linkedError != 0) {
- qCWarning(QInstaller::lcGeneral) << "Cannot create a symlink from" << linkPath << "to"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot create a symlink from" << linkPath << "to"
<< targetPath << ":" << linkedError;
}
@@ -242,7 +242,7 @@ Link Link::create(const QString &link, const QString &targetPath)
if (!linkPathExists)
linkPathExists = QDir().mkpath(linkPath);
if (!linkPathExists) {
- qCWarning(QInstaller::lcGeneral) << "Cannot create the needed directories" << link;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot create the needed directories" << link;
return Link(link);
}
@@ -250,7 +250,7 @@ Link Link::create(const QString &link, const QString &targetPath)
if (QFileInfo(targetPath).isDir())
return createJunction(link, targetPath);
- qCWarning(QInstaller::lcGeneral) << "At the moment the" << Q_FUNC_INFO
+ qCWarning(QInstaller::lcInstallerInstallLog) << "At the moment the" << Q_FUNC_INFO
<< "can not create anything else as " << "junctions for directories under windows";
return Link(link);
#else
diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp
index 2620bd818..cb37254eb 100644
--- a/src/libs/installer/messageboxhandler.cpp
+++ b/src/libs/installer/messageboxhandler.cpp
@@ -403,7 +403,7 @@ QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messag
messageTypeHash.insert(warningType, QLatin1String("warning"));
};
- qCDebug(QInstaller::lcGeneral).nospace() << "Created " << messageTypeHash.value(messageType).toUtf8().constData()
+ qCDebug(QInstaller::lcInstallerInstallLog).nospace() << "Created " << messageTypeHash.value(messageType).toUtf8().constData()
<< " message box " << identifier << ": " << title << ", " << text;
if (qobject_cast<QApplication*> (qApp) == nullptr)
diff --git a/src/libs/installer/metadatajob.cpp b/src/libs/installer/metadatajob.cpp
index f5a453307..68d40bc9f 100644
--- a/src/libs/installer/metadatajob.cpp
+++ b/src/libs/installer/metadatajob.cpp
@@ -135,7 +135,7 @@ void MetadataJob::doStart()
items.append(item);
}
else {
- qCWarning(QInstaller::lcGeneral) << "Trying to parse compressed repo as "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Trying to parse compressed repo as "
"normal repository. Check repository syntax.";
}
}
@@ -197,7 +197,7 @@ void MetadataJob::startUnzipRepositoryTask(const Repository &repo)
{
QTemporaryDir tempRepoDir(QDir::tempPath() + QLatin1String("/compressedRepo-XXXXXX"));
if (!tempRepoDir.isValid()) {
- qCWarning(QInstaller::lcGeneral) << "Cannot create unique temporary directory.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot create unique temporary directory.";
return;
}
tempRepoDir.setAutoRemove(false);
@@ -293,10 +293,10 @@ void MetadataJob::xmlTaskFinished()
if (e.type() == AuthenticationRequiredException::Type::Proxy) {
const QNetworkProxy proxy = e.proxy();
ProxyCredentialsDialog proxyCredentials(proxy);
- qCWarning(QInstaller::lcGeneral) << e.message();
+ qCWarning(QInstaller::lcInstallerInstallLog) << e.message();
if (proxyCredentials.exec() == QDialog::Accepted) {
- qCDebug(QInstaller::lcGeneral) << "Retrying with new credentials ...";
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Retrying with new credentials ...";
PackageManagerProxyFactory *factory = m_core->proxyFactory();
factory->setProxyCredentials(proxy, proxyCredentials.userName(),
@@ -308,7 +308,7 @@ void MetadataJob::xmlTaskFinished()
emitFinishedWithError(QInstaller::DownloadError, tr("Missing proxy credentials."));
}
} else if (e.type() == AuthenticationRequiredException::Type::Server) {
- qCWarning(QInstaller::lcGeneral) << e.message();
+ qCWarning(QInstaller::lcInstallerInstallLog) << e.message();
ServerAuthenticationDialog dlg(e.message(), e.taskItem());
if (dlg.exec() == QDialog::Accepted) {
Repository original = e.taskItem().value(TaskRole::UserRole)
@@ -430,7 +430,7 @@ void MetadataJob::metadataTaskFinished()
.arg(item.value(TaskRole::SourceFile).toString());
if (m_core->settings().allowUnstableComponents()) {
m_shaMissmatchPackages.append(item.value(TaskRole::Name).toString());
- qCWarning(QInstaller::lcGeneral) << mismatchMessage;
+ qCWarning(QInstaller::lcInstallerInstallLog) << mismatchMessage;
} else {
throw QInstaller::TaskException(mismatchMessage);
}
@@ -545,7 +545,7 @@ MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &re
Metadata metadata;
QTemporaryDir tmp(QDir::tempPath() + QLatin1String("/remoterepo-XXXXXX"));
if (!tmp.isValid()) {
- qCWarning(QInstaller::lcGeneral) << "Cannot create unique temporary directory.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot create unique temporary directory.";
return XmlDownloadFailure;
}
@@ -555,13 +555,13 @@ MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &re
QFile file(result.target());
if (!file.rename(metadata.directory + QLatin1String("/Updates.xml"))) {
- qCWarning(QInstaller::lcGeneral) << "Cannot rename target to Updates.xml:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot rename target to Updates.xml:"
<< file.errorString();
return XmlDownloadFailure;
}
if (!file.open(QIODevice::ReadOnly)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot open Updates.xml for reading:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot open Updates.xml for reading:"
<< file.errorString();
return XmlDownloadFailure;
}
@@ -569,7 +569,7 @@ MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &re
QString error;
QDomDocument doc;
if (!doc.setContent(&file, &error)) {
- qCWarning(QInstaller::lcGeneral).nospace() << "Cannot fetch a valid version of Updates.xml from repository "
+ qCWarning(QInstaller::lcInstallerInstallLog).nospace() << "Cannot fetch a valid version of Updates.xml from repository "
<< metadata.repository.displayname() << ": " << error;
//If there are other repositories, try to use those
continue;
@@ -705,7 +705,7 @@ MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &re
<< oldRepository.displayname() << "with" << newRepository.displayname();
}
} else {
- qCWarning(QInstaller::lcGeneral) << "Invalid additional repositories action set "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Invalid additional repositories action set "
"in Updates.xml fetched from" << metadata.repository.displayname()
<< "line:" << el.lineNumber();
}
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index f6b393b9d..de3ff4e6b 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -2283,7 +2283,7 @@ bool PackageManagerCore::killProcess(const QString &absoluteFilePath) const
processPath = QDir::cleanPath(processPath.replace(QLatin1Char('\\'), QLatin1Char('/')));
if (processPath == normalizedPath) {
- qCDebug(QInstaller::lcGeneral).nospace() << "try to kill process " << process.name
+ qCDebug(QInstaller::lcInstallerInstallLog).nospace() << "try to kill process " << process.name
<< " (" << process.id << ")";
//to keep the ui responsible use QtConcurrent::run
@@ -2298,7 +2298,7 @@ bool PackageManagerCore::killProcess(const QString &absoluteFilePath) const
if (!future.isFinished())
loop.exec();
- qCDebug(QInstaller::lcGeneral) << process.name << "killed!";
+ qCDebug(QInstaller::lcInstallerInstallLog) << process.name << "killed!";
return future.result();
}
}
@@ -2421,7 +2421,7 @@ bool PackageManagerCore::executeDetached(const QString &program, const QStringLi
QString adjustedWorkingDir = replaceVariables(workingDirectory);
foreach (const QString &argument, arguments)
adjustedArguments.append(replaceVariables(argument));
- qCDebug(QInstaller::lcGeneral) << "run application as detached process:" << adjustedProgram
+ qCDebug(QInstaller::lcInstallerInstallLog) << "run application as detached process:" << adjustedProgram
<< adjustedArguments << adjustedWorkingDir;
if (workingDirectory.isEmpty())
return QProcess::startDetached(adjustedProgram, adjustedArguments);
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index f08b88f09..1e18daf66 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -92,15 +92,15 @@ public:
{
if (!m_operation)
return;
- qCDebug(QInstaller::lcGeneral).noquote() << QString::fromLatin1("%1 %2 operation: %3")
+ qCDebug(QInstaller::lcInstallerInstallLog).noquote() << QString::fromLatin1("%1 %2 operation: %3")
.arg(state, m_operation->value(QLatin1String("component")).toString(), m_operation->name());
- qCDebug(QInstaller::lcGeneral).noquote() << QString::fromLatin1("\t- arguments: %1")
+ qCDebug(QInstaller::lcInstallerInstallLog).noquote() << QString::fromLatin1("\t- arguments: %1")
.arg(m_operation->arguments().join(QLatin1String(", ")));
}
~OperationTracer() {
if (!m_operation)
return;
- qCDebug(QInstaller::lcGeneral) << "Done";
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Done";
}
private:
Operation *m_operation;
@@ -254,13 +254,13 @@ PackageManagerCorePrivate::PackageManagerCorePrivate(PackageManagerCore *core, q
QScopedPointer<QInstaller::Operation> op(KDUpdater::UpdateOperationFactory::instance()
.create(operation.name, core));
if (op.isNull()) {
- qCWarning(QInstaller::lcGeneral) << "Failed to load unknown operation"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Failed to load unknown operation"
<< operation.name;
continue;
}
if (!op->fromXml(operation.xml)) {
- qCWarning(QInstaller::lcGeneral) << "Failed to load XML for operation"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Failed to load XML for operation"
<< operation.name;
continue;
}
@@ -665,7 +665,7 @@ void PackageManagerCorePrivate::setStatus(int status, const QString &error)
{
m_error = error;
if (!error.isEmpty())
- qCWarning(QInstaller::lcGeneral) << m_error;
+ qCWarning(QInstaller::lcInstallerInstallLog) << m_error;
if (m_status != status) {
m_status = status;
emit m_core->statusChanged(PackageManagerCore::Status(m_status));
@@ -884,7 +884,7 @@ void PackageManagerCorePrivate::readMaintenanceConfigFiles(const QString &target
} break;
case QXmlStreamReader::Invalid: {
- qCWarning(QInstaller::lcGeneral) << reader.errorString();
+ qCWarning(QInstaller::lcInstallerInstallLog) << reader.errorString();
} break;
default:
@@ -1024,7 +1024,7 @@ void PackageManagerCorePrivate::registerPathsForUninstallation(
void PackageManagerCorePrivate::writeMaintenanceToolBinary(QFile *const input, qint64 size, bool writeBinaryLayout)
{
QString maintenanceToolRenamedName = maintenanceToolName() + QLatin1String(".new");
- qCDebug(QInstaller::lcGeneral) << "Writing maintenance tool:" << maintenanceToolRenamedName;
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Writing maintenance tool:" << maintenanceToolRenamedName;
ProgressCoordinator::instance()->emitLabelAndDetailTextChanged(tr("Writing maintenance tool."));
QFile out(generateTemporaryFileName());
@@ -1086,10 +1086,10 @@ void PackageManagerCorePrivate::writeMaintenanceToolBinary(QFile *const input, q
if (setDefaultFilePermissions(&mt, DefaultFilePermissions::Executable))
qCDebug(QInstaller::lcGeneral) << "Wrote permissions for maintenance tool.";
else
- qCWarning(QInstaller::lcGeneral) << "Failed to write permissions for maintenance tool.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Failed to write permissions for maintenance tool.";
if (out.exists() && !out.remove()) {
- qCWarning(QInstaller::lcGeneral) << tr("Cannot remove temporary data file \"%1\": %2")
+ qCWarning(QInstaller::lcInstallerInstallLog) << tr("Cannot remove temporary data file \"%1\": %2")
.arg(out.fileName(), out.errorString());
}
}
@@ -1211,7 +1211,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
op = createOwnedOperation(QLatin1String("Mkdir"));
op->setArguments(QStringList() << (targetAppDirPath + QLatin1String("/../Resources/qt_menu.nib")));
if (!op->performOperation()) {
- qCWarning(QInstaller::lcGeneral) << "ERROR in Mkdir operation:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "ERROR in Mkdir operation:"
<< op->errorString();
}
@@ -1284,34 +1284,34 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper
bool replacementExists = false;
const QString installerBaseBinary = replaceVariables(m_installerBaseBinaryUnreplaced);
if (!installerBaseBinary.isEmpty() && QFileInfo(installerBaseBinary).exists()) {
- qCDebug(QInstaller::lcGeneral) << "Got a replacement installer base binary:"
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Got a replacement installer base binary:"
<< installerBaseBinary;
QFile replacementBinary(installerBaseBinary);
try {
QInstaller::openForRead(&replacementBinary);
writeMaintenanceToolBinary(&replacementBinary, replacementBinary.size(), true);
- qCDebug(QInstaller::lcGeneral) << "Wrote the binary with the new replacement.";
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Wrote the binary with the new replacement.";
newBinaryWritten = true;
replacementExists = true;
} catch (const Error &error) {
- qCWarning(QInstaller::lcGeneral) << error.message();
+ qCWarning(QInstaller::lcInstallerInstallLog) << 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.
- qCDebug(QInstaller::lcGeneral) << "Cannot remove installer base binary"
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Cannot remove installer base binary"
<< installerBaseBinary << "after updating the maintenance tool:"
<< replacementBinary.errorString();
} else {
- qCDebug(QInstaller::lcGeneral) << "Removed installer base binary"
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Removed installer base binary"
<< installerBaseBinary << "after updating the maintenance tool.";
}
m_installerBaseBinaryUnreplaced.clear();
} else if (!installerBaseBinary.isEmpty() && !QFileInfo(installerBaseBinary).exists()) {
- qCWarning(QInstaller::lcGeneral) << "The current maintenance tool could not be updated."
+ qCWarning(QInstaller::lcInstallerInstallLog) << "The current maintenance tool could not be updated."
<< installerBaseBinary << "does not exist. Please fix the \"setInstallerBaseBinary"
"(<temp_installer_base_binary_path>)\" call in your script.";
}
@@ -1500,7 +1500,7 @@ bool PackageManagerCorePrivate::runInstaller()
m_core->calculateComponentsToInstall();
const QList<Component*> componentsToInstall = m_core->orderedComponentsToInstall();
- qCDebug(QInstaller::lcGeneral) << "Install size:" << componentsToInstall.size()
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Install size:" << componentsToInstall.size()
<< "components";
callBeginInstallation(componentsToInstall);
@@ -1613,7 +1613,7 @@ bool PackageManagerCorePrivate::runInstaller()
setStatus(PackageManagerCore::Failure);
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("installationError"), tr("Error"), err.message());
- qCDebug(QInstaller::lcGeneral) << "ROLLING BACK operations="
+ qCDebug(QInstaller::lcInstallerInstallLog) << "ROLLING BACK operations="
<< m_performedOperationsCurrentSession.count();
}
@@ -1646,7 +1646,7 @@ bool PackageManagerCorePrivate::runPackageUpdater()
adminRightsGained = m_core->gainAdminRights();
const QList<Component *> componentsToInstall = m_core->orderedComponentsToInstall();
- qCDebug(QInstaller::lcGeneral) << "Install size:" << componentsToInstall.size()
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Install size:" << componentsToInstall.size()
<< "components";
callBeginInstallation(componentsToInstall);
@@ -1789,7 +1789,7 @@ bool PackageManagerCorePrivate::runPackageUpdater()
setStatus(PackageManagerCore::Failure);
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("installationError"), tr("Error"), err.message());
- qCDebug(QInstaller::lcGeneral) << "ROLLING BACK operations="
+ qCDebug(QInstaller::lcInstallerInstallLog) << "ROLLING BACK operations="
<< m_performedOperationsCurrentSession.count();
}
@@ -1847,7 +1847,7 @@ bool PackageManagerCorePrivate::runUninstaller()
if (updateAdminRights && !adminRightsGained)
adminRightsGained = m_core->gainAdminRights();
removeDirectoryThreaded(targetDir(), true);
- qCDebug(QInstaller::lcGeneral) << "Complete uninstallation was chosen.";
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Complete uninstallation was chosen.";
}
unregisterMaintenanceTool();
@@ -1908,7 +1908,7 @@ void PackageManagerCorePrivate::installComponent(Component *component, double pr
bool ignoreError = false;
bool ok = performOperationThreaded(operation);
while (!ok && !ignoreError && m_core->status() != PackageManagerCore::Canceled) {
- qCDebug(QInstaller::lcGeneral) << QString::fromLatin1("Operation \"%1\" with arguments "
+ qCDebug(QInstaller::lcInstallerInstallLog) << QString::fromLatin1("Operation \"%1\" with arguments "
"\"%2\" failed: %3").arg(operation->name(), operation->arguments()
.join(QLatin1String("; ")), operation->errorString());
const QMessageBox::StandardButton button =
@@ -1982,7 +1982,7 @@ bool PackageManagerCorePrivate::runningProcessesFound()
excludeFiles.append(maintenanceToolName());
QStringList runningProcesses = runningInstallerProcesses(excludeFiles);
if (!runningProcesses.isEmpty()) {
- qCWarning(QInstaller::lcGeneral()) << "Unable to update components. Please stop these processes: "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Unable to update components. Please stop these processes: "
<< runningProcesses << " and try again.";
return true;
}
@@ -2120,7 +2120,7 @@ void PackageManagerCorePrivate::runUndoOperations(const OperationList &undoOpera
becameAdmin = m_core->gainAdminRights();
connectOperationToInstaller(undoOperation, progressSize);
- qCDebug(QInstaller::lcGeneral) << "undo operation=" << undoOperation->name();
+ qCDebug(QInstaller::lcInstallerInstallLog) << "undo operation=" << undoOperation->name();
bool ignoreError = false;
bool ok = performOperationThreaded(undoOperation, PackageManagerCorePrivate::Undo);
@@ -2352,7 +2352,7 @@ bool PackageManagerCorePrivate::addUpdateResourcesFromRepositories(bool parseChe
try {
QInstaller::openForRead(&updatesFile);
} catch(const Error &e) {
- qCWarning(QInstaller::lcGeneral) << "Error opening Updates.xml:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Error opening Updates.xml:"
<< e.message();
setStatus(PackageManagerCore::Failure, tr("Cannot add temporary update source information."));
return false;
@@ -2363,7 +2363,7 @@ bool PackageManagerCorePrivate::addUpdateResourcesFromRepositories(bool parseChe
QString error;
QDomDocument doc;
if (!doc.setContent(&updatesFile, &error, &line, &column)) {
- qCWarning(QInstaller::lcGeneral).nospace() << "Parse error in file "
+ qCWarning(QInstaller::lcInstallerInstallLog).nospace() << "Parse error in file "
<< updatesFile.fileName() << ": " << error << " at line " << line
<< " col " << column;
setStatus(PackageManagerCore::Failure, tr("Cannot add temporary update source information."));
@@ -2477,7 +2477,7 @@ void PackageManagerCorePrivate::processFilesForDelayedDeletion()
foreach (const QString &i, filesForDelayedDeletion) {
QFile file(i); //TODO: this should happen asnyc and report errors, I guess
if (file.exists() && !file.remove()) {
- qCWarning(QInstaller::lcGeneral) << "Cannot delete file " << qPrintable(i) <<
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot delete file " << qPrintable(i) <<
": " << qPrintable(file.errorString());
m_filesForDelayedDeletion << i; // try again next time
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index f754987f7..797b5bc7d 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -327,11 +327,11 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
if (sheet.open(QIODevice::ReadOnly)) {
setStyleSheet(QString::fromLatin1(sheet.readAll()));
} else {
- qCWarning(QInstaller::lcGeneral) << "The specified style sheet file "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "The specified style sheet file "
"can not be opened.";
}
} else {
- qCWarning(QInstaller::lcGeneral) << "A style sheet file is specified, "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "A style sheet file is specified, "
"but it does not exist.";
}
}
@@ -469,7 +469,7 @@ void PackageManagerGui::setTextItems(QObject *object, const QStringList &items)
return;
}
- qCWarning(QInstaller::lcGeneral) << "Cannot set text items on object of type"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot set text items on object of type"
<< object->metaObject()->className() << ".";
}
@@ -526,7 +526,7 @@ void PackageManagerGui::clickButton(int wb, int delay)
if (QAbstractButton *b = button(static_cast<QWizard::WizardButton>(wb)))
QTimer::singleShot(delay, b, &QAbstractButton::click);
else
- qCWarning(QInstaller::lcGeneral) << "Button with type: " << d->buttonType(wb) << "not found!";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Button with type: " << d->buttonType(wb) << "not found!";
}
/*!
@@ -545,7 +545,7 @@ bool PackageManagerGui::isButtonEnabled(int wb)
if (QAbstractButton *b = button(static_cast<QWizard::WizardButton>(wb)))
return b->isEnabled();
- qCWarning(QInstaller::lcGeneral) << "Button with type: " << d->buttonType(wb) << "not found!";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Button with type: " << d->buttonType(wb) << "not found!";
return false;
}
@@ -761,7 +761,7 @@ QWidget *PackageManagerGui::pageByObjectName(const QString &name) const
if (p && p->objectName() == name)
return p;
}
- qCWarning(QInstaller::lcGeneral) << "No page found for object name" << name;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "No page found for object name" << name;
return nullptr;
}
@@ -789,7 +789,7 @@ QWidget *PackageManagerGui::pageWidgetByObjectName(const QString &name) const
return dp->widget();
return p;
}
- qCWarning(QInstaller::lcGeneral) << "No page found for object name" << name;
+ qCWarning(QInstaller::lcInstallerInstallLog) << "No page found for object name" << name;
return nullptr;
}
@@ -2419,7 +2419,7 @@ void ReadyForInstallationPage::entering()
// at the moment there is no better way to check this
if (targetVolume.size() == 0 && installVolumeAvailableSize == 0) {
- qCWarning(QInstaller::lcGeneral).nospace() << "Cannot determine available space on device. "
+ qCWarning(QInstaller::lcInstallerInstallLog).nospace() << "Cannot determine available space on device. "
"Volume descriptor: " << targetVolume.volumeDescriptor()
<< ", Mount path: " << targetVolume.mountPath() << ". Continue silently.";
return; // TODO: Shouldn't this also disable the "Next" button?
@@ -2427,11 +2427,11 @@ void ReadyForInstallationPage::entering()
const bool tempOnSameVolume = (targetVolume == tempVolume);
if (tempOnSameVolume) {
- qCDebug(QInstaller::lcGeneral) << "Tmp and install directories are on the same volume. "
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Tmp and install directories are on the same volume. "
"Volume mount point:" << targetVolume.mountPath() << "Free space available:"
<< humanReadableSize(installVolumeAvailableSize);
} else {
- qCDebug(QInstaller::lcGeneral) << "Tmp is on a different volume than the installation "
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Tmp is on a different volume than the installation "
"directory. Tmp volume mount point:"
<< tempVolume.mountPath() << "Free space available:"
<< humanReadableSize(tempVolumeAvailableSize) << "Install volume mount point:"
@@ -2458,7 +2458,7 @@ void ReadyForInstallationPage::entering()
required += repositorySize;
}
- qCDebug(QInstaller::lcGeneral) << "Installation space required:"
+ qCDebug(QInstaller::lcInstallerInstallLog) << "Installation space required:"
<< humanReadableSize(required) << "Temporary space "
"required:" << humanReadableSize(tempRequired) << "Local repository size:"
<< humanReadableSize(repositorySize);
@@ -2830,7 +2830,7 @@ void FinishedPage::handleFinishClicked()
if (!m_runItCheckBox->isChecked() || program.isEmpty())
return;
- qCDebug(QInstaller::lcGeneral) << "starting" << program << args;
+ qCDebug(QInstaller::lcInstallerInstallLog) << "starting" << program << args;
QProcess::startDetached(program, args);
}
diff --git a/src/libs/installer/qtpatch.cpp b/src/libs/installer/qtpatch.cpp
index 07559acbd..89b5dddf6 100644
--- a/src/libs/installer/qtpatch.cpp
+++ b/src/libs/installer/qtpatch.cpp
@@ -84,7 +84,7 @@ QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteA
QByteArray output = process.readAllStandardOutput();
qmakeOutput->append(output);
if (process.exitStatus() == QProcess::CrashExit) {
- qCWarning(QInstaller::lcGeneral) << qmake.absoluteFilePath() << args
+ qCWarning(QInstaller::lcInstallerInstallLog) << qmake.absoluteFilePath() << args
<< "crashed with exit code" << process.exitCode()
<< "standard output:" << output
<< "error output:" << process.readAllStandardError();
@@ -98,13 +98,13 @@ QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteA
QInstaller::uiDetachedWait(waitTimeInMilliSeconds);
}
if (process.state() > QProcess::NotRunning ) {
- qCWarning(QInstaller::lcGeneral) << "qmake process is still running, need to kill it.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "qmake process is still running, need to kill it.";
process.kill();
}
}
if (qmakeValueHash.isEmpty())
- qCWarning(QInstaller::lcGeneral) << "Cannot get any query output from qmake.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot get any query output from qmake.";
return qmakeValueHash;
}
@@ -114,15 +114,15 @@ bool QtPatch::patchBinaryFile(const QString &fileName,
{
QFile file(fileName);
if (!file.exists()) {
- qCWarning(QInstaller::lcGeneral) << "qpatch: warning: file" << fileName << "not found";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "qpatch: warning: file" << fileName << "not found";
return false;
}
openFileForPatching(&file);
if (!file.isOpen()) {
- qCWarning(QInstaller::lcGeneral) << "qpatch: warning: file" << qPrintable(fileName)
+ qCWarning(QInstaller::lcInstallerInstallLog) << "qpatch: warning: file" << qPrintable(fileName)
<< "cannot open.";
- qCWarning(QInstaller::lcGeneral).noquote() << file.errorString();
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote() << file.errorString();
return false;
}
@@ -138,7 +138,7 @@ bool QtPatch::patchBinaryFile(QIODevice *device,
const QByteArray &newQtPath)
{
if (!(device->openMode() == QIODevice::ReadWrite)) {
- qCWarning(QInstaller::lcGeneral) << "qpatch: warning: This function needs an "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "qpatch: warning: This function needs an "
"open device for writing.";
return false;
}
@@ -171,7 +171,7 @@ bool QtPatch::patchTextFile(const QString &fileName,
QFile file(fileName);
if (!file.open(QFile::ReadOnly)) {
- qCWarning(QInstaller::lcGeneral) << "Cannot open file" << fileName << "for patching:"
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot open file" << fileName << "for patching:"
<< file.errorString();
return false;
}
@@ -186,7 +186,7 @@ bool QtPatch::patchTextFile(const QString &fileName,
}
if (!file.open(QFile::WriteOnly | QFile::Truncate)) {
- qCWarning(QInstaller::lcGeneral) << "File" << fileName << "not writable.";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "File" << fileName << "not writable.";
return false;
}
@@ -206,7 +206,7 @@ bool QtPatch::openFileForPatching(QFile *file)
}
return file->openMode() == QFile::ReadWrite;
}
- qCWarning(QInstaller::lcGeneral) << "File" << file->fileName() << "is open, "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "File" << file->fileName() << "is open, "
"so it cannot be opened again.";
return false;
}
diff --git a/src/libs/installer/scriptengine_p.h b/src/libs/installer/scriptengine_p.h
index 67d642ff8..928f903cb 100644
--- a/src/libs/installer/scriptengine_p.h
+++ b/src/libs/installer/scriptengine_p.h
@@ -50,7 +50,7 @@ public:
ConsoleProxy() {}
public slots :
- void log(const QString &log) { qCDebug(QInstaller::lcGeneral).noquote() << log; }
+ void log(const QString &log) { qCDebug(QInstaller::lcInstallerInstallLog).noquote() << log; }
};
class InstallerProxy : public QObject
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index 618773937..4fd006d01 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -85,12 +85,12 @@ static void raiseError(QXmlStreamReader &reader, const QString &error, Settings:
} else {
QFile *xmlFile = qobject_cast<QFile*>(reader.device());
if (xmlFile) {
- qCWarning(QInstaller::lcGeneral).noquote().nospace()
+ qCWarning(QInstaller::lcInstallerInstallLog).noquote().nospace()
<< "Ignoring following settings reader error in " << xmlFile->fileName()
<< ", line " << reader.lineNumber() << ", column " << reader.columnNumber()
<< ": " << error;
} else {
- qCWarning(QInstaller::lcGeneral) << "Ignoring following settings reader error: "
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Ignoring following settings reader error: "
<< qPrintable(error);
}
}
diff --git a/src/libs/installer/settingsoperation.cpp b/src/libs/installer/settingsoperation.cpp
index 5f16a47e1..e45416663 100644
--- a/src/libs/installer/settingsoperation.cpp
+++ b/src/libs/installer/settingsoperation.cpp
@@ -179,14 +179,14 @@ bool SettingsOperation::undoOperation()
if (cleanUp) {
QFile settingsFile(path);
if (!settingsFile.remove())
- qCWarning(QInstaller::lcGeneral).noquote() << settingsFile.errorString();
+ qCWarning(QInstaller::lcInstallerUninstallLog).noquote() << settingsFile.errorString();
if (!value(QLatin1String("createddir")).toString().isEmpty()) {
KDUpdater::MkdirOperation mkDirOperation(packageManager());
mkDirOperation.setArguments(QStringList() << QFileInfo(path).absolutePath());
mkDirOperation.setValue(QLatin1String("createddir"), value(QLatin1String("createddir")));
if (!mkDirOperation.undoOperation()) {
- qCWarning(QInstaller::lcGeneral).noquote() << mkDirOperation.errorString();
+ qCWarning(QInstaller::lcInstallerUninstallLog).noquote() << mkDirOperation.errorString();
}
}
}
diff --git a/src/libs/kdtools/filedownloader.cpp b/src/libs/kdtools/filedownloader.cpp
index f134ce883..b816b5fd5 100644
--- a/src/libs/kdtools/filedownloader.cpp
+++ b/src/libs/kdtools/filedownloader.cpp
@@ -1575,7 +1575,7 @@ void KDUpdater::HttpDownloader::onSslErrors(QNetworkReply* reply, const QList<QS
errorString += QLatin1String(", ");
errorString += error.errorString();
}
- qCWarning(QInstaller::lcGeneral) << errorString;
+ qCWarning(QInstaller::lcInstallerInstallLog) << errorString;
const QStringList arguments = QCoreApplication::arguments();
if (arguments.contains(QLatin1String("--script")) || arguments.contains(QLatin1String("Script"))
diff --git a/src/libs/kdtools/filedownloaderfactory.cpp b/src/libs/kdtools/filedownloaderfactory.cpp
index a61e5b195..098c03c6d 100644
--- a/src/libs/kdtools/filedownloaderfactory.cpp
+++ b/src/libs/kdtools/filedownloaderfactory.cpp
@@ -69,7 +69,7 @@ FileDownloaderFactory::FileDownloaderFactory()
if (QSslSocket::supportsSsl())
registerFileDownloader<HttpDownloader>(QLatin1String("https"));
else
- qCWarning(QInstaller::lcGeneral) << "Cannot register file downloader for https protocol: QSslSocket::supportsSsl() returns false";
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Cannot register file downloader for https protocol: QSslSocket::supportsSsl() returns false";
#endif
d->m_followRedirects = false;
diff --git a/src/libs/kdtools/updateoperation.cpp b/src/libs/kdtools/updateoperation.cpp
index b95f6f5a3..0a61c0105 100644
--- a/src/libs/kdtools/updateoperation.cpp
+++ b/src/libs/kdtools/updateoperation.cpp
@@ -249,7 +249,7 @@ QString UpdateOperation::argumentKeyValue(const QString &key, const QString &def
it = std::find_if(++it, tArguments.end(), StartsWith(keySeparater));
if (it != tArguments.end()) {
- qCWarning(QInstaller::lcGeneral).nospace() << "There are multiple keys in the arguments calling "
+ qCWarning(QInstaller::lcInstallerInstallLog).nospace() << "There are multiple keys in the arguments calling "
<< name() << ". " << "Only the first found " << key << " is used: "
<< arguments().join(QLatin1String("; "));
}
@@ -518,7 +518,7 @@ bool UpdateOperation::fromXml(const QString &xml)
int errorLine;
int errorColumn;
if (!doc.setContent( xml, &errorMsg, &errorLine, &errorColumn)) {
- qCWarning(QInstaller::lcGeneral) << "Error parsing xml error=" << errorMsg
+ qCWarning(QInstaller::lcInstallerInstallLog) << "Error parsing xml error=" << errorMsg
<< "line=" << errorLine << "column=" << errorColumn;
return false;
}