Variable is Assigned a never used value in qt_make_filter_list()
Variable 'i' is assigned a value that is never used in qt_make_filter_list() Change-Id: Id845ecb5231b97a899443bdcb9f49cccb7f20bea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 8a226cd76b96527970b1600f6975c13eccddf109) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f930f6a797
commit
da778d7ade
@ -1335,21 +1335,14 @@ QList<QUrl> QFileDialog::selectedUrls() const
|
||||
*/
|
||||
QStringList qt_make_filter_list(const QString &filter)
|
||||
{
|
||||
QString f(filter);
|
||||
|
||||
if (f.isEmpty())
|
||||
if (filter.isEmpty())
|
||||
return QStringList();
|
||||
|
||||
QString sep(QLatin1String(";;"));
|
||||
int i = f.indexOf(sep, 0);
|
||||
if (i == -1) {
|
||||
if (f.indexOf(QLatin1Char('\n'), 0) != -1) {
|
||||
if (!filter.contains(sep) && filter.contains(QLatin1Char('\n')))
|
||||
sep = QLatin1Char('\n');
|
||||
i = f.indexOf(sep, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return f.split(sep);
|
||||
return filter.split(sep);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user