Skip to content

Commit b601467

Browse files
committedApr 6, 2017
Merge branch 'master' of github.com:qgis/QGIS
2 parents e5d10b6 + c0fb3f2 commit b601467

File tree

6 files changed

+142
-98
lines changed

6 files changed

+142
-98
lines changed
 

‎editors/QtCreator/install-win.bat

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@ECHO OFF
2+
SET CREATOR=%APPDATA%\QtProject\qtcreator
3+
SET WIZARDS=%CREATOR%\templates\wizards
4+
SET CODESTYLES=%CREATOR%\codestyles\cpp
5+
IF NOT EXIST "%WIZARDS%" (
6+
mkdir "%WIZARDS%"
7+
)
8+
9+
IF NOT EXIST "%WIZARDS%\qgis" (
10+
mklink /J "%WIZARDS%\qgis" %CD%\templates\wizards\qgis
11+
)
12+
13+
IF NOT EXIST "%CODESTYLES%" (
14+
mkdir "%CODESTYLES%"
15+
)
16+
17+
IF NOT EXIST "%CODESTYLES%\qgis_code_style.xml" (
18+
mklink "%CODESTYLES%\qgis_code_style.xml" %CD%\qgis_code_style.xml
19+
)
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
% {Cpp: LicenseTemplate}\
1+
%{Cpp:LicenseTemplate}
22
#include "qgstest.h"
33
#include <QObject>
44
#include <qgsapplication.h>
55

6-
class % {CN}: public QObject
6+
class %{CN}: public QObject
77
{
88

99
Q_OBJECT
@@ -17,25 +17,25 @@ private slots:
1717
// Add your test methods here
1818
};
1919

20-
void % {CN}::initTestCase()
20+
void %{CN}::initTestCase()
2121
{
2222

2323
}
2424

25-
void % {CN}::cleanupTestCase()
25+
void %{CN}::cleanupTestCase()
2626
{
2727

2828
}
2929

30-
void % {CN}::init()
30+
void %{CN}::init()
3131
{
3232

3333
}
3434

35-
void % {CN}::cleanup()
35+
void %{CN}::cleanup()
3636
{
3737

3838
}
3939

