File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ namespace QgisGui
182
182
183
183
QString createFileFilter_ ( QString const &format )
184
184
{
185
- QString longName = format + " format" ;
186
- QString glob = " *" + format;
185
+ QString longName = format. toUpper () + " format" ;
186
+ QString glob = " *. " + format;
187
187
return createFileFilter_ ( longName, glob );
188
188
}
189
189
Original file line number Diff line number Diff line change @@ -20,14 +20,23 @@ class TestQgsGui : public QObject
20
20
{
21
21
Q_OBJECT
22
22
private slots:
23
+ void createFileFilterForFormat ();
23
24
void createFileFilter ();
24
25
25
26
};
26
27
27
- void TestQgsGui::createFileFilter ()
28
+ void TestQgsGui::createFileFilterForFormat ()
28
29
{
29
30
QString expected = " FOO format (*.foo *.FOO)" ;
30
- QString actual = QgisGui::createFileFilter_ (" foo" );;
31
+ QString actual = QgisGui::createFileFilter_ (" foo" );
32
+
33
+ QCOMPARE ( actual, expected );
34
+ }
35
+
36
+ void TestQgsGui::createFileFilter ()
37
+ {
38
+ QString expected = " My Description (my_regex MY_REGEX)" ;
39
+ QString actual = QgisGui::createFileFilter_ (" My Description" , " my_regex" );
31
40
32
41
QCOMPARE ( actual, expected );
33
42
}
You can’t perform that action at this time.
0 commit comments