File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 18
18
#include " qgsapplication.h"
19
19
#include " qgslogger.h"
20
20
#include " qgsscalecombobox.h"
21
+ #include " qgssettingsregistrycore.h"
21
22
#include < QObject>
22
23
#include < QLineEdit>
23
24
#include < QComboBox>
@@ -70,6 +71,14 @@ void TestQgsScaleComboBox::init()
70
71
71
72
void TestQgsScaleComboBox::basic ()
72
73
{
74
+ const QStringList scales = QgsSettingsRegistryCore::settingsMapScales->value ();
75
+ QCOMPARE ( scales.count (), s->count () );
76
+ for ( int i = 0 ; i < s->count (); i++ )
77
+ {
78
+ int denominator = QLocale ().toInt ( scales[i].split ( ' :' )[1 ] );
79
+ QCOMPARE ( s->itemText ( i ), QString ( " 1:%1" ).arg ( QLocale ().toString ( denominator ) ) );
80
+ }
81
+
73
82
// Testing conversion from "1:nnn".
74
83
enterScale ( QStringLiteral ( " 1:2345" ) );
75
84
QCOMPARE ( s->scaleString (), QString ( " 1:%1" ).arg ( QLocale ().toString ( 2345 ) ) );
You can’t perform that action at this time.
0 commit comments