-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1864 from michaelkirk/feature/export-png-first-8493
[fixes #8493] "Save as Image" defaults to PNG
- Loading branch information
Showing
4 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/*************************************************************************** | ||
testqgsgui.cpp | ||
-------------------------------------- | ||
Date : 26.1.2015 | ||
Copyright : (C) 2015 Michael Kirk | ||
Email : michael at jackpine dot me | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include <QtTest/QtTest> | ||
#include <qgisgui.h> | ||
|
||
class TestQgsGui : public QObject | ||
{ | ||
Q_OBJECT | ||
private slots: | ||
void createFileFilterForFormat(); | ||
void createFileFilter(); | ||
|
||
}; | ||
|
||
void TestQgsGui::createFileFilterForFormat() | ||
{ | ||
QString expected = "FOO format (*.foo *.FOO)"; | ||
QString actual = QgisGui::createFileFilter_("foo"); | ||
|
||
QCOMPARE( actual, expected ); | ||
} | ||
|
||
void TestQgsGui::createFileFilter() | ||
{ | ||
QString expected = "My Description (my_regex MY_REGEX)"; | ||
QString actual = QgisGui::createFileFilter_("My Description", "my_regex"); | ||
|
||
QCOMPARE( actual, expected ); | ||
} | ||
|
||
QTEST_MAIN( TestQgsGui ) | ||
#include "testqgsgui.moc" |