Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/QGIS
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Apr 6, 2017
2 parents e5d10b6 + c0fb3f2 commit b601467
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 98 deletions.
19 changes: 19 additions & 0 deletions editors/QtCreator/install-win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@ECHO OFF
SET CREATOR=%APPDATA%\QtProject\qtcreator
SET WIZARDS=%CREATOR%\templates\wizards
SET CODESTYLES=%CREATOR%\codestyles\cpp
IF NOT EXIST "%WIZARDS%" (
mkdir "%WIZARDS%"
)

IF NOT EXIST "%WIZARDS%\qgis" (
mklink /J "%WIZARDS%\qgis" %CD%\templates\wizards\qgis
)

IF NOT EXIST "%CODESTYLES%" (
mkdir "%CODESTYLES%"
)

IF NOT EXIST "%CODESTYLES%\qgis_code_style.xml" (
mklink "%CODESTYLES%\qgis_code_style.xml" %CD%\qgis_code_style.xml
)
File renamed without changes.
14 changes: 7 additions & 7 deletions editors/QtCreator/templates/wizards/qgis/qgis_test/file.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
% {Cpp: LicenseTemplate}\
%{Cpp:LicenseTemplate}
#include "qgstest.h"
#include <QObject>
#include <qgsapplication.h>

class % {CN}: public QObject
class %{CN}: public QObject
{

Q_OBJECT
Expand All @@ -17,25 +17,25 @@ private slots:
// Add your test methods here
};

void % {CN}::initTestCase()
void %{CN}::initTestCase()
{

}

void % {CN}::cleanupTestCase()
void %{CN}::cleanupTestCase()
{

}

void % {CN}::init()
void %{CN}::init()
{

}

void % {CN}::cleanup()
void %{CN}::cleanup()
{

}

QGSTEST_MAIN( % {CN} )
QGSTEST_MAIN( %{CN} )
#include "%{JS: Cpp.classToFileName('%{Class}', '.moc')}"
197 changes: 111 additions & 86 deletions editors/QtCreator/templates/wizards/qgis/qgis_test/wizard.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,111 @@
{
"version": 1,
"supportedProjectTypes": [ ],
"id": "B.QGISTest",
"category": "O.QGIS",
"trDescription": "Creates a C++ QGIS Test",
"trDisplayName": "QGIS C++ Test",
"trDisplayCategory": "QGIS",
"icon": "../qgis_icon.svg",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"platformIndependent" : true,

"options":
[
{ "key": "TargetPath", "value": "Test%{Path}" },
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }
],

"pages":
[
{
"trDisplayName": "Define Tests",
"trShortTitle": "Details",
"typeId": "Fields",
"data" :
[
{
"name": "Class",
"trDisplayName": "Class name:",
"mandatory": true,
"type": "LineEdit",
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
},
{
"name": "Sp1",
"type": "Spacer",
"data": { "factor": 2 }
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
},
{
"name": "Path",
"type": "PathChooser",
"trDisplayName": "Path:",
"mandatory": true,
"data":
{
"kind": "existingDirectory",
"basePath": "%{CurrentProject:Path}\\tests\\src\\",
"path": "%{CurrentProject:Path}\\tests\\src\\"
}
}
]
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],

"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "file.cpp",
"target": "%{SrcPath}",
"openInEditor": true,
"options": [
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
]
}
]
}
]
}
{
"version": 1,
"supportedProjectTypes": [ ],
"id": "B.QGISTest",
"category": "O.QGIS",
"trDescription": "Creates a C++ QGIS Test",
"trDisplayName": "QGIS C++ Test",
"trDisplayCategory": "QGIS",
"icon": "../qgis_icon.svg",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}",
"platformIndependent" : true,

"options":
[
{ "key": "TargetPath", "value": "Test%{Path}" },
{ "key": "SrcPath", "value": "%{Path}/%{Area}/%{SrcFileName}" },
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }
],

"pages":
[
{
"trDisplayName": "Define Tests",
"trShortTitle": "Details",
"typeId": "Fields",
"data" :
[
{
"name": "Class",
"trDisplayName": "Class name:",
"mandatory": true,
"type": "LineEdit",
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" }
},
{
"name": "Area",
"trDisplayName": "API Area",
"type": "ComboBox",
"data":
{
"items": [
"analysis",
"app",
"core",
"gui",
"providers"
]
}
},
{
"name": "Sp1",
"type": "Spacer",
"data": { "factor": 2 }
},
{
"name": "LabelQQC_1_0",
"type": "Label",
"span": true,
"data":
{
"wordWrap": true,
"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."
}
},
{
"name": "SrcFileName",
"type": "LineEdit",
"trDisplayName": "Source file:",
"mandatory": true,
"data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }
},
{
"name": "Path",
"type": "PathChooser",
"trDisplayName": "Path:",
"mandatory": true,
"data":
{
"kind": "existingDirectory",
"basePath": "%{CurrentProject:Path}/tests/src/",
"path": "%{CurrentProject:Path}/tests/src/"
}
}
]
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],

"generators":
[
{
"typeId": "File",
"data":
[
{
"source": "file.cpp",
"target": "%{SrcPath}",
"openInEditor": true,
"options": [
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
]
}
]
}
]
}
2 changes: 1 addition & 1 deletion scripts/astyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ astyleit() {

for f in "$@"; do
case "$f" in
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/*)
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/*)
echo -ne "$f skipped $elcr"
continue
;;
Expand Down
8 changes: 4 additions & 4 deletions src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2182,8 +2182,8 @@ Acts on currently active editable layer</string>
<bool>true</bool>
</property>
<property name="icon">
<iconset>
<normaloff>:/images/themes/default/mActionRotateFeature.png</normaloff>:/images/themes/default/mActionRotateFeature.png</iconset>
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionRotateFeature.svg</normaloff>:/images/themes/default/mActionRotateFeature.svg</iconset>
</property>
<property name="text">
<string>Rotate Feature(s)</string>
Expand Down Expand Up @@ -2330,8 +2330,8 @@ Acts on currently active editable layer</string>
<bool>true</bool>
</property>
<property name="icon">
<iconset>
<normaloff>:/images/themes/default/mActionFillRing.png</normaloff>:/images/themes/default/mActionFillRing.png</iconset>
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionFillRing.svg</normaloff>:/images/themes/default/mActionFillRing.svg</iconset>
</property>
<property name="text">
<string>Fill Ring</string>
Expand Down

0 comments on commit b601467

Please sign in to comment.