summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-11-16 17:23:30 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-12-21 10:16:32 +0200
commit347d9cd8525a0baadbd4822465248905877babd3 (patch)
treea9a7aa98f32008cfdc11132842fe63eb7113be05
parent7ba80f53f3f493e6b66c9867a9f31cbdcf364466 (diff)
Fix deprecation warnings from building with Qt 5.15.2
Also update build version requirements. Task-number: QTIFW-2388 Change-Id: Iae1949548dda7a3b8d448228e27060efb5abd8eb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--INSTALL6
-rw-r--r--README4
-rw-r--r--coin/instructions/execute_license_check.yaml2
-rw-r--r--coin/module_config.yaml2
-rw-r--r--doc/installerfw-getting-started.qdoc10
-rw-r--r--installerfw.pro4
-rw-r--r--src/libs/ifwtools/repositorygen.cpp6
-rw-r--r--src/libs/installer/abstractarchive.h1
-rw-r--r--src/libs/installer/component.cpp10
-rw-r--r--src/libs/installer/componentmodel.cpp4
-rw-r--r--src/libs/installer/createdesktopentryoperation.cpp2
-rw-r--r--src/libs/installer/fakestopprocessforupdateoperation.cpp2
-rw-r--r--src/libs/installer/fileutils.cpp4
-rw-r--r--src/libs/installer/graph.h2
-rw-r--r--src/libs/installer/installercalculator.cpp3
-rw-r--r--src/libs/installer/installiconsoperation.cpp2
-rw-r--r--src/libs/installer/packagemanagercore.cpp13
-rw-r--r--src/libs/installer/settings.cpp16
-rw-r--r--src/libs/installer/sysinfo_win.cpp2
-rw-r--r--src/libs/installer/uninstallercalculator.cpp7
-rw-r--r--src/libs/kdtools/kdsysinfo_win.cpp2
-rw-r--r--src/libs/kdtools/localpackagehub.cpp4
-rw-r--r--src/libs/kdtools/sysinfo.cpp2
-rw-r--r--src/libs/kdtools/sysinfo_x11.cpp4
-rw-r--r--src/libs/kdtools/updatefinder.cpp2
-rw-r--r--src/sdk/main.cpp8
-rw-r--r--src/sdk/sdkapp.h10
-rw-r--r--tests/auto/installer/appendfileoperation/tst_appendfileoperation.cpp2
-rw-r--r--tests/auto/installer/createdesktopentryoperation/tst_createdesktopentryoperation.cpp2
-rw-r--r--tests/auto/installer/installiconsoperation/tst_installiconsoperation.cpp2
-rw-r--r--tests/auto/installer/lib7zarchive/tst_lib7zarchive.cpp1
-rw-r--r--tests/auto/installer/linereplaceoperation/tst_linereplaceoperation.cpp2
-rw-r--r--tests/auto/installer/replaceoperation/tst_replaceoperation.cpp4
33 files changed, 79 insertions, 68 deletions
diff --git a/INSTALL b/INSTALL
index 8d1b934c6..a238aa0a1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,9 +15,9 @@ http://code.qt.io/cgit/installer-framework/installer-framework.git/
Build a static Qt
---------------------
-Building the Qt Installer Framework from sources requires at least Qt version 5.12.7.
-Supported compilers are MSVC 2013 or newer, GCC 4.7 or newer,
-and Clang 3.1 or newer. Currently, the tested combination for Windows is Qt 5.12.7 with MSVC 2015.
+Building the Qt Installer Framework from sources requires at least Qt version 5.15.2.
+Supported compilers are MSVC 2015 or newer, GCC 5 or newer,
+and Clang 11.0.0 or newer. Currently, the tested combination for Windows is Qt 5.15.2 with MSVC 2015 (Windows 10).
If you want to ship your installer as a single file you have to build
Qt and the Qt Installer Framework statically.
diff --git a/README b/README
index 194e5db83..cd57790dd 100644
--- a/README
+++ b/README
@@ -13,8 +13,8 @@ doc directory. The documentation is also available online at
Notes
--------------------------
-To build an installer, it is advised to use a statically linked Qt (5.12.7 or
-newer). The tested and supported Qt version is 5.12.7.
+To build an installer, it is advised to use a statically linked Qt (5.15.2 or
+newer). The tested and supported Qt version is 5.15.2.
See the documentation at
https://doc.qt.io/qtinstallerframework/ifw-getting-started.html
diff --git a/coin/instructions/execute_license_check.yaml b/coin/instructions/execute_license_check.yaml
index 603201a93..f5d2852f2 100644
--- a/coin/instructions/execute_license_check.yaml
+++ b/coin/instructions/execute_license_check.yaml
@@ -11,7 +11,7 @@ instructions:
maxTimeInSeconds: 600
maxTimeBetweenOutput: 600
project: qt/qtbase
- ref: 5.12.7
+ ref: 5.15.2
directory: qt/qtbase
userMessageOnFailure: "Could not install qt/base source archive. Please investigate why."
- type: ChangeDirectory
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index c0e84c92d..558036480 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -56,7 +56,7 @@ run_license_check: &run_license_check
maxTimeInSeconds: 600
maxTimeBetweenOutput: 600
project: qt/qtbase
- ref: 5.12
+ ref: 5.15
directory: qt/qtbase
userMessageOnFailure: "Could not install qt/base source archive. Please investigate why."
- type: ChangeDirectory
diff --git a/doc/installerfw-getting-started.qdoc b/doc/installerfw-getting-started.qdoc
index cfb302544..f2ef1dd38 100644
--- a/doc/installerfw-getting-started.qdoc
+++ b/doc/installerfw-getting-started.qdoc
@@ -45,8 +45,8 @@
\list
\li Microsoft Windows 7, and later
- \li Ubuntu Linux 16.04, and later
- \li macOS 10.12, and later
+ \li Ubuntu Linux 18.04, and later
+ \li macOS 10.13, and later
\endlist
\section1 Building from Sources
@@ -58,8 +58,8 @@
\section2 Supported Compilers
The Qt Installer Framework can be compiled with Microsoft Visual Studio
- 2013 and newer, GCC 4.7 and newer, and Clang 3.1 and newer. Currently, the
- tested combination for Windows is Qt 5.12.4 with MSVC 2015.
+ 2015 and newer, GCC 5 and newer, and Clang 11.0.0 and newer. Currently, the
+ tested combination for Windows is Qt 5.15.2 with MSVC 2015 (Windows 10).
\section2 Configuring Qt
@@ -69,7 +69,7 @@
from http://doc.qt.io/qt-5/ssl.html if you are statically linking against
OpenSSL libraries.
- The supported Qt version is 5.12.7.
+ The supported Qt version is 5.15.2.
\section3 Configuring Qt for Windows
diff --git a/installerfw.pro b/installerfw.pro
index 9d6a7fb68..ee9e5b1cc 100644
--- a/installerfw.pro
+++ b/installerfw.pro
@@ -20,7 +20,7 @@ isEmpty(BUILD_EXAMPLES):BUILD_EXAMPLES=$${BUILDEXAMPLES}
examples.depends = src
}
-!minQtVersion(5, 12, 7) {
+!minQtVersion(5, 15, 2) {
message("Cannot build Qt Installer Framework with Qt version $${QT_VERSION}.")
- error("Use at least Qt 5.12.7.")
+ error("Use at least Qt 5.15.2.")
}
diff --git a/src/libs/ifwtools/repositorygen.cpp b/src/libs/ifwtools/repositorygen.cpp
index a045c5248..874d88494 100644
--- a/src/libs/ifwtools/repositorygen.cpp
+++ b/src/libs/ifwtools/repositorygen.cpp
@@ -525,7 +525,7 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QStringList &packa
.arg(QDir::toNativeSeparators(fileInfo.absoluteFilePath()), info.version));
}
info.dependencies = packageElement.firstChildElement(QLatin1String("Dependencies")).text()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
info.directory = it->filePath();
if (packagesUpdatedWithSha.contains(info.name)) {
info.createContentSha1Node = true;
@@ -663,10 +663,10 @@ PackageInfoVector QInstallerTools::createListOfRepositoryPackages(const QStringL
const QDomElement c2Element = c2.at(j).toElement();
if (c2Element.tagName() == QInstaller::scDependencies)
info.dependencies = c2Element.text()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
else if (c2Element.tagName() == QInstaller::scDownloadableArchives) {
QStringList names = c2Element.text()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
foreach (const QString &name, names) {
info.copiedFiles.append(QString::fromLatin1("%1/%3%2").arg(info.directory,
name, info.version));
diff --git a/src/libs/installer/abstractarchive.h b/src/libs/installer/abstractarchive.h
index 77cc35b61..55489eb14 100644
--- a/src/libs/installer/abstractarchive.h
+++ b/src/libs/installer/abstractarchive.h
@@ -49,7 +49,6 @@ struct INSTALLER_EXPORT ArchiveEntry
, compressedSize(0)
, uncompressedSize(0)
, permissions_mode(0)
- , permissions_enum(0)
{}
QString path;
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 1a83291c1..21daa795c 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -352,12 +352,12 @@ void Component::loadDataFromPackage(const Package &package)
setLocalTempPath(QInstaller::pathFromUrl(package.packageSource().url));
const QStringList uis = package.data(QLatin1String("UserInterfaces")).toString()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
if (!uis.isEmpty())
loadUserInterfaces(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), uis);
#ifndef IFW_DISABLE_TRANSLATIONS
const QStringList qms = package.data(QLatin1String("Translations")).toString()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
if (!qms.isEmpty())
loadTranslations(QDir(QString::fromLatin1("%1/%2").arg(localTempPath(), name())), qms);
#endif
@@ -1329,7 +1329,7 @@ void Component::addDependency(const QString &newDependency)
QStringList Component::dependencies() const
{
- return d->m_vars.value(scDependencies).split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ return d->m_vars.value(scDependencies).split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
}
/*!
@@ -1352,7 +1352,7 @@ void Component::addAutoDependOn(const QString &newDependOn)
QStringList Component::autoDependencies() const
{
- return d->m_vars.value(scAutoDependOn).split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ return d->m_vars.value(scAutoDependOn).split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
}
/*!
@@ -1383,7 +1383,7 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
// essential updates needs to be installed first, otherwise non-essential components
// will be installed
if (packageManagerCore()->foundEssentialUpdate()) {
- const QSet<QString> autoDependOnSet = autoDependOnList.toSet();
+ const QSet<QString> autoDependOnSet(autoDependOnList.begin(), autoDependOnList.end());
if (componentsToInstall.contains(autoDependOnSet)) {
foreach (const QString &autoDep, autoDependOnSet) {
Component *component = packageManagerCore()->componentByName(autoDep);
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 56ee57fc6..3862f8dc5 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -252,7 +252,9 @@ bool ComponentModel::setData(const QModelIndex &index, const QVariant &value, in
if (role == Qt::CheckStateRole) {
if (index.column() != 0)
return false;
- ComponentSet nodes = component->childItems().toSet();
+
+ const QList<Component*> childItems = component->childItems();
+ ComponentSet nodes(childItems.begin(), childItems.end());
Qt::CheckState newValue = Qt::CheckState(value.toInt());
if (newValue == Qt::PartiallyChecked) {
const Qt::CheckState oldValue = component->checkState();
diff --git a/src/libs/installer/createdesktopentryoperation.cpp b/src/libs/installer/createdesktopentryoperation.cpp
index 1a56c193c..6c92cc178 100644
--- a/src/libs/installer/createdesktopentryoperation.cpp
+++ b/src/libs/installer/createdesktopentryoperation.cpp
@@ -60,7 +60,7 @@ QString CreateDesktopEntryOperation::absoluteFileName()
QStringList XDG_DATA_HOME = QString::fromLocal8Bit(qgetenv("XDG_DATA_HOME"))
.split(QLatin1Char(':'),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
XDG_DATA_HOME.push_back(QDir::home().absoluteFilePath(QLatin1String(".local/share"))); // default user-specific path
diff --git a/src/libs/installer/fakestopprocessforupdateoperation.cpp b/src/libs/installer/fakestopprocessforupdateoperation.cpp
index 36892eac7..67d60a92f 100644
--- a/src/libs/installer/fakestopprocessforupdateoperation.cpp
+++ b/src/libs/installer/fakestopprocessforupdateoperation.cpp
@@ -68,7 +68,7 @@ bool FakeStopProcessForUpdateOperation::undoOperation()
return false;
}
- QStringList processes = arguments().at(0).split(QLatin1Char(','), QString::SkipEmptyParts);
+ QStringList processes = arguments().at(0).split(QLatin1Char(','), Qt::SkipEmptyParts);
for (int i = processes.count() - 1; i >= 0; --i) {
if (!core->isProcessRunning(processes.at(i)))
processes.removeAt(i);
diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp
index 8c015a1c2..d534b3651 100644
--- a/src/libs/installer/fileutils.cpp
+++ b/src/libs/installer/fileutils.cpp
@@ -78,7 +78,7 @@ TempDirDeleter::TempDirDeleter(const QString &path)
}
TempDirDeleter::TempDirDeleter(const QStringList &paths)
- : m_paths(paths.toSet())
+ : m_paths(QSet<QString>(paths.begin(), paths.end()))
{
}
@@ -99,7 +99,7 @@ void TempDirDeleter::add(const QString &path)
void TempDirDeleter::add(const QStringList &paths)
{
- m_paths += paths.toSet();
+ m_paths += QSet<QString>(paths.begin(), paths.end());
}
void TempDirDeleter::releaseAndDeleteAll()
diff --git a/src/libs/installer/graph.h b/src/libs/installer/graph.h
index 5f330e69b..49da9c2ed 100644
--- a/src/libs/installer/graph.h
+++ b/src/libs/installer/graph.h
@@ -63,7 +63,7 @@ public:
QList<T> edges(const T &node) const
{
- return m_graph.value(node).toList();
+ return m_graph.value(node).values();
}
void addEdge(const T &node, const T &edge)
diff --git a/src/libs/installer/installercalculator.cpp b/src/libs/installer/installercalculator.cpp
index 363837dd1..ba8bf9db3 100644
--- a/src/libs/installer/installercalculator.cpp
+++ b/src/libs/installer/installercalculator.cpp
@@ -164,7 +164,8 @@ bool InstallerCalculator::appendComponentsToInstall(const QList<Component *> &co
bool InstallerCalculator::appendComponentToInstall(Component *component, const QString &version)
{
- QSet<QString> allDependencies = component->dependencies().toSet();
+ const QStringList dependenciesList = component->dependencies();
+ QSet<QString> allDependencies(dependenciesList.begin(), dependenciesList.end());
QString requiredDependencyVersion = version;
foreach (const QString &dependencyComponentName, allDependencies) {
// PackageManagerCore::componentByName returns 0 if dependencyComponentName contains a
diff --git a/src/libs/installer/installiconsoperation.cpp b/src/libs/installer/installiconsoperation.cpp
index cfb5a9536..5927ebf74 100644
--- a/src/libs/installer/installiconsoperation.cpp
+++ b/src/libs/installer/installiconsoperation.cpp
@@ -54,7 +54,7 @@ QString InstallIconsOperation::targetDirectory()
QStringList XDG_DATA_HOME = QString::fromLocal8Bit(qgetenv("XDG_DATA_HOME"))
.split(QLatin1Char(':'),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
XDG_DATA_HOME.push_back(QDir::home().absoluteFilePath(QLatin1String(".local/share"))); // default user-specific path
if (AdminAuthorization::hasAdminRights() || RemoteClient::instance().isActive())
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 75cd4a4cf..e17444be6 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -1225,7 +1225,8 @@ PackageManagerCore::PackageManagerCore(qint64 magicmaker, const QList<OperationB
// Sanity check to detect a broken installations with missing operations.
// Every installed package should have at least one MinimalProgress operation.
//
- QSet<QString> installedPackages = d->m_core->localInstalledPackages().keys().toSet();
+ const QStringList localPackageList = d->m_core->localInstalledPackages().keys();
+ QSet<QString> installedPackages(localPackageList.begin(), localPackageList.end());
QSet<QString> operationPackages;
foreach (QInstaller::Operation *operation, d->m_performedOperationsOld) {
if (operation->hasValue(QLatin1String("component")))
@@ -2110,7 +2111,9 @@ bool PackageManagerCore::calculateComponentsToUninstall() const
emit aboutCalculateComponentsToUninstall();
if (!isUpdater()) {
// hack to avoid removing needed dependencies
- QSet<Component*> componentsToInstall = d->installerCalculator()->orderedComponentsToInstall().toSet();
+ const QList<Component *> componentsToInstallList
+ = d->installerCalculator()->orderedComponentsToInstall();
+ QSet<Component*> componentsToInstall(componentsToInstallList.begin(), componentsToInstallList.end());
QList<Component*> componentsToUninstall;
foreach (Component *component, components(ComponentType::All)) {
@@ -3684,7 +3687,7 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
// add downloadable archive from xml
const QStringList downloadableArchives = data.package->data(scDownloadableArchives).toString()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
if (component->isFromOnlineRepository()) {
foreach (const QString downloadableArchive, downloadableArchives)
@@ -3692,7 +3695,7 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
}
const QStringList componentsToReplace = data.package->data(scReplaces).toString()
- .split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ .split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
if (!componentsToReplace.isEmpty()) {
// Store the component (this is a component that replaces others) and all components that
@@ -3873,7 +3876,7 @@ bool PackageManagerCore::fetchUpdaterPackages(const PackagesList &remotes, const
bool isValidUpdate = locals.contains(name);
if (!isValidUpdate && !replaces.isEmpty()) {
const QStringList possibleNames = replaces.split(QInstaller::commaRegExp(),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
foreach (const QString &possibleName, possibleNames) {
if (locals.contains(possibleName)) {
isValidUpdate = true;
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index 537f6060b..c64a33382 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -132,7 +132,7 @@ static QStringList readArgumentAttributes(QXmlStreamReader &reader, Settings::Pa
if (reader.isWhitespace())
continue;
arguments.append(reader.text().toString().split(QRegularExpression(QLatin1String("\\s+")),
- QString::SkipEmptyParts));
+ Qt::SkipEmptyParts));
}
break;
case QXmlStreamReader::EndElement: {
@@ -713,7 +713,7 @@ Settings::Update Settings::updateRepositoryCategories(const RepoHash &updates)
}
}
if (update) {
- categories = categoriesList.toSet();
+ categories = QSet<RepositoryCategory>(categoriesList.begin(), categoriesList.end());
setRepositoryCategories(categories);
}
return update ? Settings::UpdatesApplied : Settings::NoUpdatesApplied;
@@ -764,8 +764,10 @@ Settings::Update Settings::updateDefaultRepositories(const RepoHash &updates)
}
const bool updated = apply(updates, &defaultRepos);
- if (updated)
- setDefaultRepositories(defaultRepos.values().toSet());
+ if (updated) {
+ const QList<Repository> repositoriesList = defaultRepos.values();
+ setDefaultRepositories(QSet<Repository>(repositoriesList.begin(), repositoriesList.end()));
+ }
return updated ? Settings::UpdatesApplied : Settings::NoUpdatesApplied;
}
@@ -816,8 +818,10 @@ Settings::Update Settings::updateUserRepositories(const RepoHash &updates)
}
const bool updated = apply(updates, &reposToUpdate);
- if (updated)
- setUserRepositories(reposToUpdate.values().toSet());
+ if (updated) {
+ const QList<Repository> repositoriesList = reposToUpdate.values();
+ setUserRepositories(QSet<Repository>(repositoriesList.begin(), repositoriesList.end()));
+ }
return updated ? Settings::UpdatesApplied : Settings::NoUpdatesApplied;
}
diff --git a/src/libs/installer/sysinfo_win.cpp b/src/libs/installer/sysinfo_win.cpp
index 508ce7a6e..12ffbcdd7 100644
--- a/src/libs/installer/sysinfo_win.cpp
+++ b/src/libs/installer/sysinfo_win.cpp
@@ -109,7 +109,7 @@ QList<VolumeInfo> localVolumeInfosFromMountPoints(PTCHAR volumeGUID)
TCHAR volumeNames[MAX_PATH + 1] = { 0 };
if (GetVolumePathNamesForVolumeName(volumeGUID, volumeNames, MAX_PATH, &bufferSize)) {
QStringList mountedPaths = QString::fromWCharArray(volumeNames, bufferSize).split(QLatin1Char(char(0)),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
foreach (const QString &mountedPath, mountedPaths) {
VolumeInfo info;
info.setMountPath(mountedPath);
diff --git a/src/libs/installer/uninstallercalculator.cpp b/src/libs/installer/uninstallercalculator.cpp
index 668ace699..10b44d80a 100644
--- a/src/libs/installer/uninstallercalculator.cpp
+++ b/src/libs/installer/uninstallercalculator.cpp
@@ -62,8 +62,9 @@ void UninstallerCalculator::appendComponentToUninstall(Component *component)
PackageManagerCore *core = component->packageManagerCore();
// remove all already resolved dependees
- QSet<Component *> dependees = core->dependees(component).toSet()
- .subtract(m_componentsToUninstall);
+ const QList<Component *> dependeesList = core->dependees(component);
+ QSet<Component *> dependees = QSet<Component *>(dependeesList.begin(),
+ dependeesList.end()).subtract(m_componentsToUninstall);
foreach (Component *dependee, dependees)
appendComponentToUninstall(dependee);
@@ -104,7 +105,7 @@ void UninstallerCalculator::appendComponentsToUninstall(const QList<Component*>
foreach (Component *c, m_installedComponents) {
const QString replaces = c->value(scReplaces);
const QStringList possibleNames = replaces.split(QInstaller::commaRegExp(),
- QString::SkipEmptyParts) << c->name();
+ Qt::SkipEmptyParts) << c->name();
foreach (const QString &possibleName, possibleNames) {
Component *cc = PackageManagerCore::componentByName(possibleName, m_installedComponents);
diff --git a/src/libs/kdtools/kdsysinfo_win.cpp b/src/libs/kdtools/kdsysinfo_win.cpp
index 0aa7e7aa3..465029252 100644
--- a/src/libs/kdtools/kdsysinfo_win.cpp
+++ b/src/libs/kdtools/kdsysinfo_win.cpp
@@ -68,7 +68,7 @@ QList<ProcessInfo> runningProcesses()
char buffer[bufferSize + 1] = { 0 };
if (QSysInfo::windowsVersion() <= QSysInfo::WV_5_2) {
const DWORD size = GetLogicalDriveStringsA(bufferSize, buffer);
- deviceList = QString::fromLatin1(buffer, size).split(QLatin1Char(char(0)), QString::SkipEmptyParts);
+ deviceList = QString::fromLatin1(buffer, size).split(QLatin1Char(char(0)), Qt::SkipEmptyParts);
}
QLibrary kernel32(QLatin1String("Kernel32.dll"));
diff --git a/src/libs/kdtools/localpackagehub.cpp b/src/libs/kdtools/localpackagehub.cpp
index 2ee880e04..a1c112900 100644
--- a/src/libs/kdtools/localpackagehub.cpp
+++ b/src/libs/kdtools/localpackagehub.cpp
@@ -488,10 +488,10 @@ void LocalPackageHub::PackagesInfoData::addPackageFrom(const QDomElement &packag
info.uncompressedSize = childNodeE.text().toULongLong();
else if (childNodeE.tagName() == QLatin1String("Dependencies")) {
info.dependencies = childNodeE.text().split(QInstaller::commaRegExp(),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
} else if (childNodeE.tagName() == QLatin1String("AutoDependOn")) {
info.autoDependencies = childNodeE.text().split(QInstaller::commaRegExp(),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
} else if (childNodeE.tagName() == QLatin1String("ForcedInstallation"))
info.forcedInstallation = childNodeE.text().toLower() == QLatin1String( "true" ) ? true : false;
else if (childNodeE.tagName() == QLatin1String("LastUpdateDate"))
diff --git a/src/libs/kdtools/sysinfo.cpp b/src/libs/kdtools/sysinfo.cpp
index df9a374f2..9512e59e3 100644
--- a/src/libs/kdtools/sysinfo.cpp
+++ b/src/libs/kdtools/sysinfo.cpp
@@ -71,7 +71,7 @@ VolumeInfo VolumeInfo::fromPath(const QString &path)
}
// the target directory does not exist yet, we need to cd up till we find the first existing dir
- QStringList parts = targetPath.absolutePath().split(QDir::separator(),QString::SkipEmptyParts);
+ QStringList parts = targetPath.absolutePath().split(QDir::separator(), Qt::SkipEmptyParts);
while (targetPath.absolutePath() != QDir::rootPath()) {
if (targetPath.exists())
break;
diff --git a/src/libs/kdtools/sysinfo_x11.cpp b/src/libs/kdtools/sysinfo_x11.cpp
index bc55939a6..a59fd150b 100644
--- a/src/libs/kdtools/sysinfo_x11.cpp
+++ b/src/libs/kdtools/sysinfo_x11.cpp
@@ -60,7 +60,7 @@ quint64 installedMemory()
else if (s.isEmpty())
return quint64();
- const QStringList parts = s.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ const QStringList parts = s.split(QLatin1Char(' '), Qt::SkipEmptyParts);
return quint64(parts.at(1).toInt() * 1024LL);
}
#else
@@ -99,7 +99,7 @@ QList<VolumeInfo> mountedVolumes()
if (!s.startsWith(QLatin1Char('/')) && !s.startsWith(QLatin1String("tmpfs ") + QDir::tempPath()))
continue;
- const QStringList parts = s.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ const QStringList parts = s.split(QLatin1Char(' '), Qt::SkipEmptyParts);
VolumeInfo v;
v.setMountPath(parts.at(1));
diff --git a/src/libs/kdtools/updatefinder.cpp b/src/libs/kdtools/updatefinder.cpp
index 5bf33d4a4..ed45b9797 100644
--- a/src/libs/kdtools/updatefinder.cpp
+++ b/src/libs/kdtools/updatefinder.cpp
@@ -375,7 +375,7 @@ QList<UpdateInfo> UpdateFinder::Private::applicableUpdates(UpdatesInfo *updatesI
// Catch hold of app names contained updatesInfo->applicationName()
// If the application appName isn't one of the app names, then the updates are not applicable.
- const QStringList apps = appName.split(QInstaller::commaRegExp(), QString::SkipEmptyParts);
+ const QStringList apps = appName.split(QInstaller::commaRegExp(), Qt::SkipEmptyParts);
if (apps.indexOf([&packages] { return packages->isValid() ? packages->applicationName()
: QCoreApplication::applicationName(); } ()) < 0) {
return dummy;
diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp
index a2eb22189..8bb422e39 100644
--- a/src/sdk/main.cpp
+++ b/src/sdk/main.cpp
@@ -112,8 +112,10 @@ int main(int argc, char *argv[])
.arg(mutually.join(QLatin1String(", ")));
sanityCheck = false;
}
- const QSet<QString> commands = parser.positionalArguments().toSet()
- .intersect(CommandLineOptions::scCommandLineInterfaceOptions.toSet());
+ const QStringList positionalArgs = parser.positionalArguments();
+ QSet<QString> commands(positionalArgs.begin(), positionalArgs.end());
+ commands.intersect(QSet<QString>(CommandLineOptions::scCommandLineInterfaceOptions.begin(),
+ CommandLineOptions::scCommandLineInterfaceOptions.end()));
// Check sanity of the given argument sequence.
if (commands.size() > 1) {
sanityMessage = QString::fromLatin1("%1 commands provided, only one can be used at a time.")
@@ -146,7 +148,7 @@ int main(int argc, char *argv[])
if (parser.isSet(CommandLineOptions::scStartServerLong)) {
const QStringList arguments = parser.value(CommandLineOptions::scStartServerLong)
- .split(QLatin1Char(','), QString::SkipEmptyParts);
+ .split(QLatin1Char(','), Qt::SkipEmptyParts);
QString socketName, key;
const QString mode = arguments.value(0);
diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h
index 0c09897d7..097886104 100644
--- a/src/sdk/sdkapp.h
+++ b/src/sdk/sdkapp.h
@@ -143,7 +143,7 @@ public:
if (m_parser.isSet(CommandLineOptions::scLoggingRulesLong)) {
loggingRules = QLatin1String("ifw.* = false\n");
loggingRules += m_parser.value(CommandLineOptions::scLoggingRulesLong)
- .split(QLatin1Char(','), QString::SkipEmptyParts)
+ .split(QLatin1Char(','), Qt::SkipEmptyParts)
.join(QLatin1Char('\n')); // take rules from command line
} else if (isCommandLineInterface) {
loggingRules = QLatin1String("ifw.* = false\n"
@@ -181,7 +181,7 @@ public:
const QHash<QString, QString> userArgs = userArguments();
if (m_parser.isSet(CommandLineOptions::scStartClientLong)) {
const QStringList arguments = m_parser.value(CommandLineOptions::scStartClientLong)
- .split(QLatin1Char(','), QString::SkipEmptyParts);
+ .split(QLatin1Char(','), Qt::SkipEmptyParts);
m_core = new QInstaller::PackageManagerCore(
magicMarker, oldOperations,
arguments.value(0, QLatin1String(QInstaller::Protocol::DefaultSocket)),
@@ -363,7 +363,7 @@ public:
if (m_parser.isSet(CommandLineOptions::scMessageAutomaticAnswerLong)) {
const QString positionalArguments = m_parser.value(CommandLineOptions::scMessageAutomaticAnswerLong);
- const QStringList items = positionalArguments.split(QLatin1Char(','), QString::SkipEmptyParts);
+ const QStringList items = positionalArguments.split(QLatin1Char(','), Qt::SkipEmptyParts);
if (items.count() > 0) {
errorMessage = setMessageBoxAutomaticAnswers(items);
if (!errorMessage.isEmpty())
@@ -376,7 +376,7 @@ public:
}
if (m_parser.isSet(CommandLineOptions::scFileDialogAutomaticAnswer)) {
const QString positionalArguments = m_parser.value(CommandLineOptions::scFileDialogAutomaticAnswer);
- const QStringList items = positionalArguments.split(QLatin1Char(','), QString::SkipEmptyParts);
+ const QStringList items = positionalArguments.split(QLatin1Char(','), Qt::SkipEmptyParts);
foreach (const QString &item, items) {
if (item.contains(QLatin1Char('='))) {
@@ -485,7 +485,7 @@ public:
QStringList repositories(const QString &list) const
{
- const QStringList items = list.split(QLatin1Char(','), QString::SkipEmptyParts);
+ const QStringList items = list.split(QLatin1Char(','), Qt::SkipEmptyParts);
foreach (const QString &item, items)
qCDebug(QInstaller::lcInstallerInstallLog) << "Adding custom repository:" << item;
return items;
diff --git a/tests/auto/installer/appendfileoperation/tst_appendfileoperation.cpp b/tests/auto/installer/appendfileoperation/tst_appendfileoperation.cpp
index 9fbfb08e7..9eb1e2401 100644
--- a/tests/auto/installer/appendfileoperation/tst_appendfileoperation.cpp
+++ b/tests/auto/installer/appendfileoperation/tst_appendfileoperation.cpp
@@ -114,7 +114,7 @@ private slots:
QVERIFY(file.open(QIODevice::WriteOnly | QIODevice::Text));
QTextStream stream(&file);
- stream << source << flush;
+ stream << source << Qt::flush;
file.close();
AppendFileOperation op;
diff --git a/tests/auto/installer/createdesktopentryoperation/tst_createdesktopentryoperation.cpp b/tests/auto/installer/createdesktopentryoperation/tst_createdesktopentryoperation.cpp
index 32e23ea14..c73e7cc03 100644
--- a/tests/auto/installer/createdesktopentryoperation/tst_createdesktopentryoperation.cpp
+++ b/tests/auto/installer/createdesktopentryoperation/tst_createdesktopentryoperation.cpp
@@ -70,7 +70,7 @@ private:
QVERIFY(QFileInfo(entryFileName).exists());
if (QFileInfo(createDesktopEntryOp->arguments().first()).isRelative()) {
QStringList directories = QString::fromLocal8Bit(qgetenv("XDG_DATA_HOME"))
- .split(QLatin1Char(':'), QString::SkipEmptyParts);
+ .split(QLatin1Char(':'), Qt::SkipEmptyParts);
// Default path if XDG_DATA_HOME is not set
directories.append(QDir::home().absoluteFilePath(QLatin1String(".local/share")));
// Default path if run as root
diff --git a/tests/auto/installer/installiconsoperation/tst_installiconsoperation.cpp b/tests/auto/installer/installiconsoperation/tst_installiconsoperation.cpp
index fdbbb29bc..20e6a1a91 100644
--- a/tests/auto/installer/installiconsoperation/tst_installiconsoperation.cpp
+++ b/tests/auto/installer/installiconsoperation/tst_installiconsoperation.cpp
@@ -202,7 +202,7 @@ private slots:
QString targetIconsDirectory = op.value("directory").toString();
QVERIFY(QFileInfo(targetIconsDirectory).exists());
QStringList directories = QString::fromLocal8Bit(qgetenv("XDG_DATA_HOME"))
- .split(QLatin1Char(':'), QString::SkipEmptyParts);
+ .split(QLatin1Char(':'), Qt::SkipEmptyParts);
// Default path if XDG_DATA_HOME is not set
directories.append(QDir::home().absoluteFilePath(QLatin1String(".local/share")));
// Default path if run as root
diff --git a/tests/auto/installer/lib7zarchive/tst_lib7zarchive.cpp b/tests/auto/installer/lib7zarchive/tst_lib7zarchive.cpp
index 1c9c48861..a94b0f818 100644
--- a/tests/auto/installer/lib7zarchive/tst_lib7zarchive.cpp
+++ b/tests/auto/installer/lib7zarchive/tst_lib7zarchive.cpp
@@ -47,7 +47,6 @@ private slots:
Lib7z::initSevenZ();
m_file.path = "valid";
- m_file.permissions_enum = 0;
m_file.compressedSize = 836;
m_file.uncompressedSize = 5242880;
m_file.isDirectory = false;
diff --git a/tests/auto/installer/linereplaceoperation/tst_linereplaceoperation.cpp b/tests/auto/installer/linereplaceoperation/tst_linereplaceoperation.cpp
index 762ef0211..836b3dcbd 100644
--- a/tests/auto/installer/linereplaceoperation/tst_linereplaceoperation.cpp
+++ b/tests/auto/installer/linereplaceoperation/tst_linereplaceoperation.cpp
@@ -119,7 +119,7 @@ private slots:
QVERIFY(file.open(QIODevice::WriteOnly | QIODevice::Text));
QTextStream stream(&file);
- stream << source << endl;
+ stream << source << Qt::endl;
file.close();
LineReplaceOperation op(nullptr);
diff --git a/tests/auto/installer/replaceoperation/tst_replaceoperation.cpp b/tests/auto/installer/replaceoperation/tst_replaceoperation.cpp
index 33bd2b6c1..488a14dd1 100644
--- a/tests/auto/installer/replaceoperation/tst_replaceoperation.cpp
+++ b/tests/auto/installer/replaceoperation/tst_replaceoperation.cpp
@@ -103,7 +103,7 @@ private slots:
QTextStream stream(&file);
stream << "Lorem ipsum dolore sit amet, consectetur adipiscing elit, sed do eiusmod "
- "tempor incididunt ut labore et dolore magna aliqua." << endl;
+ "tempor incididunt ut labore et dolore magna aliqua." << Qt::endl;
file.close();
ReplaceOperation searchReplaceOperation(nullptr);
@@ -139,7 +139,7 @@ private slots:
QTextStream stream(&file);
stream << "one | 10/10/2010 | three | 1.2345 | 0.00001 "
- "| 7 | A <i>bon mot</i>." << endl;
+ "| 7 | A <i>bon mot</i>." << Qt::endl;
file.close();
ReplaceOperation searchReplaceOperation(nullptr);