forked from qt-creator/qt-creator
Avoid more deprecation warnings
Change-Id: Icc7bb7a4ccf7fc9f89f6f668c194ccd440e5231c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -110,7 +110,7 @@ void TestCodeParser::setState(State state)
|
|||||||
m_partialUpdatePostponed = false;
|
m_partialUpdatePostponed = false;
|
||||||
qCDebug(LOG) << "calling scanForTests with postponed files (setState)";
|
qCDebug(LOG) << "calling scanForTests with postponed files (setState)";
|
||||||
if (!m_reparseTimer.isActive())
|
if (!m_reparseTimer.isActive())
|
||||||
scanForTests(m_postponedFiles.toList());
|
scanForTests(Utils::toList(m_postponedFiles));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,7 +469,7 @@ void TestCodeParser::onPartialParsingFinished()
|
|||||||
m_partialUpdatePostponed = false;
|
m_partialUpdatePostponed = false;
|
||||||
qCDebug(LOG) << "calling scanForTests with postponed files (onPartialParsingFinished)";
|
qCDebug(LOG) << "calling scanForTests with postponed files (onPartialParsingFinished)";
|
||||||
if (!m_reparseTimer.isActive())
|
if (!m_reparseTimer.isActive())
|
||||||
scanForTests(m_postponedFiles.toList());
|
scanForTests(Utils::toList(m_postponedFiles));
|
||||||
} else {
|
} else {
|
||||||
m_dirty |= m_codeModelParsing;
|
m_dirty |= m_codeModelParsing;
|
||||||
if (m_dirty) {
|
if (m_dirty) {
|
||||||
|
|||||||
@@ -197,13 +197,13 @@ static QString configForFile(Utils::FilePath fileName, bool checkForSettings)
|
|||||||
{
|
{
|
||||||
QDir overrideDir;
|
QDir overrideDir;
|
||||||
if (!checkForSettings || useProjectOverriddenSettings()) {
|
if (!checkForSettings || useProjectOverriddenSettings()) {
|
||||||
overrideDir = projectPath().toString();
|
overrideDir.setPath(projectPath().toString());
|
||||||
if (!overrideDir.isEmpty() && overrideDir.exists(Constants::SETTINGS_FILE_NAME))
|
if (!overrideDir.isEmpty() && overrideDir.exists(Constants::SETTINGS_FILE_NAME))
|
||||||
return overrideDir.filePath(Constants::SETTINGS_FILE_NAME);
|
return overrideDir.filePath(Constants::SETTINGS_FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkForSettings || useGlobalOverriddenSettings()) {
|
if (!checkForSettings || useGlobalOverriddenSettings()) {
|
||||||
overrideDir = globalPath().toString();
|
overrideDir.setPath(globalPath().toString());
|
||||||
if (!overrideDir.isEmpty() && overrideDir.exists(Constants::SETTINGS_FILE_NAME))
|
if (!overrideDir.isEmpty() && overrideDir.exists(Constants::SETTINGS_FILE_NAME))
|
||||||
return overrideDir.filePath(Constants::SETTINGS_FILE_NAME);
|
return overrideDir.filePath(Constants::SETTINGS_FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ void TeaLeafReader::generateProjectTree(CMakeProjectNode *root, const QList<cons
|
|||||||
});
|
});
|
||||||
allIncludePathSet.unite(Utils::toSet(targetIncludePaths));
|
allIncludePathSet.unite(Utils::toSet(targetIncludePaths));
|
||||||
}
|
}
|
||||||
const QList<FilePath> allIncludePaths = allIncludePathSet.toList();
|
const QList<FilePath> allIncludePaths = Utils::toList(allIncludePathSet);
|
||||||
|
|
||||||
const QList<const FileNode *> missingHeaders
|
const QList<const FileNode *> missingHeaders
|
||||||
= Utils::filtered(allFiles, [&allIncludePaths](const FileNode *fn) -> bool {
|
= Utils::filtered(allFiles, [&allIncludePaths](const FileNode *fn) -> bool {
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ QmlEngine::~QmlEngine()
|
|||||||
if (textEditPtr)
|
if (textEditPtr)
|
||||||
documentsToClose << textEditPtr.data()->document();
|
documentsToClose << textEditPtr.data()->document();
|
||||||
}
|
}
|
||||||
EditorManager::closeDocuments(documentsToClose.toList());
|
EditorManager::closeDocuments(Utils::toList(documentsToClose));
|
||||||
|
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ bool GenericProject::addFiles(const QStringList &filePaths)
|
|||||||
for (const QString &filePath : filePaths)
|
for (const QString &filePath : filePaths)
|
||||||
insertSorted(&newList, baseDir.relativeFilePath(filePath));
|
insertSorted(&newList, baseDir.relativeFilePath(filePath));
|
||||||
|
|
||||||
const QSet<QString> includes = m_projectIncludePaths.toSet();
|
const QSet<QString> includes = Utils::toSet(m_projectIncludePaths);
|
||||||
QSet<QString> toAdd;
|
QSet<QString> toAdd;
|
||||||
|
|
||||||
for (const QString &filePath : filePaths) {
|
for (const QString &filePath : filePaths) {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <coreplugin/generatedfile.h>
|
#include <coreplugin/generatedfile.h>
|
||||||
#include <cpptools/abstracteditorsupport.h>
|
#include <cpptools/abstracteditorsupport.h>
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/macroexpander.h>
|
#include <utils/macroexpander.h>
|
||||||
#include <utils/templateengine.h>
|
#include <utils/templateengine.h>
|
||||||
@@ -293,8 +294,8 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
|
|||||||
sm.insert(QLatin1String("PLUGIN_HEADERS"), pluginHeaders);
|
sm.insert(QLatin1String("PLUGIN_HEADERS"), pluginHeaders);
|
||||||
sm.insert(QLatin1String("PLUGIN_SOURCES"), pluginSources);
|
sm.insert(QLatin1String("PLUGIN_SOURCES"), pluginSources);
|
||||||
sm.insert(QLatin1String("PLUGIN_RESOURCES"), options.resourceFile);
|
sm.insert(QLatin1String("PLUGIN_RESOURCES"), options.resourceFile);
|
||||||
sm.insert(QLatin1String("WIDGET_LIBS"), QStringList(widgetLibraries.toList()).join(blank));
|
sm.insert(QLatin1String("WIDGET_LIBS"), QStringList(Utils::toList(widgetLibraries)).join(blank));
|
||||||
sm.insert(QLatin1String("INCLUSIONS"), QStringList(widgetProjects.toList()).join(QLatin1Char('\n')));
|
sm.insert(QLatin1String("INCLUSIONS"), QStringList(Utils::toList(widgetProjects)).join(QLatin1Char('\n')));
|
||||||
const QString proFileContents = processTemplate(p.templatePath + QLatin1String("/tpl_plugin.pro"), sm, errorMessage);
|
const QString proFileContents = processTemplate(p.templatePath + QLatin1String("/tpl_plugin.pro"), sm, errorMessage);
|
||||||
if (proFileContents.isEmpty())
|
if (proFileContents.isEmpty())
|
||||||
return QList<Core::GeneratedFile>();
|
return QList<Core::GeneratedFile>();
|
||||||
|
|||||||
@@ -1637,7 +1637,7 @@ void QmakeProFile::applyEvaluate(QmakeEvalResult *evalResult)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const QStringList directoriesToAdd = Utils::filtered<QStringList>(
|
const QStringList directoriesToAdd = Utils::filtered<QStringList>(
|
||||||
result->directoriesWithWildcards.toList(),
|
Utils::toList(result->directoriesWithWildcards),
|
||||||
[this](const QString &path) {
|
[this](const QString &path) {
|
||||||
return !m_wildcardWatcher->watchesDirectory(path);
|
return !m_wildcardWatcher->watchesDirectory(path);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -826,7 +826,7 @@ void CentralizedFolderWatcher::watchFolders(const QList<QString> &folders, Qmake
|
|||||||
// we add the recursive directories we find
|
// we add the recursive directories we find
|
||||||
QSet<QString> tmp = recursiveDirs(folder);
|
QSet<QString> tmp = recursiveDirs(folder);
|
||||||
if (!tmp.isEmpty())
|
if (!tmp.isEmpty())
|
||||||
m_watcher.addPaths(tmp.toList());
|
m_watcher.addPaths(Utils::toList(tmp));
|
||||||
m_recursiveWatchedFolders += tmp;
|
m_recursiveWatchedFolders += tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -922,7 +922,7 @@ void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder)
|
|||||||
// If a subdirectory was added, watch it too
|
// If a subdirectory was added, watch it too
|
||||||
QSet<QString> tmp = recursiveDirs(folderWithSlash);
|
QSet<QString> tmp = recursiveDirs(folderWithSlash);
|
||||||
if (!tmp.isEmpty()) {
|
if (!tmp.isEmpty()) {
|
||||||
QSet<QString> alreadyAdded = m_watcher.directories().toSet();
|
QSet<QString> alreadyAdded = Utils::toSet(m_watcher.directories());
|
||||||
tmp.subtract(alreadyAdded);
|
tmp.subtract(alreadyAdded);
|
||||||
if (!tmp.isEmpty())
|
if (!tmp.isEmpty())
|
||||||
m_watcher.addPaths(Utils::toList(tmp));
|
m_watcher.addPaths(Utils::toList(tmp));
|
||||||
|
|||||||
Reference in New Issue
Block a user