Skip to content
Permalink
Browse files
Merge branch 'master' of github.com:qgis/QGIS
  • Loading branch information
borysiasty committed Apr 6, 2017
2 parents e5d10b6 + c0fb3f2 commit b601467d928ace25f4e31a3ba51390a0f2ddafd2
@@ -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.
@@ -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
@@ -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')}"
@@ -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}" }
]
}
]
}
]
}
@@ -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
;;
@@ -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>
@@ -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>

0 comments on commit b601467

Please sign in to comment.