Constify getLibExtensions()

This commit is contained in:
Christian Hohnstaedt 2020-01-11 00:18:05 +01:00
parent ae4445f772
commit 23a737bbfa
4 changed files with 9 additions and 9 deletions

View File

@ -52,17 +52,17 @@ QPixmap *loadImg(const char *name )
return new QPixmap(QString(":") + name);
}
QStringList getLibExtensions()
const QStringList getLibExtensions()
{
QStringList l;
return QStringList {
#if defined(Q_OS_WIN32)
l << QString("*.dll") << QString("*.DLL");
QString("*.dll"), QString("*.DLL"),
#elif defined(Q_OS_MAC)
l << QString("*.dylib") << QString("*.so");
QString("*.dylib"), QString("*.so"),
#else
l << QString("*.so");
QString("*.so"),
#endif
return l;
};
}
int portable_app()

View File

@ -30,7 +30,7 @@ QString getLibDir();
QString getDocDir();
QString getUserSettingsDir();
QString getFullFilename(const QString &filename, const QString &selectedFilter);
QStringList getLibExtensions();
const QStringList getLibExtensions();
QString hostId();
QString formatHash(const QByteArray &data, QString sep = ":", int width = 2);

View File

@ -130,7 +130,7 @@ void SearchPkcs11::updateLibs(QString f)
liblist->update();
}
searchThread::searchThread(QString _dir, QStringList _ext, bool _recursive)
searchThread::searchThread(QString _dir, const QStringList _ext, bool _recursive)
{
dirname = _dir;
ext = _ext;

View File

@ -25,7 +25,7 @@ class searchThread: public QThread
bool checkLib(QString file);
public:
searchThread(QString _dir, QStringList _ext, bool _recursive);
searchThread(QString _dir, const QStringList _ext, bool _recursive);
void search(QString mydir);
void run()
{