mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Check for XSwiftBus version before download
This commit is contained in:
committed by
Mat Sutcliffe
parent
c900123af5
commit
b13035b3f9
@@ -57,6 +57,16 @@ namespace BlackMisc
|
||||
return this->findFirstByOrDefault(&CRemoteFile::getName, name);
|
||||
}
|
||||
|
||||
CRemoteFile CRemoteFileList::findFirstContainingNameOrDefault(const QString &name, Qt::CaseSensitivity cs) const
|
||||
{
|
||||
if (name.isEmpty()) { return CRemoteFile(); }
|
||||
for (const CRemoteFile &rf : *this)
|
||||
{
|
||||
if (rf.getName().contains(name, cs)) { return rf; }
|
||||
}
|
||||
return CRemoteFile();
|
||||
}
|
||||
|
||||
CRemoteFile CRemoteFileList::findFirstByMatchingNameOrDefault(const QString &name) const
|
||||
{
|
||||
if (name.isEmpty()) { return CRemoteFile(); }
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace BlackMisc
|
||||
//! First by name of default
|
||||
CRemoteFile findFirstByNameOrDefault(const QString &name) const;
|
||||
|
||||
//! First by name contained of default
|
||||
CRemoteFile findFirstContainingNameOrDefault(const QString &name, Qt::CaseSensitivity cs) const;
|
||||
|
||||
//! Find first matching name of default
|
||||
CRemoteFile findFirstByMatchingNameOrDefault(const QString &name) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user