mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #883, OS independent version of CFileUtils::getSwiftExecutables
This commit is contained in:
committed by
Mathew Sutcliffe
parent
8ca8f51802
commit
c693423905
@@ -307,19 +307,13 @@ namespace BlackMisc
|
||||
return it->filePath();
|
||||
}
|
||||
|
||||
//! \privatesection
|
||||
//! @{
|
||||
QStringList getSwiftExecutablesImpl()
|
||||
{
|
||||
static const QFileInfo mySelf = QFileInfo(QCoreApplication::applicationFilePath()); // path + dir
|
||||
static const QStringList filter("*." + mySelf.suffix());
|
||||
return mySelf.dir().entryList(filter);
|
||||
}
|
||||
//! @}
|
||||
|
||||
const QStringList &CFileUtils::getSwiftExecutables()
|
||||
{
|
||||
static const QStringList executables(getSwiftExecutablesImpl());
|
||||
static const QStringList executables(
|
||||
QFileInfo(QCoreApplication::applicationFilePath())
|
||||
.dir()
|
||||
.entryList(QDir::Executable | QDir::Files)
|
||||
);
|
||||
return executables;
|
||||
}
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user