Skip to content

Commit

Permalink
Remove the findFilesInWorkspace() function
Browse files Browse the repository at this point in the history
This function is not used.

Change-Id: I20093ed5dedf1439098c2fac379953079b8cf3a0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
  • Loading branch information
OrkunTokdemir committed Mar 14, 2024
1 parent e6b5332 commit 9ee6e8a
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/util/get-qt-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as fs from 'fs/promises';
import { Home, IsMacOS, IsWindows } from './os';
import * as path from 'path';
import * as fsutil from './fs';
import * as vscode from 'vscode';
import commandExists = require('command-exists');

export const PlatformExecutableExtension = IsWindows ? '.exe' : '';
Expand Down Expand Up @@ -103,35 +102,6 @@ export function qtToolsDirByQtInstallationDir(qtInstallation: string): string {
return qtToolsDirByQtRootDir(qtRootByQtInstallation(qtInstallation));
}

export async function findFilesInWorkspace(
filterExtension: string
): Promise<string[]> {
// Get list of all the files in the workspace folders recursively
let files: string[] = [];
// Create an array to hold the promises
const promises = [];
for (const workspaceFolder of vscode.workspace.workspaceFolders ?? []) {
// Define the search pattern
const pattern = new vscode.RelativePattern(
workspaceFolder,
filterExtension
);

// Use findFiles to search for .pro files
promises.push(
vscode.workspace.findFiles(pattern, null).then((matches) => {
files = files.concat(
matches.map((uri) => {
return uri.path;
})
);
})
);
}
await Promise.all(promises);
return files;
}

export function mangleQtInstallation(installation: string): string {
const pathParts = installation.split(/[/\\:]+/).filter((n) => n);
const qtIdx = Math.max(
Expand Down

0 comments on commit 9ee6e8a

Please sign in to comment.