Commit d5cdca00 authored by Robert Loehning's avatar Robert Loehning
Browse files

Fixed handling of file patterns similar to "filename*"

Task-Nr: QTCREATORBUG-1314
parent 6a4d08ba
......@@ -36,6 +36,7 @@
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
#include <QtCore/QSettings>
#include <QtCore/QRegExp>
#include <QtGui/QGridLayout>
......@@ -91,7 +92,7 @@ QStringList AllProjectsFind::files()
if (!filterRegs.isEmpty()) {
foreach (const QString &file, projectFiles) {
foreach (const QRegExp &reg, filterRegs) {
if (reg.exactMatch(file)) {
if (reg.exactMatch(file) || reg.exactMatch(QFileInfo(file).fileName())) {
files.append(file);
break;
}
......
......@@ -35,6 +35,7 @@
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
#include <QtCore/QSettings>
#include <QtCore/QRegExp>
#include <QtGui/QGridLayout>
......@@ -87,7 +88,7 @@ QStringList CurrentProjectFind::files()
if (!filterRegs.isEmpty()) {
foreach (const QString &file, project->files(Project::AllFiles)) {
foreach (const QRegExp &reg, filterRegs) {
if (reg.exactMatch(file)) {
if (reg.exactMatch(file) || reg.exactMatch(QFileInfo(file).fileName())) {
files.append(file);
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment