diff options
-rw-r--r-- | src/libs/installer/componentselectionpage_p.cpp | 3 | ||||
-rw-r--r-- | src/libs/installer/keepaliveobject.cpp | 7 | ||||
-rw-r--r-- | src/libs/installer/loggingutils.cpp | 2 | ||||
-rw-r--r-- | tests/auto/installer/registerfiletypeoperation/tst_registerfiletypeoperation.cpp | 3 | ||||
-rw-r--r-- | tests/auto/tools/repotest/tst_repotest.cpp | 2 | ||||
-rw-r--r-- | tools/repocompare/repositorymanager.cpp | 1 |
6 files changed, 11 insertions, 7 deletions
diff --git a/src/libs/installer/componentselectionpage_p.cpp b/src/libs/installer/componentselectionpage_p.cpp index a9f4ba134..c333195c1 100644 --- a/src/libs/installer/componentselectionpage_p.cpp +++ b/src/libs/installer/componentselectionpage_p.cpp @@ -399,10 +399,9 @@ void ComponentSelectionPagePrivate::fetchRepositoryCategories() { updateWidgetVisibility(true); - QCheckBox *checkbox; QList<QCheckBox*> checkboxes = m_categoryGroupBox->findChildren<QCheckBox *>(); for (int i = 0; i < checkboxes.count(); i++) { - checkbox = checkboxes.at(i); + QCheckBox *checkbox = checkboxes.at(i); enableRepositoryCategory(checkbox->objectName(), checkbox->isChecked()); } diff --git a/src/libs/installer/keepaliveobject.cpp b/src/libs/installer/keepaliveobject.cpp index 94e91efd8..18ec9743a 100644 --- a/src/libs/installer/keepaliveobject.cpp +++ b/src/libs/installer/keepaliveobject.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -48,7 +48,12 @@ KeepAliveObject::KeepAliveObject() void KeepAliveObject::start() { + if (m_timer) + delete m_timer; m_timer = new QTimer(this); + + if (m_socket) + delete m_socket; m_socket = new QLocalSocket(this); connect(m_timer, &QTimer::timeout, [this]() { diff --git a/src/libs/installer/loggingutils.cpp b/src/libs/installer/loggingutils.cpp index 0ebba10db..45f7aab1b 100644 --- a/src/libs/installer/loggingutils.cpp +++ b/src/libs/installer/loggingutils.cpp @@ -259,7 +259,7 @@ void LoggingHandler::printComponentInfo(const QList<Component *> components) con QDomElement root = doc.createElement(QLatin1String("updates")); doc.appendChild(root); - foreach (Component *component, components) { + foreach (const Component *component, components) { QDomElement update = doc.createElement(QLatin1String("update")); update.setAttribute(QLatin1String("name"), component->value(scDisplayName)); update.setAttribute(QLatin1String("version"), component->value(scVersion)); diff --git a/tests/auto/installer/registerfiletypeoperation/tst_registerfiletypeoperation.cpp b/tests/auto/installer/registerfiletypeoperation/tst_registerfiletypeoperation.cpp index 5a4377d7b..3e3005621 100644 --- a/tests/auto/installer/registerfiletypeoperation/tst_registerfiletypeoperation.cpp +++ b/tests/auto/installer/registerfiletypeoperation/tst_registerfiletypeoperation.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -80,7 +80,6 @@ private slots: QInstaller::init(); QString randomString = ""; const QString possible = "abcdefghijklmnopqrstuvwxyz0123456789"; - qsrand(QTime::currentTime().msec()); for (int i = 0; i < 5; i++) { int index = QRandomGenerator::global()->generate() % possible.length(); QChar nextChar = possible.at(index); diff --git a/tests/auto/tools/repotest/tst_repotest.cpp b/tests/auto/tools/repotest/tst_repotest.cpp index 228c13c80..c467d21d2 100644 --- a/tests/auto/tools/repotest/tst_repotest.cpp +++ b/tests/auto/tools/repotest/tst_repotest.cpp @@ -44,7 +44,7 @@ private: { QStringList filteredPackages; - QInstallerTools::PackageInfoVector m_packages = QInstallerTools::collectPackages(m_repoInfo, + m_packages = QInstallerTools::collectPackages(m_repoInfo, &filteredPackages, QInstallerTools::Exclude, updateNewComponents, packagesUpdatedWithSha); if (updateNewComponents) { //Verify that component B exists as that is not updated diff --git a/tools/repocompare/repositorymanager.cpp b/tools/repocompare/repositorymanager.cpp index 3fb863eaf..e4405d103 100644 --- a/tools/repocompare/repositorymanager.cpp +++ b/tools/repocompare/repositorymanager.cpp @@ -120,6 +120,7 @@ void RepositoryManager::createRepositoryMap(const QByteArray &data, QMap<QString currentDescription.updateText.clear(); currentDescription.version.clear(); currentDescription.checksum.clear(); + currentDescription.update = false; } if (reader.name() == QLatin1String("SHA1")) currentDescription.checksum = reader.readElementText(); |