40-
QGSTEST_MAIN( % {CN} )
40+
QGSTEST_MAIN( %{CN} )
4141
#include "%{JS: Cpp.classToFileName('%{Class}', '.moc')}"
Lines changed: 111 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,111 @@
1-
{
2-
"version": 1,
3-
"supportedProjectTypes": [ ],
4-
"id": "B.QGISTest",
5-
"category": "O.QGIS",
6-
"trDescription": "Creates a C++ QGIS Test",
7-
"trDisplayName": "QGIS C++ Test",
8-
"trDisplayCategory": "QGIS",
9-
"icon": "../qgis_icon.svg",
10-
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
11-
"platformIndependent" : true,
12-
13-
"options":
14-
[
15-
{ "key": "TargetPath", "value": "Test%{Path}" },
16-
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
17-
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }
18-
],
19-
20-
"pages":
21-
[
22-
{
23-
"trDisplayName": "Define Tests",
24-
"trShortTitle": "Details",
25-
"typeId": "Fields",
26-
"data" :
27-
[
28-
{
29-
"name": "Class",
30-
"trDisplayName": "Class name:",
31-
"mandatory": true,
32-
"type": "LineEdit",
33-
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
34-
},
35-
{
36-
"name": "Sp1",
37-
"type": "Spacer",
38-
"data": { "factor": 2 }
39-
},
40-
{
41-
"name": "SrcFileName",
42-
"type": "LineEdit",
43-
"trDisplayName": "Source file:",
44-
"mandatory": true,
45-
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
46-
},
47-
{
48-
"name": "Path",
49-
"type": "PathChooser",
50-
"trDisplayName": "Path:",
51-
"mandatory": true,
52-
"data":
53-
{
54-
"kind": "existingDirectory",
55-
"basePath": "%{CurrentProject:Path}\\tests\\src\\",
56-
"path": "%{CurrentProject:Path}\\tests\\src\\"
57-
}
58-
}
59-
]
60-
},
61-
{
62-
"trDisplayName": "Project Management",
63-
"trShortTitle": "Summary",
64-
"typeId": "Summary"
65-
}
66-
],
67-
68-
"generators":
69-
[
70-
{
71-
"typeId": "File",
72-
"data":
73-
[
74-
{
75-
"source": "file.cpp",
76-
"target": "%{SrcPath}",
77-
"openInEditor": true,
78-
"options": [
79-
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
80-
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
81-
]
82-
}
83-
]
84-
}
85-
]
86-
}
1+
{
2+
"version": 1,
3+
"supportedProjectTypes": [ ],
4+
"id": "B.QGISTest",
5+
"category": "O.QGIS",
6+
"trDescription": "Creates a C++ QGIS Test",
7+
"trDisplayName": "QGIS C++ Test",
8+
"trDisplayCategory": "QGIS",
9+
"icon": "../qgis_icon.svg",
10+
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
11+
"platformIndependent" : true,
12+
13+
"options":
14+
[
15+
{ "key": "TargetPath", "value": "Test%{Path}" },
16+
{ "key": "SrcPath", "value": "%{Path}/%{Area}/%{SrcFileName}" },
17+
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }
18+
],
19+
20+
"pages":
21+
[
22+
{
23+
"trDisplayName": "Define Tests",
24+
"trShortTitle": "Details",
25+
"typeId": "Fields",
26+
"data" :
27+
[
28+
{
29+
"name": "Class",
30+
"trDisplayName": "Class name:",
31+
"mandatory": true,
32+
"type": "LineEdit",
33+
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
34+
},
35+
{
36+
"name": "Area",
37+
"trDisplayName": "API Area",
38+
"type": "ComboBox",
39+
"data":
40+
{
41+
"items": [
42+
"analysis",
43+
"app",
44+
"core",
45+
"gui",
46+
"providers"
47+
]
48+
}
49+
},
50+
{
51+
"name": "Sp1",
52+
"type": "Spacer",
53+
"data": { "factor": 2 }
54+
},
55+
{
56+
"name": "LabelQQC_1_0",
57+
"type": "Label",
58+
"span": true,
59+
"data":
60+
{
61+
"wordWrap": true,
62+
"trText": "Area selected above will be added to the final path to put the test in the correct location. You shouldn't need to change anything in here generally."
63+
}
64+
},
65+
{
66+
"name": "SrcFileName",
67+
"type": "LineEdit",
68+
"trDisplayName": "Source file:",
69+
"mandatory": true,
70+
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
71+
},
72+
{
73+
"name": "Path",
74+
"type": "PathChooser",
75+
"trDisplayName": "Path:",
76+
"mandatory": true,
77+
"data":
78+
{
79+
"kind": "existingDirectory",
80+
"basePath": "%{CurrentProject:Path}/tests/src/",
81+
"path": "%{CurrentProject:Path}/tests/src/"
82+
}
83+
}
84+
]
85+
},
86+
{
87+
"trDisplayName": "Project Management",
88+
"trShortTitle": "Summary",
89+
"typeId": "Summary"
90+
}
91+
],
92+
93+
"generators":
94+
[
95+
{
96+
"typeId": "File",
97+
"data":
98+
[
99+
{
100+
"source": "file.cpp",
101+
"target": "%{SrcPath}",
102+
"openInEditor": true,
103+
"options": [
104+
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
105+
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
106+
]
107+
}
108+
]
109+
}
110+
]
111+
}

‎scripts/astyle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ astyleit() {
7272

7373
for f in "$@"; do
7474
case "$f" in
75-
src/app/gps/qwtpolar-*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/spatialite/qspatialite/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*|python/ext-libs/*|*/ui_*.py|*.astyle|tests/testdata/*)
75+
src/app/gps/qwtpolar-*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/spatialite/qspatialite/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*|python/ext-libs/*|*/ui_*.py|*.astyle|tests/testdata/*|editors/*)
7676
echo -ne "$f skipped $elcr"
7777
continue
7878
;;

‎src/ui/qgisapp.ui

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,8 +2182,8 @@ Acts on currently active editable layer</string>
21822182
<bool>true</bool>
21832183
</property>
21842184
<property name="icon">
2185-
<iconset>
2186-
<normaloff>:/images/themes/default/mActionRotateFeature.png</normaloff>:/images/themes/default/mActionRotateFeature.png</iconset>
2185+
<iconset resource="../../images/images.qrc">
2186+
<normaloff>:/images/themes/default/mActionRotateFeature.svg</normaloff>:/images/themes/default/mActionRotateFeature.svg</iconset>
21872187
</property>
21882188
<property name="text">
21892189
<string>Rotate Feature(s)</string>
@@ -2330,8 +2330,8 @@ Acts on currently active editable layer</string>
23302330
<bool>true</bool>
23312331
</property>
23322332
<property name="icon">
2333-
<iconset>
2334-
<normaloff>:/images/themes/default/mActionFillRing.png</normaloff>:/images/themes/default/mActionFillRing.png</iconset>
2333+
<iconset resource="../../images/images.qrc">
2334+
<normaloff>:/images/themes/default/mActionFillRing.svg</normaloff>:/images/themes/default/mActionFillRing.svg</iconset>
23352335
</property>
23362336
<property name="text">
23372337
<string>Fill Ring</string>

0 commit comments

Comments
 (0)
Please sign in to comment.