forked from qt-creator/qt-creator
Remove unused variables
Change-Id: I653f6fa71bb04e049d4e1848a7e38a606692e678 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1751,8 +1751,6 @@ QStringList FileFilter::asFindArguments(const QString &path) const
|
||||
if (!(filters & QDir::Hidden))
|
||||
filterOptions << "!" << "-name" << ".*";
|
||||
|
||||
QStringList typesToList;
|
||||
|
||||
QStringList filterFilesAndDirs;
|
||||
if (filters.testFlag(QDir::Dirs))
|
||||
filterFilesAndDirs << "-type" << "d";
|
||||
|
@@ -862,7 +862,7 @@ bool FileSystemModel::remove(const QModelIndex &aindex)
|
||||
if (useFileSystemWatcher() && HostOsInfo::isWindowsHost()) {
|
||||
// QTBUG-65683: Remove file system watchers prior to deletion to prevent
|
||||
// failure due to locked files on Windows.
|
||||
const QStringList watchedPaths = d->unwatchPathsAt(aindex);
|
||||
d->unwatchPathsAt(aindex);
|
||||
}
|
||||
const bool success = (fileInfo.isFile() || fileInfo.isSymLink())
|
||||
? QFile::remove(path) : QDir(path).removeRecursively();
|
||||
@@ -2192,6 +2192,7 @@ void FileSystemModel::setNameFilters(const QStringList &filters)
|
||||
// update the bypass filter to only bypass the stuff that must be kept around
|
||||
d->bypassFilters.clear();
|
||||
// We guarantee that rootPath will stick around
|
||||
// TODO: root looks unused - does it really guarantee anything?
|
||||
QPersistentModelIndex root(index(rootPath()));
|
||||
const QModelIndexList persistentList = persistentIndexList();
|
||||
for (const auto &persistentIndex : persistentList) {
|
||||
|
@@ -162,7 +162,8 @@ void AndroidRunner::launchAVD()
|
||||
if (!m_target || !m_target->project())
|
||||
return;
|
||||
|
||||
QStringList androidAbis = AndroidManager::applicationAbis(m_target);
|
||||
// TODO: is this still needed?
|
||||
AndroidManager::applicationAbis(m_target);
|
||||
|
||||
// Get AVD info
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(m_target->kit());
|
||||
|
@@ -199,10 +199,8 @@ void ActionsFilter::collectEntriesForAction(QAction *action,
|
||||
const QStringList &path,
|
||||
QList<const QMenu *> &processedMenus)
|
||||
{
|
||||
QList<LocatorFilterEntry> entries;
|
||||
if (!m_enabledActions.contains(action))
|
||||
return;
|
||||
const QString whatsThis = action->whatsThis();
|
||||
const QString text = actionText(action);
|
||||
if (QMenu *menu = action->menu()) {
|
||||
if (processedMenus.contains(menu))
|
||||
|
@@ -8966,7 +8966,6 @@ private:
|
||||
if (constructorLocation == CppQuickFixSettings::FunctionLocation::CppFile) {
|
||||
implLoc = sourceLocationFor(m_class, &insertedNamespaces);
|
||||
implFile = m_sourceFile;
|
||||
QString clazz = overview.prettyName(m_class->name());
|
||||
if (m_settings->rewriteTypesinCppFile())
|
||||
implCode = symbolAt(m_class, m_sourceFile, implLoc);
|
||||
else
|
||||
@@ -8997,7 +8996,6 @@ private:
|
||||
if (!member->defaultValue.isEmpty())
|
||||
inClassDeclaration += " = " + member->defaultValue;
|
||||
inClassDeclaration += ", ";
|
||||
QString param = member->parameterName;
|
||||
if (implFile) {
|
||||
FullySpecifiedType type = typeAt(member->type,
|
||||
m_class,
|
||||
|
@@ -145,7 +145,6 @@ QVariantMap JsonWizardFactory::loadDefaultValues(const QString &fileName)
|
||||
return {};
|
||||
}
|
||||
|
||||
QList <Core::IWizardFactory *> result;
|
||||
const Utils::FilePaths paths = searchPaths();
|
||||
for (const Utils::FilePath &path : paths) {
|
||||
if (path.isEmpty())
|
||||
@@ -378,7 +377,6 @@ JsonWizardFactory::Page JsonWizardFactory::parsePage(const QVariant &value, QStr
|
||||
//loadDefaultValues() and loadDefaultValues()
|
||||
void JsonWizardFactory::createWizardFactories()
|
||||
{
|
||||
QString errorMessage;
|
||||
QString verboseLog;
|
||||
const QString wizardFileName = QLatin1String("wizard.json");
|
||||
|
||||
|
@@ -3321,7 +3321,6 @@ void ProjectExplorerPluginPrivate::updateDeployActions()
|
||||
enableDeployActionsContextMenu = false;
|
||||
}
|
||||
|
||||
const QString projectName = project ? project->displayName() : QString();
|
||||
bool hasProjects = SessionManager::hasProjects();
|
||||
|
||||
m_deployAction->setEnabled(enableDeployActions);
|
||||
|
@@ -260,7 +260,6 @@ void PyLSClient::updateExtraCompilers(ProjectExplorer::Project *project,
|
||||
|
||||
void PyLSClient::updateExtraCompilerContents(ExtraCompiler *compiler, const FilePath &file)
|
||||
{
|
||||
const QString text = QString::fromUtf8(compiler->content(file));
|
||||
const FilePath target = m_extraCompilerOutputDir.pathAppended(file.fileName());
|
||||
|
||||
target.writeFileContents(compiler->content(file));
|
||||
|
@@ -296,7 +296,6 @@ bool QbsBuildSystem::renameFile(Node *context,
|
||||
QVariant QbsBuildSystem::additionalData(Id id) const
|
||||
{
|
||||
if (id == "QmlDesignerImportPath") {
|
||||
QStringList designerImportPaths;
|
||||
const QJsonObject project = session()->projectData();
|
||||
QStringList paths;
|
||||
forAllProducts(project, [&paths](const QJsonObject &product) {
|
||||
|
@@ -91,7 +91,6 @@ public:
|
||||
template<typename... TypeName>
|
||||
bool hasDynamicTypeName(const std::tuple<TypeName...> &typeNames) const
|
||||
{
|
||||
auto dynamicTypeName_ = dynamicTypeName();
|
||||
return std::apply([&](auto... typeName) { return hasDynamicTypeName(typeName...); },
|
||||
typeNames);
|
||||
}
|
||||
|
@@ -397,7 +397,6 @@ void QdsNewDialog::accept()
|
||||
.execute();
|
||||
|
||||
std::shared_ptr<PresetItem> item = m_wizard.preset();
|
||||
QString customSizeName = m_qmlCustomWidth + " x " + m_qmlCustomHeight;
|
||||
|
||||
UserPresetData preset = currentUserPresetData(m_currentPreset->displayName());
|
||||
m_recentsStore.save(preset);
|
||||
|
@@ -201,12 +201,9 @@ void ICodeStylePreferences::fromSettings(const QString &category, QSettings *s)
|
||||
|
||||
QVariantMap ICodeStylePreferences::toMap() const
|
||||
{
|
||||
QVariantMap map;
|
||||
if (!currentDelegate())
|
||||
return d->m_tabSettings.toMap();
|
||||
return {
|
||||
{currentPreferencesKey, currentDelegateId()}
|
||||
};
|
||||
return {{currentPreferencesKey, currentDelegateId()}};
|
||||
}
|
||||
|
||||
void ICodeStylePreferences::fromMap(const QVariantMap &map)
|
||||
|
Reference in New Issue
Block a user