From 0e5baf4c13286e2ff5f7f82547d90cdf2b61a8d6 Mon Sep 17 00:00:00 2001 From: Giuseppe Sucameli Date: Thu, 26 May 2011 11:58:18 +0200 Subject: [PATCH 01/62] crop to mask layer extent --- python/plugins/GdalTools/tools/doClipper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/plugins/GdalTools/tools/doClipper.py b/python/plugins/GdalTools/tools/doClipper.py index 7d74e8622454..2d4f3cae951f 100644 --- a/python/plugins/GdalTools/tools/doClipper.py +++ b/python/plugins/GdalTools/tools/doClipper.py @@ -139,6 +139,8 @@ def getArgsModeMask(self): arguments << "-q" arguments << "-cutline" arguments << mask + if Utils.GdalConfig.version() >= "1.8.0": + arguments << "-crop_to_cutline" if self.alphaBandCheck.isChecked(): arguments << "-dstalpha" From 7c8ded108127fb038bb37e65b1f0949a769858af Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 26 May 2011 18:23:17 +0200 Subject: [PATCH 02/62] Fix missing space between 'Middle' and 'Right' click instructions, consistently use 'vertex' rather than 'point' while adding lines or boundaries. Fixes bug #3846. --- src/plugins/grass/qgsgrassedit.cpp | 6 +++--- src/plugins/grass/qgsgrassedittools.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/grass/qgsgrassedit.cpp b/src/plugins/grass/qgsgrassedit.cpp index c8b89843d50a..2f5d63537704 100644 --- a/src/plugins/grass/qgsgrassedit.cpp +++ b/src/plugins/grass/qgsgrassedit.cpp @@ -1912,11 +1912,11 @@ void QgsGrassEdit::setCanvasPrompt( QString left, QString mid, QString right ) QgsDebugMsg( "entered." ); mCanvasPrompt = ""; if ( left.length() > 0 ) - mCanvasPrompt.append( tr( "Left: %1 " ).arg( left ) ); + mCanvasPrompt.append( tr( "Left: %1" ).arg( left ) ); if ( mid.length() > 0 ) - mCanvasPrompt.append( tr( "Middle: %1" ).arg( mid ) ); + mCanvasPrompt.append( tr( " -- Middle: %1" ).arg( mid ) ); if ( right.length() > 0 ) - mCanvasPrompt.append( tr( "Right: %1" ).arg( right ) ); + mCanvasPrompt.append( tr( " -- Right: %1" ).arg( right ) ); } void QgsGrassEdit::attributesClosed() diff --git a/src/plugins/grass/qgsgrassedittools.cpp b/src/plugins/grass/qgsgrassedittools.cpp index 25f33d234a61..1e696dff2c1a 100644 --- a/src/plugins/grass/qgsgrassedittools.cpp +++ b/src/plugins/grass/qgsgrassedittools.cpp @@ -228,15 +228,15 @@ void QgsGrassEditNewLine::mouseClick( QgsPoint & point, Qt::MouseButton button ) if ( e->mEditPoints->n_points == 0 ) { - e->setCanvasPrompt( tr( "New point" ), "", "" ); + e->setCanvasPrompt( tr( "New vertex" ), "", "" ); } else if ( e->mEditPoints->n_points == 1 ) { - e->setCanvasPrompt( tr( "New point" ), tr( "Undo last point" ), "" ); + e->setCanvasPrompt( tr( "New vertex" ), tr( "Undo last vertex" ), "" ); } else if ( e->mEditPoints->n_points > 1 ) { - e->setCanvasPrompt( tr( "New point" ), tr( "Undo last point" ), tr( "Close line" ) ); + e->setCanvasPrompt( tr( "New vertex" ), tr( "Undo last vertex" ), tr( "Close line" ) ); } } From c2757d31bc3a2d463b7f1e376b62f6046820a2e0 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 26 May 2011 12:51:16 +0200 Subject: [PATCH 03/62] Add support for modulo operator (%) in rule based rendering. See ticket #3845. --- src/core/qgssearchstringlexer.ll | 2 +- src/core/qgssearchstringparser.yy | 1 + src/core/qgssearchtreenode.cpp | 5 +++++ src/core/qgssearchtreenode.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/qgssearchstringlexer.ll b/src/core/qgssearchstringlexer.ll index e9f5f135c12c..dbe41398f1f9 100644 --- a/src/core/qgssearchstringlexer.ll +++ b/src/core/qgssearchstringlexer.ll @@ -109,7 +109,7 @@ string "'"{str_char}*"'" "||" { return CONCAT; } -[+-/*^] { return yytext[0]; } +[+-/*^%] { return yytext[0]; } [()] { return yytext[0]; } diff --git a/src/core/qgssearchstringparser.yy b/src/core/qgssearchstringparser.yy index cc0915b30362..4ba75ef8387a 100644 --- a/src/core/qgssearchstringparser.yy +++ b/src/core/qgssearchstringparser.yy @@ -171,6 +171,7 @@ scalar_exp: } | scalar_exp '^' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opPOW, $1, $3); joinTmpNodes($$,$1,$3); } | scalar_exp '*' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMUL, $1, $3); joinTmpNodes($$,$1,$3); } + | scalar_exp '%' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMOD, $1, $3); joinTmpNodes($$,$1,$3); } | scalar_exp '/' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opDIV, $1, $3); joinTmpNodes($$,$1,$3); } | scalar_exp '+' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opPLUS, $1, $3); joinTmpNodes($$,$1,$3); } | scalar_exp '-' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMINUS,$1, $3); joinTmpNodes($$,$1,$3); } diff --git a/src/core/qgssearchtreenode.cpp b/src/core/qgssearchtreenode.cpp index ae0a8ee66215..291594c60f34 100644 --- a/src/core/qgssearchtreenode.cpp +++ b/src/core/qgssearchtreenode.cpp @@ -268,6 +268,7 @@ QString QgsSearchTreeNode::makeSearchString() case opPLUS: str += "+"; break; case opMINUS: str += "-"; break; case opMUL: str += "*"; break; + case opMOD: str += "%"; break; case opDIV: str += "/"; break; case opPOW: str += "^"; break; @@ -781,6 +782,10 @@ QgsSearchTreeValue QgsSearchTreeNode::valueAgainst( const QgsFieldMap& fields, Q return QgsSearchTreeValue( val1 - val2 ); case opMUL: return QgsSearchTreeValue( val1 * val2 ); + case opMOD: + // NOTE: we _might_ support float operators, like postgresql does + // see 83c94a886c059 commit in postgresql git repo for more info + return QgsSearchTreeValue( int(val1) % int(val2) ); case opDIV: if ( val2 == 0 ) return QgsSearchTreeValue( 2, "" ); // division by zero diff --git a/src/core/qgssearchtreenode.h b/src/core/qgssearchtreenode.h index e2be2b48171a..94fde672c3f6 100644 --- a/src/core/qgssearchtreenode.h +++ b/src/core/qgssearchtreenode.h @@ -66,6 +66,7 @@ class CORE_EXPORT QgsSearchTreeNode opPLUS, opMINUS, opMUL, + opMOD, opDIV, opPOW, opSQRT, From ffc267d937efaa0ad2f33dff5effad801c2287e7 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Thu, 26 May 2011 22:30:56 +0200 Subject: [PATCH 04/62] Coding guideline updates for GIT --- .gitignore | 3 + CODING | 398 ++------ INSTALL | 12 +- doc/CODING.t2t | 270 ++---- doc/INSTALL.html | 2383 ++++++++++++++++++++++++++++++++++++++++++++++ doc/build.sh | 8 +- 6 files changed, 2580 insertions(+), 494 deletions(-) create mode 100644 doc/INSTALL.html mode change 100644 => 100755 doc/build.sh diff --git a/.gitignore b/.gitignore index b0921c6ba976..bb338040ef7d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ scripts/astyle.exe *.out *.tex *.toc +doc/CODING.html +doc/CODING.tex +doc/INSTALL.tex diff --git a/CODING b/CODING index 6724f7fae6b0..74ab22a7fae6 100644 --- a/CODING +++ b/CODING @@ -4,6 +4,7 @@ Developers guide for QGIS ------------------------------------------------------------------------ + 1. QGIS Coding Standards 1.1. Classes 1.1.1. Names @@ -16,7 +17,7 @@ Developers guide for QGIS 1.3. C++ Files 1.3.1. Names 1.3.2. Standard Header and License - 1.3.3. SVN Keyword + 1.3.3. Keyword Substitution 1.4. Variable Names 1.5. Enumerated Types 1.6. Global Constants @@ -32,24 +33,20 @@ Developers guide for QGIS 1.9.4. Add Trailing Identifying Comments 1.9.5. Use Braces Even for Single Line Statements 1.9.6. Book recommendations - 2. SVN Access + 2. GIT Access 2.1. Accessing the Repository - 2.2. Anonymous Access + 2.2. Check out a branch 2.3. QGIS documentation sources - 2.4. SVN Documentation + 2.4. GIT Documentation 2.5. Development in branches 2.5.1. Purpose 2.5.2. Procedure - 2.5.3. Creating a branch - 2.5.4. Merge regularly from trunk to branch 2.6. Submitting Patches 2.6.1. Patch file naming 2.6.2. Create your patch in the top level QGIS source dir - 2.6.3. Including non version controlled files in your patch - 2.6.4. Getting your patch noticed - 2.6.5. Due Diligence - 2.7. Obtaining SVN Write Access - 2.7.1. Procedure once you have access + 2.6.3. Getting your patch noticed + 2.6.4. Due Diligence + 2.7. Obtaining GIT Write Access 3. Unit Testing 3.1. The QGIS testing framework - an overview 3.2. Creating a unit test @@ -79,25 +76,21 @@ These standards should be followed by all QGIS developers. Class in QGIS begin with Qgs and are formed using mixed case. - Examples: QgsPoint QgsMapCanvas QgsRasterLayer - 1.1.2. Members ============== Class member names begin with a lower case m and are formed using mixed case. - mMapCanvas mCurrentExtent - All class members should be private. Public class members are STRONGLY discouraged @@ -109,24 +102,20 @@ Class member values should be obtained through accesssor functions. The function should be named without a get prefix. Accessor functions for the two private members above would be: - mapCanvas() currentExtent() - 1.1.4. Functions ================ Function names begin with a lowercase letter and are formed using mixed case. The function name should convey something about the purpose of the function. - updateMapExtent() setUserOptions() - 1.2. Qt Designer ================ @@ -137,7 +126,6 @@ The function name should convey something about the purpose of the function. QGIS classes that are generated from Qt Designer (ui) files should have a Base suffix. This identifies the class as a generated base class. - Examples: QgsPluginManagerBase QgsUserOptionsBase @@ -165,12 +153,10 @@ C++ implementation and header files should be have a .cpp and .h extension respectively. Filename should be all lowercase and, in the case of classes, match the class name. - Example: Class QgsFeatureAttribute source files are qgsfeatureattribute.cpp and qgsfeatureattribute.h - /!\ Note: in case it is not clear from the statement above, for a filename to match a class name it implicitly means that each class should be declared and implemented in its own file. This makes it much easier for newcomers to @@ -183,7 +169,6 @@ identify where the code is relating to specific class. Each source file should contain a header section patterned after the following example: - /*************************************************************************** qgsfield.cpp - Describes a field in a layer or table -------------------------------------- @@ -200,26 +185,12 @@ example: ***************************************************************************/ + 1.3.3. Keyword Substitution + =========================== - 1.3.3. SVN Keyword - ================== - -Each source file should contain the $Id$ keyword. This will be expanded by SVN -to contain useful information about the file, revision, last committer, and -date/time of last checkin. - -Place the keyword right after the standard header/license that is found at the -top of each source file: - - - /* $Id$ */ - - -You also need to set - -svn propset svn:keywords "Id" - -for the new files. +In the days of SVN we used to require that each source file should contain the +$Id$ keyword. Keyword substitution is not supported by GIT and so should no +longer be used. 1.4. Variable Names @@ -227,19 +198,16 @@ for the new files. Variable names begin with a lower case letter and are formed using mixed case. - Examples: mapCanvas currentExtent - 1.5. Enumerated Types ===================== Enumerated types should be named in CamelCase with a leading capital e.g.: - enum UnitType { Meters, @@ -248,7 +216,6 @@ Enumerated types should be named in CamelCase with a leading capital e.g.: UnknownUnit } ; - Do not use generic type names that will conflict with other types. e.g. use "UnkownUnit" rather than "Unknown" @@ -258,11 +225,9 @@ Do not use generic type names that will conflict with other types. e.g. use Global constants should be written in upper case underscore separated e.g.: - const long GEOCRS_ID = 3344; - 1.7. Editing ============ @@ -291,7 +256,6 @@ should emulate these settings. Braces should start on the line following the expression: - if(foo == 1) { // do stuff @@ -302,7 +266,6 @@ Braces should start on the line following the expression: ... } - There is a scripts/prepare-commit.sh that looks up the changed files and reindents them using astyle. This should be run before committing. @@ -320,7 +283,6 @@ work against any of the 1.x QGIS releases (although recompiling may be required).Cleanups to the API should be done in a manner similar to the Trolltech developers e.g. - class Foo { public: @@ -338,7 +300,6 @@ Trolltech developers e.g. } - 1.9. Coding Style ================= @@ -349,11 +310,9 @@ errors, development time, and maintenance. 1.9.1. Where-ever Possible Generalize Code ========================================== - If you are cut-n-pasting code, or otherwise writing the same thing more than once, consider consolidating the code into a single function. - This will: - allow changes to be made in one location instead of in multiple places @@ -362,16 +321,13 @@ This will: thus making it harder to understand and maintain for others - 1.9.2. Prefer Having Constants First in Predicates ================================================== Prefer to put constants first in predicates. - "0 == value" instead of "value == 0" - This will help prevent programmers from accidentally using "=" when they meant to use "==", which can introduce very subtle logic bugs. The compiler will generate an error if you accidentally use "=" instead of "==" for comparisons @@ -386,17 +342,13 @@ humans to parse code. Which is easier to read, this: - if (!a&&b) - or this: - if ( ! a && b ) - 1.9.4. Add Trailing Identifying Comments ======================================== @@ -412,14 +364,12 @@ desired part. e.g., - void foo::bar() { // ... imagine a lot of code here } // foo::bar() - 1.9.5. Use Braces Even for Single Line Statements ================================================= @@ -429,20 +379,17 @@ generate broken code. Consider: - if (foo) bar(); else baz(); - Adding code after bar() or baz() without adding enclosing braces would create broken code. Though most programmers would naturally do that, some may forget to do so in haste. So, prefer this: - if (foo) { bar(); @@ -453,7 +400,6 @@ So, prefer this: } - 1.9.6. Book recommendations =========================== @@ -462,58 +408,48 @@ So, prefer this: - Effective STL (http://www.awprofessional.com/title/0201749629), Scott Meyers - Design Patterns (http://www.awprofessional.com/title/0201634988), GoF - You should also really read this article from Qt Quarterly on http://doc.trolltech.com/qq/qq13-apis.html designing Qt style (APIs) - 2. SVN Access + 2. GIT Access ============= -This page describes how to get started using the QGIS Subversion repository - - - 2.1. Accessing the Repository - ============================= - -To check out QGIS HEAD: - +This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. Debian based distro users can do: - svn --username [your user name] co https://svn.osgeo.org/qgis/trunk/qgis + sudo apt-get install git +Windows users can obtain msys git (http://code.google.com/p/msysgit/). - 2.2. Anonymous Access - ===================== - -You can use the following commands to perform an anonymous checkout from the -QGIS Subversion repository. Note we recommend checking out the trunk (unless -you are a developer or really HAVE to have the latest changes and don't mind -lots of crashing!). - -You must have a subversion client installed prior to checking out the code. See -the Subversion website for more information. The Links page contains a good -selection of SVN clients for various platforms. - -To check out a branch + 2.1. Accessing the Repository + ============================= +To clone QGIS master: - svn co https://svn.osgeo.org/qgis/branches/ + git://github.com/qgis/Quantum-GIS.git -To check out SVN stable trunk: + 2.2. Check out a branch + ======================= +To check out a branch, for example the release 1.7.0 branch do: - svn co https://svn.osgeo.org/qgis/trunk/qgis qgis_trunk + cd Quantum-GIS + git fetch + git branch --track origin release-1_7_0 + git checkout release-1_7_0 + +To check out the master branch: -/!\ Note: If you are behind a proxy server, edit your ~/subversion/servers -file to specify your proxy settings first! + cd Quantum-GIS + git checkout master -/!\ Note: In QGIS we keep our most stable code in the version 1_0 branch. -Trunk contains code for the so called 'unstable' release series. Periodically -we will tag a release off trunk, and then continue stabilisation and selective -incorporation of new features into trunk. +/!\ Note: In QGIS we keep our most stable code in the current release branch. +Master contains code for the so called 'unstable' release series. Periodically +we will branch a release off master, and then continue stabilisation and selective +incorporation of new features into master. See the INSTALL file in the source tree for specific instructions on building development versions. @@ -524,22 +460,21 @@ development versions. If you're interested in checking out Quantum GIS documentation sources: - svn co https://svn.osgeo.org/qgis/docs/trunk qgis_docs +/!\ Note: This url will change to a git URL in the near future. You can also take a look at DocumentationWritersCorner for more information. - 2.4. SVN Documentation + 2.4. GIT Documentation ====================== -The repository is organized as follows: +See the following sites for information on becoming a GIT master. -http://wiki.qgis.org/images/repo.png - -See the Subversion book http://svnbook.red-bean.com for information on becoming -a SVN master. +http://gitref.org +http://progit.org +http://gitready.com 2.5. Development in branches @@ -554,8 +489,8 @@ last years. Therefore it is hard to anticipate the side effects that the addition of a feature will have. In the past, the QGIS project had very long release cycles because it was a lot of work to reetablish the stability of the software system after new features were added. To overcome these problems, QGIS -switched to a development model where new features are coded in svn branches -first and merged to trunk (the main branch) when they are finished and stable. +switched to a development model where new features are coded in GIT branches +first and merged to master (the main branch) when they are finished and stable. This section describes the procedure for branching and merging in the QGIS project. @@ -570,79 +505,40 @@ technical advisor of the project steering committee (PSC). If the new feature requires any changes to the QGIS architecture, a request for comment (RFC) is needed. -- Create a branch: -Create a new svn branch for the development of the new feature (see -UsingSubversion for the svn syntax). Now you can start developing. +Create a branch: +Create a new GIT branch for the development of the new feature. -- Merge from trunk regularly: -It is recommended to merge the changes in trunk to the branch on a regular -basis. This makes it easier to merge the branch back to trunk later. + git branch newfeature + git checkout newfeature -- Documentation on wiki: -It is also recommended to document the intended changes and the current status -of the work on a wiki page. -- Testing before merging back to trunk: -When you are finished with the new feature and happy with the stability, make -an announcement on the developer list. Before merging back, the changes will -be tested by developers and users. Binary packages (especially for OsX and -Windows) will be generated to also involve non-developers. In trac, a new -Component will be opened to file tickets against. Once there are no remaining -issues left, the technical advisor of the PSC merges the changes into trunk. - - - - - 2.5.3. Creating a branch - ======================== - -We prefer that new feature developments happen out of trunk so that trunk -remains in a stable state. To create a branch use the following command: - - - svn copy https://svn.osgeo.org/qgis/trunk/qgis https://svn.osgeo.org/qgis/branches/qgis_newfeature - svn commit -m "New feature branch" +Now you can start developing. If you plan to do extensive on that branch, would +like to share the work with other developers, and have write access to the +upstream repo, you can push your repo up to the QGIS official repo by doing: + git push origin newfeature - 2.5.4. Merge regularly from trunk to branch - =========================================== +Note: if the branch already exists your changes will be pushed into it. -When working in a branch you should regularly merge trunk into it so that your -branch does not diverge more than necessary. In the top level dir of your -branch, first type `svn info` to determine the revision numbers of your -branch which will produce output something like this: +Merge from master regularly: +It is recommended to merge the changes in master to the branch on a regular +basis. This makes it easier to merge the branch back to master later. + git merge master - timlinux@timlinux-desktop:~/dev/cpp/qgis_raster_transparency_branch$ svn info - Caminho: . - URL: https://svn.osgeo.org/qgis/branches/raster_transparency_branch - Raiz do Repositório: https://svn.osgeo.org/qgis - UUID do repositório: c8812cc2-4d05-0410-92ff-de0c093fc19c - Revisão: 6546 - Tipo de Nó: diretório - Agendado: normal - Autor da Última Mudança: timlinux - Revisão da Última Mudança: 6495 - Data da Última Mudança: 2007-02-02 09:29:47 -0200 (Sex, 02 Fev 2007) - Propriedades da Última Mudança: 2007-01-09 11:32:55 -0200 (Ter, 09 Jan 2007) +Documentation on wiki: +It is also recommended to document the intended changes and the current status +of the work on a wiki page. -The second revision number shows the revision number of the start revision of -your branch and the first the current revision. You can do a dry run of the -merge like this: - - - svn merge --dry-run -r 6495:6546 https://svn.osgeo.org/qgis/trunk/qgis - - -After you are happy with the changes that will be made do the merge for real -like this: - - - svn merge -r 6495:6546 https://svn.osgeo.org/qgis/trunk/qgis - svn commit -m "Merged upstream changes from trunk to my branch" - +Testing before merging back to master: +When you are finished with the new feature and happy with the stability, make +an announcement on the developer list. Before merging back, the changes will +be tested by developers and users. Binary packages (especially for OsX and +Windows) will be generated to also involve non-developers. In trac, a new +Component will be opened to file tickets against. Once there are no remaining +issues left, the technical advisor of the PSC merges the changes into master. 2.6. Submitting Patches @@ -656,7 +552,7 @@ easily, and help us deal with the patches that are sent to use easily. ======================== If the patch is a fix for a specific bug, please name the file with the bug -number in it e.g. bug777fix.diff, and attach it to the original bug report +number in it e.g. bug777fix.patch, and attach it to the original bug report in trac (https://trac.osgeo.org/qgis/). If the bug is an enhancement or new feature, its usually a good idea to create @@ -668,32 +564,23 @@ a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you This makes it easier for us to apply the patches since we don't need to navigate to a specific place in the source tree to apply the patch. Also when I -receive patches I usually evaluate them using kompare, and having the patch +receive patches I usually evaluate them using merge, and having the patch from the top level dir makes this much easier. Below is an example of how you can include multiple changed files into your patch from the top level directory: + cd Quantum-GIS + git checkout master + git pull origin master + git checkout newfeature + git format-patch master --stdout > bug777fix.patch - cd qgis - svn diff src/ui/somefile.ui src/app/somefile2.cpp > bug872fix.diff - - - - 2.6.3. Including non version controlled files in your patch - =========================================================== +This will make sure your master branch is in sync with the upstream repository, +and then generate a patch which contains the delta between your feature branch +and what is in the master branch. -If your improvements include new files that don't yet exist in the repository, -you should indicate to svn that they need to be added before generating your -patch e.g. - - cd qgis - svn add src/lib/somenewfile.cpp - svn diff > bug7887fix.diff - - - - 2.6.4. Getting your patch noticed + 2.6.3. Getting your patch noticed ================================= QGIS developers are busy folk. We do scan the incoming patches on bug reports @@ -704,7 +591,7 @@ can escalate your query to one of the Project Steering Committee members (contact details also available on the Project Organigram). - 2.6.5. Due Diligence + 2.6.4. Due Diligence ==================== QGIS is licensed under the GPL. You should make every effort to ensure you only @@ -713,7 +600,7 @@ rights. Also do not submit code that you are not happy to have made available under the GPL. - 2.7. Obtaining SVN Write Access + 2.7. Obtaining GIT Write Access =============================== Write access to QGIS source tree is by invitation. Typically when a person @@ -728,72 +615,26 @@ demonstrated ability to submit patches and should ideally have submitted several substantial patches that demonstrate their understanding of modifying the code base without breaking things, etc. +Note: Since moving to GIT, we are less likely to grant write access to new +developers since it is trivial to share code within github by forking QGIS and +then issuing pull requests. - 2.7.1. Procedure once you have access - ===================================== - -Checkout the sources: - - - svn co https://svn.osgeo.org/qgis/trunk/qgis qgis - - -Build the sources (see INSTALL document for proper detailed instructions) - - - cd qgis - mkdir build - ccmake .. (set your preferred options) - make - make install (maybe you need to do with sudo / root perms) - - -Make your edits - - - cd .. - - -Make your changes in sources. Always check that everything compiles before -making any commits. Try to be aware of possible breakages your commits may -cause for people building on other platforms and with older / newer versions of +Always check that everything compiles before making any commits / pull +requests. Try to be aware of possible breakages your commits may cause for +people building on other platforms and with older / newer versions of libraries. -Add files (if you added any new files). The svn status command can be used to -quickly see if you have added new files. - - - svn status src/pluguns/grass/modules - - -Files listed with ? in front are not in SVN and possibly need to be added by -you: - - - svn add src/pluguns/grass/modules/foo.xml - - -Commit your changes - - - svn commit src/pluguns/grass/modules/foo.xml - - -Your editor (as defined in $EDITOR environment variable) will appear and you -should make a comment at the top of the file (above the area that says 'don't -change this'. Put a descriptive comment and rather do several small commits if -the changes across a number of files are unrelated. Conversely we prefer you to -group related changes into a single commit. - -Save and close in your editor. The first time you do this, you should be -prompted to put in your username and password. Just use the same ones as your -trac account. +When making a commit, your editor (as defined in $EDITOR environment variable) +will appear and you should make a comment at the top of the file (above the +area that says 'don't change this'. Put a descriptive comment and rather do +several small commits if the changes across a number of files are unrelated. +Conversely we prefer you to group related changes into a single commit. 3. Unit Testing =============== -As of November 2007 we require all new features going into trunk to be +As of November 2007 we require all new features going into master to be accompanied with a unit test. Initially we have limited this requirement to qgis_core, and we will extend this requirement to other parts of the code base once people are familiar with the procedures for unit testing explained in the @@ -846,7 +687,6 @@ the details: more fine grained control over running tests. - Right with that overview in mind, I will delve into a bit of detail. I've already done much of the configuration for you in CMake and other places in the source tree so all you need to do are the easy bits - writing unit tests! @@ -864,7 +704,6 @@ prefixed with 'Test'. So our test implementation goes in a file called testqgsrasterlayer.cpp and the class itself will be TestQgsRasterLayer. First we add our standard copyright banner: - /*************************************************************************** testqgsvectorfilewriter.cpp -------------------------------------- @@ -880,21 +719,17 @@ we add our standard copyright banner: * * ***************************************************************************/ - Next we use start our includes needed for the tests we plan to run. There is one special include all tests should have: - #include - Note that we use the new style Qt4 includes - i.e. QtTest is included not qttest.h Beyond that you just continue implementing your class as per normal, pulling in whatever headers you may need: - //Qt includes... #include #include @@ -908,27 +743,22 @@ in whatever headers you may need: #include #include - Since we are combining both class declaration and implementation in a single file the class declaration comes next. We start with our doxygen documentation. Every test case should be properly documented. We use the doxygen ingroup directive so that all the UnitTests appear as a module in the generated Doxygen documentation. After that comes a short description of the unit test: - /** \ingroup UnitTests * This is a unit test for the QgsRasterLayer class. */ - The class must inherit from QObject and include the Q_OBJECT macro. - class TestQgsRasterLayer: public QObject { Q_OBJECT; - All our test methods are implemented as private slots. The QtTest framework will sequentially call each private slot method in the test class. There are four 'special' methods which if implemented will be called at the start of the @@ -938,7 +768,6 @@ method will be called and after each test method is called the cleanup() method is called. These methods are handy in that they allow you to allocate and cleanup resources prior to running each test, and the test unit as a whole. - private slots: // will be called before the first testfunction is executed. void initTestCase(); @@ -949,7 +778,6 @@ and cleanup resources prior to running each test, and the test unit as a whole. // will be called after every testfunction. void cleanup(); - Then come your test methods, all of which should take no parameters and should return void. The methods will be called in order of declaration. I am implementing two methods here which illustrates to types of testing. In the @@ -966,7 +794,6 @@ and normally you do not need to write tests for accessors and mutators. If it should happen that an acccessor or mutator is not working as expected you would normally implement a regression test to check for this (see lower down). - // // Functional Testing // @@ -976,7 +803,6 @@ normally implement a regression test to check for this (see lower down). // more functional tests here ... - Next we implement our regression tests. Regression tests should be implemented to replicate the conditions of a particular bug. For example I recently received a report by email that the cell count by rasters was off by @@ -1003,7 +829,6 @@ regression for your test functions. If no trac ticket exists for the regression, you should create one first. Using this approach allows the person running a failed regression test easily go and find out more information. - // // Regression Testing // @@ -1016,7 +841,6 @@ running a failed regression test easily go and find out more information. // more regression tests go here ... - Finally in our test class declaration you can declare privately any data members and helper methods your unit test may need. In our case I will declare a QgsRasterLayer * which can be used by any of our test methods. The raster @@ -1026,7 +850,6 @@ tests. By declaring helper methods (which may be called by various test functions) privately, you can ensure that they wont be automatically run by the QTest executeable that is created when we compile our test. - private: // Here we have any data structures that may need to // be used in many test cases. @@ -1034,11 +857,9 @@ QTest executeable that is created when we compile our test. }; - That ends our class declaration. The implementation is simply inlined in the same file lower down. First our init and cleanup functions: - void TestQgsRasterLayer::initTestCase() { // init QGIS's paths - true means that all path will be inited from prefix @@ -1068,7 +889,6 @@ same file lower down. First our init and cleanup functions: } - The above init function illustrates a couple of interesting things. 1. I needed to manually set the QGIS application data path so that @@ -1092,7 +912,6 @@ raster layer was correctly loaded in the initTestCase. QVERIFY is a Qt macro that you can use to evaluate a test condition. There are a few other use macros Qt provide for use in your tests including: - QCOMPARE ( actual, expected ) QEXPECT_FAIL ( dataIndex, comment, mode ) QFAIL ( message ) @@ -1106,17 +925,14 @@ macros Qt provide for use in your tests including: QVERIFY ( condition ) QWARN ( message ) - Some of these macros are useful only when using the Qt framework for data driven testing (see the Qt docs for more detail). - void TestQgsRasterLayer::isValid() { QVERIFY ( mpLayer->isValid() ); } - Normally your functional tests would cover all the range of functionality of your classes public API where feasible. With our functional tests out the way, we can look at our regression test example. @@ -1125,7 +941,6 @@ Since the issue in bug #832 is a misreported cell count, writing our test if simply a matter of using QVERIFY to check that the cell count meets the expected value: - void TestQgsRasterLayer::regression832() { QVERIFY ( mpLayer->getRasterXDim() == 10 ); @@ -1135,15 +950,12 @@ expected value: QVERIFY ( mpLayer->getRasterBandStats(1).elementCountInt == 100 ); } - With all the unit test functions implemented, there one final thing we need to add to our test class: - QTEST_MAIN(TestQgsRasterLayer) #include "moc_testqgsrasterlayer.cxx" - The purpose of these two lines is to signal to Qt's moc that his is a QtTest (it will generate a main method that in turn calls each test funtion. The last line is the include for the MOC generated sources. You should replace @@ -1157,19 +969,16 @@ Adding your unit test to the build system is simply a matter of editing the CMakeLists.txt in the test directory, cloning one of the existing test blocks, and then replacing your test class name into it. For example: - # QgsRasterLayer test ADD_QGIS_TEST(rasterlayertest testqgsrasterlayer.cpp) - 3.4. The ADD_QGIS_TEST macro explained ====================================== I'll run through these lines briefly to explain what they do, but if you are not interested, just do the step explained in the above section and section. - MACRO (ADD_QGIS_TEST testname testsrc) SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS}) SET(qgis_${testname}_MOC_CPPS ${testsrc}) @@ -1200,51 +1009,41 @@ not interested, just do the step explained in the above section and section. ENDIF (APPLE) ENDMACRO (ADD_QGIS_TEST) - Lets look a little more in detail at the individual lines. First we define the list of sources for our test. Since we have only one source file (following the methodology I described above where class declaration and definition are in the same file) its a simple statement: - SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS}) - Since our test class needs to be run through the Qt meta object compiler (moc) we need to provide a couple of lines to make that happen too: - SET(qgis_${testname}_MOC_CPPS ${testsrc}) QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS}) ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS}) - Next we tell cmake that it must make an executeable from the test class. Remember in the previous section on the last line of the class implementation I included the moc outputs directly into our test class, so that will give it (among other things) a main method so the class can be compiled as an executeable: - ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS}) ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc) - Next we need to specify any library dependencies. At the moment classes have been implemented with a catch-all QT_LIBRARIES dependency, but I will be working to replace that with the specific Qt libraries that each class needs only. Of course you also need to link to the relevant qgis libraries as required by your unit test. - TARGET_LINK_LIBRARIES(qgis_${testname} ${QT_LIBRARIES} qgis_core) - Next I tell cmake to install the tests to the same place as the qgis binaries itself. This is something I plan to remove in the future so that the tests can run directly from inside the source tree. - SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES # skip the full RPATH for the build tree @@ -1266,7 +1065,6 @@ run directly from inside the source tree. ADD_TEST(qgis_${testname} ${CMAKE_INSTALL_PREFIX}/bin/qgis_${testname}) ENDIF (APPLE) - Finally the above uses ADD_TEST to register the test with cmake / ctest . Here is where the best magic happens - we register the class with ctest. If you recall in the overview I gave in the beginning of this section we are using @@ -1297,15 +1095,12 @@ Other than that, just build QGIS as per normal and the tests should build too. The simplest way to run the tests is as part of your normal build process: - make && make install && make test - The make test command will invoke CTest which will run each test that was registered using the ADD_TEST CMake directive described above. Typical output from make test will look like this: - Running tests... Start processing tests Test project /Users/tim/dev/cpp/qgis/build @@ -1320,12 +1115,10 @@ from make test will look like this: Errors while running CTest make: *** [test] Error 8 - If a test fails, you can use the ctest command to examine more closely why it failed. User the -R option to specify a regex for which tests you want to run and -V to get verbose output: - [build] ctest -R appl -V Start processing tests Test project /Users/tim/dev/cpp/qgis/build @@ -1364,7 +1157,6 @@ and -V to get verbose output: Errors while running CTest - Well that concludes this section on writing unit tests in QGIS. We hope you will get into the habit of writing test to test new functionality and to check for regressions. Some aspects of the test system (in particular the @@ -1422,7 +1214,6 @@ guidelines are followed in layout and design of GUIs. suffixed to the button text. - 5. Authors ========== @@ -1430,7 +1221,6 @@ guidelines are followed in layout and design of GUIs. - Gary Sherman - Marco Hugentobler - Original pages from wiki to deprecate: - http://wiki.qgis.org/qgiswiki/CodingGuidelines (./) @@ -1441,7 +1231,3 @@ Original pages from wiki to deprecate: - http://wiki.qgis.org/qgiswiki/SubmittingPatchesAndSvnAccess (./) - - - - diff --git a/INSTALL b/INSTALL index 1668076e9670..79df75cf603e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,9 +1,10 @@ Quantum GIS (QGIS) Building QGIS from source - step by step +Thursday May 26, 2011 -Last update: 20110504 -Last change: 20110502 +Last Updated: Thursday May 26, 2011 +Last Change : Tuesday May 24, 2011 1. Introduction @@ -629,8 +630,8 @@ installed in the default locations): call "%OSGEO4W_ROOT%\bin\o4w_env.bat" @set GRASS_PREFIX=c:/OSGeo4W/apps/grass/grass-6.4.0 - @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\apps\gdal-17\include;%OSGEO4W_ROOT%\include - @set LIB=%LIB%;%OSGEO4W_ROOT%\apps\gdal-17\lib;%OSGEO4W_ROOT%\lib + @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include + @set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib @cmd @@ -1666,3 +1667,6 @@ The following people have contributed to this document: - Tim Sutton 2006 - Debian package section: Juergen Fischer 2008 +- Latex Generator + - Tim Sutton 2011 + diff --git a/doc/CODING.t2t b/doc/CODING.t2t index ece0b72b0255..3548693ddc0c 100644 --- a/doc/CODING.t2t +++ b/doc/CODING.t2t @@ -77,7 +77,7 @@ Developers guide for QGIS % format, then paste the procedure in below. I have instated these changes so % that we can have a single central document that contains all the instructions % developers contributing to QGIS. This page should always reflect the most -% current SVN trunk build procedure - for release versions the CODING document +% current GIT master build procedure - for release versions the CODING document % in the sources will be generated according to the current build procedure at % the time. @@ -184,22 +184,11 @@ example: ***************************************************************************/ ``` -=== SVN Keyword === -Each source file should contain the $Id$ keyword. This will be expanded by SVN -to contain useful information about the file, revision, last committer, and -date/time of last checkin. +=== Keyword Substitution === -Place the keyword right after the standard header/license that is found at the -top of each source file: -``` - /* $Id$ */ -``` - -You also need to set - -svn propset svn:keywords "Id" - -for the new files. +In the days of SVN we used to require that each source file should contain the +$Id$ keyword. Keyword substitution is not supported by GIT and so should no +longer be used. == Variable Names == Variable names begin with a lower case letter and are formed using mixed case. @@ -416,45 +405,48 @@ You should also really read this article from Qt Quarterly on -= SVN Access = += GIT Access = -This page describes how to get started using the QGIS Subversion repository +This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. Debian based distro users can do: -== Accessing the Repository == -To check out QGIS HEAD: ``` - svn --username [your user name] co https://svn.osgeo.org/qgis/trunk/qgis +sudo apt-get install git ``` +Windows users can obtain [msys git http://code.google.com/p/msysgit/]. + -== Anonymous Access == -You can use the following commands to perform an anonymous checkout from the -QGIS Subversion repository. Note we recommend checking out the trunk (unless -you are a developer or really HAVE to have the latest changes and don't mind -lots of crashing!). -You must have a subversion client installed prior to checking out the code. See -the Subversion website for more information. The Links page contains a good -selection of SVN clients for various platforms. +== Accessing the Repository == + +To clone QGIS master: -To check out a branch ``` - svn co https://svn.osgeo.org/qgis/branches/ +git://github.com/qgis/Quantum-GIS.git ``` -To check out SVN stable trunk: +== Check out a branch == +To check out a branch, for example the release 1.7.0 branch do: ``` - svn co https://svn.osgeo.org/qgis/trunk/qgis qgis_trunk + cd Quantum-GIS + git fetch + git branch --track origin release-1_7_0 + git checkout release-1_7_0 + ``` -/!\ **Note:** If you are behind a proxy server, edit your ~/subversion/servers -file to specify your proxy settings first! +To check out the master branch: -/!\ **Note:** In QGIS we keep our most stable code in the version 1_0 branch. -Trunk contains code for the so called 'unstable' release series. Periodically -we will tag a release off trunk, and then continue stabilisation and selective -incorporation of new features into trunk. +``` + cd Quantum-GIS + git checkout master +``` + +/!\ **Note:** In QGIS we keep our most stable code in the current release branch. +Master contains code for the so called 'unstable' release series. Periodically +we will branch a release off master, and then continue stabilisation and selective +incorporation of new features into master. See the INSTALL file in the source tree for specific instructions on building development versions. @@ -466,19 +458,17 @@ If you're interested in checking out Quantum GIS documentation sources: svn co https://svn.osgeo.org/qgis/docs/trunk qgis_docs ``` +/!\ **Note:** This url will change to a git URL in the near future. + You can also take a look at DocumentationWritersCorner for more information. -== SVN Documentation == - -The repository is organized as follows: - -http://wiki.qgis.org/images/repo.png - -See the Subversion book http://svnbook.red-bean.com for information on becoming -a SVN master. - +== GIT Documentation == +See the following sites for information on becoming a GIT master. +http://gitref.org +http://progit.org +http://gitready.com == Development in branches == @@ -488,8 +478,8 @@ last years. Therefore it is hard to anticipate the side effects that the addition of a feature will have. In the past, the QGIS project had very long release cycles because it was a lot of work to reetablish the stability of the software system after new features were added. To overcome these problems, QGIS -switched to a development model where new features are coded in svn branches -first and merged to trunk (the main branch) when they are finished and stable. +switched to a development model where new features are coded in GIT branches +first and merged to master (the main branch) when they are finished and stable. This section describes the procedure for branching and merging in the QGIS project. @@ -503,75 +493,43 @@ technical advisor of the project steering committee (PSC). If the new feature requires any changes to the QGIS architecture, a request for comment (RFC) is needed. -- **Create a branch:** -Create a new svn branch for the development of the new feature (see -UsingSubversion for the svn syntax). Now you can start developing. - -- **Merge from trunk regularly:** -It is recommended to merge the changes in trunk to the branch on a regular -basis. This makes it easier to merge the branch back to trunk later. - -- **Documentation on wiki:** -It is also recommended to document the intended changes and the current status -of the work on a wiki page. - -- **Testing before merging back to trunk:** -When you are finished with the new feature and happy with the stability, make -an announcement on the developer list. Before merging back, the changes will -be tested by developers and users. Binary packages (especially for OsX and -Windows) will be generated to also involve non-developers. In trac, a new -Component will be opened to file tickets against. Once there are no remaining -issues left, the technical advisor of the PSC merges the changes into trunk. - -- - -=== Creating a branch === - -We prefer that new feature developments happen out of trunk so that trunk -remains in a stable state. To create a branch use the following command: +**Create a branch:** +Create a new GIT branch for the development of the new feature. ``` -svn copy https://svn.osgeo.org/qgis/trunk/qgis https://svn.osgeo.org/qgis/branches/qgis_newfeature -svn commit -m "New feature branch" +git branch newfeature +git checkout newfeature ``` -=== Merge regularly from trunk to branch === - -When working in a branch you should regularly merge trunk into it so that your -branch does not diverge more than necessary. In the top level dir of your -branch, first type ```svn info``` to determine the revision numbers of your -branch which will produce output something like this: +Now you can start developing. If you plan to do extensive on that branch, would +like to share the work with other developers, and have write access to the +upstream repo, you can push your repo up to the QGIS official repo by doing: ``` -timlinux@timlinux-desktop:~/dev/cpp/qgis_raster_transparency_branch$ svn info -Caminho: . -URL: https://svn.osgeo.org/qgis/branches/raster_transparency_branch -Raiz do Repositório: https://svn.osgeo.org/qgis -UUID do repositório: c8812cc2-4d05-0410-92ff-de0c093fc19c -Revisão: 6546 -Tipo de Nó: diretório -Agendado: normal -Autor da Última Mudança: timlinux -Revisão da Última Mudança: 6495 -Data da Última Mudança: 2007-02-02 09:29:47 -0200 (Sex, 02 Fev 2007) -Propriedades da Última Mudança: 2007-01-09 11:32:55 -0200 (Ter, 09 Jan 2007) +git push origin newfeature ``` -The second revision number shows the revision number of the start revision of -your branch and the first the current revision. You can do a dry run of the -merge like this: +**Note:** if the branch already exists your changes will be pushed into it. + +**Merge from master regularly:** +It is recommended to merge the changes in master to the branch on a regular +basis. This makes it easier to merge the branch back to master later. ``` -svn merge --dry-run -r 6495:6546 https://svn.osgeo.org/qgis/trunk/qgis +git merge master ``` -After you are happy with the changes that will be made do the merge for real -like this: +**Documentation on wiki:** +It is also recommended to document the intended changes and the current status +of the work on a wiki page. -``` -svn merge -r 6495:6546 https://svn.osgeo.org/qgis/trunk/qgis -svn commit -m "Merged upstream changes from trunk to my branch" -``` +**Testing before merging back to master:** +When you are finished with the new feature and happy with the stability, make +an announcement on the developer list. Before merging back, the changes will +be tested by developers and users. Binary packages (especially for OsX and +Windows) will be generated to also involve non-developers. In trac, a new +Component will be opened to file tickets against. Once there are no remaining +issues left, the technical advisor of the PSC merges the changes into master. == Submitting Patches == @@ -582,7 +540,7 @@ easily, and help us deal with the patches that are sent to use easily. === Patch file naming === If the patch is a fix for a specific bug, please name the file with the bug -number in it e.g. **bug777fix.diff**, and attach it to the original bug report +number in it e.g. **bug777fix.patch**, and attach it to the original bug report in trac (https://trac.osgeo.org/qgis/). If the bug is an enhancement or new feature, its usually a good idea to create @@ -592,27 +550,22 @@ a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you This makes it easier for us to apply the patches since we don't need to navigate to a specific place in the source tree to apply the patch. Also when I -receive patches I usually evaluate them using kompare, and having the patch +receive patches I usually evaluate them using merge, and having the patch from the top level dir makes this much easier. Below is an example of how you can include multiple changed files into your patch from the top level directory: ``` -cd qgis -svn diff src/ui/somefile.ui src/app/somefile2.cpp > bug872fix.diff +cd Quantum-GIS +git checkout master +git pull origin master +git checkout newfeature +git format-patch master --stdout > bug777fix.patch ``` -=== Including non version controlled files in your patch === - -If your improvements include new files that don't yet exist in the repository, -you should indicate to svn that they need to be added before generating your -patch e.g. - -``` -cd qgis -svn add src/lib/somenewfile.cpp -svn diff > bug7887fix.diff -``` +This will make sure your master branch is in sync with the upstream repository, +and then generate a patch which contains the delta between your feature branch +and what is in the master branch. === Getting your patch noticed === @@ -632,7 +585,7 @@ under the GPL. -== Obtaining SVN Write Access == +== Obtaining GIT Write Access == Write access to QGIS source tree is by invitation. Typically when a person submits several (there is no fixed number here) substantial patches that @@ -646,74 +599,25 @@ demonstrated ability to submit patches and should ideally have submitted several substantial patches that demonstrate their understanding of modifying the code base without breaking things, etc. +**Note:** Since moving to GIT, we are less likely to grant write access to new +developers since it is trivial to share code within github by forking QGIS and +then issuing pull requests. -=== Procedure once you have access === - - -Checkout the sources: - -``` -svn co https://svn.osgeo.org/qgis/trunk/qgis qgis -``` - - -Build the sources (see INSTALL document for proper detailed instructions) - -``` -cd qgis -mkdir build -ccmake .. (set your preferred options) -make -make install (maybe you need to do with sudo / root perms) -``` - -Make your edits - -``` -cd .. -``` - -Make your changes in sources. Always check that everything compiles before -making any commits. Try to be aware of possible breakages your commits may -cause for people building on other platforms and with older / newer versions of +Always check that everything compiles before making any commits / pull +requests. Try to be aware of possible breakages your commits may cause for +people building on other platforms and with older / newer versions of libraries. - -Add files (if you added any new files). The svn status command can be used to -quickly see if you have added new files. - -``` -svn status src/pluguns/grass/modules -``` - -Files listed with ? in front are not in SVN and possibly need to be added by -you: - -``` -svn add src/pluguns/grass/modules/foo.xml -``` - -Commit your changes - -``` -svn commit src/pluguns/grass/modules/foo.xml -``` - -Your editor (as defined in $EDITOR environment variable) will appear and you -should make a comment at the top of the file (above the area that says 'don't -change this'. Put a descriptive comment and rather do several small commits if -the changes across a number of files are unrelated. Conversely we prefer you to -group related changes into a single commit. - -Save and close in your editor. The first time you do this, you should be -prompted to put in your username and password. Just use the same ones as your -trac account. - +When making a commit, your editor (as defined in $EDITOR environment variable) +will appear and you should make a comment at the top of the file (above the +area that says 'don't change this'. Put a descriptive comment and rather do +several small commits if the changes across a number of files are unrelated. +Conversely we prefer you to group related changes into a single commit. = Unit Testing = -As of November 2007 we require all new features going into trunk to be +As of November 2007 we require all new features going into master to be accompanied with a unit test. Initially we have limited this requirement to **qgis_core**, and we will extend this requirement to other parts of the code base once people are familiar with the procedures for unit testing explained in the diff --git a/doc/INSTALL.html b/doc/INSTALL.html new file mode 100644 index 000000000000..f88bc0e36c7c --- /dev/null +++ b/doc/INSTALL.html @@ -0,0 +1,2383 @@ + + + + + +Quantum GIS (QGIS) + + + + + + + + + +
+

+Last Updated: Thursday May 26, 2011 +Last Change : Tuesday May 24, 2011 +

+ + + +

1. Introduction

+ +

+This document is the original installation guide of the described software +Quantum GIS. The software and hardware descriptions named in this +document are in most cases registered trademarks and are therefore subject +to the legal requirements. Quantum GIS is subject to the GNU General Public +License. Find more information on the Quantum GIS Homepage: +http://www.qgis.org +

+

+The details, that are given in this document have been written and verified +to the best of knowledge and responsibility of the editors. Nevertheless, +mistakes concerning the content are possible. Therefore, all data are not +liable to any duties or guarantees. The editors and publishers do not take +any responsibility or liability for failures and their consequences. You are +always welcome for indicating possible mistakes. +

+

+You can download this document as part of the Quantum GIS 'User and +Installation Guide' in HTML and PDF format via http://www.qgis.org. A current +version is also available at the wiki, see: +http://www.qgis.org/wiki/Installation_Guide +

+

+Translations of this document can also be downloaded at the documentation area +of the Quantum GIS project at http://www.qgis.org. More information is +available via http://wiki.qgis.org/qgiswiki/DocumentationWritersCorner. +

+

+Please visit http://qgis.org for information on joining our mailing lists +and getting involved in the project further. +

+

+/!\ Note to document writers: Please use this document as the central +place for describing build procedures. Please do not remove this notice. +

+

+/!\ Note to document writers: This documented is generated from +doc/INSTALL.t2t - if you need to edit this document, be sure to edit that +file rather than the generated INSTALL document found in the root of the +source directory. +

+ + +

2. Overview

+ +

+QGIS, like a number of major projects (eg. KDE 4.0), uses CMake +(http://www.cmake.org) for building from source. +

+

+Following a summary of the required dependencies for building: +

+

+Required build tools: +

+ +
    +
  • CMake >= 2.6.0 +
  • Flex +
  • Bison +
+ +

+Required build deps: +

+ +
    +
  • Qt >= 4.4.0 +
  • Proj >= 4.4.x +
  • GEOS >= 3.0 +
  • Sqlite3 >= 3.0.0 +
  • GDAL/OGR >= 1.4.x +
  • Qwt >= 5.0 +
+ +

+Optional dependencies: +

+ +
    +
  • for GRASS plugin - GRASS >= 6.0.0 (libraries compiled with exceptions support on Linux 32bit) +
  • for georeferencer - GSL >= 1.8 +
  • for postgis support and SPIT plugin - PostgreSQL >= 8.0.x +
  • for gps plugin - expat >= 1.95 and gpsbabel +
  • for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred) +
  • for python support - SIP >= 4.8, PyQt >= must match Qt version +
  • for qgis mapserver - FastCGI +
+ + +

3. Building on GNU/Linux

+ + +

3.1. Building QGIS with Qt 4.x

+ +

+Requires: Ubuntu / Debian derived distro +

+

+These notes are for Ubuntu - other versions and Debian derived distros may +require slight variations in package names. +

+

+These notes are for if you want to build QGIS from source. One of the major +aims here is to show how this can be done using binary packages for *all* +dependencies - building only the core QGIS stuff from source. I prefer this +approach because it means we can leave the business of managing system packages +to apt and only concern ourselves with coding QGIS! +

+

+This document assumes you have made a fresh install and have a 'clean' system. +These instructions should work fine if this is a system that has already been +in use for a while, you may need to just skip those steps which are irrelevant +to you. +

+

+/!\ Note: Refer to the section Building Debian packages for building +debian packages. Unless you plan to develop on QGIS, that is probably the +easiest option to compile and install QGIS. +

+ + +

3.2. Prepare apt

+ +

+The packages qgis depends on to build are available in the "universe" component +of Ubuntu. This is not activated by default, so you need to activate it: +

+ +
    +
  1. Edit your /etc/apt/sources.list file. +
  2. Uncomment all the lines starting with "deb" +

    +Also you will need to be running (K)Ubuntu 'edgy' or higher in order for +all dependencies to be met. +

    +Now update your local sources database: +

    + +
    +sudo apt-get update 
    +
    + +
+ + +

3.3. Install build dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Distributioninstall command for packages
lennyapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-dev libqwt5-qt4-dev libsqlite3-dev pkg-config proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4-dev sip4 txt2tags
lucidapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags
maverickapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags
nattyapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags
sidapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags
squeezeapt-get install bison cmake doxygen flex graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags
+ +

+(extracted from the respective control files in debian/) +

+

+/!\ A Special Note: If you are following this set of instructions on +a system where you already have Qt3 development tools installed, there will +be a conflict between Qt3 tools and Qt4 tools. For example, qmake will +point to the Qt3 version, not the Qt4. Ubuntu Qt4 and Qt3 packages are +designed to live alongside each other. This means that, for example, if you +have them both installed, you will have three qmake exe's: +

+ +
+/usr/bin/qmake -> /etc/alternatives/qmake 
+/usr/bin/qmake-qt3
+/usr/bin/qmake-qt4 
+
+ +

+The same applies to all other Qt binaries. You will notice above that the +canonical 'qmake' is managed by apt alternatives, so before we start to +build QGIS, we need to make Qt4 the default. To return Qt3 to default later +you can use this same process. +

+

+You can use apt alternatives to correct this so that the Qt4 version of +applications is used in all cases: +

+ +
+sudo update-alternatives --config qmake
+sudo update-alternatives --config uic 
+sudo update-alternatives --config designer 
+sudo update-alternatives --config assistant 
+sudo update-alternatives --config qtconfig 
+sudo update-alternatives --config moc 
+sudo update-alternatives --config lupdate 
+sudo update-alternatives --config lrelease 
+sudo update-alternatives --config linguist 
+
+ +

+Use the simple command line dialog that appears after running each of the +above commands to select the Qt4 version of the relevant applications. +

+

+/!\ Note: For python language bindings SIP >= 4.5 and PyQt4 >= 4.1 is required! Some stable GNU/Linux +distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To include support for python +language bindings you may need to build and install those packages from source. +

+ + +

3.4. Setup ccache (Optional)

+ +

+You should also setup ccache to speed up compile times: +

+ +
+cd /usr/local/bin 
+sudo ln -s /usr/bin/ccache gcc 
+sudo ln -s /usr/bin/ccache g++ 
+
+ + +

3.5. Prepare your development environment

+ +

+As a convention I do all my development work in $HOME/dev/<language>, so in +this case we will create a work environment for C++ development work like +this: +

+ +
+mkdir -p ${HOME}/dev/cpp 
+cd ${HOME}/dev/cpp 
+
+ +

+This directory path will be assumed for all instructions that follow. +

+ + +

3.6. Check out the QGIS Source Code

+ +

+There are two ways the source can be checked out. Use the anonymous method +if you do not have edit privileges for the QGIS source repository, or use + the developer checkout if you have permissions to commit source code + changes. +

+

+1. Anonymous Checkout +

+ +
+cd ${HOME}/dev/cpp 
+svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
+
+ +

+2. Developer Checkout +

+ +
+cd ${HOME}/dev/cpp 
+svn co --username <yourusername> https://svn.osgeo.org/qgis/trunk/qgis qgis
+
+ +

+The first time you check out the source you will be prompted to accept the +qgis.org certificate. Press 'p' to accept it permanently: +

+ +
+Error validating server certificate for 'https://svn.qgis.org:443':
+   - The certificate is not issued by a trusted authority. Use the
+     fingerprint to validate the certificate manually!  Certificate
+     information:
+   - Hostname: svn.qgis.org
+   - Valid: from Apr  1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
+   - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
+   - Fingerprint:
+     2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject,
+     accept (t)emporarily or accept (p)ermanently?  
+
+ + +

3.7. Starting the compile

+ +

+I compile my development version of QGIS into my ~/apps directory to avoid +conflicts with Ubuntu packages that may be under /usr. This way for example +you can use the binary packages of QGIS on your system along side with your +development version. I suggest you do something similar: +

+ +
+mkdir -p ${HOME}/apps 
+
+ +

+Now we create a build directory and run ccmake: +

+ +
+cd qgis
+mkdir build
+cd build
+ccmake ..
+
+ +

+When you run ccmake (note the .. is required!), a menu will appear where +you can configure various aspects of the build. If you do not have root +access or do not want to overwrite existing QGIS installs (by your +packagemanager for example), set the CMAKE_BUILD_PREFIX to somewhere you +have write access to (I usually use /home/timlinux/apps). Now press +'c' to configure, 'e' to dismiss any error messages that may appear. +and 'g' to generate the make files. Note that sometimes 'c' needs to +be pressed several times before the 'g' option becomes available. +After the 'g' generation is complete, press 'q' to exit the ccmake +interactive dialog. +

+

+Now on with the build: +

+ +
+make
+make install
+
+ +

+It may take a little while to build depending on your platform. +

+

+After that you can try to run QGIS: +

+ +
+$HOME/apps/bin/qgis
+
+ +

+If all has worked properly the QGIS application should start up and appear +on your screen. +

+ + +

3.8. Building Debian packages

+ +

+Instead of creating a personal installation as in the previous step you can +also create debian package. This is done from the qgis root directory, where +you'll find a debian directory. +

+

+First you need to install the debian packaging tools once: +

+ +
+apt-get install build-essential
+
+ +

+First you need to create an changelog entry for your distribution. For example for Ubuntu Lucid: +

+ +
+dch -l ~lucid  --force-distribution --distribution lucid "lucid build"
+
+ +

+The QGIS packages will be created with: +

+ +
+dpkg-buildpackage -us -uc -b
+
+ +

+/!\ Note: If dpkg-buildpackage complains about unmet build dependencies +you can install them using apt-get and re-run the command. +

+

+/!\ Note: If you have libqgis1-dev installed, you need to remove it first +using dpkg -r libqgis1-dev. Otherwise dpkg-buildpackage will complain about a +build conflict. +

+

+The packages are created in the parent directory (ie. one level up). +Install them using dpkg. E.g.: +

+ +
+sudo debi
+
+ + +

3.9. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support

+ +

+The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want +to use different versions of the software (gdal, grass, qgis), just make the +necessary adjustments to the following code. This guide assumes that you don't have +installed any previous version of gdal, grass and qgis. +

+ +

3.9.1. Step 1: install base packages

+ +

+First you need to install the necessary packages required to download the source +code and compile it. Open the terminal and issue the following command: +

+ +
+sudo apt-get install build-essential g++ subversion
+
+ +

3.9.2. Step 2: compile and install the ecw libraries

+ +

+Go to the ERDAS web site http://www.erdas.com/ and follow the links +"'products --> ECW JPEG2000 Codec SDK --> downloads'" +then download the "'Image Compression SDK Source Code 3.3'" (you'll need to make a registration +and accept a license). +

+

+Uncompress the arquive in a proper location (this guide assumes +that all the downloaded source code will be placed in the user home) +and the enter the newly created folder +

+ +
+cd /libecwj2-3.3
+
+ +

+Compile the code with the standard commands +

+ +
+./configure
+
+ +

+then +

+ +
+make
+
+ +

+then +

+ +
+sudo make install
+
+ +

+leave the folder +

+ +
+cd ..
+
+ +

3.9.3. Step 3: download the MrSID binaries

+ +

+Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links +"'download --> Developer SDKs'", +then download the "'GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'" +(you'll need to make a registration and accept a license). +

+

+Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167" +

+ +

3.9.4. Step 4: compile and install the gdal libraries

+ +

+Download the latest gdal source code +

+ +
+svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
+
+ +

+then copy a few files from the MrSID binaries folder to the folder with the gdal source code +('replace "USERNAME" with your actual account username') +

+ +
+cp /home/USERNAME/Geo_DSDK-7.0.0.2167/include/*.* /home/USERNAME/gdal/frmts/mrsid/
+
+ +

+enter the gdal source code folder +

+ +
+cd /gdal
+
+ +

+and run configure with a few specific parameters +

+ +
+./configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
+
+ +

+at the end of the configuration process you should read something like +

+ +
+...
+GRASS support:             no
+...
+...
+...
+ECW support:               yes
+MrSID support              yes			
+...
+
+ +

+then compile normally +

+ +
+make
+
+ +

+and +

+ +
+sudo make install
+
+ +

+finish the process by creating the necessary links to the most recent shared libraries +

+ +
+sudo ldconfig
+
+ +

+at this point you may want to check if gdal was compiled correctly with MrSID and ECW +support by issuing one (or both) of the following commands +

+ +
+gdalinfo --formats | grep 'ECW'
+
+ +
+gdalinfo --formats | grep 'SID'
+
+ +

+leave the folder +

+ +
+cd ..
+
+ +

3.9.5. Step 5: compile and install GRASS

+ +

+Before downloading and compile GRASS source code you need to install a few +other libraries and programs. We can do this trough apt +

+ +
+sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \
+tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \
+libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake \
+python-dev python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev libxmu6 \
+libqt4-dev libgsl0-dev python-qt4 swig python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
+tk8.4-dev tk8.4 libfftw3-dev libfftw3-3
+
+ +

+At this point we can get the GRASS source code: you may want to download it +trough svn or maybe you want just to download the latest available source code arquive. +For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz +

+

+Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters +

+ +
+CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
+--with-python=/usr/bin/python2.5-config
+
+ +

+The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also http://trac.osgeo.org/grass/ticket/869 +

+

+Then as usual (it will take a while) +

+ +
+make
+
+ +

+and +

+ +
+sudo make install
+
+ +

+leave the folder +

+ +
+cd ..
+
+ +

+you have now compiled and installed GRASS (also with the new wxpyhton interface) so you +may want to give it a try +

+ +
+grass64 -wxpython
+
+ +

3.9.6. Step 6: compile and install QGIS

+ +

+As for GRASS you can obtain the QGIS source code from different sources, +for instance from svn or just by downloading one of the source code arquives available +at http://www.qgis.org/download/sources.html +

+

+For example download the QGIS 1.1.0 source code here http://download.osgeo.org/qgis/src/qgis_1.1.0.tar.gz +

+

+uncompress the arquive and enter the newly created folder +

+ +
+cd /qgis_1.1.0
+
+ +

+then run ccmake +

+ +
+ccmake .
+
+ +

+press the "c" key, then when the option list will appear we need to manually +configure the "GRASS_PREFIX" parameter. Scroll down until the "GRASS_PREFIX" will appear, +press enter and manually set it to +

+ +
+/usr/local/grass-6.4.0RC4
+
+ +

+then press enter again. +

+

+Press the "c" again and the option "Press [g] to generate and exit" will appear. +Press the "g" key to generate and exit. +

+

+then as usual (it will take a while) +

+ +
+make
+
+ +

+and +

+ +
+sudo make install
+
+ +

+At the end of the process you should have QGIS and GRASS working with MrSID and ECW +raster format support. +

+

+To run QGIS just use this command +

+ +
+qgis
+
+ + +

4. Building on Windows

+ + +

4.1. Building with Microsoft Visual Studio

+ +

+This section describes how to build QGIS using Visual Studio on Windows. This +is currently also who the binary QGIS packages are made (earlier versions used +MinGW). +

+

+This section describes the setup required to allow Visual Studio to be used to +build QGIS. +

+ +

4.1.1. Visual C++ Express Edition

+ +

+The free (as in free beer) Express Edition installer is available under: +

+
+ http://download.microsoft.com/download/d/c/3/dc3439e7-5533-4f4c-9ba0-8577685b6e7e/vcsetup.exe +
+

+The optional products are not necessary. In the process the Windows SDKs for +Visual Studio 2008 will also be downloaded and installed. +

+

+You also need the Microsoft Windows Server® 2003 R2 Platform SDK (for setupapi): +

+
+ http://download.microsoft.com/download/f/a/d/fad9efde-8627-4e7a-8812-c351ba099151/PSDK-x86.exe +
+

+You only need Microsoft Windows Core SDK / Build Environment (x86 32-Bit). +

+ +

4.1.2. Other tools and dependencies

+ +

+Download and install following packages: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ToolWebsite
CMakehttp://www.cmake.org/files/v2.8/cmake-2.8.4-win32-x86.exe
Flexhttp://gnuwin32.sourceforge.net/downlinks/flex.php
Bisonhttp://gnuwin32.sourceforge.net/downlinks/bison.php
SVNhttp://sourceforge.net/projects/win32svn/files/1.6.13/Setup-Subversion-1.6.13.msi/download
or GIThttp://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe
OSGeo4Whttp://download.osgeo.org/osgeo4w/osgeo4w-setup.exe
+ +

+OSGeo4W does not only provide ready packages for the current QGIS release and +nightly builds of the trunk, but also offers most of the dependencies needs to +build it. +

+

+For the QGIS build you need to install following packages from OSGeo4W (select +Advanced Installation): +

+ +
    +
  • expat +
  • fcgi +
  • gdal17 +
  • grass +
  • gsl-devel +
  • iconv +
  • pyqt4 +
  • qt4-devel +
  • qwt5-devel-qt4 +
  • sip +
+ +

+This will also select packages the above packages depend on. +

+

+Additionally QGIS also needs the include file unistd.h, which normally +doesn't exist on Windows. It's shipped with Flex/Bison in GnuWin32\include +and needs to be copied into the VC\include directory of your Visual C++ +installation. +

+

+Earlier versions of this document also covered how to build all above +dependencies. If you're interested in that, check the history of this page in the Wiki +or the SVN repository. +

+ +

4.1.3. Setting up the Visual Studio project with CMake

+ +

+To start a command prompt with an environment that both has the VC++ and the OSGeo4W +variables create the following batch file (assuming the above packages were +installed in the default locations): +

+ +
+@echo off
+path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.8\bin;%PROGRAMFILES%\subversion\bin;%PROGRAMFILES%\GnuWin32\bin
+set PYTHONPATH=
+
+set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\
+call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
+
+set INCLUDE=%INCLUDE%;%PROGRAMFILES%\Microsoft Platform SDK for Windows Server 2003 R2\include
+set LIB=%LIB%;%PROGRAMFILES%\Microsoft Platform SDK for Windows Server 2003 R2\lib
+
+set OSGEO4W_ROOT=C:\OSGeo4W
+call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
+
+@set GRASS_PREFIX=c:/OSGeo4W/apps/grass/grass-6.4.0
+@set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include
+@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib
+
+@cmd
+
+ +

+Start the batch file and on the command prompt checkout the QGIS source from +svn to the source directory qgis-trunk: +

+ +
+svn co https://svn.osgeo.org/qgis/trunk/qgis qgis-trunk
+
+ +

+or using git-svn (from the git shell): +

+ +
+git svn clone --username $USER --revision 15611:HEAD https://svn.osgeo.org/qgis/trunk/qgis
+
+ +

+Create a 'build' directory somewhere. This will be where all the build output +will be generated. +

+

+Now run cmake-gui and in the Where is the source code: box, browse to +the top level QGIS directory. +

+

+In the Where to build the binaries: box, browse to the 'build' directory you +created. +

+

+Adjust the path to bison and flex so that the shortened C:/Progra~1 is used +rather than C:/Program Files. +

+

+Verify that the 'BINDINGS_GLOBAL_INSTALL' option is not checked, so that python +bindings are placed into the output directory when you run the INSTALL target. +

+

+Hit Configure to start the configuration and select Visual Studio 9 2008 +and keep native compilers and click Finish. +

+

+The configuration should complete without any further questions and allow you to +click Generate. +

+

+Now close cmake-gui and continue on the command prompt by starting +vcexpress. Use File / Open / Project/Solutions and open the +qgis-x.y.z.sln File in your project directory. +

+

+Change Solution Configuration from Debug to RelWithDebInfo (Release +with Debug Info) or Release before you build QGIS using the ALL_BUILD +target (otherwise you need debug libraries that are not included). +

+

+After the build completed you should install QGIS using the INSTALL target. +

+

+Install QGIS by building the INSTALL project. By default this will install to +c:\Program Files\qgis<version> (this can be changed by changing the +CMAKE_INSTALL_PREFIX variable in cmake-gui). +

+

+You will also either need to add all the dependency DLLs to the QGIS install +directory or add their respective directories to your PATH. +

+ +

4.1.4. Packaging

+ +

+To create a windows 'all in one' standalone package under ubuntu (yes you +read correctly) do the following: +

+ +
+sudo apt-get install nsis
+
+ +

+Now +

+ +
+cd qgis/ms-windows/osgeo4w
+
+ +

+And run the nsis creation script: +

+ +
+creatensis.pl
+
+ +

+When the script completes, it should have created a QGIS installer executable +in the ms-windows directory (using the QGIS binaries from OSGEO4W). +

+ +

4.1.5. Packaging your own build of QGIS

+ +

+Assuming you have completed the above packaging step, if you want to include +your own hand built QGIS executables, you need to copy them in from your +windows installation into the ms-windows file tree created by the creatensis +script. +

+ +
+cd ms-windows/
+rm -rf osgeo4w/unpacked/apps/qgis/*
+cp -r /tmp/qgis1.7.0/* osgeo4w/unpacked/apps/qgis/
+
+ +

+Now create a package. +

+ +
+./quickpackage.sh
+
+ +

+After this you should now have a nsis installer containing your own build +of QGIS and all dependencies needed to run it on a windows machine. +

+ +

4.1.6. Osgeo4w packaging

+ +

+The actual packaging process is currently not documented, for now please take a +look at: +

+

+ms-windows/osgeo4w/package.cmd +

+ + +

4.2. Building using MinGW

+ +

+Note: This section might be outdated as nowadays Visual C++ is use to build +the "official" packages. +

+

+Note: For a detailed account of building all the dependencies yourself you +can visit Marco Pasetti's website here: +

+

+http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html +

+

+Read on to use the simplified approach with pre-built libraries... +

+ +

4.2.1. MSYS

+ +

+MSYS provides a unix style build environment under windows. We have created a +zip archive that contains just about all dependencies. +

+

+Get this: +

+

+http://download.osgeo.org/qgis/win32/msys.zip +

+

+and unpack to c:\msys +

+

+If you wish to prepare your msys environment yourself rather than using +our pre-made one, detailed instructions are provided elsewhere in this +document. +

+ +

4.2.2. Qt

+ +

+Download Qt opensource precompiled edition exe and install (including the +download and install of mingw) from here: +

+

+http://qt.nokia.com/downloads/ +

+

+When the installer will ask for MinGW, you don't need to download and install +it, just point the installer to c:\msys\mingw +

+

+When Qt installation is complete: +

+

+Edit C:\Qt\4.7.0\bin\qtvars.bat and add the following lines: +

+ +
+set PATH=%PATH%;C:\msys\local\bin;c:\msys\local\lib 
+set PATH=%PATH%;"C:\Program Files\Subversion\bin" 
+
+ +

+I suggest you also add C:\Qt\4.7.0\bin\ to your Environment Variables Path in +the windows system preferences. +

+

+If you plan to do some debugging, you'll need to compile debug version of Qt: +C:\Qt\4.7.0\bin\qtvars.bat compile_debug +

+

+Note: there is a problem when compiling debug version of Qt 4.7, the script ends with +this message "mingw32-make: *** No rule to make target `debug'. Stop.". To +compile the debug version you have to go out of src directory and execute the +following command: +

+ +
+c:\Qt\4.7.0 make 
+
+ +

4.2.3. Flex and Bison

+ +

+Get Flex +http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16424 +(the zip bin) and extract it into c:\msys\mingw\bin +

+ +

4.2.4. Python stuff (optional)

+ +

+Follow this section in case you would like to use Python bindings for QGIS. To +be able to compile bindings, you need to compile SIP and PyQt4 from sources as +their installer doesn't include some development files which are necessary. +

+ +

4.2.4.1. Download and install Python - use Windows installer

+ +

+(It doesn't matter to what folder you'll install it) +

+

+http://python.org/download/ +

+ +

4.2.4.2. Download SIP and PyQt4 sources

+ +

+http://www.riverbankcomputing.com/software/sip/download +http://www.riverbankcomputing.com/software/pyqt/download +

+

+Extract each of the above zip files in a temporary directory. Make sure +to get versions that match your current Qt installed version. +

+ +

4.2.4.3. Compile SIP

+ +
+c:\Qt\4.7.0\bin\qtvars.bat 
+python configure.py -p win32-g++ 
+make 
+make install 
+
+ +

4.2.4.4. Compile PyQt

+ +
+c:\Qt\4.7.0\bin\qtvars.bat 
+python configure.py 
+make 
+make install 
+
+ +

4.2.4.5. Final python notes

+ +

+/!\ You can delete the directories with unpacked SIP and PyQt4 sources after a +successfull install, they're not needed anymore. +

+ +

4.2.5. Subversion

+ +

+In order to check out QGIS sources from the repository, you need Subversion +client. This installer should work fine: +

+

+http://www.sliksvn.com/pub/Slik-Subversion-1.6.13-win32.msi +

+ +

4.2.6. CMake

+ +

+CMake is build system used by Quantum GIS. Download it from here: +

+

+http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe +

+ +

4.2.7. QGIS

+ +

+Start a cmd.exe window ( Start -> Run -> cmd.exe ) Create development +directory and move into it +

+ +
+md c:\dev\cpp 
+cd c:\dev\cpp 
+
+ +

+Check out sources from SVN: +

+

+For svn trunk: +

+ +
+svn co https://svn.osgeo.org/qgis/trunk/qgis 
+
+ +

+For svn 1.5 branch +

+ +
+svn co https://svn.osgeo.org/qgis/branches/Release-1_5_0 qgis1.5.0
+
+ +

4.2.8. Compiling

+ +

+As a background read the generic building with CMake notes at the end of +this document. +

+

+Start a cmd.exe window ( Start -> Run -> cmd.exe ) if you don't have one +already. Add paths to compiler and our MSYS environment: +

+ +
+c:\Qt\4.7.0\bin\qtvars.bat 
+
+ +

+For ease of use add c:\Qt\4.7.0\bin\ to your system path in system +properties so you can just type qtvars.bat when you open the cmd console. +Create build directory and set it as current directory: +

+ +
+cd c:\dev\cpp\qgis 
+md build 
+cd build 
+
+ +

4.2.9. Configuration

+ +
+cmakesetup ..  
+
+ +

+Note: You must include the '..' above. +

+

+Click 'Configure' button. When asked, you should choose 'MinGW Makefiles' as +generator. +

+

+There's a problem with MinGW Makefiles on Win2K. If you're compiling on this +platform, use 'MSYS Makefiles' generator instead. +

+

+All dependencies should be picked up automatically, if you have set up the +Paths correctly. The only thing you need to change is the installation +destination (CMAKE_INSTALL_PREFIX) and/or set 'Debug'. +

+

+For compatibility with NSIS packaging scripts I recommend to leave the install +prefix to its default c:\program files\ +

+

+When configuration is done, click 'OK' to exit the setup utility. +

+ +

4.2.10. Compilation and installation

+ +
+ make make install 
+
+ +

4.2.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)

+ +

+Make sure to copy all .dll:s needed to the same directory as the qgis.exe +binary is installed to, if not already done so, otherwise QGIS will complain +about missing libraries when started. +

+

+A possibility is to run qgis.exe when your path contains c:\msys\local\bin and +c:\msys\local\lib directories, so the DLLs will be used from that place. +

+ +

4.2.12. Create the installation package: (optional)

+ +

+Download and install NSIS from (http://nsis.sourceforge.net/Main_Page) +

+

+Now using windows explorer, enter the win_build directory in your QGIS source +tree. Read the READMEfile there and follow the instructions. Next right click +on qgis.nsi and choose the option 'Compile NSIS Script'. +

+ + +

4.3. Creation of MSYS environment for compilation of Quantum GIS

+ +

4.3.1. Initial setup

+ +

4.3.1.1. MSYS

+ +

+This is the environment that supplies many utilities from UNIX world in Windows and is needed +by many dependencies to be able to compile. +

+

+Download from here: +

+
+ http://puzzle.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-2004.04.30-1.exe +
+

+Install to c:\msys +

+

+All stuff we're going to compile is going to get to this directory (resp. its subdirs). +

+ +

4.3.1.2. MinGW

+ +

+Download from here: +

+
+ http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe +
+

+Install to c:\msys\mingw +

+

+It suffices to download and install only g++ and mingw-make components. +

+ +

4.3.1.3. Flex and Bison

+ +

+Flex and Bison are tools for generation of parsers, they're needed for GRASS and also QGIS compilation. +

+

+Download the following packages: +

+
+ http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php +
+
+ http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php +
+
+ http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php +
+

+Unpack them all to c:\msys\local +

+ +

4.3.2. Installing dependencies

+ +

4.3.2.1. Getting ready

+ +

+Paul Kelly did a great job and prepared a package of precompiled libraries for GRASS. +The package currently includes: +

+ +
    +
  • zlib-1.2.3 +
  • libpng-1.2.16-noconfig +
  • xdr-4.0-mingw2 +
  • freetype-2.3.4 +
  • fftw-2.1.5 +
  • PDCurses-3.1 +
  • proj-4.5.0 +
  • gdal-1.4.1 +
+ +

+It's available for download here: +

+
+ http://www.stjohnspoint.co.uk/grass/wingrass-extralibs.tar.gz +
+

+Moreover he also left the notes how to compile it (for those interested): +

+
+ http://www.stjohnspoint.co.uk/grass/README.extralibs +
+

+Unpack the whole package to c:\msys\local +

+ +

4.3.2.2. GRASS

+ +

+Grab sources from CVS or use a weekly snapshot, see: +

+
+ http://grass.itc.it/devel/cvs.php +
+

+In MSYS console go to the directory where you've unpacked or checked out sources +(e.g. c:\msys\local\src\grass-6.3.cvs) +

+

+Run these commands: +

+ +
+export PATH="/usr/local/bin:/usr/local/lib:$PATH"
+./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg \
+--without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw \
+--with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes \
+--with-proj-share=/usr/local/share/proj
+make
+make install
+
+ +

+It should get installed to c:\msys\local\grass-6.3.cvs +

+

+By the way, these pages might be useful: +

+ + + +

4.3.2.3. GEOS

+ +

+Download the sources: +

+
+ http://geos.refractions.net/geos-2.2.3.tar.bz2 +
+

+Unpack to e.g. c:\msys\local\src +

+

+To compile, I had to patch the sources: in file source/headers/timeval.h line 13. +Change it from: +

+ +
+#ifdef _WIN32
+
+ +

+to: +

+ +
+#if defined(_WIN32) && defined(_MSC_VER)
+
+ +

+Now, in MSYS console, go to the source directory and run: +

+ +
+./configure --prefix=/usr/local
+make
+make install
+
+ +

4.3.2.4. SQLITE

+ +

+You can use precompiled DLL, no need to compile from source: +

+

+Download this archive: +

+
+ http://www.sqlite.org/sqlitedll-3_3_17.zip +
+

+and copy sqlite3.dll from it to c:\msys\local\lib +

+

+Then download this archive: +

+
+ http://www.sqlite.org/sqlite-source-3_3_17.zip +
+

+and copy sqlite3.h to c:\msys\local\include +

+ +

4.3.2.5. GSL

+ +

+Download sources: +

+
+ ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz +
+

+Unpack to c:\msys\local\src +

+

+Run from MSYS console in the source directory: +

+ +
+./configure
+make
+make install
+
+ +

4.3.2.6. EXPAT

+ +

+Download sources: +

+
+ http://dfn.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz +
+

+Unpack to c:\msys\local\src +

+

+Run from MSYS console in the source directory: +

+ +
+./configure
+make
+make install
+
+ +

4.3.2.7. POSTGRES

+ +

+We're going to use precompiled binaries. Use the link below for download: +

+
+ http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.2.4%2Fwin32%2Fpostgresql-8.2.4-1-binaries-no-installer.zip +
+

+copy contents of pgsql directory from the archive to c:\msys\local +

+ +

4.3.3. Cleanup

+ +

+We're done with preparation of MSYS environment. Now you can delete all stuff in c:\msys\local\src - it takes quite a lot +of space and it's not necessary at all. +

+ + +

5. MacOS X: building using frameworks and Cmake

+ +

+In this approach I will try to avoid as much as possible building dependencies +from source and rather use frameworks wherever possible. +

+

+The base system here is Mac OS X 10.4 (Tiger), with a single architecture build. +Included are a few notes for building on Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard). +Make sure to read each section completely before typing the first command you see. +

+

+General note on Terminal usage: When I say "cd" to a folder in a Terminal, +it means type "cd " (without the quotes, make sure to type a space after) and +then type the path to said folder, then <return>. A simple way to do this without having to know +and type the full path is, after type the "cd " part, drag the folder (use the icon +in its window title bar, or drag a folder from within a window) from the Desktop +to the Terminal, then tap <return>. +

+

+Parallel Compilation: On multiprocessor/multicore Macs, it's possible to speed +up compilation, but it's not automatic. Whenever you type "make" (but NOT "make install"), +instead type: +

+ +
+make -j [n]
+
+ +

+Replace [n] with the number of cores and/or processors your Mac has. On recent +models with hyperthreading processors this can be double the physical count of +processors and cores. +

+

+ie: Mac Pro "8 Core" model (2 quad core processors) = 8 +

+

+ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4 +

+ + +

5.1. Install Qt4 from .dmg

+ +

+You need a minimum of Qt-4.4.0. I suggest getting the latest. +

+

+Snow Leopard note: If you are building on Snow Leopard, you will need to +decide between 32-bit support in the older, Qt Carbon branch, or 64-bit +support in the Qt Cocoa branch. Appropriate installers are available for both +as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa. +

+

+PPC note: There appear to be issues with Qt Cocoa on PPC Macs. QT Carbon +is recommended on PPC Macs. +

+ +
+http://qt.nokia.com/downloads
+
+ +

+If you want debug frameworks, Qt also provides a dmg with these. These are in +addition to the non-debug frameworks. +

+

+Once downloaded open the dmg and run the installer. Note you need admin +privileges to install. +

+

+Qt note: Starting in Qt 4.4, libQtCLucene was added, and in 4.5 +libQtUiTools was added, both in /usr/lib. When using a system SDK +these libraries will not be found. To fix this problem, +add symlinks to /usr/local: +

+ +
+sudo ln -s /usr/lib/libQtUiTools.a /usr/local/lib/
+sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/
+
+ +

+These should then be found automatically on Leopard and above. Earlier systems +may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS, +CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build. +

+ + +

5.2. Install development frameworks for QGIS dependencies

+ +

+Download William Kyngesburye's excellent GDAL Complete package that includes +PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also +a GSL framework. +

+ +
+http://www.kyngchaos.com/wiki/software/frameworks
+
+ +

+Once downloaded, open and install the frameworks. +

+

+William provides an additional installer package for Postgresql (for PostGIS support). +Qgis just needs the libpq client library, so unless you want to setup the full +Postgres + PostGIS server, all you need is the client-only package. +It's available here: +

+ +
+http://www.kyngchaos.com/wiki/software/postgres 
+
+ +

+Also available is a GRASS application: +

+ +
+http://www.kyngchaos.com/wiki/software/grass
+
+ +

5.2.1. Additional Dependencies: General compatibility note

+ +

+There are some additional dependencies that, at the time of writing, are not +provided as frameworks or installers so we will need to build these from source. +If you are wanting to build Qgis as a 64-bit application, you will need to +provide the appropriate build commands to produce 64-bit support in dependencies. +Likewise, for 32-bit support on Snow Leopard, you will need to override the +default system architecture, which is 64-bit, according to instructions for +individual dependency packages. +

+

+Stable release versions are preferred. Beta and other development versions may +have problems and you are on your own with those. +

+ +

5.2.2. Additional Dependencies: Expat

+ +

+Snow Leopard note: Snow Leopard includes a usable expat, so this step is +not necessary on Snow Leopard. +

+

+Get the expat sources: +

+ +
+http://sourceforge.net/project/showfiles.php?group_id=10127 
+
+ +

+Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and: +

+ +
+./configure
+make 
+sudo make install 
+
+ +

5.2.3. Additional Dependencies: Python

+ +

+Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable +Python 2.5 and 2.6, respectively. So there is no need to install Python on +Leopard and Snow Leopard. You can still install Python from python.org if preferred. +

+

+If installing from python.org, make sure you install at least the latest Python 2.x from +

+ +
+http://www.python.org/download/
+
+ +

+Python 3 is a major change, and may have compatibility issues, so try it at your own risk. +

+ +

5.2.4. Additional Dependencies: SIP

+ +

+Retrieve the python bindings toolkit SIP from +

+ +
+http://www.riverbankcomputing.com/software/sip/download
+
+ +

+Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder +and (this installs by default into the Python framework, and is appropriate only for +python.org Python installs): +

+ +
+python configure.py 
+make 
+sudo make install 
+
+ +

+Leopard notes +

+

+If building on Leopard, using Leopard's bundled Python, SIP wants to install in the +system path -- this is not a good idea. Use this configure command instead of the +basic configure above: +

+ +
+python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk
+
+ +

+Snow Leopard notes +

+

+Similar to Leopard, you should install outside the system Python path. +Also, you need to specify the architecture you want (requires at least SIP 4.9), +and make sure to run the versioned python binary (this one responds to the +'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon): +

+ +
+python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip --arch=i386 -s MacOSX10.6.sdk
+
+ +

+For 64-bit Qt (Qt Cocoa), use this configure line: +

+ +
+python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
+
+ +

5.2.5. Additional Dependencies: PyQt

+ +

+Retrieve the python bindings toolkit for Qt from +

+ +
+http://www.riverbankcomputing.com/software/pyqt/download
+
+ +

+Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder +and (this installs by default into the Python framework, and is appropriate only for +python.org Python installs): +

+ +
+python configure.py 
+yes 
+
+ +

+There is a problem with the configuration that needs to be fixed now +(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir line to: +

+ +
+    'qt_dir': '/usr',
+
+ +

+Then continue with compilation and installation (this is a good place to use +parallel compilation, if you can): +

+ +
+make 
+sudo make install 
+
+ +

+Leopard notes +

+

+If building on Leopard, using Leopard's bundled Python, PyQt wants to install +in the system path -- this is not a good idea. Use this configure command +instead of the basic configure above: +

+ +
+python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
+
+ +

+If there is a problem with undefined symbols in QtOpenGL on Leopard, edit +QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS. +Then make again. +

+

+Snow Leopard notes +

+

+Similar to Leopard, you should install outside the system Python path. +Also, you need to specify the architecture you want (requires at least PyQt 4.6), +and make sure to run the versioned python binary (this one responds to the +'arch' command, which is important for pyuic4, 'python' does not). +If you are using 32-bit Qt (Qt Carbon): +

+ +
+python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch i386
+
+ +

+For 64-bit Qt (Qt Cocoa), use this configure line: +

+ +
+python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
+
+ +

5.2.6. Additional Dependencies: Qwt/PyQwt

+ +

+The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. +You can take care of both with the PyQwt source from: +

+ +
+http://pyqwt.sourceforge.net/
+
+ +

+Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1). +Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked +into PyQwt, and Qgis can't use it. So, we need to split the build. +

+

+First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so +you don't get a bloated debug static library (too bad they are not configurable from +qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +=' +line, within an 'else' block, and change 'debug' to 'release'. Like so: +

+ +
+    else {
+        CONFIG           += release     # release/debug
+    }
+
+ +

+Also uncomment (remove # prefix) the line 'CONFIG += QwtDll'. Like so: +

+ +
+CONFIG           += QwtDll
+
+ +

+If you are building for Qt Carbon 32bit on Snow Leopard, add a line at the bottom: +

+ +
+CONFIG += x86
+
+ +

+Save and close. +

+

+Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install: +

+ +
+qmake -spec macx-g++
+make
+sudo make install
+sudo install_name_tool -id /usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib \
+/usr/local/qwt-5.2.1-svn/lib/libqwt.5.dylib
+
+ +

+The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is the +minor.point version, and it may be an SVN version). Remember this for QGIS and PyQwt configuration. +

+

+Now for PyQwt. Still in the Terminal: +

+ +
+cd ../configure
+python configure.py --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
+--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
+make
+sudo make install
+
+ +

+Make sure to use the qwt install path from the Qwt build above. +

+

+Snow Leopard note +

+

+If using Qt Carbon, you need to specify which architectures to build, otherwise +it will default to a combination that does not work (ie x86_64 for a Carbon Qt). +This is not needed for Qt Cocoa. Configure as follows: +

+ +
+python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
+--extra-lflags="-arch i386" --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
+--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
+
+ +

5.2.7. Additional Dependencies: Bison

+ +

+Leopard and Snow Leopard note: Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard. +

+

+The version of bison available by default on Mac OS X 10.4 is too old so you need to +get a more recent one on your system. Download at least version 2.3 from: +

+ +
+ftp.gnu.org/gnu/bison/
+
+ +

+Now build and install it to a prefix of /usr/local.Ê Double-click the source +tarball to unpack it, then cd to the source folder and: +

+ +
+./configure --prefix=/usr/local 
+make
+sudo make install 
+
+ + +

5.3. Install CMake for OSX

+ +

+Get the latest source release from here: +

+ +
+http://www.cmake.org/cmake/resources/software.html
+
+ +

+Binary installers are available for OS X, but they are not recommended +(2.4 versions install in /usr instead of /usr/local, and 2.6 versions are a +strange application). Instead, download the source, double-click the source tarball, +then cd to the source folder and: +

+ +
+./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
+make
+sudo make install
+
+ + +

5.4. Install subversion for OSX

+ +

+Leopard and Snow Leopard note: Leopard and Snow Leopard (Xcode 3+) +include SVN, so this step can be skipped on Leopard and Snow Leopard. +

+

+The [http://sourceforge.net/projects/macsvn/MacSVN] project has a downloadable +build of svn. If you are a GUI inclined person you may want to grab their gui +client too. Get the command line client here: +

+ +
+curl -O http://ufpr.dl.sourceforge.net/sourceforge/macsvn/Subversion_1.4.2.zip 
+
+ +

+Once downloaded open the zip file and run the installer. +

+

+You also need to install BerkleyDB available from the same +http://sourceforge.net/projects/macsvn/. At the time of writing the +file was here: +

+ +
+curl -O http://ufpr.dl.sourceforge.net/sourceforge/macsvn/Berkeley_DB_4.5.20.zip 
+
+ +

+Once again unzip this and run the installer therein. +

+

+Lastly we need to ensure that the svn commandline executeable is in the path. +Add the following line to the end of /etc/bashrc using sudo: +

+ +
+sudo vim /etc/bashrc 
+
+ +

+And add this line to the bottom before saving and quiting: +

+ +
+export PATH=/usr/local/bin:$PATH:/usr/local/pgsql/bin 
+
+ +

+/usr/local/bin needs to be first in the path so that the newer bison (that will +be built from source further down) is found before the bison (which is very +old) that is installed by MacOSX +

+

+Now close and reopen your shell to get the updated vars. +

+ + +

5.5. Check out QGIS from SVN

+ +

+Now we are going to check out the sources for QGIS. First we will create a +directory for working in (or some folder of your choice): +

+ +
+mkdir -p ~/dev/cpp cd ~/dev/cpp 
+
+ +

+Now we check out the sources: +

+

+Trunk: +

+ +
+svn co https://svn.osgeo.org/qgis/trunk/qgis qgis 
+
+ +

+For a release branch version x.y.z: +

+ +
+svn co https://svn.qgis.org/qgis/branches/Release-x_y_z qgis-x.y.z
+
+ +

+The first time you check out QGIS sources you will probably get a message like +this: +

+ +
+ Error validating server certificate for 'https://svn.qgis.org:443':
+ - The certificate is not issued by a trusted authority. Use the fingerprint to
+   validate the certificate manually!  Certificate information:
+ - Hostname: svn.qgis.org
+ - Valid: from Apr  1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
+ - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
+ - Fingerprint: 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b
+   (R)eject, accept (t)emporarily or accept (p)ermanently?  
+
+ +

+I suggest you press 'p' to accept the key permanently. +

+ + +

5.6. Configure the build

+ +

+CMake supports out of source build so we will create a 'build' dir for the +build process. OS X uses ${HOME}/Applications as a standard user app folder (it gives it the system app folder icon). +If you have the correct permissions you may want to build +straight into your /Applications folder. The instructions below assume you are +building into a pre-existing ${HOME}/Applications directory. +In a Terminal cd to the qgis source folder previously downloaded, then: +

+ +
+mkdir build
+cd build
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D CMAKE_BUILD_TYPE=MinSizeRel \
+-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
+-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
+-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
+..
+
+ +

+This will automatically find and use the previously installed frameworks, and the GRASS +application if installed. +

+

+Or, to use a Unix-style build of GRASS, use the following cmake invocation +(minimum GRASS version as stated in the Qgis requirements, substitute the GRASS +path and version as required): +

+ +
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D CMAKE_BUILD_TYPE=MinSizeRel \
+-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
+-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
+-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
+-D GRASS_PREFIX=/user/local/grass-6.4.0 \
+..
+
+ +

+Snow Leopard note: To handle 32-bit Qt (Carbon), create a 32bit python wrapper +script and add arch flags to the configuration: +

+ +
+sudo cat >/usr/local/bin/python32 <<EOF
+#!/bin/sh
+exec arch -i386 /usr/bin/python2.6 \${1+"\$@"}
+EOF
+
+sudo chmod +x /usr/local/bin/python32
+
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D CMAKE_BUILD_TYPE=MinSizeRel \
+-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
+-D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
+-D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \
+-D CMAKE_OSX_ARCHITECTURES=i386 -D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
+..
+
+ +

+Bundling note: Older Qt versions may have problems with some Qt plugins and Qgis. +The way to handle this is to bundle Qt inside the Qgis application. You can do this now +or wait to see if there are immediate crashes when running Qgis. It's also a good +idea to bundle Qt if you need to copy Qgis to other Macs (where you would have to +install Xcode just so Qt would install!). +

+

+To bundle Qt, add the following line before the last line in the above cmake configurations: +

+ +
+-D QGIS_MACAPP_BUNDLE=1 \
+
+ + +

5.7. Building

+ +

+Now we can start the build process (remember the parallel compilation note at +the beginning, this is a good place to use it, if you can): +

+ +
+make 
+
+ +

+If all built without errors you can then install it: +

+ +
+make install 
+
+ +

+or, for a /Applications build: +

+ +
+sudo make install
+
+ + +

6. Authors and Acknowledgments

+ +

+The following people have contributed to this document: +

+ +
    +
  • Windows MINGW Section +
      +
    • Tim Sutton, Godofredo Contreras 2006 +
    • CMake additions Magnus Homann 2007 +
    • Python additions Martin Dobias 2007 +
    • With thanks to Tisham Dhar for preparing the initial msys environment +

      +
    +
  • Windows MSVC Section (Detailed install) +
      +
    • David Willis 2007 +
    • MSVC install additions Tim Sutton 2007 +
    • PostgreSQL, Qt compile, SIP, Python, AutoExp additions Juergen Fischer 2007 +

      +
    +
  • Windows MSVC Section (Simplified install) +
      +
    • Tim Sutton 2007 +
    • Juergen Fischer 2007 +
    • Florian Hillen 2010 +

      +
    +
  • OSX Section +
      +
    • Tim Sutton 2007 +
    • With special thanks to Tom Elwertowski and William Kyngesburye +

      +
    +
  • GNU/Linux Section +
      +
    • Tim Sutton 2006 +
    • Debian package section: Juergen Fischer 2008 +

      +
    +
  • Latex Generator +
      +
    • Tim Sutton 2011 +
    +
+ +
+ + + diff --git a/doc/build.sh b/doc/build.sh old mode 100644 new mode 100755 index e88e6790f55c..29d0a621e769 --- a/doc/build.sh +++ b/doc/build.sh @@ -1,5 +1,11 @@ #!/bin/bash txt2tags -o ../INSTALL -t txt INSTALL.t2t -txt2tags -o index.html -t html INSTALL.t2t +txt2tags -o INSTALL.html -t html INSTALL.t2t +txt2tags -o INSTALL.tex -t tex INSTALL.t2t +pdflatex INSTALL.tex +mv INSTALL.pdf .. txt2tags -o ../CODING -t txt CODING.t2t txt2tags -o CODING.html -t html CODING.t2t +txt2tags -o CODING.tex -t tex CODING.t2t +pdflatex CODING.tex +mv CODING.pdf .. From 5a6d3cebcc673f314d4715296f615e52586010e0 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 26 May 2011 23:05:14 +0200 Subject: [PATCH 05/62] remove svn Id tags --- src/analysis/vector/qgsgeometryanalyzer.cpp | 1 - src/analysis/vector/qgsgeometryanalyzer.h | 1 - src/analysis/vector/qgsoverlayanalyzer.cpp | 1 - src/analysis/vector/qgsoverlayanalyzer.h | 1 - src/app/composer/qgscomposer.h | 1 - src/app/gps/qgsgpsinformationwidget.cpp | 1 - src/app/gps/qgsgpsinformationwidget.h | 1 - src/app/gps/qgsgpsmarker.cpp | 1 - src/app/gps/qgsgpsmarker.h | 1 - src/app/legend/qgsapplegendinterface.cpp | 1 - src/app/legend/qgsapplegendinterface.h | 1 - src/app/legend/qgslegend.cpp | 3 --- src/app/legend/qgslegend.h | 1 - src/app/main.cpp | 3 --- src/app/ogr/qgsnewogrconnection.cpp | 1 - src/app/ogr/qgsnewogrconnection.h | 1 - src/app/ogr/qgsogrhelperfunctions.cpp | 1 - src/app/ogr/qgsogrhelperfunctions.h | 1 - src/app/ogr/qgsogrsublayersdialog.cpp | 1 - src/app/ogr/qgsogrsublayersdialog.h | 1 - src/app/ogr/qgsopenvectorlayerdialog.cpp | 1 - src/app/ogr/qgsopenvectorlayerdialog.h | 1 - src/app/ogr/qgsvectorlayersaveasdialog.cpp | 1 - src/app/ogr/qgsvectorlayersaveasdialog.h | 1 - src/app/postgres/qgspgnewconnection.cpp | 1 - src/app/postgres/qgspgnewconnection.h | 1 - src/app/postgres/qgspgsourceselect.cpp | 1 - src/app/postgres/qgspgsourceselect.h | 1 - src/app/qgisapp.cpp | 1 - src/app/qgisapp.h | 1 - src/app/qgisappinterface.cpp | 1 - src/app/qgisappinterface.h | 1 - src/app/qgsabout.cpp | 1 - src/app/qgsabout.h | 1 - src/app/qgsattributeactiondialog.cpp | 1 - src/app/qgsattributeactiondialog.h | 1 - src/app/qgsattributedialog.cpp | 1 - src/app/qgsattributedialog.h | 1 - src/app/qgsattributetypedialog.cpp | 1 - src/app/qgsattributetypedialog.h | 1 - src/app/qgsattributetypeloaddialog.cpp | 1 - src/app/qgsattributetypeloaddialog.h | 1 - src/app/qgsbookmarkitem.cpp | 1 - src/app/qgsbookmarkitem.h | 1 - src/app/qgsbookmarks.cpp | 1 - src/app/qgsbookmarks.h | 1 - src/app/qgsclipboard.cpp | 1 - src/app/qgsclipboard.h | 1 - src/app/qgscontinuouscolordialog.cpp | 1 - src/app/qgscontinuouscolordialog.h | 1 - src/app/qgscustomization.cpp | 1 - src/app/qgscustomization.h | 1 - src/app/qgsfeatureaction.cpp | 1 - src/app/qgsfeatureaction.h | 1 - src/app/qgsgraduatedsymboldialog.cpp | 1 - src/app/qgsgraduatedsymboldialog.h | 1 - src/app/qgshandlebadlayers.cpp | 1 - src/app/qgshandlebadlayers.h | 1 - src/app/qgshighlight.cpp | 1 - src/app/qgshighlight.h | 1 - src/app/qgsidentifyresults.cpp | 1 - src/app/qgsidentifyresults.h | 1 - src/app/qgslabeldialog.cpp | 1 - src/app/qgslabeldialog.h | 1 - src/app/qgsmaptooladdfeature.cpp | 1 - src/app/qgsmaptooladdfeature.h | 1 - src/app/qgsmaptooladdpart.cpp | 1 - src/app/qgsmaptooladdpart.h | 1 - src/app/qgsmaptooladdring.cpp | 1 - src/app/qgsmaptooladdring.h | 1 - src/app/qgsmaptoolcapture.cpp | 1 - src/app/qgsmaptoolcapture.h | 1 - src/app/qgsmaptooledit.cpp | 1 - src/app/qgsmaptooledit.h | 1 - src/app/qgsmaptoolidentify.cpp | 1 - src/app/qgsmaptoolidentify.h | 1 - src/app/qgsmaptoolmovefeature.cpp | 1 - src/app/qgsmaptoolmovefeature.h | 1 - src/app/qgsmaptoolreshape.cpp | 1 - src/app/qgsmaptoolreshape.h | 1 - src/app/qgsmaptoolselect.cpp | 1 - src/app/qgsmaptoolselect.h | 1 - src/app/qgsmaptoolselectfreehand.cpp | 1 - src/app/qgsmaptoolselectfreehand.h | 1 - src/app/qgsmaptoolselectpolygon.cpp | 1 - src/app/qgsmaptoolselectpolygon.h | 1 - src/app/qgsmaptoolselectradius.cpp | 1 - src/app/qgsmaptoolselectradius.h | 1 - src/app/qgsmaptoolselectrectangle.cpp | 1 - src/app/qgsmaptoolselectrectangle.h | 1 - src/app/qgsmaptoolselectutils.cpp | 1 - src/app/qgsmaptoolselectutils.h | 1 - src/app/qgsmaptoolsimplify.h | 1 - src/app/qgsmaptoolsplitfeatures.cpp | 1 - src/app/qgsmaptoolsplitfeatures.h | 1 - src/app/qgsmaptoolvertexedit.cpp | 1 - src/app/qgsmaptoolvertexedit.h | 1 - src/app/qgsmeasuredialog.cpp | 1 - src/app/qgsmeasuretool.cpp | 1 - src/app/qgsmeasuretool.h | 1 - src/app/qgsoptions.cpp | 1 - src/app/qgsoptions.h | 1 - src/app/qgspastetransformations.cpp | 1 - src/app/qgspastetransformations.h | 1 - src/app/qgspluginitem.cpp | 1 - src/app/qgspluginitem.h | 1 - src/app/qgspluginmanager.cpp | 1 - src/app/qgspluginmanager.h | 1 - src/app/qgspluginmetadata.cpp | 1 - src/app/qgspluginmetadata.h | 1 - src/app/qgspluginregistry.cpp | 1 - src/app/qgspluginregistry.h | 1 - src/app/qgsprojectproperties.cpp | 1 - src/app/qgsprojectproperties.h | 1 - src/app/qgsquerybuilder.cpp | 1 - src/app/qgsrasterlayerproperties.cpp | 3 --- src/app/qgsrasterlayerproperties.h | 1 - src/app/qgssinglesymboldialog.cpp | 1 - src/app/qgssinglesymboldialog.h | 1 - src/app/qgssponsors.cpp | 1 - src/app/qgssponsors.h | 1 - src/app/qgstilescalewidget.cpp | 1 - src/app/qgstilescalewidget.h | 1 - src/app/qgstipgui.cpp | 1 - src/app/qgstipgui.h | 1 - src/app/qgsuniquevaluedialog.cpp | 1 - src/app/qgsuniquevaluedialog.h | 1 - src/app/qgsvectorlayerproperties.cpp | 1 - src/app/qgsvectorlayerproperties.h | 1 - src/app/spatialite/qgsnewspatialitelayerdialog.cpp | 1 - src/app/spatialite/qgsnewspatialitelayerdialog.h | 1 - src/app/spatialite/qgsspatialitesridsdialog.cpp | 1 - src/app/spatialite/qgsspatialitesridsdialog.h | 1 - src/browser/qgsbrowser.cpp | 1 - src/browser/qgsbrowser.h | 1 - src/core/composer/qgscomposerpicture.cpp | 1 - src/core/qgis.h | 1 - src/core/qgsapplication.cpp | 1 - src/core/qgsapplication.h | 1 - src/core/qgsattributeaction.cpp | 3 --- src/core/qgsattributeaction.h | 1 - src/core/qgsclipper.cpp | 1 - src/core/qgsclipper.h | 1 - src/core/qgscontexthelp.cpp | 1 - src/core/qgscontexthelp.h | 1 - src/core/qgscoordinatetransform.cpp | 1 - src/core/qgscoordinatetransform.h | 1 - src/core/qgscredentials.cpp | 1 - src/core/qgscredentials.h | 1 - src/core/qgscsexception.h | 1 - src/core/qgsdataitem.cpp | 1 - src/core/qgsdataitem.h | 1 - src/core/qgsdataprovider.h | 1 - src/core/qgsdatasourceuri.cpp | 1 - src/core/qgsdatasourceuri.h | 1 - src/core/qgsdistancearea.cpp | 1 - src/core/qgsdistancearea.h | 1 - src/core/qgsexception.h | 1 - src/core/qgsfeature.cpp | 1 - src/core/qgsfeature.h | 1 - src/core/qgsfield.cpp | 4 ---- src/core/qgsfield.h | 1 - src/core/qgsgeometry.cpp | 1 - src/core/qgsgeometry.h | 1 - src/core/qgshttptransaction.cpp | 1 - src/core/qgshttptransaction.h | 1 - src/core/qgslabel.cpp | 3 --- src/core/qgslabel.h | 1 - src/core/qgslabelattributes.cpp | 1 - src/core/qgslabelattributes.h | 1 - src/core/qgsmaplayer.cpp | 1 - src/core/qgsmaplayer.h | 1 - src/core/qgsmaplayerregistry.cpp | 1 - src/core/qgsmaplayerregistry.h | 1 - src/core/qgsmaprenderer.cpp | 1 - src/core/qgsmaprenderer.h | 1 - src/core/qgsmaptopixel.cpp | 1 - src/core/qgsmaptopixel.h | 1 - src/core/qgsmessageoutput.cpp | 1 - src/core/qgsmessageoutput.h | 1 - src/core/qgsnetworkaccessmanager.cpp | 1 - src/core/qgsnetworkaccessmanager.h | 1 - src/core/qgspallabeling.cpp | 0 src/core/qgspluginlayerregistry.cpp | 1 - src/core/qgspluginlayerregistry.h | 1 - src/core/qgspoint.cpp | 1 - src/core/qgspoint.h | 1 - src/core/qgsproject.cpp | 3 --- src/core/qgsproject.h | 1 - src/core/qgsprojectfiletransform.cpp | 1 - src/core/qgsprojectfiletransform.h | 1 - src/core/qgsprojectproperty.cpp | 3 --- src/core/qgsprojectproperty.h | 1 - src/core/qgsprovidercountcalcevent.cpp | 1 - src/core/qgsprovidercountcalcevent.h | 1 - src/core/qgsproviderextentcalcevent.cpp | 1 - src/core/qgsproviderextentcalcevent.h | 1 - src/core/qgsprovidermetadata.cpp | 1 - src/core/qgsprovidermetadata.h | 1 - src/core/qgsproviderregistry.cpp | 1 - src/core/qgsproviderregistry.h | 1 - src/core/qgsrasterdataprovider.cpp | 1 - src/core/qgsrasterdataprovider.h | 1 - src/core/qgsrasterprojector.cpp | 1 - src/core/qgsrasterprojector.h | 1 - src/core/qgsrectangle.cpp | 1 - src/core/qgsrectangle.h | 1 - src/core/qgsrunprocess.cpp | 1 - src/core/qgsrunprocess.h | 1 - src/core/qgsscalecalculator.cpp | 1 - src/core/qgsscalecalculator.h | 1 - src/core/qgssearchstring.cpp | 1 - src/core/qgssearchstring.h | 1 - src/core/qgssearchstringlexer.ll | 1 - src/core/qgssearchstringparser.yy | 1 - src/core/qgssearchtreenode.cpp | 1 - src/core/qgssearchtreenode.h | 1 - src/core/qgsvectordataprovider.cpp | 1 - src/core/qgsvectordataprovider.h | 1 - src/core/qgsvectorfilewriter.cpp | 1 - src/core/qgsvectorfilewriter.h | 1 - src/core/qgsvectorlayer.cpp | 3 --- src/core/qgsvectorlayer.h | 1 - src/core/raster/qgsrasterbandstats.h | 1 - src/core/raster/qgsrasterlayer.cpp | 1 - src/core/raster/qgsrasterlayer.h | 1 - src/core/raster/qgsrasterviewport.h | 1 - src/core/renderer/qgscontinuouscolorrenderer.cpp | 1 - src/core/renderer/qgscontinuouscolorrenderer.h | 1 - src/core/renderer/qgsgraduatedsymbolrenderer.cpp | 1 - src/core/renderer/qgsgraduatedsymbolrenderer.h | 1 - src/core/renderer/qgsrenderer.h | 1 - src/core/renderer/qgssinglesymbolrenderer.cpp | 1 - src/core/renderer/qgssinglesymbolrenderer.h | 1 - src/core/renderer/qgsuniquevaluerenderer.cpp | 1 - src/core/renderer/qgsuniquevaluerenderer.h | 1 - src/core/spatialindex/qgsspatialindex.cpp | 1 - src/core/spatialindex/qgsspatialindex.h | 1 - src/core/symbology/qgssymbol.cpp | 1 - src/core/symbology/qgssymbol.h | 1 - src/core/symbology/qgssymbologyutils.cpp | 1 - src/core/symbology/qgssymbologyutils.h | 1 - src/gui/qgisgui.h | 1 - src/gui/qgisinterface.cpp | 1 - src/gui/qgisinterface.h | 1 - src/gui/qgsattributeeditor.cpp | 1 - src/gui/qgsattributeeditor.h | 1 - src/gui/qgscolorbutton.cpp | 1 - src/gui/qgscolorbutton.h | 1 - src/gui/qgscomposerview.h | 1 - src/gui/qgscredentialdialog.cpp | 1 - src/gui/qgscredentialdialog.h | 1 - src/gui/qgsdetaileditemdata.cpp | 1 - src/gui/qgsdetaileditemdata.h | 1 - src/gui/qgsdetaileditemdelegate.cpp | 1 - src/gui/qgsdetaileditemdelegate.h | 1 - src/gui/qgsdetaileditemwidget.cpp | 1 - src/gui/qgsdetaileditemwidget.h | 1 - src/gui/qgsfieldvalidator.cpp | 1 - src/gui/qgsfieldvalidator.h | 1 - src/gui/qgsfiledropedit.cpp | 1 - src/gui/qgsfiledropedit.h | 1 - src/gui/qgsgenericprojectionselector.cpp | 1 - src/gui/qgsgenericprojectionselector.h | 1 - src/gui/qgslegendinterface.cpp | 1 - src/gui/qgslegendinterface.h | 1 - src/gui/qgslonglongvalidator.h | 1 - src/gui/qgsludialog.cpp | 1 - src/gui/qgsludialog.h | 1 - src/gui/qgsmanageconnectionsdialog.cpp | 1 - src/gui/qgsmanageconnectionsdialog.h | 1 - src/gui/qgsmapcanvas.cpp | 1 - src/gui/qgsmapcanvas.h | 1 - src/gui/qgsmapcanvasitem.cpp | 1 - src/gui/qgsmapcanvasitem.h | 1 - src/gui/qgsmapcanvasmap.cpp | 1 - src/gui/qgsmapcanvasmap.h | 1 - src/gui/qgsmapoverviewcanvas.cpp | 1 - src/gui/qgsmapoverviewcanvas.h | 1 - src/gui/qgsmaptool.cpp | 1 - src/gui/qgsmaptool.h | 1 - src/gui/qgsmaptoolemitpoint.cpp | 1 - src/gui/qgsmaptoolemitpoint.h | 1 - src/gui/qgsmaptoolpan.cpp | 1 - src/gui/qgsmaptoolpan.h | 1 - src/gui/qgsmaptoolzoom.cpp | 1 - src/gui/qgsmaptoolzoom.h | 1 - src/gui/qgsmessageviewer.cpp | 1 - src/gui/qgsmessageviewer.h | 1 - src/gui/qgsnewhttpconnection.cpp | 1 - src/gui/qgsnewhttpconnection.h | 1 - src/gui/qgsnewvectorlayerdialog.cpp | 1 - src/gui/qgsnewvectorlayerdialog.h | 1 - src/gui/qgsnumericsortlistviewitem.cpp | 1 - src/gui/qgsnumericsortlistviewitem.h | 1 - src/gui/qgsprojectionselector.cpp | 1 - src/gui/qgsquickprint.cpp | 1 - src/gui/qgsquickprint.h | 1 - src/gui/qgsrubberband.cpp | 1 - src/gui/qgsrubberband.h | 1 - src/gui/qgssearchquerybuilder.cpp | 1 - src/gui/qgssearchquerybuilder.h | 1 - src/gui/qgsvertexmarker.cpp | 1 - src/gui/qgsvertexmarker.h | 1 - src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp | 1 - src/gui/symbology-ng/qgsstylev2exportimportdialog.h | 1 - src/helpviewer/qgshelpserver.cpp | 1 - src/helpviewer/qgshelpserver.h | 1 - src/helpviewer/qgshelpviewer.cpp | 1 - src/helpviewer/qgshelpviewer.h | 1 - src/plugins/coordinate_capture/coordinatecapture.cpp | 2 -- src/plugins/coordinate_capture/coordinatecapture.h | 1 - src/plugins/coordinate_capture/coordinatecapturemaptool.cpp | 1 - src/plugins/coordinate_capture/coordinatecapturemaptool.h | 1 - src/plugins/copyright_label/plugin.cpp | 3 --- src/plugins/copyright_label/plugin.h | 1 - src/plugins/delimited_text/qgsdelimitedtextplugin.cpp | 1 - src/plugins/delimited_text/qgsdelimitedtextplugin.h | 1 - src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp | 1 - src/plugins/dxf2shp_converter/dxf2shpconverter.cpp | 3 --- src/plugins/dxf2shp_converter/dxf2shpconverter.h | 1 - .../evis/databaseconnection/evisdatabaseconnection.cpp | 1 - .../evis/databaseconnection/evisdatabaseconnection.h | 1 - .../evis/databaseconnection/evisdatabaseconnectiongui.cpp | 1 - .../evis/databaseconnection/evisdatabaseconnectiongui.h | 1 - .../evisdatabaselayerfieldselectiongui.cpp | 1 - .../databaseconnection/evisdatabaselayerfieldselectiongui.h | 1 - src/plugins/evis/databaseconnection/evisquerydefinition.cpp | 1 - src/plugins/evis/databaseconnection/evisquerydefinition.h | 1 - src/plugins/evis/eventbrowser/evisconfiguration.cpp | 1 - src/plugins/evis/eventbrowser/evisconfiguration.h | 1 - .../evis/eventbrowser/evisgenericeventbrowsergui.cpp | 1 - src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h | 1 - src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp | 1 - src/plugins/evis/eventbrowser/evisimagedisplaywidget.h | 1 - src/plugins/evis/evis.cpp | 2 -- src/plugins/evis/evis.h | 1 - src/plugins/evis/idtool/eviseventidtool.cpp | 1 - src/plugins/evis/idtool/eviseventidtool.h | 1 - src/plugins/georeferencer/qgsgcpcanvasitem.cpp | 1 - src/plugins/georeferencer/qgsgcpcanvasitem.h | 1 - src/plugins/georeferencer/qgsgcplist.cpp | 1 - src/plugins/georeferencer/qgsgcplist.h | 1 - src/plugins/georeferencer/qgsgcplistmodel.cpp | 1 - src/plugins/georeferencer/qgsgcplistmodel.h | 1 - src/plugins/georeferencer/qgsgcplistwidget.cpp | 1 - src/plugins/georeferencer/qgsgcplistwidget.h | 1 - src/plugins/georeferencer/qgsgeorefconfigdialog.cpp | 1 - src/plugins/georeferencer/qgsgeorefconfigdialog.h | 1 - src/plugins/georeferencer/qgsgeorefdatapoint.cpp | 1 - src/plugins/georeferencer/qgsgeorefdatapoint.h | 1 - src/plugins/georeferencer/qgsgeorefdelegates.cpp | 1 - src/plugins/georeferencer/qgsgeorefdelegates.h | 1 - src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp | 1 - src/plugins/georeferencer/qgsgeorefdescriptiondialog.h | 1 - src/plugins/georeferencer/qgsgeorefplugin.cpp | 2 -- src/plugins/georeferencer/qgsgeorefplugin.h | 1 - src/plugins/georeferencer/qgsgeorefplugingui.cpp | 1 - src/plugins/georeferencer/qgsgeorefplugingui.h | 1 - src/plugins/georeferencer/qgsgeoreftooladdpoint.cpp | 1 - src/plugins/georeferencer/qgsgeoreftooladdpoint.h | 1 - src/plugins/georeferencer/qgsgeoreftooldeletepoint.cpp | 1 - src/plugins/georeferencer/qgsgeoreftooldeletepoint.h | 1 - src/plugins/georeferencer/qgsgeoreftoolmovepoint.cpp | 1 - src/plugins/georeferencer/qgsgeoreftoolmovepoint.h | 1 - src/plugins/georeferencer/qgsgeoreftransform.cpp | 1 - src/plugins/georeferencer/qgsgeoreftransform.h | 1 - src/plugins/georeferencer/qgsgeorefvalidators.cpp | 1 - src/plugins/georeferencer/qgsgeorefvalidators.h | 1 - src/plugins/georeferencer/qgsimagewarper.cpp | 1 - src/plugins/georeferencer/qgsimagewarper.h | 1 - src/plugins/georeferencer/qgsleastsquares.cpp | 1 - src/plugins/georeferencer/qgsleastsquares.h | 1 - src/plugins/georeferencer/qgsmapcoordsdialog.cpp | 1 - src/plugins/georeferencer/qgsmapcoordsdialog.h | 1 - src/plugins/georeferencer/qgsopenrasterdialog.cpp | 1 - src/plugins/georeferencer/qgsopenrasterdialog.h | 1 - src/plugins/georeferencer/qgsresidualplotitem.cpp | 1 - src/plugins/georeferencer/qgsresidualplotitem.h | 2 -- src/plugins/georeferencer/qgstransformsettingsdialog.cpp | 1 - src/plugins/georeferencer/qgstransformsettingsdialog.h | 1 - src/plugins/georeferencer/qgsvalidateddoublespinbox.h | 1 - src/plugins/gps_importer/qgsbabelformat.cpp | 1 - src/plugins/gps_importer/qgsbabelformat.h | 1 - src/plugins/gps_importer/qgsgpsdevice.h | 1 - src/plugins/gps_importer/qgsgpsplugin.cpp | 2 -- src/plugins/gps_importer/qgsgpsplugin.h | 1 - src/plugins/gps_importer/qgsgpsplugingui.h | 1 - src/plugins/grass/qgsgrassplugin.cpp | 1 - src/plugins/grass/qgsgrassplugin.h | 1 - src/plugins/grass/qtermwidget/konsole_wcwidth.cpp | 1 - src/plugins/grass/qtermwidget/konsole_wcwidth.h | 1 - src/plugins/north_arrow/plugin.cpp | 6 ------ src/plugins/north_arrow/plugin.h | 1 - src/plugins/oracle_raster/qgsoracle_plugin.cpp | 2 -- src/plugins/oracle_raster/qgsoracle_plugin.h | 1 - src/plugins/oracle_raster/qgsoracleconnect_ui.cpp | 1 - src/plugins/oracle_raster/qgsoracleconnect_ui.h | 1 - src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp | 1 - src/plugins/oracle_raster/qgsselectgeoraster_ui.h | 1 - src/plugins/plugin_template/plugin.cpp | 2 -- src/plugins/plugin_template/plugin.h | 1 - src/plugins/roadgraph/roadgraphplugin.cpp | 1 - src/plugins/scale_bar/plugin.cpp | 3 --- src/plugins/scale_bar/plugin.h | 1 - src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp | 1 - src/plugins/spatialquery/qgsgeometrycoordinatetransform.h | 1 - src/plugins/spatialquery/qgsmngprogressbar.cpp | 1 - src/plugins/spatialquery/qgsmngprogressbar.h | 1 - src/plugins/spatialquery/qgsreaderfeatures.cpp | 1 - src/plugins/spatialquery/qgsreaderfeatures.h | 1 - src/plugins/spatialquery/qgsrubberselectid.cpp | 1 - src/plugins/spatialquery/qgsrubberselectid.h | 1 - src/plugins/spatialquery/qgsspatialquery.cpp | 1 - src/plugins/spatialquery/qgsspatialquery.h | 1 - src/plugins/spatialquery/qgsspatialquerydialog.cpp | 1 - src/plugins/spatialquery/qgsspatialquerydialog.h | 1 - src/plugins/spatialquery/qgsspatialqueryplugin.cpp | 1 - src/plugins/spatialquery/qgsspatialqueryplugin.h | 1 - src/plugins/spit/qgspgutil.cpp | 1 - src/plugins/spit/qgspgutil.h | 1 - src/plugins/spit/qgsshapefile.cpp | 1 - src/plugins/spit/qgsshapefile.h | 1 - src/plugins/spit/qgsspit.cpp | 1 - src/plugins/spit/qgsspit.h | 1 - src/plugins/spit/qgsspitplugin.cpp | 3 --- src/plugins/spit/qgsspitplugin.h | 1 - src/plugins/sqlanywhere/sadbfilterproxymodel.cpp | 1 - src/plugins/sqlanywhere/sadbfilterproxymodel.h | 1 - src/plugins/sqlanywhere/sadbtablemodel.cpp | 1 - src/plugins/sqlanywhere/sadbtablemodel.h | 1 - src/plugins/sqlanywhere/salayer.h | 1 - src/plugins/sqlanywhere/sanewconnection.cpp | 1 - src/plugins/sqlanywhere/sanewconnection.h | 1 - src/plugins/sqlanywhere/saquerybuilder.cpp | 1 - src/plugins/sqlanywhere/saquerybuilder.h | 1 - src/plugins/sqlanywhere/sasourceselect.cpp | 1 - src/plugins/sqlanywhere/sasourceselect.h | 1 - src/plugins/sqlanywhere/sqlanywhere.cpp | 1 - src/plugins/sqlanywhere/sqlanywhere.h | 1 - src/providers/delimitedtext/qgsdelimitedtextprovider.cpp | 1 - src/providers/delimitedtext/qgsdelimitedtextprovider.h | 1 - src/providers/gdal/qgsgdalprovider.cpp | 1 - src/providers/gdal/qgsgdalprovider.h | 1 - src/providers/gpx/qgsgpxprovider.cpp | 1 - src/providers/grass/qgsgrass.cpp | 1 - src/providers/grass/qgsgrassprovider.cpp | 1 - src/providers/grass/qgsgrassrasterprovider.cpp | 1 - src/providers/grass/qgsgrassrasterprovider.h | 1 - src/providers/ogr/qgsogrprovider.cpp | 1 - src/providers/ogr/qgsogrprovider.h | 1 - src/providers/postgres/create_test_tables | 2 -- src/providers/postgres/qgspostgresprovider.cpp | 1 - src/providers/postgres/qgspostgresprovider.h | 1 - src/providers/sqlanywhere/load_alaska_shapes.sql | 1 - src/providers/sqlanywhere/qgssqlanywhereprovider.cpp | 1 - src/providers/sqlanywhere/qgssqlanywhereprovider.h | 1 - .../sqlanywhere/sqlanyconnection/sqlanyconnection.cpp | 1 - .../sqlanywhere/sqlanyconnection/sqlanyconnection.h | 1 - .../sqlanywhere/sqlanyconnection/sqlanystatement.cpp | 1 - .../sqlanywhere/sqlanyconnection/sqlanystatement.h | 1 - src/providers/wms/qgswmsconnection.cpp | 1 - src/providers/wms/qgswmsconnection.h | 1 - src/providers/wms/qgswmsprovider.cpp | 1 - src/providers/wms/qgswmsprovider.h | 1 - src/providers/wms/qgswmssourceselect.cpp | 1 - src/providers/wms/qgswmssourceselect.h | 1 - src/python/qgispython.cpp | 1 - src/python/qgspythonutils.h | 1 - src/python/qgspythonutilsimpl.cpp | 1 - src/python/qgspythonutilsimpl.h | 1 - tests/src/core/qgsrenderchecker.h | 1 - tools/qgis_config/qgis_config.cpp | 1 - 473 files changed, 512 deletions(-) mode change 100755 => 100644 src/core/qgscredentials.cpp mode change 100755 => 100644 src/core/qgspallabeling.cpp mode change 100755 => 100644 src/plugins/grass/qgsgrassplugin.cpp mode change 100755 => 100644 src/providers/grass/qgsgrass.cpp diff --git a/src/analysis/vector/qgsgeometryanalyzer.cpp b/src/analysis/vector/qgsgeometryanalyzer.cpp index fbb5b9258d6f..dc4daf55fe07 100644 --- a/src/analysis/vector/qgsgeometryanalyzer.cpp +++ b/src/analysis/vector/qgsgeometryanalyzer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */ #include "qgsgeometryanalyzer.h" diff --git a/src/analysis/vector/qgsgeometryanalyzer.h b/src/analysis/vector/qgsgeometryanalyzer.h index 6f4af9bc7ade..3f43b8f4c2c1 100644 --- a/src/analysis/vector/qgsgeometryanalyzer.h +++ b/src/analysis/vector/qgsgeometryanalyzer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */ #ifndef QGSGEOMETRYANALYZERH #define QGSGEOMETRYANALYZERH diff --git a/src/analysis/vector/qgsoverlayanalyzer.cpp b/src/analysis/vector/qgsoverlayanalyzer.cpp index 18c731447614..1e562eec36e1 100644 --- a/src/analysis/vector/qgsoverlayanalyzer.cpp +++ b/src/analysis/vector/qgsoverlayanalyzer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */ #include "qgsoverlayanalyzer.h" diff --git a/src/analysis/vector/qgsoverlayanalyzer.h b/src/analysis/vector/qgsoverlayanalyzer.h index 4d8b25137bce..367758104740 100644 --- a/src/analysis/vector/qgsoverlayanalyzer.h +++ b/src/analysis/vector/qgsoverlayanalyzer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */ #ifndef QGSOVERLAYANALYZERH #define QGSOVERLAYANALYZERH diff --git a/src/app/composer/qgscomposer.h b/src/app/composer/qgscomposer.h index ee4a486a4388..794a0fdce0d2 100644 --- a/src/app/composer/qgscomposer.h +++ b/src/app/composer/qgscomposer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCOMPOSER_H #define QGSCOMPOSER_H #include "ui_qgscomposerbase.h" diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index cb19b96d7442..ab9bc1e11dde 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgisapp.h 12390 2009-12-09 21:35:43Z jef $ */ #include "qgsgpsinformationwidget.h" #include "qgsnmeaconnection.h" #include "qgsgpsconnectionregistry.h" diff --git a/src/app/gps/qgsgpsinformationwidget.h b/src/app/gps/qgsgpsinformationwidget.h index 7c6c8e909485..8d335220d362 100644 --- a/src/app/gps/qgsgpsinformationwidget.h +++ b/src/app/gps/qgsgpsinformationwidget.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgisapp.h 12390 2009-12-09 21:35:43Z jef $ */ #ifndef QGSGPSINFORMATIONWIDGET_H #define QGSGPSINFORMATIONWIDGET_H diff --git a/src/app/gps/qgsgpsmarker.cpp b/src/app/gps/qgsgpsmarker.cpp index 54c63b00e5a9..e3544b4a4d0a 100644 --- a/src/app/gps/qgsgpsmarker.cpp +++ b/src/app/gps/qgsgpsmarker.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/gps/qgsgpsmarker.h b/src/app/gps/qgsgpsmarker.h index 111e06042a06..fbeca429c13d 100644 --- a/src/app/gps/qgsgpsmarker.h +++ b/src/app/gps/qgsgpsmarker.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGPSMARKER_H #define QGSGPSMARKER_H diff --git a/src/app/legend/qgsapplegendinterface.cpp b/src/app/legend/qgsapplegendinterface.cpp index 16f46b15bbd2..efd90d2eca69 100644 --- a/src/app/legend/qgsapplegendinterface.cpp +++ b/src/app/legend/qgsapplegendinterface.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplegendinterface.h" diff --git a/src/app/legend/qgsapplegendinterface.h b/src/app/legend/qgsapplegendinterface.h index e437a80c2307..3b5c37e4dc55 100644 --- a/src/app/legend/qgsapplegendinterface.h +++ b/src/app/legend/qgsapplegendinterface.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLEGENDAPPIFACE_H #define QGSLEGENDAPPIFACE_H diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index a81ea786bfd6..6438ee989b18 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplication.h" #include "qgisapp.h" @@ -44,8 +43,6 @@ #include #include -static const char *const ident_ = "$Id$"; - const int AUTOSCROLL_MARGIN = 16; QgsLegend::QgsLegend( QgsMapCanvas *canvas, QWidget * parent, const char *name ) diff --git a/src/app/legend/qgslegend.h b/src/app/legend/qgslegend.h index 8d6803721c7e..b242e162f88e 100644 --- a/src/app/legend/qgslegend.h +++ b/src/app/legend/qgslegend.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLEGEND_H #define QGSLEGEND_H diff --git a/src/app/main.cpp b/src/app/main.cpp index f674b05f684b..1fdd6b4911f2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ //qt includes #include @@ -81,8 +80,6 @@ typedef SInt32 SRefCon; #include #endif -static const char * const ident_ = "$Id$"; - /** print usage text */ void usage( std::string const & appName ) diff --git a/src/app/ogr/qgsnewogrconnection.cpp b/src/app/ogr/qgsnewogrconnection.cpp index 10345dc599ff..5f21dabbc340 100644 --- a/src/app/ogr/qgsnewogrconnection.cpp +++ b/src/app/ogr/qgsnewogrconnection.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/ogr/qgsnewogrconnection.h b/src/app/ogr/qgsnewogrconnection.h index 5505fe426576..56ba4ed096cb 100644 --- a/src/app/ogr/qgsnewogrconnection.h +++ b/src/app/ogr/qgsnewogrconnection.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSNEWOGRCONNECTION_H #define QGSNEWOGRCONNECTION_H diff --git a/src/app/ogr/qgsogrhelperfunctions.cpp b/src/app/ogr/qgsogrhelperfunctions.cpp index 36e4181934d6..1a0c256a3c78 100644 --- a/src/app/ogr/qgsogrhelperfunctions.cpp +++ b/src/app/ogr/qgsogrhelperfunctions.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include "qgsogrhelperfunctions.h" #include "qgslogger.h" diff --git a/src/app/ogr/qgsogrhelperfunctions.h b/src/app/ogr/qgsogrhelperfunctions.h index bc8d07f6be3c..10bd3b378970 100644 --- a/src/app/ogr/qgsogrhelperfunctions.h +++ b/src/app/ogr/qgsogrhelperfunctions.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include diff --git a/src/app/ogr/qgsogrsublayersdialog.cpp b/src/app/ogr/qgsogrsublayersdialog.cpp index 5d036ab0de95..5e7f7b04781d 100644 --- a/src/app/ogr/qgsogrsublayersdialog.cpp +++ b/src/app/ogr/qgsogrsublayersdialog.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsogrsublayersdialog.h" diff --git a/src/app/ogr/qgsogrsublayersdialog.h b/src/app/ogr/qgsogrsublayersdialog.h index 098c906c685a..5389e5f51633 100644 --- a/src/app/ogr/qgsogrsublayersdialog.h +++ b/src/app/ogr/qgsogrsublayersdialog.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSOGRSUBLAYERSDIALOG_H #define QGSOGRSUBLAYERSDIALOG_H diff --git a/src/app/ogr/qgsopenvectorlayerdialog.cpp b/src/app/ogr/qgsopenvectorlayerdialog.cpp index 91e4efde6ee6..db1b4366c0cf 100644 --- a/src/app/ogr/qgsopenvectorlayerdialog.cpp +++ b/src/app/ogr/qgsopenvectorlayerdialog.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include #include #include diff --git a/src/app/ogr/qgsopenvectorlayerdialog.h b/src/app/ogr/qgsopenvectorlayerdialog.h index 83e149ea4950..726469a3bd68 100644 --- a/src/app/ogr/qgsopenvectorlayerdialog.h +++ b/src/app/ogr/qgsopenvectorlayerdialog.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSOPENVECTORLAYERDIALOG_H #define QGSOPENVECTORLAYERDIALOG_H diff --git a/src/app/ogr/qgsvectorlayersaveasdialog.cpp b/src/app/ogr/qgsvectorlayersaveasdialog.cpp index 08dec37990b4..5b6bb6515cc1 100644 --- a/src/app/ogr/qgsvectorlayersaveasdialog.cpp +++ b/src/app/ogr/qgsvectorlayersaveasdialog.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include "qgsvectorlayersaveasdialog.h" #include "qgsgenericprojectionselector.h" #include "qgsvectordataprovider.h" diff --git a/src/app/ogr/qgsvectorlayersaveasdialog.h b/src/app/ogr/qgsvectorlayersaveasdialog.h index 3e1918cfa3b6..bd09be9b9a34 100644 --- a/src/app/ogr/qgsvectorlayersaveasdialog.h +++ b/src/app/ogr/qgsvectorlayersaveasdialog.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSVECTORLAYERSAVEASDIALOG_H #define QGSVECTORLAYERSAVEASDIALOG_H diff --git a/src/app/postgres/qgspgnewconnection.cpp b/src/app/postgres/qgspgnewconnection.cpp index a3527a516d84..71cf13dcd8da 100644 --- a/src/app/postgres/qgspgnewconnection.cpp +++ b/src/app/postgres/qgspgnewconnection.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/postgres/qgspgnewconnection.h b/src/app/postgres/qgspgnewconnection.h index 70c0cc806fa5..2b929f9ae27c 100644 --- a/src/app/postgres/qgspgnewconnection.h +++ b/src/app/postgres/qgspgnewconnection.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPGNEWCONNECTION_H #define QGSPGNEWCONNECTION_H #include "ui_qgspgnewconnectionbase.h" diff --git a/src/app/postgres/qgspgsourceselect.cpp b/src/app/postgres/qgspgsourceselect.cpp index dd7e3203125d..e503213a9b8e 100644 --- a/src/app/postgres/qgspgsourceselect.cpp +++ b/src/app/postgres/qgspgsourceselect.cpp @@ -15,7 +15,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspgsourceselect.h" diff --git a/src/app/postgres/qgspgsourceselect.h b/src/app/postgres/qgspgsourceselect.h index 94d07560ba38..39769f5e5610 100644 --- a/src/app/postgres/qgspgsourceselect.h +++ b/src/app/postgres/qgspgsourceselect.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPGSOURCESELECT_H #define QGSPGSOURCESELECT_H #include "ui_qgsdbsourceselectbase.h" diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 93910a65665a..684c993f0d8a 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // // QT4 includes make sure to use the new style! diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 0e75065c6d82..241c8710709a 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGISAPP_H #define QGISAPP_H diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index 548de0af6e42..5acea87a92e8 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index ed95d420025e..78d714733334 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGISIFACE_H #define QGISIFACE_H diff --git a/src/app/qgsabout.cpp b/src/app/qgsabout.cpp index eec83bf25f85..4ceb1108038e 100644 --- a/src/app/qgsabout.cpp +++ b/src/app/qgsabout.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsabout.h" #include "qgsapplication.h" diff --git a/src/app/qgsabout.h b/src/app/qgsabout.h index 5f1a15467f37..75d494fb10ef 100644 --- a/src/app/qgsabout.h +++ b/src/app/qgsabout.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSABOUT_H #define QGSABOUT_H diff --git a/src/app/qgsattributeactiondialog.cpp b/src/app/qgsattributeactiondialog.cpp index 36d6a7a3da7a..0faf374df1b0 100644 --- a/src/app/qgsattributeactiondialog.cpp +++ b/src/app/qgsattributeactiondialog.cpp @@ -19,7 +19,6 @@ back to QgsVectorLayer. * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsattributeactiondialog.h" #include "qgsattributeaction.h" diff --git a/src/app/qgsattributeactiondialog.h b/src/app/qgsattributeactiondialog.h index 4bdba61286cb..33475f2aa0cb 100644 --- a/src/app/qgsattributeactiondialog.h +++ b/src/app/qgsattributeactiondialog.h @@ -19,7 +19,6 @@ back to QgsVectorLayer. * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTEACTIONDIALOG_H #define QGSATTRIBUTEACTIONDIALOG_H diff --git a/src/app/qgsattributedialog.cpp b/src/app/qgsattributedialog.cpp index f9bc66f8e28d..d5269b0998ef 100644 --- a/src/app/qgsattributedialog.cpp +++ b/src/app/qgsattributedialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsattributedialog.h" #include "qgsfield.h" #include "qgslogger.h" diff --git a/src/app/qgsattributedialog.h b/src/app/qgsattributedialog.h index c28b627498f8..7efdb18b824d 100644 --- a/src/app/qgsattributedialog.h +++ b/src/app/qgsattributedialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTEDIALOG_H #define QGSATTRIBUTEDIALOG_H diff --git a/src/app/qgsattributetypedialog.cpp b/src/app/qgsattributetypedialog.cpp index b15ff4b03aa9..2d6ab6d6d89a 100644 --- a/src/app/qgsattributetypedialog.cpp +++ b/src/app/qgsattributetypedialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsattributetypedialog.h" #include "qgsattributetypeloaddialog.h" diff --git a/src/app/qgsattributetypedialog.h b/src/app/qgsattributetypedialog.h index ee5143df2a08..4e9c5d771215 100644 --- a/src/app/qgsattributetypedialog.h +++ b/src/app/qgsattributetypedialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTETYPEDIALOG_H #define QGSATTRIBUTETYPEDIALOG_H diff --git a/src/app/qgsattributetypeloaddialog.cpp b/src/app/qgsattributetypeloaddialog.cpp index a4953e74bc84..0054755b7a07 100644 --- a/src/app/qgsattributetypeloaddialog.cpp +++ b/src/app/qgsattributetypeloaddialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsattributetypeloaddialog.h" diff --git a/src/app/qgsattributetypeloaddialog.h b/src/app/qgsattributetypeloaddialog.h index d5974c89e243..611dcf39d9eb 100644 --- a/src/app/qgsattributetypeloaddialog.h +++ b/src/app/qgsattributetypeloaddialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTETYPELOADDIALOG_H #define QGSATTRIBUTETYPELOADDIALOG_H diff --git a/src/app/qgsbookmarkitem.cpp b/src/app/qgsbookmarkitem.cpp index fd6e5ed5bdbd..254a19d5edc2 100644 --- a/src/app/qgsbookmarkitem.cpp +++ b/src/app/qgsbookmarkitem.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgsbookmarkitem.h b/src/app/qgsbookmarkitem.h index 69a434878e11..119d5e19027f 100644 --- a/src/app/qgsbookmarkitem.h +++ b/src/app/qgsbookmarkitem.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSBOOKMARKITEM_H #define QGSBOOKMARKITEM_H diff --git a/src/app/qgsbookmarks.cpp b/src/app/qgsbookmarks.cpp index e93ff8331a31..1552772816ff 100644 --- a/src/app/qgsbookmarks.cpp +++ b/src/app/qgsbookmarks.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsbookmarks.h" #include "qgisapp.h" #include "qgsapplication.h" diff --git a/src/app/qgsbookmarks.h b/src/app/qgsbookmarks.h index 8fe92620ea9a..511dd5a0f5e0 100644 --- a/src/app/qgsbookmarks.h +++ b/src/app/qgsbookmarks.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSBOOKMARKS_H #define QGSBOOKMARKS_H #include "ui_qgsbookmarksbase.h" diff --git a/src/app/qgsclipboard.cpp b/src/app/qgsclipboard.cpp index 78a0f8c4e3a8..e598162fe952 100644 --- a/src/app/qgsclipboard.cpp +++ b/src/app/qgsclipboard.cpp @@ -15,7 +15,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/app/qgsclipboard.h b/src/app/qgsclipboard.h index b0fc8c41aab8..d4a42316a9d3 100644 --- a/src/app/qgsclipboard.h +++ b/src/app/qgsclipboard.h @@ -15,7 +15,6 @@ * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCLIPBOARD_H #define QGSCLIPBOARD_H diff --git a/src/app/qgscontinuouscolordialog.cpp b/src/app/qgscontinuouscolordialog.cpp index 1d03a5295e0f..6635943aa54b 100644 --- a/src/app/qgscontinuouscolordialog.cpp +++ b/src/app/qgscontinuouscolordialog.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscontinuouscolordialog.h" #include "qgscontinuouscolorrenderer.h" diff --git a/src/app/qgscontinuouscolordialog.h b/src/app/qgscontinuouscolordialog.h index 398489822420..4a6e242af59b 100644 --- a/src/app/qgscontinuouscolordialog.h +++ b/src/app/qgscontinuouscolordialog.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCONTINUOUSCOLORDIALOG_H #define QGSCONTINUOUSCOLORDIALOG_H diff --git a/src/app/qgscustomization.cpp b/src/app/qgscustomization.cpp index 278157097a06..0114a0a7c1d1 100644 --- a/src/app/qgscustomization.cpp +++ b/src/app/qgscustomization.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscustomization.h" #include "qgisapp.h" #include "qgsapplication.h" diff --git a/src/app/qgscustomization.h b/src/app/qgscustomization.h index 52ce084e1e99..0f9dded0ba2d 100644 --- a/src/app/qgscustomization.h +++ b/src/app/qgscustomization.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCUSTOMIZATION_H #define QGSCUSTOMIZATION_H diff --git a/src/app/qgsfeatureaction.cpp b/src/app/qgsfeatureaction.cpp index 6c3a03492cac..a73fb18e28d2 100644 --- a/src/app/qgsfeatureaction.cpp +++ b/src/app/qgsfeatureaction.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsfeatureaction.h" #include "qgsvectorlayer.h" diff --git a/src/app/qgsfeatureaction.h b/src/app/qgsfeatureaction.h index 93310d623e9f..1aa14b6e36b2 100644 --- a/src/app/qgsfeatureaction.h +++ b/src/app/qgsfeatureaction.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSFEATUREACTION_H #define QGSFEATUREACTION_H diff --git a/src/app/qgsgraduatedsymboldialog.cpp b/src/app/qgsgraduatedsymboldialog.cpp index 843155016f20..583ca8923464 100644 --- a/src/app/qgsgraduatedsymboldialog.cpp +++ b/src/app/qgsgraduatedsymboldialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgsgraduatedsymboldialog.h b/src/app/qgsgraduatedsymboldialog.h index b94c3f46239a..a6d3b1d78998 100644 --- a/src/app/qgsgraduatedsymboldialog.h +++ b/src/app/qgsgraduatedsymboldialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGRADUATEDSYMBOLDIALOG_H #define QGSGRADUATEDSYMBOLDIALOG_H diff --git a/src/app/qgshandlebadlayers.cpp b/src/app/qgshandlebadlayers.cpp index 158f0532cfed..2668ebc2eb2d 100644 --- a/src/app/qgshandlebadlayers.cpp +++ b/src/app/qgshandlebadlayers.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgshandlebadlayers.h" #include "qgisapp.h" diff --git a/src/app/qgshandlebadlayers.h b/src/app/qgshandlebadlayers.h index 2427966175fb..f0f793526343 100644 --- a/src/app/qgshandlebadlayers.h +++ b/src/app/qgshandlebadlayers.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSHANDLEBADLAYERS_H #define QGSHANDLEBADLAYERS_H diff --git a/src/app/qgshighlight.cpp b/src/app/qgshighlight.cpp index c595d863f7e7..0af0335727ce 100644 --- a/src/app/qgshighlight.cpp +++ b/src/app/qgshighlight.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgshighlight.h" #include "qgsgeometry.h" diff --git a/src/app/qgshighlight.h b/src/app/qgshighlight.h index 902cd227ecc1..7c6241bee073 100644 --- a/src/app/qgshighlight.h +++ b/src/app/qgshighlight.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSHIGHLIGHT_H #define QGSHIGHLIGHT_H diff --git a/src/app/qgsidentifyresults.cpp b/src/app/qgsidentifyresults.cpp index f51b9dd811d1..c0e2f86dcc43 100644 --- a/src/app/qgsidentifyresults.cpp +++ b/src/app/qgsidentifyresults.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsidentifyresults.h" #include "qgsapplication.h" diff --git a/src/app/qgsidentifyresults.h b/src/app/qgsidentifyresults.h index 653ae1eb1c09..a741aae5ee26 100644 --- a/src/app/qgsidentifyresults.h +++ b/src/app/qgsidentifyresults.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSIDENTIFYRESULTS_H #define QGSIDENTIFYRESULTS_H diff --git a/src/app/qgslabeldialog.cpp b/src/app/qgslabeldialog.cpp index 8086ed4ee05c..62d4571cbbfa 100644 --- a/src/app/qgslabeldialog.cpp +++ b/src/app/qgslabeldialog.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/app/qgslabeldialog.h b/src/app/qgslabeldialog.h index 8d8f273d2b61..077233491fd7 100644 --- a/src/app/qgslabeldialog.h +++ b/src/app/qgslabeldialog.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLABELDIALOG_H #define QGSLABELDIALOG_H diff --git a/src/app/qgsmaptooladdfeature.cpp b/src/app/qgsmaptooladdfeature.cpp index ba231136135f..2dba2a26f6b8 100644 --- a/src/app/qgsmaptooladdfeature.cpp +++ b/src/app/qgsmaptooladdfeature.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptooladdfeature.h" #include "qgsapplication.h" diff --git a/src/app/qgsmaptooladdfeature.h b/src/app/qgsmaptooladdfeature.h index 688d5789745f..c96954ff93eb 100644 --- a/src/app/qgsmaptooladdfeature.h +++ b/src/app/qgsmaptooladdfeature.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolcapture.h" #include "qgsfeature.h" diff --git a/src/app/qgsmaptooladdpart.cpp b/src/app/qgsmaptooladdpart.cpp index 38e5f4f35fa1..b348a5533e88 100644 --- a/src/app/qgsmaptooladdpart.cpp +++ b/src/app/qgsmaptooladdpart.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptooladdpart.h" #include "qgsgeometry.h" diff --git a/src/app/qgsmaptooladdpart.h b/src/app/qgsmaptooladdpart.h index d4d16bc5dc5a..6473097fb3ee 100644 --- a/src/app/qgsmaptooladdpart.h +++ b/src/app/qgsmaptooladdpart.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolcapture.h" diff --git a/src/app/qgsmaptooladdring.cpp b/src/app/qgsmaptooladdring.cpp index 09a133a77772..acc48ef77c70 100644 --- a/src/app/qgsmaptooladdring.cpp +++ b/src/app/qgsmaptooladdring.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptooladdring.h" #include "qgsgeometry.h" diff --git a/src/app/qgsmaptooladdring.h b/src/app/qgsmaptooladdring.h index a55abf0f59e5..7b0d2232e4a9 100644 --- a/src/app/qgsmaptooladdring.h +++ b/src/app/qgsmaptooladdring.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolcapture.h" diff --git a/src/app/qgsmaptoolcapture.cpp b/src/app/qgsmaptoolcapture.cpp index 1518ef21d3bb..03223204d764 100644 --- a/src/app/qgsmaptoolcapture.cpp +++ b/src/app/qgsmaptoolcapture.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolcapture.h" diff --git a/src/app/qgsmaptoolcapture.h b/src/app/qgsmaptoolcapture.h index ba7ba2e804a7..56eaf6aa491d 100644 --- a/src/app/qgsmaptoolcapture.h +++ b/src/app/qgsmaptoolcapture.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLCAPTURE_H #define QGSMAPTOOLCAPTURE_H diff --git a/src/app/qgsmaptooledit.cpp b/src/app/qgsmaptooledit.cpp index 571c57dd2e49..9da149ac3d2e 100644 --- a/src/app/qgsmaptooledit.cpp +++ b/src/app/qgsmaptooledit.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptooledit.h" #include "qgsproject.h" diff --git a/src/app/qgsmaptooledit.h b/src/app/qgsmaptooledit.h index c638187a2627..7fd27f0bcc4b 100644 --- a/src/app/qgsmaptooledit.h +++ b/src/app/qgsmaptooledit.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLEDIT_H #define QGSMAPTOOLEDIT_H diff --git a/src/app/qgsmaptoolidentify.cpp b/src/app/qgsmaptoolidentify.cpp index 8c40ca59a488..844e817430f1 100644 --- a/src/app/qgsmaptoolidentify.cpp +++ b/src/app/qgsmaptoolidentify.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscursors.h" #include "qgsdistancearea.h" diff --git a/src/app/qgsmaptoolidentify.h b/src/app/qgsmaptoolidentify.h index 45084efff6b5..46069245950d 100644 --- a/src/app/qgsmaptoolidentify.h +++ b/src/app/qgsmaptoolidentify.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLIDENTIFY_H #define QGSMAPTOOLIDENTIFY_H diff --git a/src/app/qgsmaptoolmovefeature.cpp b/src/app/qgsmaptoolmovefeature.cpp index 3c939e3f2e6c..daf8cedb6f7a 100644 --- a/src/app/qgsmaptoolmovefeature.cpp +++ b/src/app/qgsmaptoolmovefeature.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolmovefeature.h" #include "qgsgeometry.h" diff --git a/src/app/qgsmaptoolmovefeature.h b/src/app/qgsmaptoolmovefeature.h index 8bc57a580442..af62fc82480b 100644 --- a/src/app/qgsmaptoolmovefeature.h +++ b/src/app/qgsmaptoolmovefeature.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLMOVEFEATURE_H #define QGSMAPTOOLMOVEFEATURE_H diff --git a/src/app/qgsmaptoolreshape.cpp b/src/app/qgsmaptoolreshape.cpp index eb9f123f5de4..af81ab1a1f45 100644 --- a/src/app/qgsmaptoolreshape.cpp +++ b/src/app/qgsmaptoolreshape.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolreshape.h" #include "qgsgeometry.h" diff --git a/src/app/qgsmaptoolreshape.h b/src/app/qgsmaptoolreshape.h index 665df0207194..3058a555292c 100644 --- a/src/app/qgsmaptoolreshape.h +++ b/src/app/qgsmaptoolreshape.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLRESHAPE_H #define QGSMAPTOOLRESHAPE_H diff --git a/src/app/qgsmaptoolselect.cpp b/src/app/qgsmaptoolselect.cpp index 7d95848ccc11..541cb603f93e 100644 --- a/src/app/qgsmaptoolselect.cpp +++ b/src/app/qgsmaptoolselect.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolselect.h" diff --git a/src/app/qgsmaptoolselect.h b/src/app/qgsmaptoolselect.h index 1c111962dced..400f2e9108e9 100644 --- a/src/app/qgsmaptoolselect.h +++ b/src/app/qgsmaptoolselect.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSELECT_H #define QGSMAPTOOLSELECT_H diff --git a/src/app/qgsmaptoolselectfreehand.cpp b/src/app/qgsmaptoolselectfreehand.cpp index f8b38b6eda5a..ca4cb382a599 100644 --- a/src/app/qgsmaptoolselectfreehand.cpp +++ b/src/app/qgsmaptoolselectfreehand.cpp @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolselectfreehand.h" #include "qgsmaptoolselectutils.h" diff --git a/src/app/qgsmaptoolselectfreehand.h b/src/app/qgsmaptoolselectfreehand.h index 5d5f103a984c..bc9e7d810be3 100644 --- a/src/app/qgsmaptoolselectfreehand.h +++ b/src/app/qgsmaptoolselectfreehand.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSELECTFREEHAND_H #define QGSMAPTOOLSELECTFREEHAND_H diff --git a/src/app/qgsmaptoolselectpolygon.cpp b/src/app/qgsmaptoolselectpolygon.cpp index cd1c349afb29..4716348112a4 100644 --- a/src/app/qgsmaptoolselectpolygon.cpp +++ b/src/app/qgsmaptoolselectpolygon.cpp @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolselectpolygon.h" #include "qgsmaptoolselectutils.h" diff --git a/src/app/qgsmaptoolselectpolygon.h b/src/app/qgsmaptoolselectpolygon.h index f977252aac90..9715ce9c284a 100644 --- a/src/app/qgsmaptoolselectpolygon.h +++ b/src/app/qgsmaptoolselectpolygon.h @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSELECTPOLYGON_H #define QGSMAPTOOLSELECTPOLYGON_H diff --git a/src/app/qgsmaptoolselectradius.cpp b/src/app/qgsmaptoolselectradius.cpp index 9ec17fe488f8..9828db2f80c7 100644 --- a/src/app/qgsmaptoolselectradius.cpp +++ b/src/app/qgsmaptoolselectradius.cpp @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolselectradius.h" #include "qgsmaptoolselectutils.h" diff --git a/src/app/qgsmaptoolselectradius.h b/src/app/qgsmaptoolselectradius.h index 6900df0543c4..e3d9f7d9f0cd 100644 --- a/src/app/qgsmaptoolselectradius.h +++ b/src/app/qgsmaptoolselectradius.h @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSELECTRADIUS_H #define QGSMAPTOOLSELECTRADIUS_H diff --git a/src/app/qgsmaptoolselectrectangle.cpp b/src/app/qgsmaptoolselectrectangle.cpp index 4190a2175855..19c7f8462e1d 100644 --- a/src/app/qgsmaptoolselectrectangle.cpp +++ b/src/app/qgsmaptoolselectrectangle.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmaptoolselectrangle.cpp 13380 2010-04-25 12:51:49Z jef $ */ #include "qgsmaptoolselectrectangle.h" #include "qgsmaptoolselectutils.h" diff --git a/src/app/qgsmaptoolselectrectangle.h b/src/app/qgsmaptoolselectrectangle.h index bef9b3e6aaa0..acc21bf5d0bd 100644 --- a/src/app/qgsmaptoolselectrectangle.h +++ b/src/app/qgsmaptoolselectrectangle.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmaptoolselectrectangle.h 13187 2010-03-28 22:14:44Z jef $ */ #ifndef QGSMAPTOOLRECTANGLE_H #define QGSMAPTOOLRECTANGLE_H diff --git a/src/app/qgsmaptoolselectutils.cpp b/src/app/qgsmaptoolselectutils.cpp index 60d78240b01e..eac61fd1ddba 100644 --- a/src/app/qgsmaptoolselectutils.cpp +++ b/src/app/qgsmaptoolselectutils.cpp @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/app/qgsmaptoolselectutils.h b/src/app/qgsmaptoolselectutils.h index 7b41c8cc78ef..a12bf4087ef4 100644 --- a/src/app/qgsmaptoolselectutils.h +++ b/src/app/qgsmaptoolselectutils.h @@ -12,7 +12,6 @@ email : jpalmer at linz dot govt dot nz * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSELECTUTILS_H #define QGSMAPTOOLSELECTUTILS_H diff --git a/src/app/qgsmaptoolsimplify.h b/src/app/qgsmaptoolsimplify.h index fe0757aebe01..f5ebfee5ebb4 100644 --- a/src/app/qgsmaptoolsimplify.h +++ b/src/app/qgsmaptoolsimplify.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSIMPLIFY_H #define QGSMAPTOOLSIMPLIFY_H diff --git a/src/app/qgsmaptoolsplitfeatures.cpp b/src/app/qgsmaptoolsplitfeatures.cpp index 927f97ae8f43..36836aa67640 100644 --- a/src/app/qgsmaptoolsplitfeatures.cpp +++ b/src/app/qgsmaptoolsplitfeatures.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolsplitfeatures.h" #include "qgsmapcanvas.h" diff --git a/src/app/qgsmaptoolsplitfeatures.h b/src/app/qgsmaptoolsplitfeatures.h index 595d1a425c66..1f2f0c324286 100644 --- a/src/app/qgsmaptoolsplitfeatures.h +++ b/src/app/qgsmaptoolsplitfeatures.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLSPLITFEATURES_H #define QGSMAPTOOLSPLITFEATURES_H diff --git a/src/app/qgsmaptoolvertexedit.cpp b/src/app/qgsmaptoolvertexedit.cpp index 3eccb6f5e9ae..80223962ca46 100644 --- a/src/app/qgsmaptoolvertexedit.cpp +++ b/src/app/qgsmaptoolvertexedit.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolvertexedit.h" #include "qgsmapcanvas.h" diff --git a/src/app/qgsmaptoolvertexedit.h b/src/app/qgsmaptoolvertexedit.h index b9742b78fb4e..59385d869bfb 100644 --- a/src/app/qgsmaptoolvertexedit.h +++ b/src/app/qgsmaptoolvertexedit.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLVERTEXEDIT_H #define QGSMAPTOOLVERTEXEDIT_H diff --git a/src/app/qgsmeasuredialog.cpp b/src/app/qgsmeasuredialog.cpp index 39c8a08d7824..fbad0bdb15b6 100644 --- a/src/app/qgsmeasuredialog.cpp +++ b/src/app/qgsmeasuredialog.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmeasuredialog.h" #include "qgsmeasuretool.h" diff --git a/src/app/qgsmeasuretool.cpp b/src/app/qgsmeasuretool.cpp index 07f9e9b0e7b2..c40586311e7a 100644 --- a/src/app/qgsmeasuretool.cpp +++ b/src/app/qgsmeasuretool.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsdistancearea.h" #include "qgslogger.h" diff --git a/src/app/qgsmeasuretool.h b/src/app/qgsmeasuretool.h index 4918ac05fd37..3b9da988ccc9 100644 --- a/src/app/qgsmeasuretool.h +++ b/src/app/qgsmeasuretool.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMEASURETOOL_H diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index fbe360bca2d2..0dd9c4b8a713 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplication.h" #include "qgsoptions.h" #include "qgis.h" diff --git a/src/app/qgsoptions.h b/src/app/qgsoptions.h index 8cceb2024539..6761b62846e5 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSOPTIONS_H #define QGSOPTIONS_H diff --git a/src/app/qgspastetransformations.cpp b/src/app/qgspastetransformations.cpp index c4b104185859..7f032288a84a 100644 --- a/src/app/qgspastetransformations.cpp +++ b/src/app/qgspastetransformations.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/app/qgspastetransformations.h b/src/app/qgspastetransformations.h index 2882287e12ff..798c97159cfd 100644 --- a/src/app/qgspastetransformations.h +++ b/src/app/qgspastetransformations.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPASTETRANSFORMATIONS_H #define QGSPASTETRANSFORMATIONS_H #include "ui_qgspastetransformationsbase.h" diff --git a/src/app/qgspluginitem.cpp b/src/app/qgspluginitem.cpp index 5fcb2ed1890b..732711e0e6d0 100644 --- a/src/app/qgspluginitem.cpp +++ b/src/app/qgspluginitem.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspluginitem.h" QgsPluginItem::QgsPluginItem( QString _name, QString _fullPath, QString _type, bool _python ): diff --git a/src/app/qgspluginitem.h b/src/app/qgspluginitem.h index 827173389d80..1928d44c4a93 100644 --- a/src/app/qgspluginitem.h +++ b/src/app/qgspluginitem.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPLUGINITEM_H #define QGSPLUGINITEM_H #include diff --git a/src/app/qgspluginmanager.cpp b/src/app/qgspluginmanager.cpp index de16c5078026..16f85fdf828e 100644 --- a/src/app/qgspluginmanager.cpp +++ b/src/app/qgspluginmanager.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsconfig.h" diff --git a/src/app/qgspluginmanager.h b/src/app/qgspluginmanager.h index 4ea5d516d424..b560007e5c0a 100644 --- a/src/app/qgspluginmanager.h +++ b/src/app/qgspluginmanager.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPLUGINMANAGER_H #define QGSPLUGINMANAGER_H #include diff --git a/src/app/qgspluginmetadata.cpp b/src/app/qgspluginmetadata.cpp index 90dfc11ea4ca..4d34a7c6f8d4 100644 --- a/src/app/qgspluginmetadata.cpp +++ b/src/app/qgspluginmetadata.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "../plugins/qgisplugin.h" #include "qgspluginmetadata.h" diff --git a/src/app/qgspluginmetadata.h b/src/app/qgspluginmetadata.h index 14e1a3921ad1..903a9ed7ba4d 100644 --- a/src/app/qgspluginmetadata.h +++ b/src/app/qgspluginmetadata.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPLUGINMETADATA_H #define QGSPLUGINMETADATA_H diff --git a/src/app/qgspluginregistry.cpp b/src/app/qgspluginregistry.cpp index 8e3a3b4736e7..8fabe223e17a 100644 --- a/src/app/qgspluginregistry.cpp +++ b/src/app/qgspluginregistry.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgspluginregistry.h b/src/app/qgspluginregistry.h index d295f57adfcf..76609d6fc622 100644 --- a/src/app/qgspluginregistry.h +++ b/src/app/qgspluginregistry.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPLUGINREGISTRY_H #define QGSPLUGINREGISTRY_H diff --git a/src/app/qgsprojectproperties.cpp b/src/app/qgsprojectproperties.cpp index 8f5604769171..cb593625c55f 100644 --- a/src/app/qgsprojectproperties.cpp +++ b/src/app/qgsprojectproperties.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsprojectproperties.h" diff --git a/src/app/qgsprojectproperties.h b/src/app/qgsprojectproperties.h index 44f24a42223a..a21815e054b8 100644 --- a/src/app/qgsprojectproperties.h +++ b/src/app/qgsprojectproperties.h @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include "ui_qgsprojectpropertiesbase.h" #include "qgis.h" diff --git a/src/app/qgsquerybuilder.cpp b/src/app/qgsquerybuilder.cpp index e9609ba10727..6da34c1330f0 100644 --- a/src/app/qgsquerybuilder.cpp +++ b/src/app/qgsquerybuilder.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsquerybuilder.h" #include "qgslogger.h" #include diff --git a/src/app/qgsrasterlayerproperties.cpp b/src/app/qgsrasterlayerproperties.cpp index 20051138c045..8fdd12bff344 100644 --- a/src/app/qgsrasterlayerproperties.cpp +++ b/src/app/qgsrasterlayerproperties.cpp @@ -59,9 +59,6 @@ #include #include -const char * const ident = - "$Id$"; - QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanvas* theCanvas, QWidget *parent, Qt::WFlags fl ) : QDialog( parent, fl ), // Constant that signals property not used. diff --git a/src/app/qgsrasterlayerproperties.h b/src/app/qgsrasterlayerproperties.h index 327add964220..f026da44d532 100644 --- a/src/app/qgsrasterlayerproperties.h +++ b/src/app/qgsrasterlayerproperties.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRASTERLAYERPROPERTIES_H #define QGSRASTERLAYERPROPERTIES_H diff --git a/src/app/qgssinglesymboldialog.cpp b/src/app/qgssinglesymboldialog.cpp index 72a6138313d5..ab88a6bff66f 100644 --- a/src/app/qgssinglesymboldialog.cpp +++ b/src/app/qgssinglesymboldialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgssinglesymboldialog.h" #include "qgsmarkercatalogue.h" diff --git a/src/app/qgssinglesymboldialog.h b/src/app/qgssinglesymboldialog.h index 1084510446a7..1903f1d6408c 100644 --- a/src/app/qgssinglesymboldialog.h +++ b/src/app/qgssinglesymboldialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSINGLESYMBOLDIALOG_H #define QGSSINGLESYMBOLDIALOG_H diff --git a/src/app/qgssponsors.cpp b/src/app/qgssponsors.cpp index 2fd869405ae9..4ab8b17d35b9 100644 --- a/src/app/qgssponsors.cpp +++ b/src/app/qgssponsors.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgssponsors.h" #include "qgsapplication.h" diff --git a/src/app/qgssponsors.h b/src/app/qgssponsors.h index a078f38a81d7..8532506d0894 100644 --- a/src/app/qgssponsors.h +++ b/src/app/qgssponsors.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSSPONSORS_H #define QGSSPONSORS_H diff --git a/src/app/qgstilescalewidget.cpp b/src/app/qgstilescalewidget.cpp index 22a740d79ccb..67ca1846b092 100644 --- a/src/app/qgstilescalewidget.cpp +++ b/src/app/qgstilescalewidget.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgstilescalewidget.h" #include "qgsmapcanvas.h" diff --git a/src/app/qgstilescalewidget.h b/src/app/qgstilescalewidget.h index fa051372676b..0d1dc7602a6d 100644 --- a/src/app/qgstilescalewidget.h +++ b/src/app/qgstilescalewidget.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSTILESCALEWIDGET_H #define QGSTILESCALEWIDGET_H diff --git a/src/app/qgstipgui.cpp b/src/app/qgstipgui.cpp index d9281e9d313a..f91ebc332777 100644 --- a/src/app/qgstipgui.cpp +++ b/src/app/qgstipgui.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgstipgui.h b/src/app/qgstipgui.h index 2b8032f9eb3a..72940a705210 100644 --- a/src/app/qgstipgui.h +++ b/src/app/qgstipgui.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSTIPGUI_H #define QGSTIPGUI_H diff --git a/src/app/qgsuniquevaluedialog.cpp b/src/app/qgsuniquevaluedialog.cpp index 60b67aebc83c..90ce3b963f62 100644 --- a/src/app/qgsuniquevaluedialog.cpp +++ b/src/app/qgsuniquevaluedialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsuniquevaluedialog.h" #include "qgsfeature.h" diff --git a/src/app/qgsuniquevaluedialog.h b/src/app/qgsuniquevaluedialog.h index 772c1b366a10..db50c3ca338c 100644 --- a/src/app/qgsuniquevaluedialog.h +++ b/src/app/qgsuniquevaluedialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSUNIQUEVALUEDIALOG_H #define QGSUNIQUEVALUEDIALOG_H diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index 31dc9d6c7b85..f2af3e19e6b2 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/app/qgsvectorlayerproperties.h b/src/app/qgsvectorlayerproperties.h index e961b3b9719a..ff527688e0bf 100644 --- a/src/app/qgsvectorlayerproperties.h +++ b/src/app/qgsvectorlayerproperties.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSVECTORLAYERPROPERTIES #define QGSVECTORLAYERPROPERTIES diff --git a/src/app/spatialite/qgsnewspatialitelayerdialog.cpp b/src/app/spatialite/qgsnewspatialitelayerdialog.cpp index b4bc9e3807c4..25e7bb8e543c 100644 --- a/src/app/spatialite/qgsnewspatialitelayerdialog.cpp +++ b/src/app/spatialite/qgsnewspatialitelayerdialog.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsnewspatialitelayerdialog.h" diff --git a/src/app/spatialite/qgsnewspatialitelayerdialog.h b/src/app/spatialite/qgsnewspatialitelayerdialog.h index bcb4c9ca740b..5317cbe115c9 100644 --- a/src/app/spatialite/qgsnewspatialitelayerdialog.h +++ b/src/app/spatialite/qgsnewspatialitelayerdialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSNEWSPATIALITELAYERDIALOG_H #define QGSNEWSPATIALITELAYERDIALOG_H diff --git a/src/app/spatialite/qgsspatialitesridsdialog.cpp b/src/app/spatialite/qgsspatialitesridsdialog.cpp index ea20a03a8d92..992d23dcbc35 100644 --- a/src/app/spatialite/qgsspatialitesridsdialog.cpp +++ b/src/app/spatialite/qgsspatialitesridsdialog.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include "qgsspatialitesridsdialog.h" QgsSpatialiteSridsDialog::QgsSpatialiteSridsDialog( QWidget *parent, Qt::WFlags fl ) diff --git a/src/app/spatialite/qgsspatialitesridsdialog.h b/src/app/spatialite/qgsspatialitesridsdialog.h index 9f6118b3fc45..73975079b4ad 100644 --- a/src/app/spatialite/qgsspatialitesridsdialog.h +++ b/src/app/spatialite/qgsspatialitesridsdialog.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QgsSpatialiteSridsDialog_H #define QgsSpatialiteSridsDialog_H #include "ui_qgsspatialitesridsdialogbase.h" diff --git a/src/browser/qgsbrowser.cpp b/src/browser/qgsbrowser.cpp index c15fff2e9c98..bb13cac0b444 100644 --- a/src/browser/qgsbrowser.cpp +++ b/src/browser/qgsbrowser.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include #include diff --git a/src/browser/qgsbrowser.h b/src/browser/qgsbrowser.h index a54d75746db2..225cf151f888 100644 --- a/src/browser/qgsbrowser.h +++ b/src/browser/qgsbrowser.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSBROWSER_H #define QGSBROWSER_H diff --git a/src/core/composer/qgscomposerpicture.cpp b/src/core/composer/qgscomposerpicture.cpp index 80c0a830a060..cd36067542e9 100644 --- a/src/core/composer/qgscomposerpicture.cpp +++ b/src/core/composer/qgscomposerpicture.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscomposerpicture.h" #include "qgscomposermap.h" diff --git a/src/core/qgis.h b/src/core/qgis.h index 735fcadff634..44daf494a933 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGIS_H #define QGIS_H diff --git a/src/core/qgsapplication.cpp b/src/core/qgsapplication.cpp index 4ac0f0993db4..c640bd0297cc 100644 --- a/src/core/qgsapplication.cpp +++ b/src/core/qgsapplication.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplication.h" #include "qgslogger.h" diff --git a/src/core/qgsapplication.h b/src/core/qgsapplication.h index 1795783c0c1d..c33f81a192cf 100644 --- a/src/core/qgsapplication.h +++ b/src/core/qgsapplication.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSAPPLICATION_H #define QGSAPPLICATION_H diff --git a/src/core/qgsattributeaction.cpp b/src/core/qgsattributeaction.cpp index 58f1e7f5f827..100c08118e52 100644 --- a/src/core/qgsattributeaction.cpp +++ b/src/core/qgsattributeaction.cpp @@ -21,7 +21,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include @@ -33,8 +32,6 @@ #include "qgsrunprocess.h" #include "qgsvectorlayer.h" -static const char * const ident_ = "$Id$"; - void QgsAttributeAction::addAction( QgsAction::ActionType type, QString name, QString action, bool capture ) { mActions << QgsAction( type, name, action, capture ); diff --git a/src/core/qgsattributeaction.h b/src/core/qgsattributeaction.h index 2653f26c40f5..e5e0ae20bede 100644 --- a/src/core/qgsattributeaction.h +++ b/src/core/qgsattributeaction.h @@ -20,7 +20,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTEACTION_H #define QGSATTRIBUTEACTION_H diff --git a/src/core/qgsclipper.cpp b/src/core/qgsclipper.cpp index f0603297b4e9..e15db15b884a 100644 --- a/src/core/qgsclipper.cpp +++ b/src/core/qgsclipper.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsclipper.h" diff --git a/src/core/qgsclipper.h b/src/core/qgsclipper.h index c953bfe19741..2f621f425615 100644 --- a/src/core/qgsclipper.h +++ b/src/core/qgsclipper.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCLIPPER_H #define QGSCLIPPER_H diff --git a/src/core/qgscontexthelp.cpp b/src/core/qgscontexthelp.cpp index 51ef018d7141..f51c68cd2982 100644 --- a/src/core/qgscontexthelp.cpp +++ b/src/core/qgscontexthelp.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgscontexthelp.h b/src/core/qgscontexthelp.h index 5065e5cae6bd..35ced88be6d7 100644 --- a/src/core/qgscontexthelp.h +++ b/src/core/qgscontexthelp.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCONTEXTHELP_H #define QGSCONTEXTHELP_H #include diff --git a/src/core/qgscoordinatetransform.cpp b/src/core/qgscoordinatetransform.cpp index a70a41fd0092..633cfbe91d38 100644 --- a/src/core/qgscoordinatetransform.cpp +++ b/src/core/qgscoordinatetransform.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscoordinatetransform.h" #include "qgsmessageoutput.h" #include "qgslogger.h" diff --git a/src/core/qgscoordinatetransform.h b/src/core/qgscoordinatetransform.h index d7f56c38a949..cf675e9a897e 100644 --- a/src/core/qgscoordinatetransform.h +++ b/src/core/qgscoordinatetransform.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCOORDINATETRANSFORM_H #define QGSCOORDINATETRANSFORM_H diff --git a/src/core/qgscredentials.cpp b/src/core/qgscredentials.cpp old mode 100755 new mode 100644 index 57f602590687..22ac7057605d --- a/src/core/qgscredentials.cpp +++ b/src/core/qgscredentials.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscredentials.h" #include "qgslogger.h" diff --git a/src/core/qgscredentials.h b/src/core/qgscredentials.h index 0cef35c40e85..8404504848e3 100644 --- a/src/core/qgscredentials.h +++ b/src/core/qgscredentials.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCREDENTIALS_H diff --git a/src/core/qgscsexception.h b/src/core/qgscsexception.h index b65598e5d8e5..3c60ce8ef48e 100644 --- a/src/core/qgscsexception.h +++ b/src/core/qgscsexception.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCSEXCEPTION_H #define QGSCSEXCEPTION_H diff --git a/src/core/qgsdataitem.cpp b/src/core/qgsdataitem.cpp index 4ee75f7d4367..e6d29b3e1b22 100644 --- a/src/core/qgsdataitem.cpp +++ b/src/core/qgsdataitem.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsdataitem.h b/src/core/qgsdataitem.h index 86746acb7fec..98e7a12a4de0 100644 --- a/src/core/qgsdataitem.h +++ b/src/core/qgsdataitem.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSDATAITEM_H #define QGSDATAITEM_H diff --git a/src/core/qgsdataprovider.h b/src/core/qgsdataprovider.h index 3b0b1e73bdba..d7d2cc997854 100644 --- a/src/core/qgsdataprovider.h +++ b/src/core/qgsdataprovider.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QQGSDATAPROVIDER_H #define QQGSDATAPROVIDER_H diff --git a/src/core/qgsdatasourceuri.cpp b/src/core/qgsdatasourceuri.cpp index 414e661f0175..2761a368adfc 100644 --- a/src/core/qgsdatasourceuri.cpp +++ b/src/core/qgsdatasourceuri.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsdatasourceuri.h 5839 2006-09-19 18:04:21Z wonder $ */ #include "qgsdatasourceuri.h" #include "qgslogger.h" diff --git a/src/core/qgsdatasourceuri.h b/src/core/qgsdatasourceuri.h index 4b288c101540..121b5b184d59 100644 --- a/src/core/qgsdatasourceuri.h +++ b/src/core/qgsdatasourceuri.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSDATASOURCEURI_H #define QGSDATASOURCEURI_H diff --git a/src/core/qgsdistancearea.cpp b/src/core/qgsdistancearea.cpp index 069e5104cec7..1203f3cc9b1f 100644 --- a/src/core/qgsdistancearea.cpp +++ b/src/core/qgsdistancearea.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsdistancearea.h b/src/core/qgsdistancearea.h index e18373dd49d0..54793b7a1c29 100644 --- a/src/core/qgsdistancearea.h +++ b/src/core/qgsdistancearea.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSDISTANCEAREA_H #define QGSDISTANCEAREA_H diff --git a/src/core/qgsexception.h b/src/core/qgsexception.h index 33a2d78a6191..3a7f0d028330 100644 --- a/src/core/qgsexception.h +++ b/src/core/qgsexception.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSEXCEPTION_H #define QGSEXCEPTION_H diff --git a/src/core/qgsfeature.cpp b/src/core/qgsfeature.cpp index d38ccda7fcc6..fa80037c8fc3 100644 --- a/src/core/qgsfeature.cpp +++ b/src/core/qgsfeature.cpp @@ -12,7 +12,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsfeature.h" #include "qgsgeometry.h" diff --git a/src/core/qgsfeature.h b/src/core/qgsfeature.h index 0c9c193b302b..d78f82e56c05 100644 --- a/src/core/qgsfeature.h +++ b/src/core/qgsfeature.h @@ -12,7 +12,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSFEATURE_H #define QGSFEATURE_H diff --git a/src/core/qgsfield.cpp b/src/core/qgsfield.cpp index a23234ca8bf5..5cef327a0777 100644 --- a/src/core/qgsfield.cpp +++ b/src/core/qgsfield.cpp @@ -13,13 +13,9 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsfield.h" -static const char * const ident_ = - "$Id$"; - /* QgsField::QgsField(QString nam, QString typ, int len, int prec, bool num, QString comment) diff --git a/src/core/qgsfield.h b/src/core/qgsfield.h index 1687fbdfd8be..31833ec2616d 100644 --- a/src/core/qgsfield.h +++ b/src/core/qgsfield.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSFIELD_H #define QGSFIELD_H diff --git a/src/core/qgsgeometry.cpp b/src/core/qgsgeometry.cpp index 5436d27bbac3..e33e6e0dbd6b 100644 --- a/src/core/qgsgeometry.cpp +++ b/src/core/qgsgeometry.cpp @@ -12,7 +12,6 @@ email : morb at ozemail dot com dot au * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsgeometry.h b/src/core/qgsgeometry.h index be7904123248..c933707466f6 100644 --- a/src/core/qgsgeometry.h +++ b/src/core/qgsgeometry.h @@ -12,7 +12,6 @@ email : morb at ozemail dot com dot au * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOMETRY_H #define QGSGEOMETRY_H diff --git a/src/core/qgshttptransaction.cpp b/src/core/qgshttptransaction.cpp index b40205968952..c78a26988f59 100644 --- a/src/core/qgshttptransaction.cpp +++ b/src/core/qgshttptransaction.cpp @@ -17,7 +17,6 @@ * * ***************************************************************************/ -/* $Id: qgshttptransaction.cpp 5697 2006-08-15 10:29:46Z morb_au $ */ #include diff --git a/src/core/qgshttptransaction.h b/src/core/qgshttptransaction.h index 01c8f2bba733..957f7f896d98 100644 --- a/src/core/qgshttptransaction.h +++ b/src/core/qgshttptransaction.h @@ -17,7 +17,6 @@ * * ***************************************************************************/ -/* $Id: qgshttptransaction.h 5697 2006-08-15 10:29:46Z morb_au $ */ #ifndef QGSHTTPTRANSACTION_H #define QGSHTTPTRANSACTION_H diff --git a/src/core/qgslabel.cpp b/src/core/qgslabel.cpp index 4b1ec6df3dd2..85a4eb104227 100644 --- a/src/core/qgslabel.cpp +++ b/src/core/qgslabel.cpp @@ -44,9 +44,6 @@ #define M_PI 4*atan(1.0) #endif -static const char * const ident_ = - "$Id$"; - QgsLabel::QgsLabel( const QgsFieldMap & fields ) : mMinScale( 0 ), mMaxScale( 100000000 ), diff --git a/src/core/qgslabel.h b/src/core/qgslabel.h index 90c725af6479..e9e865bf371d 100644 --- a/src/core/qgslabel.h +++ b/src/core/qgslabel.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLABEL_H #define QGSLABEL_H diff --git a/src/core/qgslabelattributes.cpp b/src/core/qgslabelattributes.cpp index 09b09a8ec145..0f0e988c23d4 100644 --- a/src/core/qgslabelattributes.cpp +++ b/src/core/qgslabelattributes.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgslabelattributes.h b/src/core/qgslabelattributes.h index 6d603d5beb07..7412726bdc0a 100644 --- a/src/core/qgslabelattributes.h +++ b/src/core/qgslabelattributes.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLABELATTRIBUTES_H #define QGSLABELATTRIBUTES_H diff --git a/src/core/qgsmaplayer.cpp b/src/core/qgsmaplayer.cpp index 8af3946a0bad..d2b5e1320d85 100644 --- a/src/core/qgsmaplayer.cpp +++ b/src/core/qgsmaplayer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 21956106b248..23a1d4f774dc 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPLAYER_H #define QGSMAPLAYER_H diff --git a/src/core/qgsmaplayerregistry.cpp b/src/core/qgsmaplayerregistry.cpp index 37f73a000659..640b8de26681 100644 --- a/src/core/qgsmaplayerregistry.cpp +++ b/src/core/qgsmaplayerregistry.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/core/qgsmaplayerregistry.h b/src/core/qgsmaplayerregistry.h index 448bacabc3dc..f0d744ab19eb 100644 --- a/src/core/qgsmaplayerregistry.h +++ b/src/core/qgsmaplayerregistry.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPLAYERREGISTRY_H #define QGSMAPLAYERREGISTRY_H diff --git a/src/core/qgsmaprenderer.cpp b/src/core/qgsmaprenderer.cpp index 7bf0ab250b10..dddb4820a696 100644 --- a/src/core/qgsmaprenderer.cpp +++ b/src/core/qgsmaprenderer.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsmaprenderer.h b/src/core/qgsmaprenderer.h index 6c6beccc4b38..2f286a70eece 100644 --- a/src/core/qgsmaprenderer.h +++ b/src/core/qgsmaprenderer.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPRENDER_H #define QGSMAPRENDER_H diff --git a/src/core/qgsmaptopixel.cpp b/src/core/qgsmaptopixel.cpp index 63df04e0ef7c..d0cc76d5b3ea 100644 --- a/src/core/qgsmaptopixel.cpp +++ b/src/core/qgsmaptopixel.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptopixel.h" #include #include diff --git a/src/core/qgsmaptopixel.h b/src/core/qgsmaptopixel.h index 954535fcf187..344671f479b2 100644 --- a/src/core/qgsmaptopixel.h +++ b/src/core/qgsmaptopixel.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOPIXEL #define QGSMAPTOPIXEL diff --git a/src/core/qgsmessageoutput.cpp b/src/core/qgsmessageoutput.cpp index 4b5c2d450ca8..f4f958017235 100644 --- a/src/core/qgsmessageoutput.cpp +++ b/src/core/qgsmessageoutput.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmessageoutput.h" #include "qgslogger.h" diff --git a/src/core/qgsmessageoutput.h b/src/core/qgsmessageoutput.h index aad27de6a257..de9bf5c92449 100644 --- a/src/core/qgsmessageoutput.h +++ b/src/core/qgsmessageoutput.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMESSAGEOUTPUT_H diff --git a/src/core/qgsnetworkaccessmanager.cpp b/src/core/qgsnetworkaccessmanager.cpp index ad660c41edcd..1ece1d7b34bb 100644 --- a/src/core/qgsnetworkaccessmanager.cpp +++ b/src/core/qgsnetworkaccessmanager.cpp @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index 3e076cad80b4..5c78e137e290 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSNETWORKACCESSMANAGER_H #define QGSNETWORKACCESSMANAGER_H diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp old mode 100755 new mode 100644 diff --git a/src/core/qgspluginlayerregistry.cpp b/src/core/qgspluginlayerregistry.cpp index 970a4c707f9f..56acc1631007 100644 --- a/src/core/qgspluginlayerregistry.cpp +++ b/src/core/qgspluginlayerregistry.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspluginlayerregistry.h" #include "qgslogger.h" diff --git a/src/core/qgspluginlayerregistry.h b/src/core/qgspluginlayerregistry.h index d247fc87c603..c04e592b6eaa 100644 --- a/src/core/qgspluginlayerregistry.h +++ b/src/core/qgspluginlayerregistry.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPLUGINLAYERREGSITRY_H #define QGSPLUGINLAYERREGSITRY_H diff --git a/src/core/qgspoint.cpp b/src/core/qgspoint.cpp index 3c81bac5f54a..d4707a02c093 100644 --- a/src/core/qgspoint.cpp +++ b/src/core/qgspoint.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspoint.h" diff --git a/src/core/qgspoint.h b/src/core/qgspoint.h index 322bf23e736c..947e7293afb8 100644 --- a/src/core/qgspoint.h +++ b/src/core/qgspoint.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPOINT_H #define QGSPOINT_H diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 391ed8db0ee5..49f058eb240c 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -38,9 +38,6 @@ #include #include - -static const char *const ident_ = "$Id$"; - // canonical project instance QgsProject * QgsProject::theProject_; diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index 85b7196abcd3..605fb635dcb0 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROJECT_H #define QGSPROJECT_H diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp index aace348d0571..4bcf29c51f5a 100644 --- a/src/core/qgsprojectfiletransform.cpp +++ b/src/core/qgsprojectfiletransform.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsprojectfiletransform.h" diff --git a/src/core/qgsprojectfiletransform.h b/src/core/qgsprojectfiletransform.h index 2c2625b01779..0836fbcb35b5 100644 --- a/src/core/qgsprojectfiletransform.h +++ b/src/core/qgsprojectfiletransform.h @@ -22,7 +22,6 @@ * perform upgrades to a more recent version */ -/* $Id$ */ #ifndef QGSPROJECTFILETRANSFORM_H #define QGSPROJECTFILETRANSFORM_H diff --git a/src/core/qgsprojectproperty.cpp b/src/core/qgsprojectproperty.cpp index 93bf73949404..f2d7c3217888 100644 --- a/src/core/qgsprojectproperty.cpp +++ b/src/core/qgsprojectproperty.cpp @@ -21,9 +21,6 @@ #include #include -static const char * const ident_ = "$Id$"; - - void QgsPropertyValue::dump( size_t tabs ) const { QString tabString; diff --git a/src/core/qgsprojectproperty.h b/src/core/qgsprojectproperty.h index fea793fc5e02..99cbcd505035 100644 --- a/src/core/qgsprojectproperty.h +++ b/src/core/qgsprojectproperty.h @@ -18,7 +18,6 @@ * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROJECTPROPERTY_H #define QGSPROJECTPROPERTY_H diff --git a/src/core/qgsprovidercountcalcevent.cpp b/src/core/qgsprovidercountcalcevent.cpp index 8e5501d76ddb..113452aa8e29 100644 --- a/src/core/qgsprovidercountcalcevent.cpp +++ b/src/core/qgsprovidercountcalcevent.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsprovidercountcalcevent.h" #include "qgis.h" diff --git a/src/core/qgsprovidercountcalcevent.h b/src/core/qgsprovidercountcalcevent.h index acfcf4e08ab4..70e086bd1df3 100644 --- a/src/core/qgsprovidercountcalcevent.h +++ b/src/core/qgsprovidercountcalcevent.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROVIDERCOUNTCALCEVENT_H #define QGSPROVIDERCOUNTCALCEVENT_H diff --git a/src/core/qgsproviderextentcalcevent.cpp b/src/core/qgsproviderextentcalcevent.cpp index 34736cae13eb..64890390dbd3 100644 --- a/src/core/qgsproviderextentcalcevent.cpp +++ b/src/core/qgsproviderextentcalcevent.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsproviderextentcalcevent.h" #include "qgis.h" diff --git a/src/core/qgsproviderextentcalcevent.h b/src/core/qgsproviderextentcalcevent.h index 7f8e4205f83b..d0407cd2b18c 100644 --- a/src/core/qgsproviderextentcalcevent.h +++ b/src/core/qgsproviderextentcalcevent.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROVIDEREXTENTCALCEVENT_H #define QGSPROVIDEREXTENTCALCEVENT_H diff --git a/src/core/qgsprovidermetadata.cpp b/src/core/qgsprovidermetadata.cpp index 176c1e0dde16..98db05538111 100644 --- a/src/core/qgsprovidermetadata.cpp +++ b/src/core/qgsprovidermetadata.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsprovidermetadata.h" diff --git a/src/core/qgsprovidermetadata.h b/src/core/qgsprovidermetadata.h index 8b783031a1b2..7affe941e53c 100644 --- a/src/core/qgsprovidermetadata.h +++ b/src/core/qgsprovidermetadata.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROVIDERMETADATA_H #define QGSPROVIDERMETADATA_H diff --git a/src/core/qgsproviderregistry.cpp b/src/core/qgsproviderregistry.cpp index c356d5c4b756..d95ee31b323e 100644 --- a/src/core/qgsproviderregistry.cpp +++ b/src/core/qgsproviderregistry.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsproviderregistry.h" diff --git a/src/core/qgsproviderregistry.h b/src/core/qgsproviderregistry.h index bcb15d74932f..c40122235ea6 100644 --- a/src/core/qgsproviderregistry.h +++ b/src/core/qgsproviderregistry.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPROVIDERREGISTRY_H #define QGSPROVIDERREGISTRY_H diff --git a/src/core/qgsrasterdataprovider.cpp b/src/core/qgsrasterdataprovider.cpp index e3d5727037a7..a6946acaf429 100644 --- a/src/core/qgsrasterdataprovider.cpp +++ b/src/core/qgsrasterdataprovider.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsrasterdataprovider.h" #include "qgsrasterprojector.h" diff --git a/src/core/qgsrasterdataprovider.h b/src/core/qgsrasterdataprovider.h index a72701ad97dd..a2f68457ab88 100644 --- a/src/core/qgsrasterdataprovider.h +++ b/src/core/qgsrasterdataprovider.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ /* Thank you to Marco Hugentobler for the original vector DataProvider */ diff --git a/src/core/qgsrasterprojector.cpp b/src/core/qgsrasterprojector.cpp index d9d6df6f5246..ce9a2d5e238e 100644 --- a/src/core/qgsrasterprojector.cpp +++ b/src/core/qgsrasterprojector.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsrasterprojector.cpp 15005 2011-01-08 16:35:21Z rblazek $ */ #include "qgslogger.h" #include "qgsrasterprojector.h" diff --git a/src/core/qgsrasterprojector.h b/src/core/qgsrasterprojector.h index 61c6b73ce021..71c19a6f9342 100644 --- a/src/core/qgsrasterprojector.h +++ b/src/core/qgsrasterprojector.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsrasterprojector.h 15005 2011-01-08 16:35:21Z rblazek $ */ /* This code takes ideas from WarpBuilder in Geotools. * Thank you to Ing. Andrea Aime, Ing. Simone Giannecchini and GeoSolutions S.A.S. diff --git a/src/core/qgsrectangle.cpp b/src/core/qgsrectangle.cpp index b322c4271fe6..80d6d41c4e8e 100644 --- a/src/core/qgsrectangle.cpp +++ b/src/core/qgsrectangle.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsrectangle.h b/src/core/qgsrectangle.h index f8c2133f3fcd..e4c9334b94d0 100644 --- a/src/core/qgsrectangle.h +++ b/src/core/qgsrectangle.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRECT_H #define QGSRECT_H diff --git a/src/core/qgsrunprocess.cpp b/src/core/qgsrunprocess.cpp index 1df266ff0cf4..58758c00069c 100644 --- a/src/core/qgsrunprocess.cpp +++ b/src/core/qgsrunprocess.cpp @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsrunprocess.h" diff --git a/src/core/qgsrunprocess.h b/src/core/qgsrunprocess.h index c20e4671b169..ad1e59983d37 100644 --- a/src/core/qgsrunprocess.h +++ b/src/core/qgsrunprocess.h @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRUNPROCESS_H #define QGSRUNPROCESS_H diff --git a/src/core/qgsscalecalculator.cpp b/src/core/qgsscalecalculator.cpp index 8fdfac249440..17fb68e5c1b0 100644 --- a/src/core/qgsscalecalculator.cpp +++ b/src/core/qgsscalecalculator.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include "qgslogger.h" diff --git a/src/core/qgsscalecalculator.h b/src/core/qgsscalecalculator.h index 7cd7d1d03ba6..ce9ad5c19dfb 100644 --- a/src/core/qgsscalecalculator.h +++ b/src/core/qgsscalecalculator.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSCALECALCULATOR_H #define QGSSCALECALCULATOR_H diff --git a/src/core/qgssearchstring.cpp b/src/core/qgssearchstring.cpp index 339238707482..75879e74f002 100644 --- a/src/core/qgssearchstring.cpp +++ b/src/core/qgssearchstring.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgssearchstring.h" #include "qgssearchtreenode.h" diff --git a/src/core/qgssearchstring.h b/src/core/qgssearchstring.h index b32d9f9d91a3..3767523cd73a 100644 --- a/src/core/qgssearchstring.h +++ b/src/core/qgssearchstring.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSEARCHSTRING_H #define QGSSEARCHSTRING_H diff --git a/src/core/qgssearchstringlexer.ll b/src/core/qgssearchstringlexer.ll index dbe41398f1f9..a0e27d32e372 100644 --- a/src/core/qgssearchstringlexer.ll +++ b/src/core/qgssearchstringlexer.ll @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ - /* $Id$ */ %option noyywrap %option case-insensitive diff --git a/src/core/qgssearchstringparser.yy b/src/core/qgssearchstringparser.yy index 4ba75ef8387a..fe7316ce3171 100644 --- a/src/core/qgssearchstringparser.yy +++ b/src/core/qgssearchstringparser.yy @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ - /* $Id$ */ %{ #include diff --git a/src/core/qgssearchtreenode.cpp b/src/core/qgssearchtreenode.cpp index 291594c60f34..6b5b3a848fe8 100644 --- a/src/core/qgssearchtreenode.cpp +++ b/src/core/qgssearchtreenode.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgslogger.h" #include "qgsdistancearea.h" diff --git a/src/core/qgssearchtreenode.h b/src/core/qgssearchtreenode.h index 94fde672c3f6..3a10c46b80ba 100644 --- a/src/core/qgssearchtreenode.h +++ b/src/core/qgssearchtreenode.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSEARCHTREENODE_H #define QGSSEARCHTREENODE_H diff --git a/src/core/qgsvectordataprovider.cpp b/src/core/qgsvectordataprovider.cpp index bb556ddb6155..b698901c2f69 100644 --- a/src/core/qgsvectordataprovider.cpp +++ b/src/core/qgsvectordataprovider.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/core/qgsvectordataprovider.h b/src/core/qgsvectordataprovider.h index b830ee4e67f2..61c96c7b3e42 100644 --- a/src/core/qgsvectordataprovider.h +++ b/src/core/qgsvectordataprovider.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSVECTORDATAPROVIDER_H #define QGSVECTORDATAPROVIDER_H diff --git a/src/core/qgsvectorfilewriter.cpp b/src/core/qgsvectorfilewriter.cpp index 6cb2cb5b068f..d73905f0df41 100644 --- a/src/core/qgsvectorfilewriter.cpp +++ b/src/core/qgsvectorfilewriter.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplication.h" #include "qgsfield.h" diff --git a/src/core/qgsvectorfilewriter.h b/src/core/qgsvectorfilewriter.h index c89d87403f07..6322e71ce8e9 100644 --- a/src/core/qgsvectorfilewriter.h +++ b/src/core/qgsvectorfilewriter.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef _QGSVECTORFILEWRITER_H_ #define _QGSVECTORFILEWRITER_H_ diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index 7abbbbdfa020..4308d55bc8bd 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -20,7 +20,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include @@ -85,8 +84,6 @@ #endif -static const char * const ident_ = "$Id$"; - // typedef for the QgsDataProvider class factory typedef QgsDataProvider * create_it( const QString* uri ); diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 6ac57f951c65..395973f710e7 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSVECTORLAYER_H #define QGSVECTORLAYER_H diff --git a/src/core/raster/qgsrasterbandstats.h b/src/core/raster/qgsrasterbandstats.h index ccc0d597a322..1d0c52e5ed51 100644 --- a/src/core/raster/qgsrasterbandstats.h +++ b/src/core/raster/qgsrasterbandstats.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */ #ifndef QGSRASTERBANDSTATS #define QGSRASTERBANDSTATS diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index 2250cc544f9b..050b28262b04 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -14,7 +14,6 @@ email : tim at linfiniti.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsapplication.h" #include "qgslogger.h" diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index 81d46f540183..e7b1bef9fe82 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRASTERLAYER_H #define QGSRASTERLAYER_H diff --git a/src/core/raster/qgsrasterviewport.h b/src/core/raster/qgsrasterviewport.h index 77bd99a788e3..4e8f0bdbcb5b 100644 --- a/src/core/raster/qgsrasterviewport.h +++ b/src/core/raster/qgsrasterviewport.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */ #ifndef QGSRASTERVIEWPORT_H #define QGSRASTERVIEWPORT_H diff --git a/src/core/renderer/qgscontinuouscolorrenderer.cpp b/src/core/renderer/qgscontinuouscolorrenderer.cpp index 04d227388113..a54a176b5f19 100644 --- a/src/core/renderer/qgscontinuouscolorrenderer.cpp +++ b/src/core/renderer/qgscontinuouscolorrenderer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgscontinuouscolorrenderer.cpp 5371 2006-04-25 01:52:13Z wonder $ */ #include "qgscontinuouscolorrenderer.h" #include "qgsmarkercatalogue.h" diff --git a/src/core/renderer/qgscontinuouscolorrenderer.h b/src/core/renderer/qgscontinuouscolorrenderer.h index 5b84b82e9c52..fbf68741426b 100644 --- a/src/core/renderer/qgscontinuouscolorrenderer.h +++ b/src/core/renderer/qgscontinuouscolorrenderer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgscontinuouscolorrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */ #ifndef QGSCONTINUOUSCOLORRENDERER_H #define QGSCONTINUOUSCOLORRENDERER_H diff --git a/src/core/renderer/qgsgraduatedsymbolrenderer.cpp b/src/core/renderer/qgsgraduatedsymbolrenderer.cpp index c09488526932..a1832443cf9b 100644 --- a/src/core/renderer/qgsgraduatedsymbolrenderer.cpp +++ b/src/core/renderer/qgsgraduatedsymbolrenderer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsgraduatedsymbolrenderer.cpp 5371 2006-04-25 01:52:13Z wonder $ */ #include "qgis.h" #include "qgslogger.h" diff --git a/src/core/renderer/qgsgraduatedsymbolrenderer.h b/src/core/renderer/qgsgraduatedsymbolrenderer.h index a1717f5aafae..fdd5eddcc217 100644 --- a/src/core/renderer/qgsgraduatedsymbolrenderer.h +++ b/src/core/renderer/qgsgraduatedsymbolrenderer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsgraduatedsymbolrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */ #ifndef QGSGRADUATEDSYMBOLRENDERER_H #define QGSGRADUATEDSYMBOLRENDERER_H diff --git a/src/core/renderer/qgsrenderer.h b/src/core/renderer/qgsrenderer.h index 22670fcfb748..691a5355a70c 100644 --- a/src/core/renderer/qgsrenderer.h +++ b/src/core/renderer/qgsrenderer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRENDERER_H #define QGSRENDERER_H diff --git a/src/core/renderer/qgssinglesymbolrenderer.cpp b/src/core/renderer/qgssinglesymbolrenderer.cpp index a35ee6ab75cb..255cbd7f4c60 100644 --- a/src/core/renderer/qgssinglesymbolrenderer.cpp +++ b/src/core/renderer/qgssinglesymbolrenderer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgssinglesymbolrenderer.cpp 5371 2006-04-25 01:52:13Z wonder $ */ #include "qgis.h" #include "qgssinglesymbolrenderer.h" diff --git a/src/core/renderer/qgssinglesymbolrenderer.h b/src/core/renderer/qgssinglesymbolrenderer.h index 0b01daf89b85..130cf7cd2452 100644 --- a/src/core/renderer/qgssinglesymbolrenderer.h +++ b/src/core/renderer/qgssinglesymbolrenderer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgssinglesymbolrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */ #ifndef QGSSINGLESYMBOLRENDERER_H #define QGSSINGLESYMBOLRENDERER_H diff --git a/src/core/renderer/qgsuniquevaluerenderer.cpp b/src/core/renderer/qgsuniquevaluerenderer.cpp index ccad6abd11e0..d6662ea253c5 100644 --- a/src/core/renderer/qgsuniquevaluerenderer.cpp +++ b/src/core/renderer/qgsuniquevaluerenderer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsuniquevaluerenderer.cpp 5371 2006-04-25 01:52:13Z wonder $ */ #include "qgsuniquevaluerenderer.h" #include "qgsfeature.h" diff --git a/src/core/renderer/qgsuniquevaluerenderer.h b/src/core/renderer/qgsuniquevaluerenderer.h index 39829808bf3f..4c6cb7f67da3 100644 --- a/src/core/renderer/qgsuniquevaluerenderer.h +++ b/src/core/renderer/qgsuniquevaluerenderer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsuniquevaluerenderer.h 5371 2006-04-25 01:52:13Z wonder $ */ #ifndef QGSUNIQUEVALUERENDERER_H #define QGSUNIQUEVALUERENDERER_H diff --git a/src/core/spatialindex/qgsspatialindex.cpp b/src/core/spatialindex/qgsspatialindex.cpp index ebabe6b580f4..62f585468c7a 100644 --- a/src/core/spatialindex/qgsspatialindex.cpp +++ b/src/core/spatialindex/qgsspatialindex.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsspatialindex.h" diff --git a/src/core/spatialindex/qgsspatialindex.h b/src/core/spatialindex/qgsspatialindex.h index 7d530ce0c69c..118c973ca4e8 100644 --- a/src/core/spatialindex/qgsspatialindex.h +++ b/src/core/spatialindex/qgsspatialindex.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSPATIALINDEX_H #define QGSSPATIALINDEX_H diff --git a/src/core/symbology/qgssymbol.cpp b/src/core/symbology/qgssymbol.cpp index 98d69f593eec..4beccb49e1a2 100644 --- a/src/core/symbology/qgssymbol.cpp +++ b/src/core/symbology/qgssymbol.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include "qgis.h" diff --git a/src/core/symbology/qgssymbol.h b/src/core/symbology/qgssymbol.h index 78867d1f0904..0d73037f0733 100644 --- a/src/core/symbology/qgssymbol.h +++ b/src/core/symbology/qgssymbol.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSYMBOL_H #define QGSSYMBOL_H diff --git a/src/core/symbology/qgssymbologyutils.cpp b/src/core/symbology/qgssymbologyutils.cpp index 87854b1b352a..5d47b21a43e7 100644 --- a/src/core/symbology/qgssymbologyutils.cpp +++ b/src/core/symbology/qgssymbologyutils.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgssymbologyutils.h" #include "qgslogger.h" #include diff --git a/src/core/symbology/qgssymbologyutils.h b/src/core/symbology/qgssymbologyutils.h index 8b71427aef06..3e3ad8b3230a 100644 --- a/src/core/symbology/qgssymbologyutils.h +++ b/src/core/symbology/qgssymbologyutils.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSYMBOLOGYUTILS_H #define QGSSYMBOLOGYUTILS_H diff --git a/src/gui/qgisgui.h b/src/gui/qgisgui.h index d1edbba3bee3..f7ecfec27616 100644 --- a/src/gui/qgisgui.h +++ b/src/gui/qgisgui.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGISGUI_H #define QGISGUI_H diff --git a/src/gui/qgisinterface.cpp b/src/gui/qgisinterface.cpp index 9e73bdf0062c..e830bfb103f5 100644 --- a/src/gui/qgisinterface.cpp +++ b/src/gui/qgisinterface.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ****************************************************************************/ -/* $Id$ */ #include "qgisinterface.h" diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 755b582ac780..b0f80b2c5d06 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGISINTERFACE_H #define QGISINTERFACE_H diff --git a/src/gui/qgsattributeeditor.cpp b/src/gui/qgsattributeeditor.cpp index 8f2518c1d467..000658b4a4be 100644 --- a/src/gui/qgsattributeeditor.cpp +++ b/src/gui/qgsattributeeditor.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsattributeeditor.h" #include diff --git a/src/gui/qgsattributeeditor.h b/src/gui/qgsattributeeditor.h index 0a1cf0027e4f..190740bb225c 100644 --- a/src/gui/qgsattributeeditor.h +++ b/src/gui/qgsattributeeditor.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSATTRIBUTEEDITOR_H #define QGSATTRIBUTEEDITOR_H diff --git a/src/gui/qgscolorbutton.cpp b/src/gui/qgscolorbutton.cpp index e835a60dec77..379af70c72ae 100644 --- a/src/gui/qgscolorbutton.cpp +++ b/src/gui/qgscolorbutton.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgscolorbutton.cpp 6251 2006-12-13 23:23:50Z telwertowski $ */ #include "qgscolorbutton.h" #include diff --git a/src/gui/qgscolorbutton.h b/src/gui/qgscolorbutton.h index fdcd45cdae62..dc8d13427254 100644 --- a/src/gui/qgscolorbutton.h +++ b/src/gui/qgscolorbutton.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgscolorbutton.h 6251 2006-12-13 23:23:50Z telwertowski $ */ #ifndef QGSCOLORBUTTON_H #define QGSCOLORBUTTON_H diff --git a/src/gui/qgscomposerview.h b/src/gui/qgscomposerview.h index 210acca5db5e..83a0b9eb5f5a 100644 --- a/src/gui/qgscomposerview.h +++ b/src/gui/qgscomposerview.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCOMPOSERVIEW_H #define QGSCOMPOSERVIEW_H diff --git a/src/gui/qgscredentialdialog.cpp b/src/gui/qgscredentialdialog.cpp index 6ce27e3e3b94..1743725db3a7 100644 --- a/src/gui/qgscredentialdialog.cpp +++ b/src/gui/qgscredentialdialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgscredentialdialog.h" #include diff --git a/src/gui/qgscredentialdialog.h b/src/gui/qgscredentialdialog.h index 8a25b8605eaa..d503027026a1 100644 --- a/src/gui/qgscredentialdialog.h +++ b/src/gui/qgscredentialdialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCREDENTIALDIALOG_H #define QGSCREDENTIALDIALOG_H diff --git a/src/gui/qgsdetaileditemdata.cpp b/src/gui/qgsdetaileditemdata.cpp index 832103b64796..ba81ab510b43 100644 --- a/src/gui/qgsdetaileditemdata.cpp +++ b/src/gui/qgsdetaileditemdata.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include "qgsdetaileditemdata.h" QgsDetailedItemData::QgsDetailedItemData() diff --git a/src/gui/qgsdetaileditemdata.h b/src/gui/qgsdetaileditemdata.h index 321cd686edc3..669f2723d9a6 100644 --- a/src/gui/qgsdetaileditemdata.h +++ b/src/gui/qgsdetaileditemdata.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSDETAILEDITEMDATA_H #define QGSDETAILEDITEMDATA_H diff --git a/src/gui/qgsdetaileditemdelegate.cpp b/src/gui/qgsdetaileditemdelegate.cpp index ccb54b73ce31..2eb26dcb700d 100644 --- a/src/gui/qgsdetaileditemdelegate.cpp +++ b/src/gui/qgsdetaileditemdelegate.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include "qgsdetaileditemdelegate.h" #include "qgsdetaileditemwidget.h" diff --git a/src/gui/qgsdetaileditemdelegate.h b/src/gui/qgsdetaileditemdelegate.h index bb50a68c7690..652f3a71de2d 100644 --- a/src/gui/qgsdetaileditemdelegate.h +++ b/src/gui/qgsdetaileditemdelegate.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSDETAILEDITEMDELEGATE_H #define QGSDETAILEDITEMDELEGATE_H diff --git a/src/gui/qgsdetaileditemwidget.cpp b/src/gui/qgsdetaileditemwidget.cpp index cbe8447292b9..297baab3c713 100644 --- a/src/gui/qgsdetaileditemwidget.cpp +++ b/src/gui/qgsdetaileditemwidget.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #include "qgsdetaileditemwidget.h" QgsDetailedItemWidget::QgsDetailedItemWidget( QWidget * parent ) : diff --git a/src/gui/qgsdetaileditemwidget.h b/src/gui/qgsdetaileditemwidget.h index 1f8d194324d8..13225fcf1c13 100644 --- a/src/gui/qgsdetaileditemwidget.h +++ b/src/gui/qgsdetaileditemwidget.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id:$ */ #ifndef QGSDETAILEDITEMWIDGET_H #define QGSDETAILEDITEMWIDGET_H diff --git a/src/gui/qgsfieldvalidator.cpp b/src/gui/qgsfieldvalidator.cpp index ad4ae4035562..9430d1597a53 100644 --- a/src/gui/qgsfieldvalidator.cpp +++ b/src/gui/qgsfieldvalidator.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsfieldvalidator.h" diff --git a/src/gui/qgsfieldvalidator.h b/src/gui/qgsfieldvalidator.h index 12e4179f0d9e..ab433193cad2 100644 --- a/src/gui/qgsfieldvalidator.h +++ b/src/gui/qgsfieldvalidator.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSFIELDVALIDATOR_H #define QGSFIELDVALIDATOR_H diff --git a/src/gui/qgsfiledropedit.cpp b/src/gui/qgsfiledropedit.cpp index 62a2edd21ce2..d05820121d96 100644 --- a/src/gui/qgsfiledropedit.cpp +++ b/src/gui/qgsfiledropedit.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsfiledropedit.h" #include diff --git a/src/gui/qgsfiledropedit.h b/src/gui/qgsfiledropedit.h index 6aea387114cb..38b73f3acedf 100644 --- a/src/gui/qgsfiledropedit.h +++ b/src/gui/qgsfiledropedit.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSFILEDROPEDIT_H #define QGSFILEDROPEDIT_H diff --git a/src/gui/qgsgenericprojectionselector.cpp b/src/gui/qgsgenericprojectionselector.cpp index c1921421a6df..46f8d5452e42 100644 --- a/src/gui/qgsgenericprojectionselector.cpp +++ b/src/gui/qgsgenericprojectionselector.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/gui/qgsgenericprojectionselector.h b/src/gui/qgsgenericprojectionselector.h index 4aa0efd8c0e6..e8c6ccb9634f 100644 --- a/src/gui/qgsgenericprojectionselector.h +++ b/src/gui/qgsgenericprojectionselector.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGENERICPROJECTIONSELECTOR_H #define QGSGENERICPROJECTIONSELECTOR_H #include diff --git a/src/gui/qgslegendinterface.cpp b/src/gui/qgslegendinterface.cpp index 0b5f356eac32..6b9ff8417eee 100644 --- a/src/gui/qgslegendinterface.cpp +++ b/src/gui/qgslegendinterface.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgslegendinterface.h" diff --git a/src/gui/qgslegendinterface.h b/src/gui/qgslegendinterface.h index 02352c11b7d5..5447908b9375 100644 --- a/src/gui/qgslegendinterface.h +++ b/src/gui/qgslegendinterface.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLEGENDINTERFACE_H #define QGSLEGENDINTERFACE_H diff --git a/src/gui/qgslonglongvalidator.h b/src/gui/qgslonglongvalidator.h index 692698484c20..9335b8e447bf 100644 --- a/src/gui/qgslonglongvalidator.h +++ b/src/gui/qgslonglongvalidator.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLONGLONGVALIDATOR_H #define QGSLONGLONGVALIDATOR_H diff --git a/src/gui/qgsludialog.cpp b/src/gui/qgsludialog.cpp index a3ddf13f2da1..38910811f41d 100644 --- a/src/gui/qgsludialog.cpp +++ b/src/gui/qgsludialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsludialog.h" diff --git a/src/gui/qgsludialog.h b/src/gui/qgsludialog.h index 0968ab570bb4..4a9c04750535 100644 --- a/src/gui/qgsludialog.h +++ b/src/gui/qgsludialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLUDIALOG_H #define QGSLUDIALOG_H diff --git a/src/gui/qgsmanageconnectionsdialog.cpp b/src/gui/qgsmanageconnectionsdialog.cpp index 8d934b3bd1e1..62b1925097cd 100644 --- a/src/gui/qgsmanageconnectionsdialog.cpp +++ b/src/gui/qgsmanageconnectionsdialog.cpp @@ -14,7 +14,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/gui/qgsmanageconnectionsdialog.h b/src/gui/qgsmanageconnectionsdialog.h index cf33a7a150c8..09284681a49e 100644 --- a/src/gui/qgsmanageconnectionsdialog.h +++ b/src/gui/qgsmanageconnectionsdialog.h @@ -14,7 +14,6 @@ * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMANAGECONNECTIONSDIALOG_H #define QGSMANAGECONNECTIONSDIALOG_H diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index cfcbeac16505..bef23b3bfcd2 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -14,7 +14,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmapcanvas.cpp 5400 2006-04-30 20:14:08Z wonder $ */ #include diff --git a/src/gui/qgsmapcanvas.h b/src/gui/qgsmapcanvas.h index 8cdd4730f8a3..969d1a52d29c 100644 --- a/src/gui/qgsmapcanvas.h +++ b/src/gui/qgsmapcanvas.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmapcanvas.h 5341 2006-04-22 12:11:36Z wonder $ */ #ifndef QGSMAPCANVAS_H #define QGSMAPCANVAS_H diff --git a/src/gui/qgsmapcanvasitem.cpp b/src/gui/qgsmapcanvasitem.cpp index ede1e5f7d856..ddcdeee983fb 100644 --- a/src/gui/qgsmapcanvasitem.cpp +++ b/src/gui/qgsmapcanvasitem.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmapcanvasitem.h" diff --git a/src/gui/qgsmapcanvasitem.h b/src/gui/qgsmapcanvasitem.h index 966e471d23b0..06c158030b68 100644 --- a/src/gui/qgsmapcanvasitem.h +++ b/src/gui/qgsmapcanvasitem.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPCANVASITEM_H #define QGSMAPCANVASITEM_H diff --git a/src/gui/qgsmapcanvasmap.cpp b/src/gui/qgsmapcanvasmap.cpp index 6ab4578b5749..f4bb903c717a 100644 --- a/src/gui/qgsmapcanvasmap.cpp +++ b/src/gui/qgsmapcanvasmap.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgslogger.h" #include "qgsmapcanvas.h" diff --git a/src/gui/qgsmapcanvasmap.h b/src/gui/qgsmapcanvasmap.h index 6e795d0f379d..6e71df028e02 100644 --- a/src/gui/qgsmapcanvasmap.h +++ b/src/gui/qgsmapcanvasmap.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPCANVASMAP_H #define QGSMAPCANVASMAP_H diff --git a/src/gui/qgsmapoverviewcanvas.cpp b/src/gui/qgsmapoverviewcanvas.cpp index 4a5f33db10b1..da6c02561f9b 100644 --- a/src/gui/qgsmapoverviewcanvas.cpp +++ b/src/gui/qgsmapoverviewcanvas.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmapcanvas.h" #include "qgsmaprenderer.h" diff --git a/src/gui/qgsmapoverviewcanvas.h b/src/gui/qgsmapoverviewcanvas.h index 9e71a34a8087..ee3963f167e3 100644 --- a/src/gui/qgsmapoverviewcanvas.h +++ b/src/gui/qgsmapoverviewcanvas.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPOVERVIEWCANVAS_H #define QGSMAPOVERVIEWCANVAS_H diff --git a/src/gui/qgsmaptool.cpp b/src/gui/qgsmaptool.cpp index 203965dbd339..27cf939261c7 100644 --- a/src/gui/qgsmaptool.cpp +++ b/src/gui/qgsmaptool.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgslogger.h" #include "qgsmaptool.h" diff --git a/src/gui/qgsmaptool.h b/src/gui/qgsmaptool.h index 51898ecdaa36..8b1b540f21df 100644 --- a/src/gui/qgsmaptool.h +++ b/src/gui/qgsmaptool.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOL_H #define QGSMAPTOOL_H diff --git a/src/gui/qgsmaptoolemitpoint.cpp b/src/gui/qgsmaptoolemitpoint.cpp index 5b63a1868e96..e9128cb8093e 100644 --- a/src/gui/qgsmaptoolemitpoint.cpp +++ b/src/gui/qgsmaptoolemitpoint.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolemitpoint.h" diff --git a/src/gui/qgsmaptoolemitpoint.h b/src/gui/qgsmaptoolemitpoint.h index 7221ebd4592d..88e1ab339976 100644 --- a/src/gui/qgsmaptoolemitpoint.h +++ b/src/gui/qgsmaptoolemitpoint.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLEMITPOINT_H #define QGSMAPTOOLEMITPOINT_H diff --git a/src/gui/qgsmaptoolpan.cpp b/src/gui/qgsmaptoolpan.cpp index 54c3e5ebc7b6..fabc0da4fc9d 100644 --- a/src/gui/qgsmaptoolpan.cpp +++ b/src/gui/qgsmaptoolpan.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolpan.h" #include "qgsmapcanvas.h" diff --git a/src/gui/qgsmaptoolpan.h b/src/gui/qgsmaptoolpan.h index ef12189ec477..94446f6f3b47 100644 --- a/src/gui/qgsmaptoolpan.h +++ b/src/gui/qgsmaptoolpan.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLPAN_H #define QGSMAPTOOLPAN_H diff --git a/src/gui/qgsmaptoolzoom.cpp b/src/gui/qgsmaptoolzoom.cpp index 94fff6cfc61c..586e64f16b3a 100644 --- a/src/gui/qgsmaptoolzoom.cpp +++ b/src/gui/qgsmaptoolzoom.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmaptoolzoom.h" #include "qgsmapcanvas.h" diff --git a/src/gui/qgsmaptoolzoom.h b/src/gui/qgsmaptoolzoom.h index a3fdcccc257d..3a9be5b4ac46 100644 --- a/src/gui/qgsmaptoolzoom.h +++ b/src/gui/qgsmaptoolzoom.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMAPTOOLZOOM_H #define QGSMAPTOOLZOOM_H diff --git a/src/gui/qgsmessageviewer.cpp b/src/gui/qgsmessageviewer.cpp index c03275a2362c..62c6af09d0b7 100644 --- a/src/gui/qgsmessageviewer.cpp +++ b/src/gui/qgsmessageviewer.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmessageviewer.h" #include diff --git a/src/gui/qgsmessageviewer.h b/src/gui/qgsmessageviewer.h index b808e9ca99fc..6c89cc82d953 100644 --- a/src/gui/qgsmessageviewer.h +++ b/src/gui/qgsmessageviewer.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSMESSAGEVIEWER_H #define QGSMESSAGEVIEWER_H diff --git a/src/gui/qgsnewhttpconnection.cpp b/src/gui/qgsnewhttpconnection.cpp index c8cb0e273d3a..babd641e5172 100644 --- a/src/gui/qgsnewhttpconnection.cpp +++ b/src/gui/qgsnewhttpconnection.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsnewhttpconnection.h" #include "qgscontexthelp.h" #include diff --git a/src/gui/qgsnewhttpconnection.h b/src/gui/qgsnewhttpconnection.h index 7bb178a04e52..d07b8b1b57fa 100644 --- a/src/gui/qgsnewhttpconnection.h +++ b/src/gui/qgsnewhttpconnection.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSNEWHTTPCONNECTION_H #define QGSNEWHTTPCONNECTION_H #include "ui_qgsnewhttpconnectionbase.h" diff --git a/src/gui/qgsnewvectorlayerdialog.cpp b/src/gui/qgsnewvectorlayerdialog.cpp index e9ca8fab26a2..3e768fd58c1f 100644 --- a/src/gui/qgsnewvectorlayerdialog.cpp +++ b/src/gui/qgsnewvectorlayerdialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsnewvectorlayerdialog.h" #include "qgsapplication.h" diff --git a/src/gui/qgsnewvectorlayerdialog.h b/src/gui/qgsnewvectorlayerdialog.h index a3fbb12c9744..cb885767863c 100644 --- a/src/gui/qgsnewvectorlayerdialog.h +++ b/src/gui/qgsnewvectorlayerdialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef qgsnewvectorlayerdialog_H #define qgsnewvectorlayerdialog_H diff --git a/src/gui/qgsnumericsortlistviewitem.cpp b/src/gui/qgsnumericsortlistviewitem.cpp index b35f7beba86c..cb6e320e3a23 100644 --- a/src/gui/qgsnumericsortlistviewitem.cpp +++ b/src/gui/qgsnumericsortlistviewitem.cpp @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include "qgsnumericsortlistviewitem.h" diff --git a/src/gui/qgsnumericsortlistviewitem.h b/src/gui/qgsnumericsortlistviewitem.h index ad7295b108eb..7ebfaa280432 100644 --- a/src/gui/qgsnumericsortlistviewitem.h +++ b/src/gui/qgsnumericsortlistviewitem.h @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSNUMERICSORTLISTVIEWITEM_H #define QGSNUMERICSORTLISTVIEWITEM_H diff --git a/src/gui/qgsprojectionselector.cpp b/src/gui/qgsprojectionselector.cpp index 978ceb4a080d..1b202c24cac5 100644 --- a/src/gui/qgsprojectionselector.cpp +++ b/src/gui/qgsprojectionselector.cpp @@ -8,7 +8,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -/* $Id$ */ #include //standard includes diff --git a/src/gui/qgsquickprint.cpp b/src/gui/qgsquickprint.cpp index 0f3b0644296e..d20cf40d6719 100644 --- a/src/gui/qgsquickprint.cpp +++ b/src/gui/qgsquickprint.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: plugin.cpp 7796 2007-12-16 22:11:38Z homann $ */ // // QGIS Specific includes diff --git a/src/gui/qgsquickprint.h b/src/gui/qgsquickprint.h index 914e00e1795f..75e8ab4a734c 100644 --- a/src/gui/qgsquickprint.h +++ b/src/gui/qgsquickprint.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: plugin.h 7796 2007-12-16 22:11:38Z homann $ */ #ifndef QGSQUICKPRINT_H #define QGSQUICKPRINT_H diff --git a/src/gui/qgsrubberband.cpp b/src/gui/qgsrubberband.cpp index edf46e59216c..723af14050c0 100644 --- a/src/gui/qgsrubberband.cpp +++ b/src/gui/qgsrubberband.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsrubberband.h" #include "qgsfeature.h" diff --git a/src/gui/qgsrubberband.h b/src/gui/qgsrubberband.h index 5cbb40d7f8bc..dd63bbdb554a 100644 --- a/src/gui/qgsrubberband.h +++ b/src/gui/qgsrubberband.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRUBBERBAND_H #define QGSRUBBERBAND_H diff --git a/src/gui/qgssearchquerybuilder.cpp b/src/gui/qgssearchquerybuilder.cpp index d202f1a9117e..beabc2b46b2a 100644 --- a/src/gui/qgssearchquerybuilder.cpp +++ b/src/gui/qgssearchquerybuilder.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/gui/qgssearchquerybuilder.h b/src/gui/qgssearchquerybuilder.h index 1575e81aa66b..d4d8411da6b7 100644 --- a/src/gui/qgssearchquerybuilder.h +++ b/src/gui/qgssearchquerybuilder.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSEARCHQUERYBUILDER_H #define QGSSEARCHQUERYBUILDER_H diff --git a/src/gui/qgsvertexmarker.cpp b/src/gui/qgsvertexmarker.cpp index 8f4b0ec8bce6..e4d08faef8e7 100644 --- a/src/gui/qgsvertexmarker.cpp +++ b/src/gui/qgsvertexmarker.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/gui/qgsvertexmarker.h b/src/gui/qgsvertexmarker.h index 38f7df529261..495f1c6fa07f 100644 --- a/src/gui/qgsvertexmarker.h +++ b/src/gui/qgsvertexmarker.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSVERTEXMARKER_H #define QGSVERTEXMARKER_H diff --git a/src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp b/src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp index 129bafa30426..7afd4258ef7a 100644 --- a/src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp +++ b/src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp @@ -14,7 +14,6 @@ * * ***************************************************************************/ -/* $Id: qgsstylev2exportimportdialog.cpp 13187 2010-03-28 22:14:44Z jef $ */ #include #include diff --git a/src/gui/symbology-ng/qgsstylev2exportimportdialog.h b/src/gui/symbology-ng/qgsstylev2exportimportdialog.h index c8a1e74761e6..5a503e1a28bd 100644 --- a/src/gui/symbology-ng/qgsstylev2exportimportdialog.h +++ b/src/gui/symbology-ng/qgsstylev2exportimportdialog.h @@ -14,7 +14,6 @@ * * ***************************************************************************/ -/* $Id: qgsstylev2exportimportdialog.h 13187 2010-03-28 22:14:44Z jef $ */ #ifndef QGSSTYLEV2EXPORTIMPORTDIALOG_H #define QGSSTYLEV2EXPORTIMPORTDIALOG_H diff --git a/src/helpviewer/qgshelpserver.cpp b/src/helpviewer/qgshelpserver.cpp index 5dd5b2e77c6d..078d1aeeeab5 100644 --- a/src/helpviewer/qgshelpserver.cpp +++ b/src/helpviewer/qgshelpserver.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgshelpserver.h" // The communications technique used here has been adapted from Qt Assistant. diff --git a/src/helpviewer/qgshelpserver.h b/src/helpviewer/qgshelpserver.h index 7f8487c62a48..1c971f583c8a 100644 --- a/src/helpviewer/qgshelpserver.h +++ b/src/helpviewer/qgshelpserver.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSHELPSERVER_H #define QGSHELPSERVER_H #include diff --git a/src/helpviewer/qgshelpviewer.cpp b/src/helpviewer/qgshelpviewer.cpp index 4f94da9105a2..32cddb8b1877 100644 --- a/src/helpviewer/qgshelpviewer.cpp +++ b/src/helpviewer/qgshelpviewer.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/helpviewer/qgshelpviewer.h b/src/helpviewer/qgshelpviewer.h index 4abc5f9e45a3..948a98e3616a 100644 --- a/src/helpviewer/qgshelpviewer.h +++ b/src/helpviewer/qgshelpviewer.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSHELPVIEWER_H #define QGSHELPVIEWER_H diff --git a/src/plugins/coordinate_capture/coordinatecapture.cpp b/src/plugins/coordinate_capture/coordinatecapture.cpp index d457412ab054..cc43bfb109a0 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.cpp +++ b/src/plugins/coordinate_capture/coordinatecapture.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: plugin.cpp 8053 2008-01-26 13:59:53Z timlinux $ */ // // QGIS Specific includes @@ -49,7 +48,6 @@ #include #include -static const char * const sIdent = "$Id: plugin.cpp 8053 2008-01-26 13:59:53Z timlinux $"; static const QString sName = QObject::tr( "Coordinate Capture" ); static const QString sDescription = QObject::tr( "Capture mouse coordinates in different CRS" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/coordinate_capture/coordinatecapture.h b/src/plugins/coordinate_capture/coordinatecapture.h index 25d3bcf27d98..ca0c3f1a2fc3 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.h +++ b/src/plugins/coordinate_capture/coordinatecapture.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: plugin.h 7796 2007-12-16 22:11:38Z homann $ */ /*************************************************************************** * QGIS Programming conventions: * diff --git a/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp b/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp index 1fd7c0d6dfff..6901d84f4cf1 100644 --- a/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp +++ b/src/plugins/coordinate_capture/coordinatecapturemaptool.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "coordinatecapturemaptool.h" #include "qgscursors.h" diff --git a/src/plugins/coordinate_capture/coordinatecapturemaptool.h b/src/plugins/coordinate_capture/coordinatecapturemaptool.h index 20abca806669..62c06cb5c2c1 100644 --- a/src/plugins/coordinate_capture/coordinatecapturemaptool.h +++ b/src/plugins/coordinate_capture/coordinatecapturemaptool.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef COORDINATECAPTUREMAPTOOL_H #define COORDINATECAPTUREMAPTOOL_H diff --git a/src/plugins/copyright_label/plugin.cpp b/src/plugins/copyright_label/plugin.cpp index d5836815d0e5..6363300d860b 100644 --- a/src/plugins/copyright_label/plugin.cpp +++ b/src/plugins/copyright_label/plugin.cpp @@ -18,7 +18,6 @@ email : tim@linfiniti.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes @@ -46,8 +45,6 @@ email : tim@linfiniti.com #include "qgslogger.h" -static const char * const ident_ = "$Id$"; - static const QString name_ = QObject::tr( "CopyrightLabel" ); static const QString description_ = QObject::tr( "Draws copyright information" ); static const QString version_ = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/copyright_label/plugin.h b/src/plugins/copyright_label/plugin.h index 714a933f28b3..b4aa288b5f07 100644 --- a/src/plugins/copyright_label/plugin.h +++ b/src/plugins/copyright_label/plugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCOPYRIGHTLABELPLUGIN #define QGSCOPYRIGHTLABELPLUGIN #include "../qgisplugin.h" diff --git a/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp b/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp index 2b9ded2765a2..ef3368fe19a4 100644 --- a/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp +++ b/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes diff --git a/src/plugins/delimited_text/qgsdelimitedtextplugin.h b/src/plugins/delimited_text/qgsdelimitedtextplugin.h index ca96bee46345..374f1d68789e 100644 --- a/src/plugins/delimited_text/qgsdelimitedtextplugin.h +++ b/src/plugins/delimited_text/qgsdelimitedtextplugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef PLUGIN #define PLUGIN #include "../qgisplugin.h" diff --git a/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp b/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp index 85247c0d6dec..1179b3358ad0 100644 --- a/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp +++ b/src/plugins/delimited_text/qgsdelimitedtextplugingui.cpp @@ -11,7 +11,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -/* $Id$ */ #include "qgsdelimitedtextplugingui.h" #include "qgscontexthelp.h" diff --git a/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp b/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp index c256d928ffb8..896a4007be12 100644 --- a/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp +++ b/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp @@ -12,7 +12,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -/* $Id$ */ // // QGIS Specific includes @@ -34,8 +33,6 @@ #include #include -static const char *const sIdent = - "$Id$"; static const QString sName = QObject::tr( "Dxf2Shp Converter" ); static const QString sDescription = QObject::tr( "Converts from dxf to shp file format" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/dxf2shp_converter/dxf2shpconverter.h b/src/plugins/dxf2shp_converter/dxf2shpconverter.h index 77fbfaf1872f..7b7614df8ee0 100644 --- a/src/plugins/dxf2shp_converter/dxf2shpconverter.h +++ b/src/plugins/dxf2shp_converter/dxf2shpconverter.h @@ -12,7 +12,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id$ * * **************************************************************************/ #ifndef dxf2shpConverter_H #define dxf2shpConverter_H diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp index 4a94902fabf7..c7534635a3c3 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisdatabaseconnection.h" #include diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h index 4dfad89de4c8..430d75cf6ab1 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef EVISDATABASECONNECTION_H #define EVISDATABASECONNECTION_H diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp index 65b8c82659eb..e54cb2087460 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisdatabaseconnectiongui.h" #include "qgscontexthelp.h" diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h index 59ee131deb24..60f2a9a6fdfb 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef eVisDatabaseConnectionGUI_H #define eVisDatabaseConnectionGUI_H diff --git a/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.cpp b/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.cpp index fe65a42ed3da..1d3cebfa612d 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisdatabaselayerfieldselectiongui.h" /** diff --git a/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.h b/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.h index f36fd9044722..dbe80967ced0 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.h +++ b/src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef eVisDatabaseLayerFieldSelectionGui_H #define eVisDatabaseLayerFieldSelectionGui_H diff --git a/src/plugins/evis/databaseconnection/evisquerydefinition.cpp b/src/plugins/evis/databaseconnection/evisquerydefinition.cpp index b8886f99ebbd..0bc5eeea3020 100644 --- a/src/plugins/evis/databaseconnection/evisquerydefinition.cpp +++ b/src/plugins/evis/databaseconnection/evisquerydefinition.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisquerydefinition.h" /** diff --git a/src/plugins/evis/databaseconnection/evisquerydefinition.h b/src/plugins/evis/databaseconnection/evisquerydefinition.h index 99d079415855..ecb97e023ef0 100644 --- a/src/plugins/evis/databaseconnection/evisquerydefinition.h +++ b/src/plugins/evis/databaseconnection/evisquerydefinition.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef EVISQUERYDEFINITION_H #define EVISQUERYDEFINITION_H diff --git a/src/plugins/evis/eventbrowser/evisconfiguration.cpp b/src/plugins/evis/eventbrowser/evisconfiguration.cpp index 87fae74e5538..c99fe54d1d05 100644 --- a/src/plugins/evis/eventbrowser/evisconfiguration.cpp +++ b/src/plugins/evis/eventbrowser/evisconfiguration.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include #include "evisconfiguration.h" diff --git a/src/plugins/evis/eventbrowser/evisconfiguration.h b/src/plugins/evis/eventbrowser/evisconfiguration.h index e89dfef3d715..98a2541c59df 100644 --- a/src/plugins/evis/eventbrowser/evisconfiguration.h +++ b/src/plugins/evis/eventbrowser/evisconfiguration.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef eVisConfiguration_H #define eVisConfiguration_H diff --git a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp index 993262fbc182..80c4424baa01 100644 --- a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp +++ b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisgenericeventbrowsergui.h" #include "qgsapplication.h" diff --git a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h index ed71b86e720c..9aa628fdf217 100644 --- a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h +++ b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef eVisGenericEventBrowserGui_H #define eVisGenericEventBrowserGui_H diff --git a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp index 11560b6855d9..9cd37b4ae945 100644 --- a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp +++ b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "evisimagedisplaywidget.h" #include "qgsapplication.h" diff --git a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h index 3bf7dd9c72a8..b50355f0d656 100644 --- a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h +++ b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef EVISIMAGEDISPLAYWIDGET_H #define EVISIMAGEDISPLAYWIDGET_H diff --git a/src/plugins/evis/evis.cpp b/src/plugins/evis/evis.cpp index 8c4038a95ad0..74b3d0e9c9f7 100644 --- a/src/plugins/evis/evis.cpp +++ b/src/plugins/evis/evis.cpp @@ -45,7 +45,6 @@ * ( at your option ) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "evis.h" // @@ -80,7 +79,6 @@ #define QGISEXTERN extern "C" #endif -static const char * const sIdent = "$Id$"; static const QString sName = QObject::tr( "eVis" ); static const QString sDescription = QObject::tr( "An event visualization tool - view images associated with vector features" ); static const QString sPluginVersion = QObject::tr( "Version 1.1.0" ); diff --git a/src/plugins/evis/evis.h b/src/plugins/evis/evis.h index 0199e0c9b605..19f2a364e815 100644 --- a/src/plugins/evis/evis.h +++ b/src/plugins/evis/evis.h @@ -63,7 +63,6 @@ * DON'T: separate variable names using underscores: my_variable_name ( NO! ) * * **************************************************************************/ -/* $Id$ */ #ifndef eVis_H #define eVis_H diff --git a/src/plugins/evis/idtool/eviseventidtool.cpp b/src/plugins/evis/idtool/eviseventidtool.cpp index f3caa2505bfe..13e348f309a0 100644 --- a/src/plugins/evis/idtool/eviseventidtool.cpp +++ b/src/plugins/evis/idtool/eviseventidtool.cpp @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #include "eviseventidtool.h" #include "qgscursors.h" diff --git a/src/plugins/evis/idtool/eviseventidtool.h b/src/plugins/evis/idtool/eviseventidtool.h index 093105251101..f5f5705d3f2c 100644 --- a/src/plugins/evis/idtool/eviseventidtool.h +++ b/src/plugins/evis/idtool/eviseventidtool.h @@ -24,7 +24,6 @@ ** National Oceanic and Atmospheric Administration or the Department of Commerce. ** **/ -/* $Id$ */ #ifndef EVISEVENTIDTOOL_H #define EVISEVENTIDTOOL_H diff --git a/src/plugins/georeferencer/qgsgcpcanvasitem.cpp b/src/plugins/georeferencer/qgsgcpcanvasitem.cpp index d54097914457..d0e8a5150cf9 100644 --- a/src/plugins/georeferencer/qgsgcpcanvasitem.cpp +++ b/src/plugins/georeferencer/qgsgcpcanvasitem.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgcpcanvasitem.h" #include "qgsgeorefdatapoint.h" diff --git a/src/plugins/georeferencer/qgsgcpcanvasitem.h b/src/plugins/georeferencer/qgsgcpcanvasitem.h index 999bbbad2c0e..d98b71f8d431 100644 --- a/src/plugins/georeferencer/qgsgcpcanvasitem.h +++ b/src/plugins/georeferencer/qgsgcpcanvasitem.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGCPCANVASITEM_H #define QGSGCPCANVASITEM_H diff --git a/src/plugins/georeferencer/qgsgcplist.cpp b/src/plugins/georeferencer/qgsgcplist.cpp index 6fd80c536df0..35904b8b5378 100644 --- a/src/plugins/georeferencer/qgsgcplist.cpp +++ b/src/plugins/georeferencer/qgsgcplist.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspoint.h" #include "qgsgeorefdatapoint.h" diff --git a/src/plugins/georeferencer/qgsgcplist.h b/src/plugins/georeferencer/qgsgcplist.h index 72d02b363346..d003fe916d1e 100644 --- a/src/plugins/georeferencer/qgsgcplist.h +++ b/src/plugins/georeferencer/qgsgcplist.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGS_GCP_LIST_H #define QGS_GCP_LIST_H diff --git a/src/plugins/georeferencer/qgsgcplistmodel.cpp b/src/plugins/georeferencer/qgsgcplistmodel.cpp index 76d622ac526a..61f6a1d54bc0 100644 --- a/src/plugins/georeferencer/qgsgcplistmodel.cpp +++ b/src/plugins/georeferencer/qgsgcplistmodel.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgcplist.h" #include "qgsgcplistmodel.h" diff --git a/src/plugins/georeferencer/qgsgcplistmodel.h b/src/plugins/georeferencer/qgsgcplistmodel.h index c0c398c7bba2..2d93227b543f 100644 --- a/src/plugins/georeferencer/qgsgcplistmodel.h +++ b/src/plugins/georeferencer/qgsgcplistmodel.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGCP_LIST_TABLE_VIEW_H #define QGSGCP_LIST_TABLE_VIEW_H diff --git a/src/plugins/georeferencer/qgsgcplistwidget.cpp b/src/plugins/georeferencer/qgsgcplistwidget.cpp index 596d6e383313..b950cb0bef32 100644 --- a/src/plugins/georeferencer/qgsgcplistwidget.cpp +++ b/src/plugins/georeferencer/qgsgcplistwidget.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsgcplistwidget.h b/src/plugins/georeferencer/qgsgcplistwidget.h index da9ee5a77d2f..d1448c0d2937 100644 --- a/src/plugins/georeferencer/qgsgcplistwidget.h +++ b/src/plugins/georeferencer/qgsgcplistwidget.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGS_GCP_LIST_WIDGET_H #define QGS_GCP_LIST_WIDGET_H diff --git a/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp b/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp index b3bb6c4eccb2..43a8ae1471b1 100644 --- a/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp +++ b/src/plugins/georeferencer/qgsgeorefconfigdialog.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include #include diff --git a/src/plugins/georeferencer/qgsgeorefconfigdialog.h b/src/plugins/georeferencer/qgsgeorefconfigdialog.h index 4c86b446564f..93d4c894f377 100644 --- a/src/plugins/georeferencer/qgsgeorefconfigdialog.h +++ b/src/plugins/georeferencer/qgsgeorefconfigdialog.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFCONFIGDIALOG_H #define QGSGEOREFCONFIGDIALOG_H diff --git a/src/plugins/georeferencer/qgsgeorefdatapoint.cpp b/src/plugins/georeferencer/qgsgeorefdatapoint.cpp index 65a1b46031b6..a1e1129153cf 100644 --- a/src/plugins/georeferencer/qgsgeorefdatapoint.cpp +++ b/src/plugins/georeferencer/qgsgeorefdatapoint.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include "qgsmapcanvas.h" diff --git a/src/plugins/georeferencer/qgsgeorefdatapoint.h b/src/plugins/georeferencer/qgsgeorefdatapoint.h index e6164b9a6685..50fe87a028a4 100644 --- a/src/plugins/georeferencer/qgsgeorefdatapoint.h +++ b/src/plugins/georeferencer/qgsgeorefdatapoint.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFDATAPOINT_H #define QGSGEOREFDATAPOINT_H diff --git a/src/plugins/georeferencer/qgsgeorefdelegates.cpp b/src/plugins/georeferencer/qgsgeorefdelegates.cpp index 9a0988711bab..59fb40acc4d7 100644 --- a/src/plugins/georeferencer/qgsgeorefdelegates.cpp +++ b/src/plugins/georeferencer/qgsgeorefdelegates.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsgeorefdelegates.h b/src/plugins/georeferencer/qgsgeorefdelegates.h index 90abb3ba246c..a7d86d6d5d28 100644 --- a/src/plugins/georeferencer/qgsgeorefdelegates.h +++ b/src/plugins/georeferencer/qgsgeorefdelegates.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSDELEGATES_H #define QGSDELEGATES_H diff --git a/src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp b/src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp index 5c36eac3f858..dca565672c5f 100644 --- a/src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp +++ b/src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgeorefdescriptiondialog.h" diff --git a/src/plugins/georeferencer/qgsgeorefdescriptiondialog.h b/src/plugins/georeferencer/qgsgeorefdescriptiondialog.h index f74d99df17fb..5ada999b9939 100644 --- a/src/plugins/georeferencer/qgsgeorefdescriptiondialog.h +++ b/src/plugins/georeferencer/qgsgeorefdescriptiondialog.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFDESCRIPTIONDIALOG_H #define QGSGEOREFDESCRIPTIONDIALOG_H diff --git a/src/plugins/georeferencer/qgsgeorefplugin.cpp b/src/plugins/georeferencer/qgsgeorefplugin.cpp index c379cb09f71e..a4c24d30fb60 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugin.cpp @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ /*************************************************************************** * QGIS Programming conventions: @@ -61,7 +60,6 @@ // #include "qgsgeorefplugingui.h" -static const char * const sIdent = "$Id$"; static const QString sName = QObject::tr( "Georeferencer GDAL" ); static const QString sDescription = QObject::tr( "Georeferencing rasters using GDAL" ); static const QString sPluginVersion = QObject::tr( "Version 3.1.9" ); diff --git a/src/plugins/georeferencer/qgsgeorefplugin.h b/src/plugins/georeferencer/qgsgeorefplugin.h index edc6acc7a74f..4cfe835d898d 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.h +++ b/src/plugins/georeferencer/qgsgeorefplugin.h @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ /*************************************************************************** * QGIS Programming conventions: diff --git a/src/plugins/georeferencer/qgsgeorefplugingui.cpp b/src/plugins/georeferencer/qgsgeorefplugingui.cpp index a44398db9175..558ad61ed778 100644 --- a/src/plugins/georeferencer/qgsgeorefplugingui.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugingui.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsgeorefplugingui.h b/src/plugins/georeferencer/qgsgeorefplugingui.h index 51b4f458d8c4..76c39cd90d19 100644 --- a/src/plugins/georeferencer/qgsgeorefplugingui.h +++ b/src/plugins/georeferencer/qgsgeorefplugingui.h @@ -9,7 +9,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFPLUGINGUI_H #define QGSGEOREFPLUGINGUI_H diff --git a/src/plugins/georeferencer/qgsgeoreftooladdpoint.cpp b/src/plugins/georeferencer/qgsgeoreftooladdpoint.cpp index 42ef7e1c7261..fa38478d671b 100644 --- a/src/plugins/georeferencer/qgsgeoreftooladdpoint.cpp +++ b/src/plugins/georeferencer/qgsgeoreftooladdpoint.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmapcanvas.h" diff --git a/src/plugins/georeferencer/qgsgeoreftooladdpoint.h b/src/plugins/georeferencer/qgsgeoreftooladdpoint.h index fcbe85e03750..b4b2af138988 100644 --- a/src/plugins/georeferencer/qgsgeoreftooladdpoint.h +++ b/src/plugins/georeferencer/qgsgeoreftooladdpoint.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFTOOLADDPOINT_H #define QGSGEOREFTOOLADDPOINT_H diff --git a/src/plugins/georeferencer/qgsgeoreftooldeletepoint.cpp b/src/plugins/georeferencer/qgsgeoreftooldeletepoint.cpp index 1c8dcd968413..44c337e05b22 100644 --- a/src/plugins/georeferencer/qgsgeoreftooldeletepoint.cpp +++ b/src/plugins/georeferencer/qgsgeoreftooldeletepoint.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmapcanvas.h" diff --git a/src/plugins/georeferencer/qgsgeoreftooldeletepoint.h b/src/plugins/georeferencer/qgsgeoreftooldeletepoint.h index 928a0b964050..7c52e3e7c72a 100644 --- a/src/plugins/georeferencer/qgsgeoreftooldeletepoint.h +++ b/src/plugins/georeferencer/qgsgeoreftooldeletepoint.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFTOOLDELETEPOINT_H #define QGSGEOREFTOOLDELETEPOINT_H diff --git a/src/plugins/georeferencer/qgsgeoreftoolmovepoint.cpp b/src/plugins/georeferencer/qgsgeoreftoolmovepoint.cpp index ccda5f9ae9b0..7c1e9a17fc4c 100644 --- a/src/plugins/georeferencer/qgsgeoreftoolmovepoint.cpp +++ b/src/plugins/georeferencer/qgsgeoreftoolmovepoint.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsmapcanvas.h" diff --git a/src/plugins/georeferencer/qgsgeoreftoolmovepoint.h b/src/plugins/georeferencer/qgsgeoreftoolmovepoint.h index 55b33ec54c4c..bc57b59fe252 100644 --- a/src/plugins/georeferencer/qgsgeoreftoolmovepoint.h +++ b/src/plugins/georeferencer/qgsgeoreftoolmovepoint.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFTOOLMOVEPOINT_H #define QGSGEOREFTOOLMOVEPOINT_H diff --git a/src/plugins/georeferencer/qgsgeoreftransform.cpp b/src/plugins/georeferencer/qgsgeoreftransform.cpp index 9f65d19165ea..05bc0123212d 100644 --- a/src/plugins/georeferencer/qgsgeoreftransform.cpp +++ b/src/plugins/georeferencer/qgsgeoreftransform.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id */ #include "qgsgeoreftransform.h" diff --git a/src/plugins/georeferencer/qgsgeoreftransform.h b/src/plugins/georeferencer/qgsgeoreftransform.h index 32d7ca2b7636..8cc60eaaed27 100644 --- a/src/plugins/georeferencer/qgsgeoreftransform.h +++ b/src/plugins/georeferencer/qgsgeoreftransform.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id */ #ifndef QGS_GEOREF_TRANSFORM_H #define QGS_GEOREF_TRANSFORM_H diff --git a/src/plugins/georeferencer/qgsgeorefvalidators.cpp b/src/plugins/georeferencer/qgsgeorefvalidators.cpp index 9fd5c5f41f5c..5c3019c77f39 100644 --- a/src/plugins/georeferencer/qgsgeorefvalidators.cpp +++ b/src/plugins/georeferencer/qgsgeorefvalidators.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/plugins/georeferencer/qgsgeorefvalidators.h b/src/plugins/georeferencer/qgsgeorefvalidators.h index d4e7365b9313..aafc650c6df5 100644 --- a/src/plugins/georeferencer/qgsgeorefvalidators.h +++ b/src/plugins/georeferencer/qgsgeorefvalidators.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGEOREFVALIDATORS_H #define QGSGEOREFVALIDATORS_H diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index 53898323eb04..b45dbf0e6865 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsimagewarper.h b/src/plugins/georeferencer/qgsimagewarper.h index b8b23f68d5ef..0eb777c76927 100644 --- a/src/plugins/georeferencer/qgsimagewarper.h +++ b/src/plugins/georeferencer/qgsimagewarper.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSIMAGEWARPER_H #define QGSIMAGEWARPER_H diff --git a/src/plugins/georeferencer/qgsleastsquares.cpp b/src/plugins/georeferencer/qgsleastsquares.cpp index 75c49fe3a7c0..0147b1bbbb31 100644 --- a/src/plugins/georeferencer/qgsleastsquares.cpp +++ b/src/plugins/georeferencer/qgsleastsquares.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsleastsquares.h b/src/plugins/georeferencer/qgsleastsquares.h index 689ab7b56ab0..eabcf1681504 100644 --- a/src/plugins/georeferencer/qgsleastsquares.h +++ b/src/plugins/georeferencer/qgsleastsquares.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSLEASTSQUARES_H #define QGSLEASTSQUARES_H diff --git a/src/plugins/georeferencer/qgsmapcoordsdialog.cpp b/src/plugins/georeferencer/qgsmapcoordsdialog.cpp index 792b31af3951..6d4c9e36ed25 100644 --- a/src/plugins/georeferencer/qgsmapcoordsdialog.cpp +++ b/src/plugins/georeferencer/qgsmapcoordsdialog.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsmapcoordsdialog.h b/src/plugins/georeferencer/qgsmapcoordsdialog.h index 0ea3afa66e93..9ea984020f2b 100644 --- a/src/plugins/georeferencer/qgsmapcoordsdialog.h +++ b/src/plugins/georeferencer/qgsmapcoordsdialog.h @@ -9,7 +9,6 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -/* $Id$ */ #ifndef MAPCOORDSDIALOG_H #define MAPCOORDSDIALOG_H diff --git a/src/plugins/georeferencer/qgsopenrasterdialog.cpp b/src/plugins/georeferencer/qgsopenrasterdialog.cpp index d7523e60d318..53cb36e393f0 100644 --- a/src/plugins/georeferencer/qgsopenrasterdialog.cpp +++ b/src/plugins/georeferencer/qgsopenrasterdialog.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgsopenrasterdialog.h b/src/plugins/georeferencer/qgsopenrasterdialog.h index 8ec892a23d26..ff7fc3904da1 100644 --- a/src/plugins/georeferencer/qgsopenrasterdialog.h +++ b/src/plugins/georeferencer/qgsopenrasterdialog.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSOPENRASTERDIALOG_H #define QGSOPENRASTERDIALOG_H diff --git a/src/plugins/georeferencer/qgsresidualplotitem.cpp b/src/plugins/georeferencer/qgsresidualplotitem.cpp index 1382b3969653..5dcabd0f0548 100644 --- a/src/plugins/georeferencer/qgsresidualplotitem.cpp +++ b/src/plugins/georeferencer/qgsresidualplotitem.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id */ #include "qgsresidualplotitem.h" #include "qgsgeorefdatapoint.h" diff --git a/src/plugins/georeferencer/qgsresidualplotitem.h b/src/plugins/georeferencer/qgsresidualplotitem.h index 92258adb96d9..f3e825863664 100644 --- a/src/plugins/georeferencer/qgsresidualplotitem.h +++ b/src/plugins/georeferencer/qgsresidualplotitem.h @@ -12,8 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id */ - #ifndef QGSRESIDUALPLOTITEM_H #define QGSRESIDUALPLOTITEM_H diff --git a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp index a78d81fcf24f..825183c27b95 100644 --- a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp +++ b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/georeferencer/qgstransformsettingsdialog.h b/src/plugins/georeferencer/qgstransformsettingsdialog.h index 38d4378a357f..bcc015e5f887 100644 --- a/src/plugins/georeferencer/qgstransformsettingsdialog.h +++ b/src/plugins/georeferencer/qgstransformsettingsdialog.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSTRANSFORMSETTINGSDIALOG_H #define QGSTRANSFORMSETTINGSDIALOG_H diff --git a/src/plugins/georeferencer/qgsvalidateddoublespinbox.h b/src/plugins/georeferencer/qgsvalidateddoublespinbox.h index a5f243ee5bd6..c669a5a3e36c 100644 --- a/src/plugins/georeferencer/qgsvalidateddoublespinbox.h +++ b/src/plugins/georeferencer/qgsvalidateddoublespinbox.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id */ #ifndef QGS_VALIDATED_DOUBLE_SPINBOX_H #define QGS_VALIDATED_DOUBLE_SPINBOX_H diff --git a/src/plugins/gps_importer/qgsbabelformat.cpp b/src/plugins/gps_importer/qgsbabelformat.cpp index 45d34ac8333a..a4dbd2fe5708 100644 --- a/src/plugins/gps_importer/qgsbabelformat.cpp +++ b/src/plugins/gps_importer/qgsbabelformat.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsbabelformat.h" diff --git a/src/plugins/gps_importer/qgsbabelformat.h b/src/plugins/gps_importer/qgsbabelformat.h index a626ad03e4fe..b3605c0a92aa 100644 --- a/src/plugins/gps_importer/qgsbabelformat.h +++ b/src/plugins/gps_importer/qgsbabelformat.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSBABELFORMAT_H #define QGSBABELFORMAT_H diff --git a/src/plugins/gps_importer/qgsgpsdevice.h b/src/plugins/gps_importer/qgsgpsdevice.h index cbd916dac1d4..511d680bf14d 100644 --- a/src/plugins/gps_importer/qgsgpsdevice.h +++ b/src/plugins/gps_importer/qgsgpsdevice.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGPSDEVICE_H #define QGSGPSDEVICE_H diff --git a/src/plugins/gps_importer/qgsgpsplugin.cpp b/src/plugins/gps_importer/qgsgpsplugin.cpp index 6e50f65c2f68..36eca53407ef 100644 --- a/src/plugins/gps_importer/qgsgpsplugin.cpp +++ b/src/plugins/gps_importer/qgsgpsplugin.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes @@ -48,7 +47,6 @@ #include "qgsgpsplugingui.h" -static const char * const ident_ = "$Id$"; static const QString name_ = QObject::tr( "GPS Tools" ); static const QString description_ = QObject::tr( "Tools for loading and importing GPS data" ); static const QString version_ = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/gps_importer/qgsgpsplugin.h b/src/plugins/gps_importer/qgsgpsplugin.h index 1343e1864363..d046b73c2f40 100644 --- a/src/plugins/gps_importer/qgsgpsplugin.h +++ b/src/plugins/gps_importer/qgsgpsplugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGPSPLUGIN_H #define QGSGPSPLUGIN_H #include "qgsbabelformat.h" diff --git a/src/plugins/gps_importer/qgsgpsplugingui.h b/src/plugins/gps_importer/qgsgpsplugingui.h index 4556f4f3c3f7..4a231eecbd5c 100644 --- a/src/plugins/gps_importer/qgsgpsplugingui.h +++ b/src/plugins/gps_importer/qgsgpsplugingui.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGPSPLUGINGUI_H #define QGSGPSPLUGINGUI_H diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp old mode 100755 new mode 100644 index 01f0e2b3cbc9..27da98b6bebf --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgrassplugin.h" #include "qgis.h" diff --git a/src/plugins/grass/qgsgrassplugin.h b/src/plugins/grass/qgsgrassplugin.h index 623845dc8fd6..6c496823d8ea 100644 --- a/src/plugins/grass/qgsgrassplugin.h +++ b/src/plugins/grass/qgsgrassplugin.h @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSGRASSPLUGIN_H #define QGSGRASSPLUGIN_H #include "../qgisplugin.h" diff --git a/src/plugins/grass/qtermwidget/konsole_wcwidth.cpp b/src/plugins/grass/qtermwidget/konsole_wcwidth.cpp index 06f837f51710..858360305e5d 100644 --- a/src/plugins/grass/qtermwidget/konsole_wcwidth.cpp +++ b/src/plugins/grass/qtermwidget/konsole_wcwidth.cpp @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/xterm/wcwidth.character,v 1.3 2001/07/29 22:08:16 tsi Exp $ */ /* * This is an implementation of wcwidth() and wcswidth() as defined in * "The Single UNIX Specification, Version 2, The Open Group, 1997" diff --git a/src/plugins/grass/qtermwidget/konsole_wcwidth.h b/src/plugins/grass/qtermwidget/konsole_wcwidth.h index 2a297b9de8c9..537126ba26ff 100644 --- a/src/plugins/grass/qtermwidget/konsole_wcwidth.h +++ b/src/plugins/grass/qtermwidget/konsole_wcwidth.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/xterm/wcwidth.h,v 1.2 2001/06/18 19:09:27 dickey Exp $ */ /* Markus Kuhn -- 2001-01-12 -- public domain */ /* Adaptions for KDE by Waldo Bastian */ diff --git a/src/plugins/north_arrow/plugin.cpp b/src/plugins/north_arrow/plugin.cpp index e8a2489afc38..b736c2945e08 100644 --- a/src/plugins/north_arrow/plugin.cpp +++ b/src/plugins/north_arrow/plugin.cpp @@ -18,7 +18,6 @@ email : tim@linfiniti.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes @@ -47,15 +46,10 @@ email : tim@linfiniti.com //the gui subclass #include "plugingui.h" - - #ifdef _MSC_VER #define round(x) ((x) >= 0 ? floor((x)+0.5) : floor((x)-0.5)) #endif -// -static const char * const ident_ = "$Id$"; - static const QString name_ = QObject::tr( "NorthArrow" ); static const QString description_ = QObject::tr( "Displays a north arrow overlayed onto the map" ); static const QString version_ = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/north_arrow/plugin.h b/src/plugins/north_arrow/plugin.h index 6ef0079a7402..c23bdc43341f 100644 --- a/src/plugins/north_arrow/plugin.h +++ b/src/plugins/north_arrow/plugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSNORTHARROWPLUGIN #define QGSNORTHARROWPLUGIN diff --git a/src/plugins/oracle_raster/qgsoracle_plugin.cpp b/src/plugins/oracle_raster/qgsoracle_plugin.cpp index c2bde030e764..659985c9f6b9 100644 --- a/src/plugins/oracle_raster/qgsoracle_plugin.cpp +++ b/src/plugins/oracle_raster/qgsoracle_plugin.cpp @@ -12,12 +12,10 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsoracle_plugin.h" #include "qgsselectgeoraster_ui.h" -static const char * const sIdent = "$Id$"; static const QString sName = QObject::tr( "Oracle Spatial GeoRaster" ); static const QString sDescription = QObject::tr( "Access Oracle Spatial GeoRaster" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/oracle_raster/qgsoracle_plugin.h b/src/plugins/oracle_raster/qgsoracle_plugin.h index 7f66b1024fa9..c64fca2f5163 100644 --- a/src/plugins/oracle_raster/qgsoracle_plugin.h +++ b/src/plugins/oracle_raster/qgsoracle_plugin.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef OraclePlugin_H #define OraclePlugin_H diff --git a/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp b/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp index 636c5f7c316c..2d2b755de757 100644 --- a/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp +++ b/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsoracleconnect_ui.h" diff --git a/src/plugins/oracle_raster/qgsoracleconnect_ui.h b/src/plugins/oracle_raster/qgsoracleconnect_ui.h index 4ff02fcd752e..b0280c4e4ffb 100644 --- a/src/plugins/oracle_raster/qgsoracleconnect_ui.h +++ b/src/plugins/oracle_raster/qgsoracleconnect_ui.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QgsOracleConnect_H #define QgsOracleConnect_H diff --git a/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp b/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp index 384fcfa23cf0..dd4055b03841 100644 --- a/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp +++ b/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsselectgeoraster_ui.h" #include "qgsoracleconnect_ui.h" diff --git a/src/plugins/oracle_raster/qgsselectgeoraster_ui.h b/src/plugins/oracle_raster/qgsselectgeoraster_ui.h index 24803fdf9215..6fa5d02b218f 100644 --- a/src/plugins/oracle_raster/qgsselectgeoraster_ui.h +++ b/src/plugins/oracle_raster/qgsselectgeoraster_ui.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef OraclePluginGUI_H #define OraclePluginGUI_H diff --git a/src/plugins/plugin_template/plugin.cpp b/src/plugins/plugin_template/plugin.cpp index da9d73eb2b3b..2cfbd4cf67fe 100644 --- a/src/plugins/plugin_template/plugin.cpp +++ b/src/plugins/plugin_template/plugin.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // // QGIS Specific includes @@ -34,7 +33,6 @@ #include -static const char * const sIdent = "$Id$"; static const QString sName = QObject::tr( "[menuitemname]" ); static const QString sDescription = QObject::tr( "[plugindescription]" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/plugin_template/plugin.h b/src/plugins/plugin_template/plugin.h index c5af9afed7e6..afb5631f0299 100644 --- a/src/plugins/plugin_template/plugin.h +++ b/src/plugins/plugin_template/plugin.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ /*************************************************************************** * QGIS Programming conventions: * diff --git a/src/plugins/roadgraph/roadgraphplugin.cpp b/src/plugins/roadgraph/roadgraphplugin.cpp index eb8ba0a3ebfd..2b7755e0a275 100644 --- a/src/plugins/roadgraph/roadgraphplugin.cpp +++ b/src/plugins/roadgraph/roadgraphplugin.cpp @@ -51,7 +51,6 @@ // standard includes -static const char * const sIdent = "$Id: roadgraphplugin.cpp 9327 2009-04-20 10:09:44Z YEKST $"; static const QString sName = QObject::tr( "Road graph plugin" ); static const QString sDescription = QObject::tr( "It solves the shortest path problem." ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/scale_bar/plugin.cpp b/src/plugins/scale_bar/plugin.cpp index 43ceeb90af3c..2cb50b89f807 100644 --- a/src/plugins/scale_bar/plugin.cpp +++ b/src/plugins/scale_bar/plugin.cpp @@ -18,7 +18,6 @@ email : sbr00pwb@users.sourceforge.net * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes @@ -58,8 +57,6 @@ email : sbr00pwb@users.sourceforge.net #define round(x) ((x) >= 0 ? floor((x)+0.5) : floor((x)-0.5)) #endif -static const char * const ident_ = "$Id$"; - static const QString name_ = QObject::tr( "ScaleBar" ); static const QString description_ = QObject::tr( "Draws a scale bar" ); static const QString version_ = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/scale_bar/plugin.h b/src/plugins/scale_bar/plugin.h index 3c1c8a893242..21c663751963 100644 --- a/src/plugins/scale_bar/plugin.h +++ b/src/plugins/scale_bar/plugin.h @@ -18,7 +18,6 @@ email : sbr00pwb@users.sourceforge.net * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSCALEBARPLUGIN #define QGSCALEBARPLUGIN #include "../qgisplugin.h" diff --git a/src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp b/src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp index 52826967f5c7..a2d032558418 100644 --- a/src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp +++ b/src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgeometrycoordinatetransform.h" diff --git a/src/plugins/spatialquery/qgsgeometrycoordinatetransform.h b/src/plugins/spatialquery/qgsgeometrycoordinatetransform.h index 08304766ba56..f47c7c3d1633 100644 --- a/src/plugins/spatialquery/qgsgeometrycoordinatetransform.h +++ b/src/plugins/spatialquery/qgsgeometrycoordinatetransform.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsgeometrycoordinatetransform.h 13377 2010-04-25 01:07:36Z jef $ */ #ifndef GEOMETRYCOORDINATETRANSFORM_H #define GEOMETRYCOORDINATETRANSFORM_H diff --git a/src/plugins/spatialquery/qgsmngprogressbar.cpp b/src/plugins/spatialquery/qgsmngprogressbar.cpp index 3b9a975e2577..9e3b63463ac0 100644 --- a/src/plugins/spatialquery/qgsmngprogressbar.cpp +++ b/src/plugins/spatialquery/qgsmngprogressbar.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmngprogressbar.cpp 13377 2010-04-25 01:07:36Z jef $ */ #include "qgsmngprogressbar.h" diff --git a/src/plugins/spatialquery/qgsmngprogressbar.h b/src/plugins/spatialquery/qgsmngprogressbar.h index 3a438c057a34..78319edad541 100644 --- a/src/plugins/spatialquery/qgsmngprogressbar.h +++ b/src/plugins/spatialquery/qgsmngprogressbar.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsmngprogressbar.h 13377 2010-04-25 01:07:36Z jef $ */ #ifndef QGSMNGPROGRESSBAR_H #define QGSMNGPROGRESSBAR_H diff --git a/src/plugins/spatialquery/qgsreaderfeatures.cpp b/src/plugins/spatialquery/qgsreaderfeatures.cpp index 2fef366edc3b..16cfa9b43169 100644 --- a/src/plugins/spatialquery/qgsreaderfeatures.cpp +++ b/src/plugins/spatialquery/qgsreaderfeatures.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsreaderfeatures.cpp 13377 2010-04-25 01:07:36Z jef $ */ #include diff --git a/src/plugins/spatialquery/qgsreaderfeatures.h b/src/plugins/spatialquery/qgsreaderfeatures.h index 38348dd5085c..1983828e3cda 100644 --- a/src/plugins/spatialquery/qgsreaderfeatures.h +++ b/src/plugins/spatialquery/qgsreaderfeatures.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsreaderfeatures.h 13377 2010-04-25 01:07:36Z jef $ */ #ifndef READERFEATURES_H #define READERFEATURES_H diff --git a/src/plugins/spatialquery/qgsrubberselectid.cpp b/src/plugins/spatialquery/qgsrubberselectid.cpp index 7c40419cd88f..466be1c2e21a 100644 --- a/src/plugins/spatialquery/qgsrubberselectid.cpp +++ b/src/plugins/spatialquery/qgsrubberselectid.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsrubberselectid.h" diff --git a/src/plugins/spatialquery/qgsrubberselectid.h b/src/plugins/spatialquery/qgsrubberselectid.h index af021c10c7a3..d0d45a0f81d4 100644 --- a/src/plugins/spatialquery/qgsrubberselectid.h +++ b/src/plugins/spatialquery/qgsrubberselectid.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSRUBBERSELECTID_H #define QGSRUBBERSELECTID_H diff --git a/src/plugins/spatialquery/qgsspatialquery.cpp b/src/plugins/spatialquery/qgsspatialquery.cpp index 1561262b8f3c..9f21d3365b81 100644 --- a/src/plugins/spatialquery/qgsspatialquery.cpp +++ b/src/plugins/spatialquery/qgsspatialquery.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsspatialquery.cpp 15302 2011-03-01 08:00:54Z timlinux $ */ #include diff --git a/src/plugins/spatialquery/qgsspatialquery.h b/src/plugins/spatialquery/qgsspatialquery.h index 81a0007d8ba9..e5f43899987c 100644 --- a/src/plugins/spatialquery/qgsspatialquery.h +++ b/src/plugins/spatialquery/qgsspatialquery.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsspatialquery.h 15141 2011-02-08 13:34:43Z jef $ */ #ifndef SPATIALQUERY_H #define SPATIALQUERY_H diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.cpp b/src/plugins/spatialquery/qgsspatialquerydialog.cpp index 81c43fd18160..5e335f101b75 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.cpp +++ b/src/plugins/spatialquery/qgsspatialquerydialog.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.h b/src/plugins/spatialquery/qgsspatialquerydialog.h index 1665e9df1059..c7efc721dcd7 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.h +++ b/src/plugins/spatialquery/qgsspatialquerydialog.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsspatialquerydialog.h 15303 2011-03-01 08:10:18Z jef $ */ #ifndef SPATIALQUERYDIALOG_H #define SPATIALQUERYDIALOG_H diff --git a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp index be26c011cae4..df3db7958b59 100644 --- a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp +++ b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // diff --git a/src/plugins/spatialquery/qgsspatialqueryplugin.h b/src/plugins/spatialquery/qgsspatialqueryplugin.h index e9238cecbdc2..649458e3b289 100644 --- a/src/plugins/spatialquery/qgsspatialqueryplugin.h +++ b/src/plugins/spatialquery/qgsspatialqueryplugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsspatialqueryplugin.h 13377 2010-04-25 01:07:36Z jef $ */ #ifndef SPATIALQUERYPLUGIN_H #define SPATIALQUERYPLUGIN_H diff --git a/src/plugins/spit/qgspgutil.cpp b/src/plugins/spit/qgspgutil.cpp index 117b37b9d14c..cc05fcd28773 100644 --- a/src/plugins/spit/qgspgutil.cpp +++ b/src/plugins/spit/qgspgutil.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgspgutil.h" QgsPgUtil *QgsPgUtil::mInstance = 0; diff --git a/src/plugins/spit/qgspgutil.h b/src/plugins/spit/qgspgutil.h index 61a68c104315..d75049414712 100644 --- a/src/plugins/spit/qgspgutil.h +++ b/src/plugins/spit/qgspgutil.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPGUTIL_H #define QGSPGUTIL_H #include diff --git a/src/plugins/spit/qgsshapefile.cpp b/src/plugins/spit/qgsshapefile.cpp index ff7aa9a0cb81..0603f4383961 100644 --- a/src/plugins/spit/qgsshapefile.cpp +++ b/src/plugins/spit/qgsshapefile.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/spit/qgsshapefile.h b/src/plugins/spit/qgsshapefile.h index 34464b294068..3f89f9bc4256 100644 --- a/src/plugins/spit/qgsshapefile.h +++ b/src/plugins/spit/qgsshapefile.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSHAPEFILE_H #define QGSSHAPEFILE_H diff --git a/src/plugins/spit/qgsspit.cpp b/src/plugins/spit/qgsspit.cpp index c853a8ee9e1f..6401d41d9a99 100644 --- a/src/plugins/spit/qgsspit.cpp +++ b/src/plugins/spit/qgsspit.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/spit/qgsspit.h b/src/plugins/spit/qgsspit.h index 10f9320c9695..25bf81b94ae8 100644 --- a/src/plugins/spit/qgsspit.h +++ b/src/plugins/spit/qgsspit.h @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/spit/qgsspitplugin.cpp b/src/plugins/spit/qgsspitplugin.cpp index 77b30d003822..08bdc1100348 100644 --- a/src/plugins/spit/qgsspitplugin.cpp +++ b/src/plugins/spit/qgsspitplugin.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // includes #include @@ -31,8 +30,6 @@ #include "qgsspit.h" -static const char * const ident_ = "$Id$"; - static const QString name_ = QObject::tr( "SPIT" ); static const QString description_ = QObject::tr( "Shapefile to PostgreSQL/PostGIS Import Tool" ); static const QString version_ = QObject::tr( "Version 0.1" ); diff --git a/src/plugins/spit/qgsspitplugin.h b/src/plugins/spit/qgsspitplugin.h index f441c1201b4e..70f972b604b1 100644 --- a/src/plugins/spit/qgsspitplugin.h +++ b/src/plugins/spit/qgsspitplugin.h @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSPITPLUGIN_H #define QGSSPITPLUGIN_H #include "../qgisplugin.h" diff --git a/src/plugins/sqlanywhere/sadbfilterproxymodel.cpp b/src/plugins/sqlanywhere/sadbfilterproxymodel.cpp index 9da4e5439d32..35b5771bc1cd 100644 --- a/src/plugins/sqlanywhere/sadbfilterproxymodel.cpp +++ b/src/plugins/sqlanywhere/sadbfilterproxymodel.cpp @@ -23,7 +23,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "sadbfilterproxymodel.h" diff --git a/src/plugins/sqlanywhere/sadbfilterproxymodel.h b/src/plugins/sqlanywhere/sadbfilterproxymodel.h index 289b26e846ba..25c21af864e6 100644 --- a/src/plugins/sqlanywhere/sadbfilterproxymodel.h +++ b/src/plugins/sqlanywhere/sadbfilterproxymodel.h @@ -22,7 +22,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SADBFILTERPROXYMODEL_H #define SADBFILTERPROXYMODEL_H diff --git a/src/plugins/sqlanywhere/sadbtablemodel.cpp b/src/plugins/sqlanywhere/sadbtablemodel.cpp index c0d96ff9e276..559586405882 100644 --- a/src/plugins/sqlanywhere/sadbtablemodel.cpp +++ b/src/plugins/sqlanywhere/sadbtablemodel.cpp @@ -24,7 +24,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "sqlanywhere.h" diff --git a/src/plugins/sqlanywhere/sadbtablemodel.h b/src/plugins/sqlanywhere/sadbtablemodel.h index ace341aaba2a..f412406828b9 100644 --- a/src/plugins/sqlanywhere/sadbtablemodel.h +++ b/src/plugins/sqlanywhere/sadbtablemodel.h @@ -24,7 +24,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SADBTABLEMODEL_H #define SADBTABLEMODEL_H diff --git a/src/plugins/sqlanywhere/salayer.h b/src/plugins/sqlanywhere/salayer.h index 90713b1393a8..c5eb709fea3a 100644 --- a/src/plugins/sqlanywhere/salayer.h +++ b/src/plugins/sqlanywhere/salayer.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SALAYER_H #define SALAYER_H diff --git a/src/plugins/sqlanywhere/sanewconnection.cpp b/src/plugins/sqlanywhere/sanewconnection.cpp index 9e5faa6d6835..109dd6d962c9 100644 --- a/src/plugins/sqlanywhere/sanewconnection.cpp +++ b/src/plugins/sqlanywhere/sanewconnection.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/plugins/sqlanywhere/sanewconnection.h b/src/plugins/sqlanywhere/sanewconnection.h index f0f3df8f8c4e..4c980aef3f1a 100644 --- a/src/plugins/sqlanywhere/sanewconnection.h +++ b/src/plugins/sqlanywhere/sanewconnection.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SANEWCONNECTION_H #define SANEWCONNECTION_H diff --git a/src/plugins/sqlanywhere/saquerybuilder.cpp b/src/plugins/sqlanywhere/saquerybuilder.cpp index f65652173fa7..d8a6b4b8162f 100644 --- a/src/plugins/sqlanywhere/saquerybuilder.cpp +++ b/src/plugins/sqlanywhere/saquerybuilder.cpp @@ -23,7 +23,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "saquerybuilder.h" diff --git a/src/plugins/sqlanywhere/saquerybuilder.h b/src/plugins/sqlanywhere/saquerybuilder.h index 807e09acfd19..0ae419861dfe 100644 --- a/src/plugins/sqlanywhere/saquerybuilder.h +++ b/src/plugins/sqlanywhere/saquerybuilder.h @@ -23,7 +23,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SAQUERYBUILDER_H #define SAQUERYBUILDER_H diff --git a/src/plugins/sqlanywhere/sasourceselect.cpp b/src/plugins/sqlanywhere/sasourceselect.cpp index 68369a5d0d6e..1f9830567038 100644 --- a/src/plugins/sqlanywhere/sasourceselect.cpp +++ b/src/plugins/sqlanywhere/sasourceselect.cpp @@ -23,7 +23,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "sasourceselect.h" #include "sanewconnection.h" diff --git a/src/plugins/sqlanywhere/sasourceselect.h b/src/plugins/sqlanywhere/sasourceselect.h index fd73dd3751a4..2a8b96ab9194 100644 --- a/src/plugins/sqlanywhere/sasourceselect.h +++ b/src/plugins/sqlanywhere/sasourceselect.h @@ -23,7 +23,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SASOURCESELECT_H #define SASOURCESELECT_H diff --git a/src/plugins/sqlanywhere/sqlanywhere.cpp b/src/plugins/sqlanywhere/sqlanywhere.cpp index ee9c88feab2d..ca4fb1d96626 100644 --- a/src/plugins/sqlanywhere/sqlanywhere.cpp +++ b/src/plugins/sqlanywhere/sqlanywhere.cpp @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // // QGIS Specific includes diff --git a/src/plugins/sqlanywhere/sqlanywhere.h b/src/plugins/sqlanywhere/sqlanywhere.h index 3bebc20ca4d2..a2358143c7d2 100644 --- a/src/plugins/sqlanywhere/sqlanywhere.h +++ b/src/plugins/sqlanywhere/sqlanywhere.h @@ -15,7 +15,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SQLANYWHERE_H #define SQLANYWHERE_H diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp index a9fd8a7b606f..f14f4dd8d101 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsdelimitedtextprovider.h" diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.h b/src/providers/delimitedtext/qgsdelimitedtextprovider.h index 22850f83fcdc..2dfe97b8fc12 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.h +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.h @@ -15,7 +15,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include "qgsvectordataprovider.h" #include "qgscoordinatereferencesystem.h" diff --git a/src/providers/gdal/qgsgdalprovider.cpp b/src/providers/gdal/qgsgdalprovider.cpp index ff2ccd1a91e3..f03a665b3d9a 100644 --- a/src/providers/gdal/qgsgdalprovider.cpp +++ b/src/providers/gdal/qgsgdalprovider.cpp @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id: qgsgdalprovider.cpp 11522 2009-08-28 14:49:22Z jef $ */ #include "qgslogger.h" #include "qgsgdalprovider.h" diff --git a/src/providers/gdal/qgsgdalprovider.h b/src/providers/gdal/qgsgdalprovider.h index f3fc59709d8b..fa5e1454fd6e 100644 --- a/src/providers/gdal/qgsgdalprovider.h +++ b/src/providers/gdal/qgsgdalprovider.h @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id: qgsgdalprovider.h 12528 2009-12-20 12:29:07Z jef $ */ #ifndef QGSGDALPROVIDER_H #define QGSGDALPROVIDER_H diff --git a/src/providers/gpx/qgsgpxprovider.cpp b/src/providers/gpx/qgsgpxprovider.cpp index 4be49e47b2a9..ecd695058e42 100644 --- a/src/providers/gpx/qgsgpxprovider.cpp +++ b/src/providers/gpx/qgsgpxprovider.cpp @@ -16,7 +16,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp old mode 100755 new mode 100644 index 96cb00c6a6ab..8c99042667f4 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsgrass.h" diff --git a/src/providers/grass/qgsgrassprovider.cpp b/src/providers/grass/qgsgrassprovider.cpp index 4c2ea38d11b2..b23e8496649d 100644 --- a/src/providers/grass/qgsgrassprovider.cpp +++ b/src/providers/grass/qgsgrassprovider.cpp @@ -13,7 +13,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/providers/grass/qgsgrassrasterprovider.cpp b/src/providers/grass/qgsgrassrasterprovider.cpp index af932d2c955a..ea9321342df3 100644 --- a/src/providers/grass/qgsgrassrasterprovider.cpp +++ b/src/providers/grass/qgsgrassrasterprovider.cpp @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id: qgsgrassrasterprovider.cpp 11522 2009-08-28 14:49:22Z jef $ */ #include "qgslogger.h" #include "qgsgrass.h" diff --git a/src/providers/grass/qgsgrassrasterprovider.h b/src/providers/grass/qgsgrassrasterprovider.h index a19ed06f8a2d..31f5f0034585 100644 --- a/src/providers/grass/qgsgrassrasterprovider.h +++ b/src/providers/grass/qgsgrassrasterprovider.h @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id: qgsgrassrasterprovider.h 12528 2009-12-20 12:29:07Z jef $ */ #ifndef QGSGRASSRASTERPROVIDER_H #define QGSGRASSRASTERPROVIDER_H diff --git a/src/providers/ogr/qgsogrprovider.cpp b/src/providers/ogr/qgsogrprovider.cpp index 591c85425c8b..6170918e2049 100644 --- a/src/providers/ogr/qgsogrprovider.cpp +++ b/src/providers/ogr/qgsogrprovider.cpp @@ -14,7 +14,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsogrprovider.h" #include "qgslogger.h" diff --git a/src/providers/ogr/qgsogrprovider.h b/src/providers/ogr/qgsogrprovider.h index bf38cb701f21..92000374f82b 100644 --- a/src/providers/ogr/qgsogrprovider.h +++ b/src/providers/ogr/qgsogrprovider.h @@ -14,7 +14,6 @@ email : sherman at mrcc.com * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgsdataitem.h" #include "qgsrectangle.h" diff --git a/src/providers/postgres/create_test_tables b/src/providers/postgres/create_test_tables index 27554da1bf95..e2a3d86b0f6d 100644 --- a/src/providers/postgres/create_test_tables +++ b/src/providers/postgres/create_test_tables @@ -2,8 +2,6 @@ -- PostgreSQL database that test the ability of Qgis to load said -- tables. --- $Id:$ - -- These are all in the public schema (need to do a set for a non-public shema) -- normal table diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index a85b2937662b..23deb736fa3c 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -15,7 +15,6 @@ * * ***************************************************************************/ -/* $Id$ */ // for htonl #ifdef WIN32 diff --git a/src/providers/postgres/qgspostgresprovider.h b/src/providers/postgres/qgspostgresprovider.h index e04c4e39f2eb..41ff5ebd8f29 100644 --- a/src/providers/postgres/qgspostgresprovider.h +++ b/src/providers/postgres/qgspostgresprovider.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPOSTGRESPROVIDER_H #define QGSPOSTGRESPROVIDER_H diff --git a/src/providers/sqlanywhere/load_alaska_shapes.sql b/src/providers/sqlanywhere/load_alaska_shapes.sql index 96ce03491a25..a4e7ecb0738c 100644 --- a/src/providers/sqlanywhere/load_alaska_shapes.sql +++ b/src/providers/sqlanywhere/load_alaska_shapes.sql @@ -13,7 +13,6 @@ without limitation, on the condition that you retain the foregoing copyright notice and disclaimer as to the original iAnywhere code. ***************************************************************************/ -/* $Id$ */ -- BEGIN CONFIGURATION VARIABLES CREATE OR REPLACE VARIABLE @QGIS_SAMPLES_DIR TEXT; diff --git a/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp b/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp index f690571256a6..3148d89000a0 100644 --- a/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp +++ b/src/providers/sqlanywhere/qgssqlanywhereprovider.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/providers/sqlanywhere/qgssqlanywhereprovider.h b/src/providers/sqlanywhere/qgssqlanywhereprovider.h index 4b188a01219b..bb5b8860c65b 100644 --- a/src/providers/sqlanywhere/qgssqlanywhereprovider.h +++ b/src/providers/sqlanywhere/qgssqlanywhereprovider.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSSQLANYWHEREPROVIDER_H #define QGSSQLANYWHEREPROVIDER_H diff --git a/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.cpp b/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.cpp index 26b408fa8a67..45ef973b0abe 100644 --- a/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.cpp +++ b/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include diff --git a/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.h b/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.h index d9b8bda0e184..681ff1bce8d6 100644 --- a/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.h +++ b/src/providers/sqlanywhere/sqlanyconnection/sqlanyconnection.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SQLANYCONNECTION_H #define SQLANYCONNECTION_H diff --git a/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.cpp b/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.cpp index eba89889dd82..de17e316fbfd 100644 --- a/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.cpp +++ b/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.cpp @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include diff --git a/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.h b/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.h index 289cfd79f752..e3b7eabe3d51 100644 --- a/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.h +++ b/src/providers/sqlanywhere/sqlanyconnection/sqlanystatement.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef SQLANYSTATEMENT_H #define SQLANYSTATEMENT_H diff --git a/src/providers/wms/qgswmsconnection.cpp b/src/providers/wms/qgswmsconnection.cpp index 464451c6783a..08efa91a220a 100644 --- a/src/providers/wms/qgswmsconnection.cpp +++ b/src/providers/wms/qgswmsconnection.cpp @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "../providers/wms/qgswmsprovider.h" #include "qgis.h" // GEO_EPSG_CRS_ID diff --git a/src/providers/wms/qgswmsconnection.h b/src/providers/wms/qgswmsconnection.h index 096f1207670a..1533ef0921c9 100644 --- a/src/providers/wms/qgswmsconnection.h +++ b/src/providers/wms/qgswmsconnection.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSWMSCONNECTION_H #define QGSWMSCONNECTION_H diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index d2898ef949d7..c55533918c6c 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -19,7 +19,6 @@ * * ***************************************************************************/ -/* $Id$ */ #include #define WMS_THRESHOLD 200 // time to wait for an answer without emitting dataChanged() diff --git a/src/providers/wms/qgswmsprovider.h b/src/providers/wms/qgswmsprovider.h index fd1073f16047..40ee597e4a65 100644 --- a/src/providers/wms/qgswmsprovider.h +++ b/src/providers/wms/qgswmsprovider.h @@ -16,7 +16,6 @@ * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSWMSPROVIDER_H #define QGSWMSPROVIDER_H diff --git a/src/providers/wms/qgswmssourceselect.cpp b/src/providers/wms/qgswmssourceselect.cpp index 19ef5b4bf913..c0fca7d39d48 100644 --- a/src/providers/wms/qgswmssourceselect.cpp +++ b/src/providers/wms/qgswmssourceselect.cpp @@ -17,7 +17,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "../providers/wms/qgswmsprovider.h" #include "qgis.h" // GEO_EPSG_CRS_ID diff --git a/src/providers/wms/qgswmssourceselect.h b/src/providers/wms/qgswmssourceselect.h index a41beecd63d8..b3766f1c2543 100644 --- a/src/providers/wms/qgswmssourceselect.h +++ b/src/providers/wms/qgswmssourceselect.h @@ -14,7 +14,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSWMSSOURCESELECT_H #define QGSWMSSOURCESELECT_H diff --git a/src/python/qgispython.cpp b/src/python/qgispython.cpp index 06e05b45ead5..a822634090e8 100644 --- a/src/python/qgispython.cpp +++ b/src/python/qgispython.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include "qgis.h" #include "qgspythonutilsimpl.h" diff --git a/src/python/qgspythonutils.h b/src/python/qgspythonutils.h index 7174130ed8b4..c5bea2b55abd 100644 --- a/src/python/qgspythonutils.h +++ b/src/python/qgspythonutils.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPYTHONUTILS_H #define QGSPYTHONUTILS_H diff --git a/src/python/qgspythonutilsimpl.cpp b/src/python/qgspythonutilsimpl.cpp index b094cbd06d0e..646e6753356d 100644 --- a/src/python/qgspythonutilsimpl.cpp +++ b/src/python/qgspythonutilsimpl.cpp @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ // python should be first include // otherwise issues some warnings diff --git a/src/python/qgspythonutilsimpl.h b/src/python/qgspythonutilsimpl.h index e0ae007fee40..cee957c5695d 100644 --- a/src/python/qgspythonutilsimpl.h +++ b/src/python/qgspythonutilsimpl.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #ifndef QGSPYTHONUTILSIMPL_H diff --git a/tests/src/core/qgsrenderchecker.h b/tests/src/core/qgsrenderchecker.h index 9ef6d91cf24f..d67ce05aba6e 100644 --- a/tests/src/core/qgsrenderchecker.h +++ b/tests/src/core/qgsrenderchecker.h @@ -12,7 +12,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id: qgsfield.h 6833 2007-03-24 22:40:10Z wonder $ */ #ifndef QGSRENDERCHECKER_H #define QGSRENDERCHECKER_H diff --git a/tools/qgis_config/qgis_config.cpp b/tools/qgis_config/qgis_config.cpp index 015ed8f78b9e..0c51e36e3970 100644 --- a/tools/qgis_config/qgis_config.cpp +++ b/tools/qgis_config/qgis_config.cpp @@ -18,7 +18,6 @@ * (at your option) any later version. * * * ***************************************************************************/ -/* $Id$ */ #include #include From 141987864a165dd8640a382fdb1477d7cbc013cd Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 26 May 2011 23:10:57 +0200 Subject: [PATCH 06/62] fix grammar warning --- src/core/qgssearchstringparser.yy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/qgssearchstringparser.yy b/src/core/qgssearchstringparser.yy index fe7316ce3171..cbcb0f6c95f1 100644 --- a/src/core/qgssearchstringparser.yy +++ b/src/core/qgssearchstringparser.yy @@ -112,7 +112,7 @@ void addToTmpNodes(QgsSearchTreeNode* node); %left IN %left '+' '-' -%left '*' '/' +%left '*' '/' '%' %left '^' %left UMINUS // fictitious symbol (for unary minus) From fa147059387d7cd8add4c7c169e00630b71c7ea9 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 26 May 2011 23:56:30 +0200 Subject: [PATCH 07/62] create PDFs from t2t files --- cmake/Txt2Tags.cmake | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/cmake/Txt2Tags.cmake b/cmake/Txt2Tags.cmake index cec4ce38b9ad..dc70d0ac12d9 100644 --- a/cmake/Txt2Tags.cmake +++ b/cmake/Txt2Tags.cmake @@ -21,6 +21,12 @@ MACRO(FIND_TXT2TAGS) MESSAGE(STATUS "txt2tags not found - disabled") ENDIF (NOT TXT2TAGS_EXECUTABLE) ENDIF(NOT TXT2TAGS_EXECUTABLE) + IF (NOT PDFLATEX_EXECUTABLE) + FIND_PROGRAM(PDFLATEX_EXECUTABLE pdflatex) + ENDIF (NOT PDFLATEX_EXECUTABLE) + IF (NOT PDFLATEX_EXECUTABLE) + MESSAGE(STATUS "pdflatex not found - disabled") + ENDIF(NOT PDFLATEX_EXECUTABLE) ENDMACRO(FIND_TXT2TAGS) MACRO(ADD_TXT2TAGS_FILES _sources) @@ -46,14 +52,26 @@ MACRO(ADD_TXT2TAGS_FILES _sources) COMMENT "Building ${_out}.html from ${_in}" ) - ADD_CUSTOM_COMMAND( - OUTPUT ${_out}.tex - COMMAND ${TXT2TAGS_EXECUTABLE} - ARGS -o${_out}.tex -t tex ${_in} - DEPENDS ${_in} - COMMENT "Building ${_out}.tex from ${_in}" - ) - SET(${_sources} ${${_sources}} ${_out} ${_out}.html) + + IF (PDFLATEX_EXECUTABLE) + ADD_CUSTOM_COMMAND( + OUTPUT ${_out}.tex + COMMAND ${TXT2TAGS_EXECUTABLE} + ARGS -o${_out}.tex -t tex ${_in} + DEPENDS ${_in} + COMMENT "Building ${_out}.tex from ${_in}" + ) + + ADD_CUSTOM_COMMAND( + OUTPUT ${_out}.pdf + COMMAND TEXINPUTS=.:${CMAKE_CURRENT_SOURCE_DIR}: ${PDFLATEX_EXECUTABLE} + ARGS -output-directory=${CMAKE_CURRENT_BINARY_DIR} ${_out}.tex + DEPENDS ${_out}.tex + COMMENT "Building ${_out}.pdf from ${_out}.tex" + ) + SET(${_sources} ${${_sources}} ${_out}.pdf) + ENDIF (PDFLATEX_EXECUTABLE) + ENDFOREACH (_current_FILE) ENDMACRO(ADD_TXT2TAGS_FILES) From 92d69e09e78f6c97da12c8bba381eecc28d67986 Mon Sep 17 00:00:00 2001 From: Sergey Yakushevs Date: Fri, 27 May 2011 07:57:11 +0200 Subject: [PATCH 08/62] apply #3849 --- src/plugins/roadgraph/graphbuilder.cpp | 9 ++++-- src/plugins/roadgraph/graphbuilder.h | 9 +++++- .../roadgraph/linevectorlayerdirector.cpp | 31 +++++++++++++++---- src/plugins/roadgraph/roadgraphplugin.cpp | 3 +- src/plugins/roadgraph/shortestpathwidget.cpp | 7 +++-- src/plugins/roadgraph/simplegraphbuilder.cpp | 4 +-- src/plugins/roadgraph/simplegraphbuilder.h | 2 +- 7 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/plugins/roadgraph/graphbuilder.cpp b/src/plugins/roadgraph/graphbuilder.cpp index 46d155e69467..5702e0a92269 100644 --- a/src/plugins/roadgraph/graphbuilder.cpp +++ b/src/plugins/roadgraph/graphbuilder.cpp @@ -18,8 +18,8 @@ // Qgis includes -RgGraphBuilder::RgGraphBuilder( const QgsCoordinateReferenceSystem& crs, double topologyTolerance ) : - mCrs( crs ), mTopologyToleraceFactor( topologyTolerance ) +RgGraphBuilder::RgGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled, double topologyTolerance ) : + mCrs( crs ), mTopologyToleraceFactor( topologyTolerance ), mCoordinateTransformEnabled( ctfEnabled ) { } @@ -38,3 +38,8 @@ double RgGraphBuilder::topologyTolerance() { return mTopologyToleraceFactor; } + +bool RgGraphBuilder::coordinateTransformEnabled() const +{ + return mCoordinateTransformEnabled; +} diff --git a/src/plugins/roadgraph/graphbuilder.h b/src/plugins/roadgraph/graphbuilder.h index 6af1c6a7eb6a..e9430018005a 100644 --- a/src/plugins/roadgraph/graphbuilder.h +++ b/src/plugins/roadgraph/graphbuilder.h @@ -33,7 +33,7 @@ class RgGraphBuilder { public: //! Constructor - RgGraphBuilder( const QgsCoordinateReferenceSystem& crs, double topologyTolerance = 0.0 ); + RgGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool coordinateTransform, double topologyTolerance = 0.0 ); //! Destructor virtual ~RgGraphBuilder(); @@ -48,6 +48,11 @@ class RgGraphBuilder */ double topologyTolerance(); + /** + * coordinate transform Enabled + */ + bool coordinateTransformEnabled() const; + /** * add vertex */ @@ -62,5 +67,7 @@ class RgGraphBuilder QgsCoordinateReferenceSystem mCrs; double mTopologyToleraceFactor; + + bool mCoordinateTransformEnabled; }; #endif //GRAPHBUILDER diff --git a/src/plugins/roadgraph/linevectorlayerdirector.cpp b/src/plugins/roadgraph/linevectorlayerdirector.cpp index 520759280310..3ad2a04637d0 100644 --- a/src/plugins/roadgraph/linevectorlayerdirector.cpp +++ b/src/plugins/roadgraph/linevectorlayerdirector.cpp @@ -72,11 +72,23 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto int featureCount = ( int ) vl->featureCount() * 2; int step = 0; - QgsCoordinateTransform ct( vl->crs(), builder->destinationCrs() ); - + QgsCoordinateTransform ct; QgsDistanceArea da; - da.setSourceCrs( builder->destinationCrs().srsid() ); - da.setProjectionsEnabled( true ); + ct.setSourceCrs( vl->crs() ); + + if ( builder->coordinateTransformEnabled() ) + { + ct.setDestCRS( builder->destinationCrs() ); + da.setProjectionsEnabled( true ); + // + //da.setSourceCrs( builder->destinationCrs().srsid() ); + // + } + else + { + ct.setDestCRS( vl->crs() ); + da.setProjectionsEnabled( false ); + } tiedPoint = QVector< QgsPoint >( additionalPoints.size(), QgsPoint( 0.0, 0.0 ) ); TiePointInfo tmpInfo; @@ -104,8 +116,15 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto for ( i = 0; i != additionalPoints.size(); ++i ) { TiePointInfo info; - info.mLength = additionalPoints[ i ].sqrDistToSegment( pt1.x(), pt1.y(), pt2.x(), pt2.y(), info.mTiedPoint ); - + if ( pt1 == pt2 ) + { + info.mLength = additionalPoints[ i ].sqrDist( pt1 ); + info.mTiedPoint = pt1; + } + else + { + info.mLength = additionalPoints[ i ].sqrDistToSegment( pt1.x(), pt1.y(), pt2.x(), pt2.y(), info.mTiedPoint ); + } if ( pointLengthMap[ i ].mLength > info.mLength ) { info.mTiedPoint = builder->addVertex( info.mTiedPoint ); diff --git a/src/plugins/roadgraph/roadgraphplugin.cpp b/src/plugins/roadgraph/roadgraphplugin.cpp index 2b7755e0a275..45c8ddc87881 100644 --- a/src/plugins/roadgraph/roadgraphplugin.cpp +++ b/src/plugins/roadgraph/roadgraphplugin.cpp @@ -304,7 +304,8 @@ void RoadGraphPlugin::render( QPainter *painter ) if ( graphDirector == NULL ) return; - RgSimpleGraphBuilder builder( mQGisIface->mapCanvas()->mapRenderer()->destinationCrs() ); + RgSimpleGraphBuilder builder( mQGisIface->mapCanvas()->mapRenderer()->destinationCrs(), + mQGisIface->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() ); QVector< QgsPoint > null; graphDirector->makeGraph( &builder , null, null ); AdjacencyMatrix m = builder.adjacencyMatrix(); diff --git a/src/plugins/roadgraph/shortestpathwidget.cpp b/src/plugins/roadgraph/shortestpathwidget.cpp index fe9ea38755b9..d25b9a596627 100644 --- a/src/plugins/roadgraph/shortestpathwidget.cpp +++ b/src/plugins/roadgraph/shortestpathwidget.cpp @@ -236,8 +236,11 @@ bool RgShortestPathWidget::getPath( AdjacencyMatrix& matrix, QgsPoint& p1, QgsPo return false; } - RgSimpleGraphBuilder builder( mPlugin->iface()->mapCanvas()->mapRenderer()->destinationCrs(), - mPlugin->topologyToleranceFactor() ); + RgSimpleGraphBuilder builder( + mPlugin->iface()->mapCanvas()->mapRenderer()->destinationCrs(), + mPlugin->iface()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled(), + mPlugin->topologyToleranceFactor() ); + { const RgGraphDirector *director = mPlugin->director(); if ( director == NULL ) diff --git a/src/plugins/roadgraph/simplegraphbuilder.cpp b/src/plugins/roadgraph/simplegraphbuilder.cpp index 050c941875f3..584ff1104fe7 100644 --- a/src/plugins/roadgraph/simplegraphbuilder.cpp +++ b/src/plugins/roadgraph/simplegraphbuilder.cpp @@ -21,8 +21,8 @@ #include #include -RgSimpleGraphBuilder::RgSimpleGraphBuilder( const QgsCoordinateReferenceSystem& crs, double topologyTolerance ) : - RgGraphBuilder( crs, topologyTolerance ) +RgSimpleGraphBuilder::RgSimpleGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled, double topologyTolerance ) : + RgGraphBuilder( crs, ctfEnabled, topologyTolerance ) { } diff --git a/src/plugins/roadgraph/simplegraphbuilder.h b/src/plugins/roadgraph/simplegraphbuilder.h index bab968dd3b58..a2ca2bdc9865 100644 --- a/src/plugins/roadgraph/simplegraphbuilder.h +++ b/src/plugins/roadgraph/simplegraphbuilder.h @@ -38,7 +38,7 @@ class RgSimpleGraphBuilder : public RgGraphBuilder /** * default constructor */ - RgSimpleGraphBuilder( const QgsCoordinateReferenceSystem& crs, double topologyTolerance = 0.0 ); + RgSimpleGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled, double topologyTolerance = 0.0 ); /** * MANDATORY BUILDER PROPERTY DECLARATION From bf4d8874d1ca5663aacc33df22b7443ed875878f Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Fri, 27 May 2011 19:29:20 +0200 Subject: [PATCH 09/62] implement #3850 --- python/plugins/fTools/tools/doValidate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/plugins/fTools/tools/doValidate.py b/python/plugins/fTools/tools/doValidate.py index 69a2764ce4f6..e68cc47333fb 100644 --- a/python/plugins/fTools/tools/doValidate.py +++ b/python/plugins/fTools/tools/doValidate.py @@ -71,6 +71,7 @@ def __init__(self, iface): self.iface = iface self.setupUi(self) self.setModal(False) # we want to be able to interact with the featuresmc.extent().width() + self.setWindowFlags( Qt.SubWindow ) # adjust user interface self.setWindowTitle( self.tr( "Check geometry validity" ) ) self.cmbField.setVisible( False ) From b74a515e94838c4c1e17a8c8caa3b2bbfcb7f9f6 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Fri, 27 May 2011 22:45:08 +0200 Subject: [PATCH 10/62] cmake: replace deprecated SUBDIRS with ADD_SUBDIRECTORY --- CMakeLists.txt | 12 ++++-- images/CMakeLists.txt | 30 ++++++++------- images/themes/gis/CMakeLists.txt | 2 +- images/themes/gis/plugins/CMakeLists.txt | 2 +- python/CMakeLists.txt | 10 ++--- python/plugins/CMakeLists.txt | 6 ++- python/plugins/GdalTools/CMakeLists.txt | 4 +- python/plugins/fTools/CMakeLists.txt | 3 +- python/plugins/fTools/icons/CMakeLists.txt | 3 +- resources/CMakeLists.txt | 3 +- src/CMakeLists.txt | 19 +++++++--- src/mac/CMakeLists.txt | 3 +- src/mac/Contents/CMakeLists.txt | 2 +- src/plugins/CMakeLists.txt | 43 +++++++++++----------- src/plugins/grass/CMakeLists.txt | 5 ++- src/plugins/grass/themes/CMakeLists.txt | 4 +- src/providers/CMakeLists.txt | 18 ++++++--- src/providers/sqlanywhere/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 6 +-- tests/src/CMakeLists.txt | 6 +-- 20 files changed, 107 insertions(+), 76 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a73038a5a05..f1796d2a1aaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -467,10 +467,14 @@ ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h) ############################################################# # process subdirs -SUBDIRS(src doc images resources i18n) +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(doc) +ADD_SUBDIRECTORY(images) +ADD_SUBDIRECTORY(resources) +ADD_SUBDIRECTORY(i18n) IF (WITH_BINDINGS) - SUBDIRS (python) + ADD_SUBDIRECTORY(python) ENDIF (WITH_BINDINGS) IF (ENABLE_TESTS) @@ -478,12 +482,12 @@ IF (ENABLE_TESTS) #so that unit tests can use TEST_DATA_DIR to locate #the test data. See CMakeLists in test dirs for more info SET (TEST_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/testdata") - SUBDIRS(tests) + ADD_SUBDIRECTORY(tests) ENDIF (ENABLE_TESTS) IF (APPLE) # must be last for install, so install_name_tool can do its work - SUBDIRS (mac) + ADD_SUBDIRECTORY(mac) ENDIF (APPLE) # manual page - makes sense only on unix systems diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt index 5af65ed31357..4166ba26463f 100644 --- a/images/CMakeLists.txt +++ b/images/CMakeLists.txt @@ -1,13 +1,17 @@ -######################################################## -# Files - -SET (IMAGE_RCCS images.qrc) - -######################################################## -# Build - -QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS}) - -######################################################## -# Continue on to subdirs -SUBDIRS (north_arrows splash icons themes svg) +######################################################## +# Files + +SET (IMAGE_RCCS images.qrc) + +######################################################## +# Build + +QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS}) + +######################################################## +# Continue on to subdirs +ADD_SUBDIRECTORY(north_arrows) +ADD_SUBDIRECTORY(splash) +ADD_SUBDIRECTORY(icons) +ADD_SUBDIRECTORY(themes) +ADD_SUBDIRECTORY(svg) diff --git a/images/themes/gis/CMakeLists.txt b/images/themes/gis/CMakeLists.txt index e5ff634122e2..8ce49e85be9b 100644 --- a/images/themes/gis/CMakeLists.txt +++ b/images/themes/gis/CMakeLists.txt @@ -1,4 +1,4 @@ -SUBDIRS (plugins) +ADD_SUBDIRECTORY(plugins) FILE (GLOB IMAGES *.png) diff --git a/images/themes/gis/plugins/CMakeLists.txt b/images/themes/gis/plugins/CMakeLists.txt index b517f11879e9..2a4949b3836f 100644 --- a/images/themes/gis/plugins/CMakeLists.txt +++ b/images/themes/gis/plugins/CMakeLists.txt @@ -1,4 +1,4 @@ -SUBDIRS (coordinate_capture) +ADD_SUBDIRECTORY(coordinate_capture) FILE (GLOB IMAGES *.png) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 6c1f50bb96b5..25a5c0ffb347 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,7 +1,7 @@ -SUBDIRS(plugins) +ADD_SUBDIRECTORY(plugins) IF (WITH_INTERNAL_SPATIALITE) - SUBDIRS(pyspatialite) + ADD_SUBDIRECTORY(pyspatialite) INCLUDE_DIRECTORIES( ../src/core/spatialite/headers @@ -51,7 +51,7 @@ ENDIF(NOT PYQT4_VERSION_NUM LESS 264194) # core module FILE(GLOB sip_files_core core/*.sip) -set(SIP_EXTRA_FILES_DEPEND ${sip_files_core}) +SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core}) ADD_SIP_PYTHON_MODULE(qgis.core core/core.sip qgis_core) # additional gui includes @@ -65,7 +65,7 @@ INCLUDE_DIRECTORIES( # gui module FILE(GLOB sip_files_gui gui/*.sip) -set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui}) +SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui}) ADD_SIP_PYTHON_MODULE(qgis.gui gui/gui.sip qgis_core qgis_gui) # additional analysis includes @@ -76,7 +76,7 @@ INCLUDE_DIRECTORIES( # analysis module FILE(GLOB sip_files_analysis analysis/*.sip) -set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis}) +SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis}) ADD_SIP_PYTHON_MODULE(qgis.analysis analysis/analysis.sip qgis_core qgis_analysis) diff --git a/python/plugins/CMakeLists.txt b/python/plugins/CMakeLists.txt index 5d1cf06fdd90..1e1c533484f4 100644 --- a/python/plugins/CMakeLists.txt +++ b/python/plugins/CMakeLists.txt @@ -1 +1,5 @@ -SUBDIRS(plugin_installer mapserver_export fTools GdalTools osm) +ADD_SUBDIRECTORY(plugin_installer) +ADD_SUBDIRECTORY(mapserver_export) +ADD_SUBDIRECTORY(fTools) +ADD_SUBDIRECTORY(GdalTools) +ADD_SUBDIRECTORY(osm) diff --git a/python/plugins/GdalTools/CMakeLists.txt b/python/plugins/GdalTools/CMakeLists.txt index d8a56176c8a3..628a7ee849f9 100644 --- a/python/plugins/GdalTools/CMakeLists.txt +++ b/python/plugins/GdalTools/CMakeLists.txt @@ -10,5 +10,5 @@ SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES}) INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools) -SUBDIRS(tools icons) - +ADD_SUBDIRECTORY(tools) +ADD_SUBDIRECTORY(icons) diff --git a/python/plugins/fTools/CMakeLists.txt b/python/plugins/fTools/CMakeLists.txt index 5c0e809ff25d..8d66b13da08e 100644 --- a/python/plugins/fTools/CMakeLists.txt +++ b/python/plugins/fTools/CMakeLists.txt @@ -10,5 +10,6 @@ SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES}) INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools) -SUBDIRS(tools icons) +ADD_SUBDIRECTORY(tools) +ADD_SUBDIRECTORY(icons) diff --git a/python/plugins/fTools/icons/CMakeLists.txt b/python/plugins/fTools/icons/CMakeLists.txt index 16d18d4d88a3..326299ea517b 100644 --- a/python/plugins/fTools/icons/CMakeLists.txt +++ b/python/plugins/fTools/icons/CMakeLists.txt @@ -7,4 +7,5 @@ menu_icons.svg ) INSTALL(FILES ${VECTOR_GRAPHICS_FILES} logo_small.png DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/icons) -SUBDIRS(default gis) +ADD_SUBDIRECTORY(default) +ADD_SUBDIRECTORY(gis) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 277c2d4ccadc..9d9035921908 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -1,5 +1,4 @@ - INSTALL(FILES srs.db qgis.db qgis_help.db symbology-ng-style.xml spatialite.db customization.xml DESTINATION ${QGIS_DATA_DIR}/resources) -SUBDIRS(context_help) +ADD_SUBDIRECTORY(context_help) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 21ee9c530f8b..f2b53d81c454 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,18 +1,27 @@ -SUBDIRS(core analysis ui gui app providers plugins helpviewer crssync browser) +ADD_SUBDIRECTORY(core) +ADD_SUBDIRECTORY(analysis) +ADD_SUBDIRECTORY(ui) +ADD_SUBDIRECTORY(gui) +ADD_SUBDIRECTORY(app) +ADD_SUBDIRECTORY(providers) +ADD_SUBDIRECTORY(plugins) +ADD_SUBDIRECTORY(helpviewer) +ADD_SUBDIRECTORY(crssync) +ADD_SUBDIRECTORY(browser) IF (WITH_BINDINGS) - SUBDIRS(python) + ADD_SUBDIRECTORY(python) ENDIF (WITH_BINDINGS) IF (WITH_MAPSERVER) - SUBDIRS(mapserver) + ADD_SUBDIRECTORY(mapserver) ENDIF (WITH_MAPSERVER) IF (WITH_ASTYLE) - SUBDIRS(astyle) + ADD_SUBDIRECTORY(astyle) ENDIF(WITH_ASTYLE) IF (APPLE) - SUBDIRS(mac) + ADD_SUBDIRECTORY(mac) ENDIF(APPLE) diff --git a/src/mac/CMakeLists.txt b/src/mac/CMakeLists.txt index 0fab7ca2ee12..f487129ce8ce 100644 --- a/src/mac/CMakeLists.txt +++ b/src/mac/CMakeLists.txt @@ -1,2 +1 @@ - -SUBDIRS(Contents) +ADD_SUBDIRECTORY(Contents) diff --git a/src/mac/Contents/CMakeLists.txt b/src/mac/Contents/CMakeLists.txt index e11bb2908904..0e675a5b01d3 100644 --- a/src/mac/Contents/CMakeLists.txt +++ b/src/mac/Contents/CMakeLists.txt @@ -21,7 +21,7 @@ ADD_CUSTOM_TARGET(Info.plist ALL ############################################################# # process subdirs -SUBDIRS(Resources) +ADD_SUBDIRECTORY(Resources) ############################################################# # install diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 5e4eb437367d..1acf96bc6668 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -1,39 +1,38 @@ -SUBDIRS (copyright_label - delimited_text - diagram_overlay - interpolation - north_arrow - scale_bar - oracle_raster - raster_terrain_analysis - coordinate_capture - dxf2shp_converter - evis - point_displacement_renderer - spatialquery - sqlanywhere - roadgraph - ) +ADD_SUBDIRECTORY(copyright_label) +ADD_SUBDIRECTORY(delimited_text) +ADD_SUBDIRECTORY(diagram_overlay) +ADD_SUBDIRECTORY(interpolation) +ADD_SUBDIRECTORY(north_arrow) +ADD_SUBDIRECTORY(scale_bar) +ADD_SUBDIRECTORY(oracle_raster) +ADD_SUBDIRECTORY(raster_terrain_analysis) +ADD_SUBDIRECTORY(coordinate_capture) +ADD_SUBDIRECTORY(dxf2shp_converter) +ADD_SUBDIRECTORY(evis) +ADD_SUBDIRECTORY(point_displacement_renderer) +ADD_SUBDIRECTORY(spatialquery) +ADD_SUBDIRECTORY(sqlanywhere) +ADD_SUBDIRECTORY(roadgraph) IF (WITH_SPATIALITE) - SUBDIRS( offline_editing ) + ADD_SUBDIRECTORY(offline_editing) ENDIF (WITH_SPATIALITE) IF (POSTGRES_FOUND) - SUBDIRS (spit) + ADD_SUBDIRECTORY(spit) ENDIF (POSTGRES_FOUND) IF (EXPAT_FOUND) - SUBDIRS (gps_importer wfs) + ADD_SUBDIRECTORY(gps_importer) + ADD_SUBDIRECTORY(wfs) ENDIF (EXPAT_FOUND) IF (GSL_FOUND) - SUBDIRS (georeferencer) + ADD_SUBDIRECTORY(georeferencer) ENDIF (GSL_FOUND) IF (GRASS_FOUND) - SUBDIRS (grass) + ADD_SUBDIRECTORY(grass) ENDIF (GRASS_FOUND) INSTALL(FILES qgisplugin.h qgsrendererplugin.h DESTINATION ${QGIS_INCLUDE_DIR}) - diff --git a/src/plugins/grass/CMakeLists.txt b/src/plugins/grass/CMakeLists.txt index f5d654ad96c9..5d8bb1e7b6ad 100644 --- a/src/plugins/grass/CMakeLists.txt +++ b/src/plugins/grass/CMakeLists.txt @@ -11,7 +11,10 @@ IF (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR}") MESSAGE (SEND_ERROR "Your GRASS version is not supported (${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR} is not a Directory).") ENDIF (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${GRASS_MODULES_DIR}") -SUBDIRS(modules-common ${GRASS_MODULES_DIR} scripts themes) +ADD_SUBDIRECTORY(modules-common) +ADD_SUBDIRECTORY(${GRASS_MODULES_DIR}) +ADD_SUBDIRECTORY(scripts) +ADD_SUBDIRECTORY(themes) ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\") ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY}) diff --git a/src/plugins/grass/themes/CMakeLists.txt b/src/plugins/grass/themes/CMakeLists.txt index e9bdb1adf635..f5e4971651bd 100644 --- a/src/plugins/grass/themes/CMakeLists.txt +++ b/src/plugins/grass/themes/CMakeLists.txt @@ -1 +1,3 @@ -SUBDIRS(default classic gis) +ADD_SUBDIRECTORY(default) +ADD_SUBDIRECTORY(classic) +ADD_SUBDIRECTORY(gis) diff --git a/src/providers/CMakeLists.txt b/src/providers/CMakeLists.txt index 702df123638a..eae6ee1a5749 100644 --- a/src/providers/CMakeLists.txt +++ b/src/providers/CMakeLists.txt @@ -1,18 +1,24 @@ - -SUBDIRS (memory ogr wms delimitedtext osm sqlanywhere gdal) +ADD_SUBDIRECTORY(memory) +ADD_SUBDIRECTORY(ogr) +ADD_SUBDIRECTORY(wms) +ADD_SUBDIRECTORY(delimitedtext) +ADD_SUBDIRECTORY(osm) +ADD_SUBDIRECTORY(sqlanywhere) +ADD_SUBDIRECTORY(gdal) IF (POSTGRES_FOUND) - SUBDIRS (postgres) + ADD_SUBDIRECTORY(postgres) ENDIF (POSTGRES_FOUND) IF (SPATIALITE_FOUND OR WITH_INTERNAL_SPATIALITE) - SUBDIRS (spatialite) + ADD_SUBDIRECTORY(spatialite) ENDIF (SPATIALITE_FOUND OR WITH_INTERNAL_SPATIALITE) IF (EXPAT_FOUND) - SUBDIRS (gpx wfs) + ADD_SUBDIRECTORY(gpx) + ADD_SUBDIRECTORY(wfs) ENDIF (EXPAT_FOUND) IF (GRASS_FOUND) - SUBDIRS (grass) + ADD_SUBDIRECTORY(grass) ENDIF (GRASS_FOUND) diff --git a/src/providers/sqlanywhere/CMakeLists.txt b/src/providers/sqlanywhere/CMakeLists.txt index 9faea8f29a3f..c67417349534 100644 --- a/src/providers/sqlanywhere/CMakeLists.txt +++ b/src/providers/sqlanywhere/CMakeLists.txt @@ -1,7 +1,7 @@ ######################################################## # Files -SUBDIRS( sqlanyconnection ) +ADD_SUBDIRECTORY(sqlanyconnection) SET (SA_SRCS qgssqlanywhereprovider.cpp) SET (SA_MOC_HDRS qgssqlanywhereprovider.h) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fb42fd987bcd..5398f4d37fa4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,3 @@ -IF (ENABLE_TESTS) - SUBDIRS(src) -ENDIF (ENABLE_TESTS) +IF (ENABLE_TESTS) + ADD_SUBDIRECTORY(src) +ENDIF (ENABLE_TESTS) diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt index da13c3aee7f5..7d99bec67feb 100644 --- a/tests/src/CMakeLists.txt +++ b/tests/src/CMakeLists.txt @@ -1,5 +1,5 @@ IF (ENABLE_TESTS) - SUBDIRS(core) - SUBDIRS(gui) - SUBDIRS(analysis) + ADD_SUBDIRECTORY(core) + ADD_SUBDIRECTORY(gui) + ADD_SUBDIRECTORY(analysis) ENDIF (ENABLE_TESTS) From 32801ed25fcb9fce98b3c3fe38499953dba28f2f Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Fri, 27 May 2011 22:56:42 +0200 Subject: [PATCH 11/62] make pdf generation for txt2tags doc optional --- CMakeLists.txt | 3 --- cmake/Txt2Tags.cmake | 57 +++++++++++++++++++++++++------------------- doc/CMakeLists.txt | 9 +++++++ 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1796d2a1aaf..b064de157e6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,9 +57,6 @@ ENDIF (WITH_GRASS) # mapserver by us disabled default because it needs FastCGI (which is optional dependency) SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should be built") -# include doxygen documentation -SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built") - # build our version of astyle SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)") diff --git a/cmake/Txt2Tags.cmake b/cmake/Txt2Tags.cmake index dc70d0ac12d9..f31f55b86259 100644 --- a/cmake/Txt2Tags.cmake +++ b/cmake/Txt2Tags.cmake @@ -21,12 +21,15 @@ MACRO(FIND_TXT2TAGS) MESSAGE(STATUS "txt2tags not found - disabled") ENDIF (NOT TXT2TAGS_EXECUTABLE) ENDIF(NOT TXT2TAGS_EXECUTABLE) - IF (NOT PDFLATEX_EXECUTABLE) - FIND_PROGRAM(PDFLATEX_EXECUTABLE pdflatex) - ENDIF (NOT PDFLATEX_EXECUTABLE) - IF (NOT PDFLATEX_EXECUTABLE) - MESSAGE(STATUS "pdflatex not found - disabled") - ENDIF(NOT PDFLATEX_EXECUTABLE) + + IF (WITH_TXT2TAGS_PDF) + IF (NOT PDFLATEX_EXECUTABLE) + FIND_PROGRAM(PDFLATEX_EXECUTABLE pdflatex) + ENDIF (NOT PDFLATEX_EXECUTABLE) + IF (NOT PDFLATEX_EXECUTABLE) + MESSAGE(ERROR "pdflatex not found - txt2tags documention pdf cannot be generated") + ENDIF(NOT PDFLATEX_EXECUTABLE) + ENDIF(WITH_TXT2TAGS_PDF) ENDMACRO(FIND_TXT2TAGS) MACRO(ADD_TXT2TAGS_FILES _sources) @@ -53,25 +56,31 @@ MACRO(ADD_TXT2TAGS_FILES _sources) ) SET(${_sources} ${${_sources}} ${_out} ${_out}.html) + ENDFOREACH (_current_FILE) +ENDMACRO(ADD_TXT2TAGS_FILES) - IF (PDFLATEX_EXECUTABLE) - ADD_CUSTOM_COMMAND( - OUTPUT ${_out}.tex - COMMAND ${TXT2TAGS_EXECUTABLE} - ARGS -o${_out}.tex -t tex ${_in} - DEPENDS ${_in} - COMMENT "Building ${_out}.tex from ${_in}" - ) +MACRO(ADD_TXT2TAGS_PDFS _sources) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE) - ADD_CUSTOM_COMMAND( - OUTPUT ${_out}.pdf - COMMAND TEXINPUTS=.:${CMAKE_CURRENT_SOURCE_DIR}: ${PDFLATEX_EXECUTABLE} - ARGS -output-directory=${CMAKE_CURRENT_BINARY_DIR} ${_out}.tex - DEPENDS ${_out}.tex - COMMENT "Building ${_out}.pdf from ${_out}.tex" - ) - SET(${_sources} ${${_sources}} ${_out}.pdf) - ENDIF (PDFLATEX_EXECUTABLE) + SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}) + ADD_CUSTOM_COMMAND( + OUTPUT ${_out}.tex + COMMAND ${TXT2TAGS_EXECUTABLE} + ARGS -o${_out}.tex -t tex ${_in} + DEPENDS ${_in} + COMMENT "Building ${_out}.tex from ${_in}" + ) + + ADD_CUSTOM_COMMAND( + OUTPUT ${_out}.pdf + COMMAND TEXINPUTS=.:${CMAKE_CURRENT_SOURCE_DIR}: ${PDFLATEX_EXECUTABLE} + ARGS -output-directory=${CMAKE_CURRENT_BINARY_DIR} ${_out}.tex + DEPENDS ${_out}.tex + COMMENT "Building ${_out}.pdf from ${_out}.tex" + ) + SET(${_sources} ${${_sources}} ${_out}.pdf) ENDFOREACH (_current_FILE) -ENDMACRO(ADD_TXT2TAGS_FILES) +ENDMACRO(ADD_TXT2TAGS_PDFS) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index b7732b745f02..04cfe815775e 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,8 +1,17 @@ +# include doxygen documentation +SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built") + +# include doxygen documentation +SET (WITH_TXT2TAGS_PDF FALSE CACHE BOOL "Determines whether PDF should be generate for the txt2tags documentation") + INCLUDE(Txt2Tags) FIND_TXT2TAGS() IF(TXT2TAGS_EXECUTABLE) ADD_TXT2TAGS_FILES(QGIS_DOC_FILES INSTALL.t2t CODING.t2t) + IF(WITH_TXT2TAGS_PDF) + ADD_TXT2TAGS_PDFS(QGIS_DOC_FILES INSTALL.t2t CODING.t2t) + ENDIF(WITH_TXT2TAGS_PDF) ADD_CUSTOM_TARGET (t2tdoc ALL DEPENDS ${QGIS_DOC_FILES}) ELSE(TXT2TAGS_EXECUTABLE) SET(QGIS_DOC_FILES From 91b4a0d26ec6b062233c3330e4ab036baf63b7f4 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 28 May 2011 09:06:07 +0200 Subject: [PATCH 12/62] osgeo4w: fix postinstall --- ms-windows/osgeo4w/postinstall.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/ms-windows/osgeo4w/postinstall.bat b/ms-windows/osgeo4w/postinstall.bat index 81ebd9581635..d3a5c110b6d2 100755 --- a/ms-windows/osgeo4w/postinstall.bat +++ b/ms-windows/osgeo4w/postinstall.bat @@ -1,4 +1,5 @@ textreplace -std -t bin\@package@.bat +textreplace -std -t bin\@package@-browser.bat mkdir "%OSGEO4W_STARTMENU%" xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" From 85e119c44b964eb4c7a5212e98491e00740b618a Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 28 May 2011 11:50:03 +0200 Subject: [PATCH 13/62] windows: browser and helpviewer are gui applications --- CMakeLists.txt | 29 ++++--------------- src/app/CMakeLists.txt | 11 +------- src/browser/CMakeLists.txt | 52 ++++++++++++++++++----------------- src/browser/main.cpp | 1 - src/helpviewer/CMakeLists.txt | 39 ++++++++++++++------------ 5 files changed, 55 insertions(+), 77 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b064de157e6f..93d9db6d9967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,15 +15,6 @@ ENDIF (APPLE) MATH(EXPR QGIS_VERSION_INT "${CPACK_PACKAGE_VERSION_MAJOR}*10000+${CPACK_PACKAGE_VERSION_MINOR}*100+${CPACK_PACKAGE_VERSION_PATCH}") MESSAGE(STATUS "Quantum GIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSION_INT})") -# TODO: -# - install includes for libs -# - nice output when configured -# - rename *.ui files to have the same filename as their implementation -# e.g. instead of blahblahbase.ui use blahblah.ui -# because it's more common in Qt4 -# Note on last point above by Tim Sutton - I prefer to have the base suffix -# as it indicates the ui generated class will be a base class for the widget. - ############################################################# # CMake settings @@ -37,16 +28,10 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) # in generated makefiles use relative paths so the project dir is moveable # Note commented out since it cause problems but it would be nice to resolve these and enable -# -# issue is caused by INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) near the end of this file generating incorrect path +# +# issue is caused by INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) near the end of this file generating incorrect path #SET (CMAKE_USE_RELATIVE_PATHS ON) -# it's possible to set PLUGINS_ALSO_BINARIES to TRUE -# then some plugins that can run as standalone apps will be built -# also as standalone apps -SET (PLUGINS_ALSO_BINARIES FALSE) - - # try to configure and build GRASS plugin by default SET (WITH_GRASS TRUE CACHE BOOL "Determines whether GRASS plugin should be built") IF (WITH_GRASS) @@ -253,23 +238,21 @@ IF (WIN32) SET (DEFAULT_DATA_SUBDIR .) SET (DEFAULT_PLUGIN_SUBDIR plugins) SET (DEFAULT_INCLUDE_SUBDIR include) - + IF (MSVC) SET (DEFAULT_BIN_SUBDIR bin) SET (DEFAULT_CGIBIN_SUBDIR bin) # put all the build products into a single directory # under build (doesnt affect install target) to make for # easier debugging. - #tell msvc compiler to use main instead of winmain as the - #application entry point - #SET(QT_USE_QTMAIN TRUE) + # Turn on defines for non standard maths stuff ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # Turn off deprecation warnings ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS) - + IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) MESSAGE (STATUS "Generating browse files") ADD_DEFINITIONS( /FR ) @@ -337,7 +320,7 @@ ENDIF (WIN32) #assume we have escaped compiler directives #eventually we want to change this to new -#since we don't need to jump through so many +#since we don't need to jump through so many #hoops to escape compiler directives then IF(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 60dba08dae55..8fc2d570f277 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -379,12 +379,7 @@ ENDIF (POSTGRES_FOUND) ############# IF (WIN32) - # 'WIN32' removes console, which is Bad when debugging - IF (CMAKE_BUILD_TYPE MATCHES Debug) - ADD_EXECUTABLE(${QGIS_APP_NAME} ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS}) - ELSE (CMAKE_BUILD_TYPE MATCHES Debug) - ADD_EXECUTABLE(${QGIS_APP_NAME} WIN32 ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS}) - ENDIF (CMAKE_BUILD_TYPE MATCHES Debug) + ADD_EXECUTABLE(${QGIS_APP_NAME} WIN32 ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS}) ELSE (WIN32) ADD_EXECUTABLE(${QGIS_APP_NAME} ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS}) ENDIF (WIN32) @@ -409,10 +404,6 @@ IF(NOT WITH_INTERNAL_SPATIALITE) TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} ${SQLITE_LIBRARY}) ENDIF(NOT WITH_INTERNAL_SPATIALITE) -IF (${QTVERSION} STRLESS "4.3.0") - TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} ${QT_QT3SUPPORT_LIBRARY} ) -ENDIF (${QTVERSION} STRLESS "4.3.0") - IF (APPLE) TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} ${APP_SERVICES_LIBRARY} ) ENDIF (APPLE) diff --git a/src/browser/CMakeLists.txt b/src/browser/CMakeLists.txt index 14e469093370..ad3ad9f48411 100644 --- a/src/browser/CMakeLists.txt +++ b/src/browser/CMakeLists.txt @@ -36,7 +36,7 @@ IF (WIN32) # application icon # resource compilation for MinGW ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon.o - COMMAND ${WINDRES} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc + COMMAND ${WINDRES} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc -o ${CMAKE_CURRENT_BINARY_DIR}/icon.o ) SET(QGIS_APP_SRCS ${QGIS_APP_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/icon.o) ENDIF (MSVC) @@ -54,16 +54,24 @@ QT4_WRAP_CPP (BROWSER_MOC_SRCS ${BROWSER_MOC_HDRS}) QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS}) #QT4_ADD_RESOURCES(BROWSER_RCC_SRCS ${BROWSER_RCCS}) -ADD_EXECUTABLE (qbrowser MACOSX_BUNDLE ${BROWSER_SRCS} ${BROWSER_MOC_SRCS} ${BROWSER_UIS_H} ${IMAGE_RCC_SRCS}) +IF(WIN32) + ADD_EXECUTABLE(qbrowser WIN32 ${BROWSER_SRCS} ${BROWSER_MOC_SRCS} ${BROWSER_UIS_H} ${IMAGE_RCC_SRCS}) +ELSE(WIN32) + IF(APPLE) + ADD_EXECUTABLE (qbrowser MACOSX_BUNDLE ${BROWSER_SRCS} ${BROWSER_MOC_SRCS} ${BROWSER_UIS_H} ${IMAGE_RCC_SRCS}) + ELSE(APPLE) + ADD_EXECUTABLE (qbrowser ${BROWSER_SRCS} ${BROWSER_MOC_SRCS} ${BROWSER_UIS_H} ${IMAGE_RCC_SRCS}) + ENDIF(APPLE) +ENDIF(WIN32) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../core - ${CMAKE_CURRENT_SOURCE_DIR}/../core/raster - ${CMAKE_CURRENT_SOURCE_DIR}/../gui - ${CMAKE_CURRENT_SOURCE_DIR}/../gui/attributetable - ${CMAKE_CURRENT_BINARY_DIR}/../ui - ${CMAKE_CURRENT_BINARY_DIR} - ${GDAL_INCLUDE_DIR} # remove once raster layer is cleaned up + ${CMAKE_CURRENT_SOURCE_DIR}/../core + ${CMAKE_CURRENT_SOURCE_DIR}/../core/raster + ${CMAKE_CURRENT_SOURCE_DIR}/../gui + ${CMAKE_CURRENT_SOURCE_DIR}/../gui/attributetable + ${CMAKE_CURRENT_BINARY_DIR}/../ui + ${CMAKE_CURRENT_BINARY_DIR} + ${GDAL_INCLUDE_DIR} # remove once raster layer is cleaned up ) IF (WITH_INTERNAL_SPATIALITE) @@ -78,27 +86,21 @@ IF (NOT WITH_INTERNAL_SPATIALITE) TARGET_LINK_LIBRARIES(qbrowser ${SQLITE3_LIBRARY}) ENDIF (NOT WITH_INTERNAL_SPATIALITE) -IF (${QTVERSION} STRLESS "4.3.0") - TARGET_LINK_LIBRARIES(qbrowser - ${QT_LIBRARIES} - ) -ELSE (${QTVERSION} STRLESS "4.3.0") - TARGET_LINK_LIBRARIES(qbrowser - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTNETWORK_LIBRARY} - ${QT_QTSVG_LIBRARY} - ${QT_QTXML_LIBRARY} - ${QT_QTWEBKIT_LIBRARY} - ) -ENDIF (${QTVERSION} STRLESS "4.3.0") +TARGET_LINK_LIBRARIES(qbrowser + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + ${QT_QTNETWORK_LIBRARY} + ${QT_QTSVG_LIBRARY} + ${QT_QTXML_LIBRARY} + ${QT_QTWEBKIT_LIBRARY} + ${QT_QTMAIN_LIBRARY} +) SET_TARGET_PROPERTIES(qbrowser PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${QGIS_LIB_DIR} INSTALL_RPATH_USE_LINK_PATH true ) - ######################################################## # Install @@ -106,7 +108,7 @@ IF (APPLE) INSTALL (TARGETS qbrowser BUNDLE DESTINATION ${QGIS_BIN_DIR}) # needed because global install_name prefix is for main qgis app INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -change ${CMAKE_INSTALL_NAME_DIR}/libqgis_core.${COMPLETE_VERSION}.dylib @executable_path/../../../../lib/libqgis_core.${COMPLETE_VERSION}.dylib \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qbrowser.app/Contents/MacOS/qbrowser\")") - INSTALL (CODE "EXECUTE_PROCESS (COMMAND ln -sfh ../../../${QGIS_FW_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qbrowser.app/Contents/Frameworks\")") + INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../${QGIS_FW_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qbrowser.app/Contents/Frameworks\")") ELSE (APPLE) INSTALL (TARGETS qbrowser RUNTIME DESTINATION ${QGIS_BIN_DIR}) ENDIF (APPLE) diff --git a/src/browser/main.cpp b/src/browser/main.cpp index 4752d972676b..4b2fe465b5eb 100644 --- a/src/browser/main.cpp +++ b/src/browser/main.cpp @@ -33,7 +33,6 @@ int main( int argc, char ** argv ) { QSettings settings; - QgsApplication a( argc, argv, true ); a.setThemeName( settings.value( "/Themes", "default" ).toString() ); diff --git a/src/helpviewer/CMakeLists.txt b/src/helpviewer/CMakeLists.txt index f52cccaa1d6d..9106ad26f228 100644 --- a/src/helpviewer/CMakeLists.txt +++ b/src/helpviewer/CMakeLists.txt @@ -38,7 +38,7 @@ IF (WIN32) # application icon # resource compilation for MinGW ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon.o - COMMAND ${WINDRES} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc + COMMAND ${WINDRES} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc -o ${CMAKE_CURRENT_BINARY_DIR}/icon.o ) SET(QGIS_APP_SRCS ${QGIS_APP_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/icon.o) ENDIF (MSVC) @@ -54,11 +54,19 @@ QT4_WRAP_CPP (HELP_MOC_SRCS ${HELP_MOC_HDRS}) #QT4_ADD_RESOURCES(HELP_RCC_SRCS ${HELP_RCCS}) -ADD_EXECUTABLE (qgis_help MACOSX_BUNDLE ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H}) +IF(WIN32) + ADD_EXECUTABLE (qgis_help WIN32 ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H}) +ELSE(WIN32) + IF(APPLE) + ADD_EXECUTABLE (qgis_help MACOSX_BUNDLE ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H}) + ELSE(APPLE) + ADD_EXECUTABLE (qgis_help ${HELP_SRCS} ${HELP_MOC_SRCS} ${HELP_UIS_H}) + ENDIF(APPLE) +ENDIF(WIN32) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../core - ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../core + ${CMAKE_CURRENT_BINARY_DIR} ) IF (WITH_INTERNAL_SPATIALITE) @@ -73,20 +81,15 @@ IF (NOT WITH_INTERNAL_SPATIALITE) TARGET_LINK_LIBRARIES(qgis_help ${SQLITE3_LIBRARY}) ENDIF (NOT WITH_INTERNAL_SPATIALITE) -IF (${QTVERSION} STRLESS "4.3.0") - TARGET_LINK_LIBRARIES(qgis_help - ${QT_LIBRARIES} - ) -ELSE (${QTVERSION} STRLESS "4.3.0") - TARGET_LINK_LIBRARIES(qgis_help - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTNETWORK_LIBRARY} - ${QT_QTSVG_LIBRARY} - ${QT_QTXML_LIBRARY} - ${QT_QTWEBKIT_LIBRARY} - ) -ENDIF (${QTVERSION} STRLESS "4.3.0") +TARGET_LINK_LIBRARIES(qgis_help + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + ${QT_QTNETWORK_LIBRARY} + ${QT_QTSVG_LIBRARY} + ${QT_QTXML_LIBRARY} + ${QT_QTWEBKIT_LIBRARY} + ${QT_QTMAIN_LIBRARY} + ) SET_TARGET_PROPERTIES(qgis_help PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${QGIS_LIB_DIR} From a917265c4eb73ec2cde075ad7686cb4a9bf7bb66 Mon Sep 17 00:00:00 2001 From: William Kyngesburye Date: Sat, 28 May 2011 21:49:38 -0500 Subject: [PATCH 14/62] add missing version numbers to Mac framework detection --- cmake/FindGDAL.cmake | 14 +++++++++++++- cmake/FindGEOS.cmake | 14 +++++++++++++- cmake/MacPlistMacros.cmake | 12 ++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 cmake/MacPlistMacros.cmake diff --git a/cmake/FindGDAL.cmake b/cmake/FindGDAL.cmake index 86ee2ebff611..d81f7ca196d8 100644 --- a/cmake/FindGDAL.cmake +++ b/cmake/FindGDAL.cmake @@ -14,6 +14,7 @@ # GDAL_INCLUDE_DIR = where to find headers +INCLUDE (@CMAKE_SOURCE_DIR@/cmake/MacPlistMacros.cmake) IF(WIN32) @@ -49,7 +50,18 @@ ELSE(WIN32) IF (GDAL_LIBRARY) # they're all the same in a framework SET (GDAL_INCLUDE_DIR ${GDAL_LIBRARY}/Headers CACHE PATH "Path to a file.") - SET (GDAL_CONFIG ${GDAL_LIBRARY}/Programs/geos-config CACHE FILEPATH "Path to a program.") + # set GDAL_CONFIG to make later test happy, not used here, may not exist + SET (GDAL_CONFIG ${GDAL_LIBRARY}/unix/bin/gdal-config CACHE FILEPATH "Path to a program.") + # version in info.plist + GET_VERSION_PLIST (${GDAL_LIBRARY}/Resources/Info.plist GDAL_VERSION) + IF (NOT GDAL_VERSION) + MESSAGE (FATAL_ERROR "Could not determine GDAL version from framework.") + ENDIF (NOT GDAL_VERSION) + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}") + IF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4) + MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.") + ENDIF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4) ENDIF (GDAL_LIBRARY) SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE) ENDIF () diff --git a/cmake/FindGEOS.cmake b/cmake/FindGEOS.cmake index bc05778f2573..e7f8a83a1599 100644 --- a/cmake/FindGEOS.cmake +++ b/cmake/FindGEOS.cmake @@ -13,6 +13,7 @@ # GEOS_LIBRARY # +INCLUDE (@CMAKE_SOURCE_DIR@/cmake/MacPlistMacros.cmake) IF(WIN32) @@ -54,7 +55,18 @@ ELSE(WIN32) IF (GEOS_LIBRARY) # they're all the same in a framework SET (GEOS_INCLUDE_DIR ${GEOS_LIBRARY}/Headers CACHE PATH "Path to a file.") - SET (GEOS_CONFIG ${GEOS_LIBRARY}/Programs/geos-config CACHE FILEPATH "Path to a program.") + # set GEOS_CONFIG to make later test happy, not used here, may not exist + SET (GEOS_CONFIG ${GEOS_LIBRARY}/unix/bin/geos-config CACHE FILEPATH "Path to a program.") + # version in info.plist + GET_VERSION_PLIST (${GEOS_LIBRARY}/Resources/Info.plist GEOS_VERSION) + IF (NOT GEOS_VERSION) + MESSAGE (FATAL_ERROR "Could not determine GEOS version from framework.") + ENDIF (NOT GEOS_VERSION) + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}") + IF (GEOS_VERSION_MAJOR LESS 3) + MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.0.0 or higher.") + ENDIF (GEOS_VERSION_MAJOR LESS 3) ENDIF (GEOS_LIBRARY) SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE) ENDIF () diff --git a/cmake/MacPlistMacros.cmake b/cmake/MacPlistMacros.cmake new file mode 100644 index 000000000000..b12387277131 --- /dev/null +++ b/cmake/MacPlistMacros.cmake @@ -0,0 +1,12 @@ +# Mac Plist Macros + +FUNCTION (GET_VERSION_PLIST PLISTFILE OUTVAR) + SET (PVERSION "") + IF (EXISTS ${PLISTFILE}) + FILE (READ "${PLISTFILE}" info_plist) + STRING (REGEX REPLACE "\n" "" info_plist "${info_plist}") + STRING (REGEX MATCH "CFBundleShortVersionString[ \t]*([0-9\\.]*)" PLISTVERSION "${info_plist}") + STRING (REGEX REPLACE "CFBundleShortVersionString[ \t]*([0-9\\.]*)" "\\1" PVERSION "${PLISTVERSION}") + ENDIF (EXISTS ${PLISTFILE}) + SET (${OUTVAR} ${PVERSION} PARENT_SCOPE) +ENDFUNCTION (GET_VERSION_PLIST) From fa4d167fc56766c797bf24a56feb69ab23cfe767 Mon Sep 17 00:00:00 2001 From: William Kyngesburye Date: Sun, 29 May 2011 10:58:55 -0500 Subject: [PATCH 15/62] OS X install updates --- INSTALL | 349 ++++++++++++++++------------------- doc/INSTALL.html | 465 +++++++++++++++++++---------------------------- doc/osx.t2t | 346 ++++++++++++++--------------------- 3 files changed, 472 insertions(+), 688 deletions(-) diff --git a/INSTALL b/INSTALL index 79df75cf603e..558a91ca444d 100644 --- a/INSTALL +++ b/INSTALL @@ -1,10 +1,10 @@ Quantum GIS (QGIS) Building QGIS from source - step by step -Thursday May 26, 2011 +Sunday May 29, 2011 -Last Updated: Thursday May 26, 2011 -Last Change : Tuesday May 24, 2011 +Last Updated: Sunday May 29, 2011 +Last Change : Friday May 20, 2011 1. Introduction @@ -23,14 +23,13 @@ Last Change : Tuesday May 24, 2011 4.1. Building with Microsoft Visual Studio 4.2. Building using MinGW 4.3. Creation of MSYS environment for compilation of Quantum GIS - 5. MacOS X: building using frameworks and Cmake - 5.1. Install Qt4 from .dmg + 5. Building on MacOS X + 5.1. Install Qt4 from disk image 5.2. Install development frameworks for QGIS dependencies 5.3. Install CMake for OSX - 5.4. Install subversion for OSX - 5.5. Check out QGIS from SVN - 5.6. Configure the build - 5.7. Building + 5.4. Download QGIS source from github + 5.5. Configure the build + 5.6. Building 6. Authors and Acknowledgments @@ -1162,26 +1161,27 @@ We're done with preparation of MSYS environment. Now you can delete all stuff in of space and it's not necessary at all. - 5. MacOS X: building using frameworks and Cmake - =============================================== + 5. Building on MacOS X + ====================== In this approach I will try to avoid as much as possible building dependencies from source and rather use frameworks wherever possible. -The base system here is Mac OS X 10.4 (Tiger), with a single architecture build. -Included are a few notes for building on Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard). -Make sure to read each section completely before typing the first command you see. +The base system here is Mac OS X 10.4 (Tiger), with a single architecture +build. Included are notes for building on Mac OS X 10.5 (Leopard) and 10.6 +(Snow Leopard). Make sure to read each section completely before typing +the first command you see. General note on Terminal usage: When I say "cd" to a folder in a Terminal, it means type "cd " (without the quotes, make sure to type a space after) and -then type the path to said folder, then . A simple way to do this without having to know -and type the full path is, after type the "cd " part, drag the folder (use the icon -in its window title bar, or drag a folder from within a window) from the Desktop -to the Terminal, then tap . +then type the path to said folder, then . A simple way to do this +without having to know and type the full path is, after type the "cd " part, +drag the folder (use the icon in its window title bar, or drag a folder from +within a window) from the Desktop to the Terminal, then tap . -Parallel Compilation: On multiprocessor/multicore Macs, it's possible to speed -up compilation, but it's not automatic. Whenever you type "make" (but NOT "make install"), -instead type: +Parallel Compilation: On multiprocessor/multicore Macs, it's possible to +speed up compilation, but it's not automatic. Whenever you type "make" (but +NOT "make install"), instead type: make -j [n] @@ -1194,25 +1194,28 @@ ie: Mac Pro "8 Core" model (2 quad core processors) = 8 ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4 - 5.1. Install Qt4 from .dmg - ========================== + 5.1. Install Qt4 from disk image + ================================ -You need a minimum of Qt-4.4.0. I suggest getting the latest. +You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need +for the full Qt SDK, so save yourself some download time and get the frameworks +only. Snow Leopard note: If you are building on Snow Leopard, you will need to decide between 32-bit support in the older, Qt Carbon branch, or 64-bit support in the Qt Cocoa branch. Appropriate installers are available for both as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa. -PPC note: There appear to be issues with Qt Cocoa on PPC Macs. QT Carbon -is recommended on PPC Macs. +PPC note: The readymade Qt Cocoa installers don't include PPC support, you'd +have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on +PPC Macs anyways. Qt Carbon is recommended on PPC Macs. - http://qt.nokia.com/downloads +http://qt.nokia.com/downloads -If you want debug frameworks, Qt also provides a dmg with these. These are in -addition to the non-debug frameworks. +If you want debug frameworks, Qt also provides a separate download with these. +These are in addition to the non-debug frameworks. -Once downloaded open the dmg and run the installer. Note you need admin +Once downloaded open the disk image and run the installer. Note you need admin privileges to install. Qt note: Starting in Qt 4.4, libQtCLucene was added, and in 4.5 @@ -1232,23 +1235,23 @@ CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build. ========================================================= Download William Kyngesburye's excellent GDAL Complete package that includes -PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also -a GSL framework. +PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks. +There is also a GSL framework. - http://www.kyngchaos.com/wiki/software/frameworks +http://www.kyngchaos.com/wiki/software/frameworks Once downloaded, open and install the frameworks. -William provides an additional installer package for Postgresql (for PostGIS support). -Qgis just needs the libpq client library, so unless you want to setup the full -Postgres + PostGIS server, all you need is the client-only package. -It's available here: +William provides an additional installer package for Postgresql (for PostGIS +support). Qgis just needs the libpq client library, so unless you want to +setup the full Postgres + PostGIS server, all you need is the client-only +package. It's available here: - http://www.kyngchaos.com/wiki/software/postgres +http://www.kyngchaos.com/wiki/software/postgres Also available is a GRASS application: - http://www.kyngchaos.com/wiki/software/grass +http://www.kyngchaos.com/wiki/software/grass 5.2.1. Additional Dependencies: General compatibility note @@ -1274,9 +1277,10 @@ not necessary on Snow Leopard. Get the expat sources: - http://sourceforge.net/project/showfiles.php?group_id=10127 +http://sourceforge.net/project/showfiles.php?group_id=10127 -Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and: +Double-click the source tarball to unpack, then, in Terminal.app, cd to the +source folder and: ./configure make @@ -1288,13 +1292,16 @@ Double-click the source tarball to unpack, then, in Terminal.app, cd to the sour Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable Python 2.5 and 2.6, respectively. So there is no need to install Python on -Leopard and Snow Leopard. You can still install Python from python.org if preferred. +Leopard and Snow Leopard. You can still install Python from python.org if +preferred. -If installing from python.org, make sure you install at least the latest Python 2.x from +If installing from python.org, make sure you install at least the latest Python +2.x from - http://www.python.org/download/ +http://www.python.org/download/ -Python 3 is a major change, and may have compatibility issues, so try it at your own risk. +Python 3 is a major change, and may have compatibility issues, so try it at +your own risk. 5.2.4. Additional Dependencies: SIP @@ -1302,31 +1309,33 @@ Python 3 is a major change, and may have compatibility issues, so try it at your Retrieve the python bindings toolkit SIP from - http://www.riverbankcomputing.com/software/sip/download +http://www.riverbankcomputing.com/software/sip/download -Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: + +python.org Python python configure.py make sudo make install -Leopard notes +Leopard system Python -If building on Leopard, using Leopard's bundled Python, SIP wants to install in the -system path -- this is not a good idea. Use this configure command instead of the -basic configure above: +SIP wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path: python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \ -e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk -Snow Leopard notes +Snow Leopard system Python Similar to Leopard, you should install outside the system Python path. -Also, you need to specify the architecture you want (requires at least SIP 4.9), -and make sure to run the versioned python binary (this one responds to the -'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon): +Also, you need to specify the architecture you want (requires at least SIP +4.9), and make sure to run the versioned python binary (this one responds to +the 'arch' command, 'python' does not). + +If you are using 32-bit Qt (Qt Carbon): python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \ -e /usr/local/include -v /usr/local/share/sip --arch=i386 -s MacOSX10.6.sdk @@ -1336,50 +1345,43 @@ For 64-bit Qt (Qt Cocoa), use this configure line: python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \ -e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk +continue... + +Then continue with compilation and installation: + + make + sudo make install + 5.2.5. Additional Dependencies: PyQt ==================================== Retrieve the python bindings toolkit for Qt from - http://www.riverbankcomputing.com/software/pyqt/download +http://www.riverbankcomputing.com/software/pyqt/download -Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: + +python.org Python python configure.py yes -There is a problem with the configuration that needs to be fixed now -(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir line to: - - 'qt_dir': '/usr', - -Then continue with compilation and installation (this is a good place to use -parallel compilation, if you can): - - make - sudo make install - -Leopard notes +Leopard system Python -If building on Leopard, using Leopard's bundled Python, PyQt wants to install -in the system path -- this is not a good idea. Use this configure command -instead of the basic configure above: +PyQt wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path: python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin -If there is a problem with undefined symbols in QtOpenGL on Leopard, edit -QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS. -Then make again. - -Snow Leopard notes +Snow Leopard system Python Similar to Leopard, you should install outside the system Python path. Also, you need to specify the architecture you want (requires at least PyQt 4.6), and make sure to run the versioned python binary (this one responds to the 'arch' command, which is important for pyuic4, 'python' does not). + If you are using 32-bit Qt (Qt Carbon): python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch i386 @@ -1388,50 +1390,56 @@ For 64-bit Qt (Qt Cocoa), use this configure line: python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64 +continue... - 5.2.6. Additional Dependencies: Qwt/PyQwt - ========================================= - -The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. -You can take care of both with the PyQwt source from: +There is a problem with the configuration that needs to be fixed now +(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir +line to: - http://pyqwt.sourceforge.net/ + 'qt_dir': '/usr', -Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1). -Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked -into PyQwt, and Qgis can't use it. So, we need to split the build. +Then continue with compilation and installation (this is a good place to use +parallel compilation, if you can): -First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so -you don't get a bloated debug static library (too bad they are not configurable from -qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +=' -line, within an 'else' block, and change 'debug' to 'release'. Like so: + make + sudo make install - else { - CONFIG += release # release/debug - } +If there is a problem with undefined symbols in QtOpenGL on Leopard, edit +QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS. +Then make again. -Also uncomment (remove # prefix) the line 'CONFIG += QwtDll'. Like so: - CONFIG += QwtDll + 5.2.6. Additional Dependencies: Qwt/PyQwt + ========================================= -If you are building for Qt Carbon 32bit on Snow Leopard, add a line at the bottom: +The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. +You can take care of both with the PyQwt source from: - CONFIG += x86 +http://pyqwt.sourceforge.net/ -Save and close. +Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 +(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same +time, but Qwt is statically linked into PyQwt, and Qgis can't use it. So, we +need to split the build. -Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install: +Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build +and install: + cat >> qwtconfig.pri <

Quantum GIS (QGIS)

Building QGIS from source - step by step

-

Thursday May 26, 2011

+

Sunday May 29, 2011

-Last Updated: Thursday May 26, 2011 -Last Change : Tuesday May 24, 2011 +Last Updated: Sunday May 29, 2011 +Last Change : Friday May 20, 2011

@@ -1645,29 +1644,30 @@

4.3.3. Cleanup

-

5. MacOS X: building using frameworks and Cmake

+

5. Building on MacOS X

In this approach I will try to avoid as much as possible building dependencies from source and rather use frameworks wherever possible.

-The base system here is Mac OS X 10.4 (Tiger), with a single architecture build. -Included are a few notes for building on Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard). -Make sure to read each section completely before typing the first command you see. +The base system here is Mac OS X 10.4 (Tiger), with a single architecture +build. Included are notes for building on Mac OS X 10.5 (Leopard) and 10.6 +(Snow Leopard). Make sure to read each section completely before typing +the first command you see.

General note on Terminal usage: When I say "cd" to a folder in a Terminal, it means type "cd " (without the quotes, make sure to type a space after) and -then type the path to said folder, then <return>. A simple way to do this without having to know -and type the full path is, after type the "cd " part, drag the folder (use the icon -in its window title bar, or drag a folder from within a window) from the Desktop -to the Terminal, then tap <return>. +then type the path to said folder, then <return>. A simple way to do this +without having to know and type the full path is, after type the "cd " part, +drag the folder (use the icon in its window title bar, or drag a folder from +within a window) from the Desktop to the Terminal, then tap <return>.

-Parallel Compilation: On multiprocessor/multicore Macs, it's possible to speed -up compilation, but it's not automatic. Whenever you type "make" (but NOT "make install"), -instead type: +Parallel Compilation: On multiprocessor/multicore Macs, it's possible to +speed up compilation, but it's not automatic. Whenever you type "make" (but +NOT "make install"), instead type:

@@ -1687,10 +1687,12 @@ 

5. MacOS X: building using frameworks and Cmake

-

5.1. Install Qt4 from .dmg

+

5.1. Install Qt4 from disk image

-You need a minimum of Qt-4.4.0. I suggest getting the latest. +You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need +for the full Qt SDK, so save yourself some download time and get the frameworks +only.

Snow Leopard note: If you are building on Snow Leopard, you will need to @@ -1699,20 +1701,19 @@

5.1. Install Qt4 from .dmg

as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.

-PPC note: There appear to be issues with Qt Cocoa on PPC Macs. QT Carbon -is recommended on PPC Macs. +PPC note: The readymade Qt Cocoa installers don't include PPC support, you'd +have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on +PPC Macs anyways. Qt Carbon is recommended on PPC Macs. +

+

+http://qt.nokia.com/downloads

- -
-http://qt.nokia.com/downloads
-
-

-If you want debug frameworks, Qt also provides a dmg with these. These are in -addition to the non-debug frameworks. +If you want debug frameworks, Qt also provides a separate download with these. +These are in addition to the non-debug frameworks.

-Once downloaded open the dmg and run the installer. Note you need admin +Once downloaded open the disk image and run the installer. Note you need admin privileges to install.

@@ -1738,35 +1739,30 @@

5.2. Install development frameworks for QGIS dependencies

Download William Kyngesburye's excellent GDAL Complete package that includes -PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also -a GSL framework. +PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks. +There is also a GSL framework. +

+

+http://www.kyngchaos.com/wiki/software/frameworks

- -
-http://www.kyngchaos.com/wiki/software/frameworks
-
-

Once downloaded, open and install the frameworks.

-William provides an additional installer package for Postgresql (for PostGIS support). -Qgis just needs the libpq client library, so unless you want to setup the full -Postgres + PostGIS server, all you need is the client-only package. -It's available here: +William provides an additional installer package for Postgresql (for PostGIS +support). Qgis just needs the libpq client library, so unless you want to +setup the full Postgres + PostGIS server, all you need is the client-only +package. It's available here: +

+

+http://www.kyngchaos.com/wiki/software/postgres

- -
-http://www.kyngchaos.com/wiki/software/postgres 
-
-

Also available is a GRASS application:

- -
-http://www.kyngchaos.com/wiki/software/grass
-
+

+http://www.kyngchaos.com/wiki/software/grass +

5.2.1. Additional Dependencies: General compatibility note

@@ -1793,13 +1789,12 @@

5.2.2. Additional Dependencies: Expat

Get the expat sources:

- -
-http://sourceforge.net/project/showfiles.php?group_id=10127 
-
-

-Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and: +http://sourceforge.net/project/showfiles.php?group_id=10127 +

+

+Double-click the source tarball to unpack, then, in Terminal.app, cd to the +source folder and:

@@ -1813,18 +1808,19 @@ 

5.2.3. Additional Dependencies: Python

Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable Python 2.5 and 2.6, respectively. So there is no need to install Python on -Leopard and Snow Leopard. You can still install Python from python.org if preferred. +Leopard and Snow Leopard. You can still install Python from python.org if +preferred.

-If installing from python.org, make sure you install at least the latest Python 2.x from +If installing from python.org, make sure you install at least the latest Python +2.x from

- -
-http://www.python.org/download/
-
-

-Python 3 is a major change, and may have compatibility issues, so try it at your own risk. +http://www.python.org/download/ +

+

+Python 3 is a major change, and may have compatibility issues, so try it at +your own risk.

5.2.4. Additional Dependencies: SIP

@@ -1832,15 +1828,15 @@

5.2.4. Additional Dependencies: SIP

Retrieve the python bindings toolkit SIP from

- -
-http://www.riverbankcomputing.com/software/sip/download
-
-

-Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +http://www.riverbankcomputing.com/software/sip/download +

+

+Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: +

+

+python.org Python

@@ -1850,12 +1846,11 @@ 

5.2.4. Additional Dependencies: SIP

-Leopard notes +Leopard system Python

-If building on Leopard, using Leopard's bundled Python, SIP wants to install in the -system path -- this is not a good idea. Use this configure command instead of the -basic configure above: +SIP wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path:

@@ -1864,13 +1859,16 @@ 

5.2.4. Additional Dependencies: SIP

-Snow Leopard notes +Snow Leopard system Python

Similar to Leopard, you should install outside the system Python path. -Also, you need to specify the architecture you want (requires at least SIP 4.9), -and make sure to run the versioned python binary (this one responds to the -'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon): +Also, you need to specify the architecture you want (requires at least SIP +4.9), and make sure to run the versioned python binary (this one responds to +the 'arch' command, 'python' does not). +

+

+If you are using 32-bit Qt (Qt Carbon):

@@ -1887,53 +1885,45 @@ 

5.2.4. Additional Dependencies: SIP

-e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk
-

5.2.5. Additional Dependencies: PyQt

-

-Retrieve the python bindings toolkit for Qt from +continue...

- -
-http://www.riverbankcomputing.com/software/pyqt/download
-
-

-Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +Then continue with compilation and installation:

-python configure.py 
-yes 
+make 
+sudo make install 
 
+

5.2.5. Additional Dependencies: PyQt

+

-There is a problem with the configuration that needs to be fixed now -(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir line to: +Retrieve the python bindings toolkit for Qt from

- -
-    'qt_dir': '/usr',
-
-

-Then continue with compilation and installation (this is a good place to use -parallel compilation, if you can): +http://www.riverbankcomputing.com/software/pyqt/download +

+

+Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: +

+

+python.org Python

-make 
-sudo make install 
+python configure.py 
+yes 
 

-Leopard notes +Leopard system Python

-If building on Leopard, using Leopard's bundled Python, PyQt wants to install -in the system path -- this is not a good idea. Use this configure command -instead of the basic configure above: +PyQt wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path:

@@ -1941,18 +1931,15 @@ 

5.2.5. Additional Dependencies: PyQt

-If there is a problem with undefined symbols in QtOpenGL on Leopard, edit -QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS. -Then make again. -

-

-Snow Leopard notes +Snow Leopard system Python

Similar to Leopard, you should install outside the system Python path. Also, you need to specify the architecture you want (requires at least PyQt 4.6), and make sure to run the versioned python binary (this one responds to the 'arch' command, which is important for pyuic4, 'python' does not). +

+

If you are using 32-bit Qt (Qt Carbon):

@@ -1968,59 +1955,59 @@

5.2.5. Additional Dependencies: PyQt

python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
-

5.2.6. Additional Dependencies: Qwt/PyQwt

- -

-The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. -You can take care of both with the PyQwt source from: -

- -
-http://pyqwt.sourceforge.net/
-
-

-Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1). -Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked -into PyQwt, and Qgis can't use it. So, we need to split the build. +continue...

-First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so -you don't get a bloated debug static library (too bad they are not configurable from -qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +=' -line, within an 'else' block, and change 'debug' to 'release'. Like so: +There is a problem with the configuration that needs to be fixed now +(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir +line to:

-    else {
-        CONFIG           += release     # release/debug
-    }
+    'qt_dir': '/usr',
 

-Also uncomment (remove # prefix) the line 'CONFIG += QwtDll'. Like so: +Then continue with compilation and installation (this is a good place to use +parallel compilation, if you can):

-CONFIG           += QwtDll
+make 
+sudo make install 
 

-If you are building for Qt Carbon 32bit on Snow Leopard, add a line at the bottom: +If there is a problem with undefined symbols in QtOpenGL on Leopard, edit +QtOpenGL/makefile and add -undefined dynamic_lookup to LFLAGS. +Then make again.

-
-CONFIG += x86
-
+

5.2.6. Additional Dependencies: Qwt/PyQwt

-Save and close. +The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. +You can take care of both with the PyQwt source from: +

+

+http://pyqwt.sourceforge.net/ +

+

+Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 +(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same +time, but Qwt is statically linked into PyQwt, and Qgis can't use it. So, we +need to split the build.

-Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install: +Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build +and install:

+cat >> qwtconfig.pri <<EOF
+CONFIG += release QwtDll
+EOF
 qmake -spec macx-g++
 make
 sudo make install
@@ -2029,11 +2016,13 @@ 

5.2.6. Additional Dependencies: Qwt/PyQwt

-The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is the -minor.point version, and it may be an SVN version). Remember this for QGIS and PyQwt configuration. +The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is +the minor.point version, and it may be an SVN version). Remember this for +QGIS and PyQwt configuration.

-Now for PyQwt. Still in the Terminal: +Now for PyQwt. Still in the Terminal (for all Pythons, except see Snow Leopard +Carbon note below):

@@ -2065,11 +2054,12 @@ 

5.2.6. Additional Dependencies: Qwt/PyQwt

5.2.7. Additional Dependencies: Bison

-Leopard and Snow Leopard note: Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard. +Leopard and Snow Leopard note: Leopard and Snow Leopard include Bison 2.3, +so this step can be skipped on Leopard and Snow Leopard.

-The version of bison available by default on Mac OS X 10.4 is too old so you need to -get a more recent one on your system. Download at least version 2.3 from: +The version of bison available by default on Mac OS X 10.4 is too old so you +need to get a more recent one on your system. Download at least version 2.3 from:

@@ -2093,16 +2083,14 @@ 

5.3. Install CMake for OSX

Get the latest source release from here:

- -
-http://www.cmake.org/cmake/resources/software.html
-
- +

+http://www.cmake.org/cmake/resources/software.html +

Binary installers are available for OS X, but they are not recommended -(2.4 versions install in /usr instead of /usr/local, and 2.6 versions are a -strange application). Instead, download the source, double-click the source tarball, -then cd to the source folder and: +(2.4 versions install in /usr instead of /usr/local, and 2.6+ versions are a +strange application). Instead, download the source, double-click the source +tarball, then cd to the source folder and:

@@ -2112,131 +2100,38 @@ 

5.3. Install CMake for OSX

-

5.4. Install subversion for OSX

- -

-Leopard and Snow Leopard note: Leopard and Snow Leopard (Xcode 3+) -include SVN, so this step can be skipped on Leopard and Snow Leopard. -

-

-The [http://sourceforge.net/projects/macsvn/MacSVN] project has a downloadable -build of svn. If you are a GUI inclined person you may want to grab their gui -client too. Get the command line client here: -

- -
-curl -O http://ufpr.dl.sourceforge.net/sourceforge/macsvn/Subversion_1.4.2.zip 
-
+

5.4. Download QGIS source from github

-Once downloaded open the zip file and run the installer. -

-

-You also need to install BerkleyDB available from the same -http://sourceforge.net/projects/macsvn/. At the time of writing the -file was here: +Go to the github QGIS project page:

- -
-curl -O http://ufpr.dl.sourceforge.net/sourceforge/macsvn/Berkeley_DB_4.5.20.zip 
-
-

-Once again unzip this and run the installer therein. +http://github.com/qgis/Quantum-GIS

-Lastly we need to ensure that the svn commandline executeable is in the path. -Add the following line to the end of /etc/bashrc using sudo: +It should default to the master branch. Click the Downloads button and +select Download .tar.gz.

- -
-sudo vim /etc/bashrc 
-
-

-And add this line to the bottom before saving and quiting: -

- -
-export PATH=/usr/local/bin:$PATH:/usr/local/pgsql/bin 
-
- -

-/usr/local/bin needs to be first in the path so that the newer bison (that will -be built from source further down) is found before the bison (which is very -old) that is installed by MacOSX -

-

-Now close and reopen your shell to get the updated vars. +Double-click the tarball to unzip it.

-

5.5. Check out QGIS from SVN

- -

-Now we are going to check out the sources for QGIS. First we will create a -directory for working in (or some folder of your choice): -

- -
-mkdir -p ~/dev/cpp cd ~/dev/cpp 
-
- -

-Now we check out the sources: -

-

-Trunk: -

- -
-svn co https://svn.osgeo.org/qgis/trunk/qgis qgis 
-
- -

-For a release branch version x.y.z: -

- -
-svn co https://svn.qgis.org/qgis/branches/Release-x_y_z qgis-x.y.z
-
- -

-The first time you check out QGIS sources you will probably get a message like -this: -

- -
- Error validating server certificate for 'https://svn.qgis.org:443':
- - The certificate is not issued by a trusted authority. Use the fingerprint to
-   validate the certificate manually!  Certificate information:
- - Hostname: svn.qgis.org
- - Valid: from Apr  1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
- - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
- - Fingerprint: 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b
-   (R)eject, accept (t)emporarily or accept (p)ermanently?  
-
- -

-I suggest you press 'p' to accept the key permanently. -

- - -

5.6. Configure the build

+

5.5. Configure the build

CMake supports out of source build so we will create a 'build' dir for the -build process. OS X uses ${HOME}/Applications as a standard user app folder (it gives it the system app folder icon). -If you have the correct permissions you may want to build -straight into your /Applications folder. The instructions below assume you are -building into a pre-existing ${HOME}/Applications directory. +build process. OS X uses ${HOME}/Applications as a standard user app folder (it +gives it the system app folder icon). If you have the correct permissions you +may want to build straight into your /Applications folder. The instructions +below assume you are building into a pre-existing ${HOME}/Applications directory. In a Terminal cd to the qgis source folder previously downloaded, then:

 mkdir build
 cd build
-cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
 -D CMAKE_BUILD_TYPE=MinSizeRel \
 -D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \
 -D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \
@@ -2245,8 +2140,8 @@ 

5.6. Configure the build

-This will automatically find and use the previously installed frameworks, and the GRASS -application if installed. +This will automatically find and use the previously installed frameworks, and +the GRASS application if installed.

Or, to use a Unix-style build of GRASS, use the following cmake invocation @@ -2260,7 +2155,7 @@

5.6. Configure the build

-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \ -D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \ -D QWT_INCLUDE_DIR=/usr/local/qwt-5.2.1-svn/include \ --D GRASS_PREFIX=/user/local/grass-6.4.0 \ +-D GRASS_PREFIX=/user/local/grass-6.4.1 \ ..
@@ -2277,7 +2172,7 @@

5.6. Configure the build

sudo chmod +x /usr/local/bin/python32 -cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \ +cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D \ -D CMAKE_BUILD_TYPE=MinSizeRel \ -D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_MAPSERVER=TRUE \ -D QWT_LIBRARY=/usr/local/qwt-5.2.1-svn/lib/libqwt.dylib \ @@ -2287,22 +2182,32 @@

5.6. Configure the build

-Bundling note: Older Qt versions may have problems with some Qt plugins and Qgis. -The way to handle this is to bundle Qt inside the Qgis application. You can do this now -or wait to see if there are immediate crashes when running Qgis. It's also a good -idea to bundle Qt if you need to copy Qgis to other Macs (where you would have to -install Xcode just so Qt would install!). +Bundling note: Older Qt versions may have problems with some Qt plugins and +Qgis. The way to handle this is to bundle Qt inside the Qgis application. You +can do this now or wait to see if there are immediate crashes when running Qgis. +It's also a good idea to bundle Qt if you need to copy Qgis to other Macs (where +you would have to install Xcode just so Qt would install!).

-To bundle Qt, add the following line before the last line in the above cmake configurations: +To bundle Qt, add the following line before the last line (the ".." line) in +the above cmake configurations:

 -D QGIS_MACAPP_BUNDLE=1 \
 
- -

5.7. Building

+

+Even better for distribution purposes, to also bundle any extra non-framework, +non-standard, libs (ie postgres' libpq) bump the bundle number to 2: +

+ +
+-D QGIS_MACAPP_BUNDLE=2 \
+
+ + +

5.6. Building

Now we can start the build process (remember the parallel compilation note at @@ -2322,14 +2227,14 @@

5.7. Building

-or, for a /Applications build: +or, for an /Applications build:

 sudo make install
 
- +

6. Authors and Acknowledgments

@@ -2379,5 +2284,5 @@

6. Authors and Acknowledgments

- + diff --git a/doc/osx.t2t b/doc/osx.t2t index f247ed225811..9ae565bdbdca 100644 --- a/doc/osx.t2t +++ b/doc/osx.t2t @@ -1,23 +1,24 @@ -= MacOS X: building using frameworks and Cmake = += Building on MacOS X = In this approach I will try to avoid as much as possible building dependencies from source and rather use frameworks wherever possible. -The base system here is Mac OS X 10.4 (__Tiger__), with a single architecture build. -Included are a few notes for building on Mac OS X 10.5 (__Leopard__) and 10.6 (__Snow Leopard__). -Make sure to read each section completely before typing the first command you see. +The base system here is Mac OS X 10.4 (__Tiger__), with a single architecture +build. Included are notes for building on Mac OS X 10.5 (__Leopard__) and 10.6 +(__Snow Leopard__). Make sure to read each section completely before typing +the first command you see. __General note on Terminal usage:__ When I say "cd" to a folder in a Terminal, it means type "cd " (without the quotes, make sure to type a space after) and -then type the path to said folder, then . A simple way to do this without having to know -and type the full path is, after type the "cd " part, drag the folder (use the icon -in its window title bar, or drag a folder from within a window) from the Desktop -to the Terminal, then tap . +then type the path to said folder, then . A simple way to do this +without having to know and type the full path is, after type the "cd " part, +drag the folder (use the icon in its window title bar, or drag a folder from +within a window) from the Desktop to the Terminal, then tap . -__Parallel Compilation:__ On multiprocessor/multicore Macs, it's possible to speed -up compilation, but it's not automatic. Whenever you type "make" (but NOT "make install"), -instead type: +__Parallel Compilation:__ On multiprocessor/multicore Macs, it's possible to +speed up compilation, but it's not automatic. Whenever you type "make" (but +NOT "make install"), instead type: ``` make -j [n] @@ -31,26 +32,27 @@ ie: Mac Pro "8 Core" model (2 quad core processors) = 8 ie: Macbook Pro i5 (hyperthreading) = 2 cores X 2 = 4 -== Install Qt4 from .dmg == +== Install Qt4 from disk image == -You need a minimum of Qt-4.4.0. I suggest getting the latest. +You need a minimum of Qt-4.4.0. I suggest getting the latest. There is no need +for the full Qt SDK, so save yourself some download time and get the frameworks +only. __Snow Leopard note:__ If you are building on Snow Leopard, you will need to decide between 32-bit support in the older, Qt Carbon branch, or 64-bit support in the Qt Cocoa branch. Appropriate installers are available for both as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa. -__PPC note:__ There appear to be issues with Qt Cocoa on PPC Macs. QT Carbon -is recommended on PPC Macs. +__PPC note:__ The readymade Qt Cocoa installers don't include PPC support, you'd +have to compile Qt yourself. But, there appear to be issues with Qt Cocoa on +PPC Macs anyways. Qt Carbon is recommended on PPC Macs. -``` http://qt.nokia.com/downloads -``` -If you want debug frameworks, Qt also provides a dmg with these. These are in -addition to the non-debug frameworks. +If you want debug frameworks, Qt also provides a separate download with these. +These are in addition to the non-debug frameworks. -Once downloaded open the dmg and run the installer. Note you need admin +Once downloaded open the disk image and run the installer. Note you need admin privileges to install. __Qt note:__ Starting in Qt 4.4, libQtCLucene was added, and in 4.5 @@ -71,29 +73,23 @@ CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build. == Install development frameworks for QGIS dependencies == Download William Kyngesburye's excellent GDAL Complete package that includes -PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also -a GSL framework. +PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks. +There is also a GSL framework. -``` http://www.kyngchaos.com/wiki/software/frameworks -``` Once downloaded, open and install the frameworks. -William provides an additional installer package for Postgresql (for PostGIS support). -Qgis just needs the libpq client library, so unless you want to setup the full -Postgres + PostGIS server, all you need is the client-only package. -It's available here: +William provides an additional installer package for Postgresql (for PostGIS +support). Qgis just needs the libpq client library, so unless you want to +setup the full Postgres + PostGIS server, all you need is the client-only +package. It's available here: -``` http://www.kyngchaos.com/wiki/software/postgres -``` Also available is a GRASS application: -``` http://www.kyngchaos.com/wiki/software/grass -``` === Additional Dependencies: General compatibility note === @@ -115,11 +111,10 @@ not necessary on Snow Leopard. Get the expat sources: -``` http://sourceforge.net/project/showfiles.php?group_id=10127 -``` -Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and: +Double-click the source tarball to unpack, then, in Terminal.app, cd to the +source folder and: ``` ./configure @@ -131,27 +126,27 @@ sudo make install __Leopard and Snow Leopard note:__ Leopard and Snow Leopard include a usable Python 2.5 and 2.6, respectively. So there is no need to install Python on -Leopard and Snow Leopard. You can still install Python from python.org if preferred. +Leopard and Snow Leopard. You can still install Python from python.org if +preferred. -If installing from python.org, make sure you install at least the latest Python 2.x from +If installing from python.org, make sure you install at least the latest Python +2.x from -``` http://www.python.org/download/ -``` -Python 3 is a major change, and may have compatibility issues, so try it at your own risk. +Python 3 is a major change, and may have compatibility issues, so try it at +your own risk. === Additional Dependencies: SIP === Retrieve the python bindings toolkit SIP from -``` http://www.riverbankcomputing.com/software/sip/download -``` -Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: + +__python.org Python__ ``` python configure.py @@ -159,23 +154,24 @@ make sudo make install ``` -__Leopard notes__ +__Leopard system Python__ -If building on Leopard, using Leopard's bundled Python, SIP wants to install in the -system path -- this is not a good idea. Use this configure command instead of the -basic configure above: +SIP wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path: ``` python configure.py -n -d /Library/Python/2.5/site-packages -b /usr/local/bin \ -e /usr/local/include -v /usr/local/share/sip -s MacOSX10.5.sdk ``` -__Snow Leopard notes__ +__Snow Leopard system Python__ Similar to Leopard, you should install outside the system Python path. -Also, you need to specify the architecture you want (requires at least SIP 4.9), -and make sure to run the versioned python binary (this one responds to the -'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon): +Also, you need to specify the architecture you want (requires at least SIP +4.9), and make sure to run the versioned python binary (this one responds to +the 'arch' command, 'python' does not). + +If you are using 32-bit Qt (Qt Carbon): ``` python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin \ @@ -189,59 +185,47 @@ python2.6 configure.py -n -d /Library/Python/2.6/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch=x86_64 -s MacOSX10.6.sdk ``` +__continue...__ + +Then continue with compilation and installation: + +``` +make +sudo make install +``` === Additional Dependencies: PyQt === Retrieve the python bindings toolkit for Qt from -``` http://www.riverbankcomputing.com/software/pyqt/download -``` -Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder -and (this installs by default into the Python framework, and is appropriate only for -python.org Python installs): +Double-click the source tarball to unpack it, then, in Terminal.app, +cd to the source folder. Then for your chosen Python: + +__python.org Python__ ``` python configure.py yes ``` -There is a problem with the configuration that needs to be fixed now -(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir line to: +__Leopard system Python__ -``` - 'qt_dir': '/usr', -``` - -Then continue with compilation and installation (this is a good place to use -parallel compilation, if you can): - -``` -make -sudo make install -``` - -__Leopard notes__ - -If building on Leopard, using Leopard's bundled Python, PyQt wants to install -in the system path -- this is not a good idea. Use this configure command -instead of the basic configure above: +PyQt wants to install in the system path -- this is not a good idea. +More configuration is needed to install outside the system path: ``` python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin ``` -If there is a problem with undefined symbols in QtOpenGL on Leopard, edit -QtOpenGL/makefile and add ""-undefined dynamic_lookup"" to LFLAGS. -Then make again. - -__Snow Leopard notes__ +__Snow Leopard system Python__ Similar to Leopard, you should install outside the system Python path. Also, you need to specify the architecture you want (requires at least PyQt 4.6), and make sure to run the versioned python binary (this one responds to the 'arch' command, which is important for pyuic4, 'python' does not). + If you are using 32-bit Qt (Qt Carbon): ``` @@ -254,48 +238,48 @@ For 64-bit Qt (Qt Cocoa), use this configure line: python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64 ``` +__continue...__ -=== Additional Dependencies: Qwt/PyQwt === - -The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. -You can take care of both with the PyQwt source from: +There is a problem with the configuration that needs to be fixed now +(it affects PyQwt compilation later). Edit pyqtconfig.py and change the qt_dir +line to: ``` -http://pyqwt.sourceforge.net/ + 'qt_dir': '/usr', ``` -Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1). -Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked -into PyQwt, and Qgis can't use it. So, we need to split the build. - -First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so -you don't get a bloated debug static library (too bad they are not configurable from -qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +=' -line, within an 'else' block, and change 'debug' to 'release'. Like so: +Then continue with compilation and installation (this is a good place to use +parallel compilation, if you can): ``` - else { - CONFIG += release # release/debug - } +make +sudo make install ``` -Also uncomment (remove # prefix) the line 'CONFIG += QwtDll'. Like so: +If there is a problem with undefined symbols in QtOpenGL on Leopard, edit +QtOpenGL/makefile and add ""-undefined dynamic_lookup"" to LFLAGS. +Then make again. -``` -CONFIG += QwtDll -``` -If you are building for Qt Carbon 32bit on Snow Leopard, add a line at the bottom: +=== Additional Dependencies: Qwt/PyQwt === -``` -CONFIG += x86 -``` +The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt. +You can take care of both with the PyQwt source from: -Save and close. +http://pyqwt.sourceforge.net/ -Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install: +Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 +(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same +time, but Qwt is statically linked into PyQwt, and Qgis can't use it. So, we +need to split the build. + +Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build +and install: ``` +cat >> qwtconfig.pri < Date: Sun, 29 May 2011 11:35:18 -0500 Subject: [PATCH 16/62] sync OS X doc updates and cleanup from release 1.7 --- CODING | 97 ++++++++++++++++++++++++++++++++++-------------- doc/CODING.t2t | 36 +++++++++++++++++- doc/INSTALL.html | 13 +++++-- doc/osx.t2t | 10 ++++- 4 files changed, 123 insertions(+), 33 deletions(-) diff --git a/CODING b/CODING index 74ab22a7fae6..2151d59c07c3 100644 --- a/CODING +++ b/CODING @@ -34,19 +34,23 @@ Developers guide for QGIS 1.9.5. Use Braces Even for Single Line Statements 1.9.6. Book recommendations 2. GIT Access - 2.1. Accessing the Repository - 2.2. Check out a branch - 2.3. QGIS documentation sources - 2.4. GIT Documentation - 2.5. Development in branches - 2.5.1. Purpose - 2.5.2. Procedure - 2.6. Submitting Patches - 2.6.1. Patch file naming - 2.6.2. Create your patch in the top level QGIS source dir - 2.6.3. Getting your patch noticed - 2.6.4. Due Diligence - 2.7. Obtaining GIT Write Access + 2.1. Installation + 2.1.1. Install git for GNU/Linux + 2.1.2. Install git for Windows + 2.1.3. Install git for OSX + 2.2. Accessing the Repository + 2.3. Check out a branch + 2.4. QGIS documentation sources + 2.5. GIT Documentation + 2.6. Development in branches + 2.6.1. Purpose + 2.6.2. Procedure + 2.7. Submitting Patches + 2.7.1. Patch file naming + 2.7.2. Create your patch in the top level QGIS source dir + 2.7.3. Getting your patch noticed + 2.7.4. Due Diligence + 2.8. Obtaining GIT Write Access 3. Unit Testing 3.1. The QGIS testing framework - an overview 3.2. Creating a unit test @@ -415,14 +419,53 @@ http://doc.trolltech.com/qq/qq13-apis.html designing Qt style (APIs) 2. GIT Access ============= -This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. Debian based distro users can do: +This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. + + + 2.1. Installation + ================= + + + 2.1.1. Install git for GNU/Linux + ================================ + +Debian based distro users can do: sudo apt-get install git + + 2.1.2. Install git for Windows + ============================== + Windows users can obtain msys git (http://code.google.com/p/msysgit/). - 2.1. Accessing the Repository + 2.1.3. Install git for OSX + ========================== + +The git (http://git-scm.com/) project has a downloadable build of git. +Make sure to get the package matching your processor (x86_64 most likely, only the first Intel Macs need the i386 package). + +Once downloaded open the disk image and run the installer. + +PPC/source note + +The git site does not offer PPC builds. If you need a PPC build, or you just want +a little more control over the installation, you need to compile it yourself. + +Download the source from http://git-scm.com/. Unzip it, and in a Terminal cd to the source folder, then: + + make prefix=/usr/local + sudo make prefix=/usr/local install + +If you don't need any of the extras, Perl, Python or TclTk (GUI), you can disable them before running make with: + + export NO_PERL= + export NO_TCLTK= + export NO_PYTHON= + + + 2.2. Accessing the Repository ============================= To clone QGIS master: @@ -430,7 +473,7 @@ To clone QGIS master: git://github.com/qgis/Quantum-GIS.git - 2.2. Check out a branch + 2.3. Check out a branch ======================= To check out a branch, for example the release 1.7.0 branch do: @@ -455,7 +498,7 @@ See the INSTALL file in the source tree for specific instructions on building development versions. - 2.3. QGIS documentation sources + 2.4. QGIS documentation sources =============================== If you're interested in checking out Quantum GIS documentation sources: @@ -467,7 +510,7 @@ If you're interested in checking out Quantum GIS documentation sources: You can also take a look at DocumentationWritersCorner for more information. - 2.4. GIT Documentation + 2.5. GIT Documentation ====================== See the following sites for information on becoming a GIT master. @@ -477,11 +520,11 @@ http://progit.org http://gitready.com - 2.5. Development in branches + 2.6. Development in branches ============================ - 2.5.1. Purpose + 2.6.1. Purpose ============== The complexity of the QGIS source code has increased considerably during the @@ -495,7 +538,7 @@ This section describes the procedure for branching and merging in the QGIS project. - 2.5.2. Procedure + 2.6.2. Procedure ================ - Initial announcement on mailing list: @@ -541,14 +584,14 @@ Component will be opened to file tickets against. Once there are no remaining issues left, the technical advisor of the PSC merges the changes into master. - 2.6. Submitting Patches + 2.7. Submitting Patches ======================= There are a few guidelines that will help you to get your patches into QGIS easily, and help us deal with the patches that are sent to use easily. - 2.6.1. Patch file naming + 2.7.1. Patch file naming ======================== If the patch is a fix for a specific bug, please name the file with the bug @@ -559,7 +602,7 @@ If the bug is an enhancement or new feature, its usually a good idea to create a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you - 2.6.2. Create your patch in the top level QGIS source dir + 2.7.2. Create your patch in the top level QGIS source dir ========================================================= This makes it easier for us to apply the patches since we don't need to @@ -580,7 +623,7 @@ and then generate a patch which contains the delta between your feature branch and what is in the master branch. - 2.6.3. Getting your patch noticed + 2.7.3. Getting your patch noticed ================================= QGIS developers are busy folk. We do scan the incoming patches on bug reports @@ -591,7 +634,7 @@ can escalate your query to one of the Project Steering Committee members (contact details also available on the Project Organigram). - 2.6.4. Due Diligence + 2.7.4. Due Diligence ==================== QGIS is licensed under the GPL. You should make every effort to ensure you only @@ -600,7 +643,7 @@ rights. Also do not submit code that you are not happy to have made available under the GPL. - 2.7. Obtaining GIT Write Access + 2.8. Obtaining GIT Write Access =============================== Write access to QGIS source tree is by invitation. Typically when a person diff --git a/doc/CODING.t2t b/doc/CODING.t2t index 3548693ddc0c..62697ef4e031 100644 --- a/doc/CODING.t2t +++ b/doc/CODING.t2t @@ -407,14 +407,48 @@ You should also really read this article from Qt Quarterly on = GIT Access = -This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. Debian based distro users can do: +This section describes how to get started using the QGIS GIT repository. Before you can do this, you need to first have a git client installed on your system. + +== Installation == + +=== Install git for GNU/Linux === + +Debian based distro users can do: ``` sudo apt-get install git ``` +=== Install git for Windows === + Windows users can obtain [msys git http://code.google.com/p/msysgit/]. +=== Install git for OSX === + +The [git http://git-scm.com/] project has a downloadable build of git. +Make sure to get the package matching your processor (x86_64 most likely, only the first Intel Macs need the i386 package). + +Once downloaded open the disk image and run the installer. + +__PPC/source note__ + +The git site does not offer PPC builds. If you need a PPC build, or you just want +a little more control over the installation, you need to compile it yourself. + +Download the source from http://git-scm.com/. Unzip it, and in a Terminal cd to the source folder, then: + +``` +make prefix=/usr/local +sudo make prefix=/usr/local install +``` + +If you don't need any of the extras, Perl, Python or TclTk (GUI), you can disable them before running make with: + +``` +export NO_PERL= +export NO_TCLTK= +export NO_PYTHON= +``` == Accessing the Repository == diff --git a/doc/INSTALL.html b/doc/INSTALL.html index 2fdd253dec82..9b81956e11ca 100644 --- a/doc/INSTALL.html +++ b/doc/INSTALL.html @@ -81,7 +81,7 @@

Sunday May 29, 2011

  • 5.1. Install Qt4 from disk image
  • 5.2. Install development frameworks for QGIS dependencies
  • 5.3. Install CMake for OSX -
  • 5.4. Download QGIS source from github +
  • 5.4. QGIS source
  • 5.5. Configure the build
  • 5.6. Building @@ -2100,10 +2100,17 @@

    5.3. Install CMake for OSX

    -

    5.4. Download QGIS source from github

    +

    5.4. QGIS source

    -Go to the github QGIS project page: +Unzip the QGIS source tarball to a working folder of your choice +(/usr/somewhere is not a good choice as it's hidden and requires root +privileges). If you are reading this from the source, you've already done +this. +

    +

    +If you want to experiment with the latest development sources, go to the github +QGIS project page:

    http://github.com/qgis/Quantum-GIS diff --git a/doc/osx.t2t b/doc/osx.t2t index 9ae565bdbdca..4b2e754c0421 100644 --- a/doc/osx.t2t +++ b/doc/osx.t2t @@ -355,9 +355,15 @@ make sudo make install ``` -== Download QGIS source from github == +== QGIS source == -Go to the github QGIS project page: +Unzip the QGIS source tarball to a working folder of your choice +(/usr/somewhere is not a good choice as it's hidden and requires root +privileges). If you are reading this from the source, you've already done +this. + +If you want to experiment with the latest development sources, go to the github +QGIS project page: http://github.com/qgis/Quantum-GIS From c8dd58791f366121e4a4db7a1589e7f7a3b9276e Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 31 May 2011 12:03:45 +0200 Subject: [PATCH 17/62] Show composer picture preview icons on demand --- src/app/composer/qgscomposerpicturewidget.cpp | 11 ++++++++--- src/app/composer/qgscomposerpicturewidget.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/composer/qgscomposerpicturewidget.cpp b/src/app/composer/qgscomposerpicturewidget.cpp index 5cd985a2d0e8..33d689e0c324 100644 --- a/src/app/composer/qgscomposerpicturewidget.cpp +++ b/src/app/composer/qgscomposerpicturewidget.cpp @@ -30,7 +30,7 @@ #include #include -QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture ): QWidget(), mPicture( picture ) +QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture ): QWidget(), mPicture( picture ), mPreviewInitialized( false ) { setupUi( this ); @@ -44,8 +44,8 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture mPreviewListWidget->setIconSize( QSize( 30, 30 ) ); - //add preview icons - addStandardDirectoriesToPreview(); + //add preview icons on demand in showEvent() + connect( mPicture, SIGNAL( itemChanged() ), this, SLOT( setGuiElementValues() ) ); connect( mPicture, SIGNAL( rotationChanged( double ) ), this, SLOT( setGuiElementValues() ) ); } @@ -263,6 +263,11 @@ void QgsComposerPictureWidget::on_mRotationFromComposerMapCheckBox_stateChanged( void QgsComposerPictureWidget::showEvent( QShowEvent * event ) { refreshMapComboBox(); + if ( !mPreviewInitialized ) + { + addStandardDirectoriesToPreview(); + mPreviewInitialized = true; + } QWidget::showEvent( event ); } diff --git a/src/app/composer/qgscomposerpicturewidget.h b/src/app/composer/qgscomposerpicturewidget.h index f064207f75f6..11995339d319 100644 --- a/src/app/composer/qgscomposerpicturewidget.h +++ b/src/app/composer/qgscomposerpicturewidget.h @@ -54,6 +54,8 @@ class QgsComposerPictureWidget: public QWidget, private Ui::QgsComposerPictureWi private: QgsComposerPicture* mPicture; + bool mPreviewInitialized; + /**Add the icons of a directory to the preview. Returns 0 in case of success*/ int addDirectoryToPreview( const QString& path ); /**Add the icons of the standard directories to the preview*/ From df8bd2d79b3f588d7cea31444599bd8df24d6858 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Mon, 30 May 2011 00:21:14 +0200 Subject: [PATCH 18/62] implement some workaround to support legacy WMS (fixes #3853) --- src/providers/wms/qgswmsprovider.cpp | 34 ++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index c55533918c6c..b18c7fa67b61 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -1724,6 +1724,25 @@ void QgsWmsProvider::parseLayer( QDomElement const & e, QgsWmsLayerProperty& lay e1.attribute( "maxx" ).toDouble(), e1.attribute( "maxy" ).toDouble() ); + + if ( e1.hasAttribute( "SRS" ) && e1.attribute( "SRS" ) != DEFAULT_LATLON_CRS ) + { + try + { + QgsCoordinateReferenceSystem src; + src.createFromOgcWmsCrs( e1.attribute( "SRS" ) ); + + QgsCoordinateReferenceSystem dst; + dst.createFromOgcWmsCrs( DEFAULT_LATLON_CRS ); + + QgsCoordinateTransform ct( src, dst ); + layerProperty.ex_GeographicBoundingBox = ct.transformBoundingBox( layerProperty.ex_GeographicBoundingBox ); + } + catch ( QgsCsException &cse ) + { + Q_UNUSED( cse ); + } + } } else if ( e1.tagName() == "EX_GeographicBoundingBox" ) //for WMS 1.3 { @@ -1751,8 +1770,19 @@ void QgsWmsProvider::parseLayer( QDomElement const & e, QgsWmsLayerProperty& lay e1.attribute( "maxx" ).toDouble(), e1.attribute( "maxy" ).toDouble() ); - bbox.crs = e1.attribute( "CRS" ); - layerProperty.boundingBox.push_back( bbox ); + if ( e1.hasAttribute( "CRS" ) || e1.hasAttribute( "SRS" ) ) + { + if ( e1.hasAttribute( "CRS" ) ) + bbox.crs = e1.attribute( "CRS" ); + else if ( e1.hasAttribute( "SRS" ) ) + bbox.crs = e1.attribute( "SRS" ); + + layerProperty.boundingBox.push_back( bbox ); + } + else + { + QgsDebugMsg( "CRS/SRS attribute note found in BoundingBox" ); + } } else if ( e1.tagName() == "Dimension" ) { From edad445fbbc663549d31c55413c2470691c37944 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Wed, 1 Jun 2011 22:28:09 +0200 Subject: [PATCH 19/62] fix #3859 --- src/plugins/grass/qgsgrassedit.cpp | 4 ---- src/plugins/grass/qgsgrassplugin.cpp | 7 +++++++ src/plugins/grass/qgsgrassplugin.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/grass/qgsgrassedit.cpp b/src/plugins/grass/qgsgrassedit.cpp index 2f5d63537704..56acff8d0650 100644 --- a/src/plugins/grass/qgsgrassedit.cpp +++ b/src/plugins/grass/qgsgrassedit.cpp @@ -1813,8 +1813,6 @@ void QgsGrassEdit::displayDynamic( struct line_pnts *Points, double x, double y, void QgsGrassEdit::displayNode( int node, const QPen & pen, int size, QPainter *painter ) { - QgsDebugMsg( QString( "node = %1" ).arg( node ) ); - if ( !mSymbDisplay[mNodeSymb[node]] ) return; @@ -1840,8 +1838,6 @@ QgsPoint QgsGrassEdit::transformLayerToMap( QgsPoint point ) void QgsGrassEdit::displayIcon( double x, double y, const QPen & pen, int type, int size, QPainter *painter ) { - QgsDebugMsg( "entered." ); - QgsPoint point; QPolygon pointArray( 2 ); diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index 27da98b6bebf..e13fdd466bc2 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -454,6 +454,7 @@ void QgsGrassPlugin::edit() mCanvas->refresh(); connect( mEdit, SIGNAL( finished() ), this, SLOT( setEditAction() ) ); connect( mEdit, SIGNAL( finished() ), this, SLOT( cleanUp() ) ); + connect( mEdit, SIGNAL( destroyed() ), this, SLOT( editClosed() ) ); connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) ); } else @@ -488,6 +489,12 @@ void QgsGrassPlugin::closeEdit( QString layerId ) } } +void QgsGrassPlugin::editClosed() +{ + if( mEdit == sender() ) + mEdit = 0; +} + void QgsGrassPlugin::cleanUp() { disconnect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) ); diff --git a/src/plugins/grass/qgsgrassplugin.h b/src/plugins/grass/qgsgrassplugin.h index 6c496823d8ea..d725bf61401b 100644 --- a/src/plugins/grass/qgsgrassplugin.h +++ b/src/plugins/grass/qgsgrassplugin.h @@ -130,6 +130,7 @@ class QgsGrassPlugin : public QObject, public QgisPlugin //! update plugin icons when the app tells us its theme is changed void setCurrentTheme( QString theThemeName ); void setTransform(); + void editClosed(); private: //! Name of the plugin QString pluginNameQString; From 94dc380cddf4833754576838e126e82f3594aeec Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Thu, 2 Jun 2011 11:13:13 +0200 Subject: [PATCH 20/62] Mark icon with 'm' for master branch to make working with multiple installs easier --- images/icons/qgis-icon-60x60.png | Bin 5220 -> 5051 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/images/icons/qgis-icon-60x60.png b/images/icons/qgis-icon-60x60.png index a55bd79a49acfc3ce50f8cdc1e362d70d2217ad2..a1f63bcf18ddf3372db02290254c61eccaad3db1 100644 GIT binary patch delta 5024 zcmV;R6JPA)D7z<+Bnkm@Qb$4nuFf3kks&F600(qQO+^RW1_B2$8`u-0yZ`_bJ4r-A zRA}DSnrUoY*LBB#_rCXL-^k%`6Gc)Bwac<3TZwJSS)6!D9Jg_u1kTblNItZPfu?93 zGzrqc2-+|C(jw`H7D1Xc3+l9Xfi#I4XK`%VmbFj|C6l5gQsOR(+YD!a%f0nE3ga0>?9!@*&@Sy)E(!=(vR5(6aWv9S{viSu!4D9#R0{shh>7#izN5R1Q8)XyP)zuvv#dCX&1DAhf-5a z`PI4dhZfSpe=T)sHG?4=xJv~1x(Ksgm`Gg&&Q|SrU(N85J3rS@RtPqlZG@feYKlh=U?Vrw;EI0m0G)1 zA;@ZFPZSEJ6JulZ-G>ehpZ@26K2SI{GSx<_deCU$NnsH&nm}fJBNnW(D$8u~hkP54 z7l2+M_x}~rJ8BMR*R>vaq~}PqzkhlxpRLRVLL^sq#M(A)Ot-FRPHk_0Xo!Ejt84wp z-FMgRd;a+|-QW4`p?+_*1PG&+!;45LQpBU^=dZgQLvI$aeoKVx{MNVrEU16@ z;^XuTEm%kes5c${)vxS5+sj9*=-6C%TZ7oHX;&WA4N>phKV zz1ZPO=^mg5I0Xz;D{k-WuTDHWH|rkA7hUotn-|ZF@Y9~tltMNl_~v@63%Kqn&fDD_ z@P;XQV>l{L&acq+Z3pbZ{zcVq@BT33*~{;<+f(3O5n*S5F~7K!fZXWN{J{8V`MFZj zE0ih@KYINXgM}=ABH;(AFEqSSk++Z2?+);aH^mE>%potY!OralEap2i-HSf?-ph;L zPHjwH!7woFhoI}{o1>J@51z^W{^Csem7g5wS1%2XqLaE-q)MPl5S%mFUTF$$T$vU@ z%Q&m^d`DRPBbo!i><<@HY{bB?um>=P7R7qozkXE*FsrWfRZ3R7p5yx&$tqXwx6_ zV(KALuT7+1q)HH<3$j@^uz7twYu6{}Tobo;?n>`|@R8LISk@)iEU#&JTYv>1L_VPJ zYgqF8!d(p%3+_@fZV_0c4Z~c^P7&fMnII@aepRl2fKiaFE!MGaWgTm~k~B7jiN!7I z>MdjU`!XMDZHuh~5`b|-J@(D7N(G!9akRDg5!w(Gw$xFrc-I3gf_vzYVV;%|T4lV( zldb?oLF06cu5=x%yOOlFMTo{M0s%=lV$#+TTf1>{dMA(ptQ(QY<_)ka4eC@C-?4$9L8dX7+^{+I?!yNnho`4XV}1_1x0+$m))v_% zgxd@y9LkidE_#Vl;VDg}>^YUPSMX)uTZMstG#dG!2=Wn`Ab43|R3JJZWCLl|ud1VS zO`Q6MAc3HP5CS2yL7E^97Uz< zdbX{~3xxe;{T+BOF%jX*GRlfe0z+3o7tx*h6kD4zbZtn{)EpraH8BivInE425{j6A z)TM)&`gEuhNYxt1`(|MRIpz}^lXo-R|YR+nVA*3E0mW!Ehg?UG+bFNa&? zN$O=iUy)(9$$GyFDuOPcMZY<9cV}z;_H7xnV||o(%EB}k*CZ(g!JwqB&WfZnp-yTo zX~zIB*GzbS&r_b`c$Ed=tV0hFkSRVWEIuKVwWc1Y#;$jP zLiwobTeCLqu3eKN(-6iqC1MHQEK3py7^Lb#E&g~mxLhpD1uPN?CnJO%(YQFCi}Lhx zDxK%Al?o6>J6*!!3o=5BOw>MAWl&jMyN7XmOr71ZKI65vB#1;zq+B{m4O0?-3L7Mn zRuYK$3>&u;uw_*ePz`FTHNaY52dmH^^rd1IdWfiu@g))CJu*`>PL*qUYxgqk^w6gr zPOV*2?<7+pO!Mld8HT_L7?>szAaWx)yzG#c(y@eaq|z>~R?E|IK6VkrFgkfug!qI^ zVP2}rl))WkzWO@Hbd?^Uuf9HitSn1j*L)#CDP{QU@GY;>!gZC>+SM8lPwC|-*UJV3 z-p@J_-6PW*eW8G43+_ag8p6n#Hz{aMJB#AMg^;8;^&7DpE=f3ULj> zJXcdLx|B+uy`V^UK*>8UH@t6={6D0Z?A>_J>V$mU=b4z~nzpQ!I4N1!b2QOUMbXQ9uVVM}l zwfE>OOA?8gQp9Kr)*D-YTN;yz#+Epp@n%fhK$n!B9-5z=-)iS(XDYdqCr66_D^|pk zV3;)?uI|xl)gzyCn3*om`NGDz)qvHPpWZw5(a(JLOfV$3BWo;PjRnIH#1d9;*L^Mb zeDjYV5ANK!g_cwpLuiz)BCv)0taEp@>TRl2$`4OZ7k<;-J^I^!P{>Nwijcah{aS1C z^A3}f6?^Jpc?vEM;?*r>7;uNrmG*~Y;U}zslv0YTuEmxmS+_oE+<$L}(bm+)#pwwS zo}FeUJCE`_9g7*XwZ=rIArea_LK{=5z=pQARUgaclA}Vz1Bzm;FfLiFG_%tcE{v55 z+1cupKOd{!4#3`ju_LqHZJo_?(KzXA`5Q6 zeX9X$!25^4+uyfk+e74D{3s)*9EDIM^N+Ryg^Rjatt^Q^t+Ba9g9Twt?sBBO9UdALZVa+m{NLC zC#JQgQt_CYEOUM^uX|6-ou1EC2Z0HH66)QK5swCc+#h`R zCi?qk4=Sbm{VB?_!}(?y)W}Le8;I90dO;OX}9O- z+e&2bO8wG4|bC;TNO3sK~hK+vF}F=TAtm0mM+KEG-2&x(iry(JG2k%$wQ(!0DT zqZhHO89txqX!lHI|Gvpnr{0)(#dXy&f9G-bExQe3sk!&f0v3Q_ZX_6bfZav|Psk|u z5~Ll7=87fp;`9*qA;r6An^@T%#chdy5Q~}wLniU0#oDe!>XFAf9_{U!dwuA9?$R>i zd0sUDu2DOVvsg}Q4Rf=$d-TxExs%6d4myrHO6^#~_yT1me)OZK!pUSL@wKl#o9pQr zvbou#htbbtAz2|~Y%}WlFd;r5Lv&yvg})Q8s-Qf`n^pEs4sd*Unq4hTdRte2S~s^u zWPLhFeM5+JCM53J6WILi@7@2*Kwtg`*vVt}-FJ7Wv9bA6QWhE%LrY3YA<#;xImcGL z3o3jOP@n$v{qmV-KC!C3J^kI8*=fD&U2R|Q=@~ldfA8Kn!wxaRya&nSz&(^ns}fSH zH#<=6`Xg2sbU-ua z2YZhlJvP|sJEU?`fbDKdBF;;~U>wOIZL<-(CWD>Vp4Ri*4{gss~#EJ`RRKG1 z;P{)(C126J0yJQ;LPY3)5Fy%)G+RZKb{Qumn?NS<)I7tEt-8lY3w`6Gh02kGlbJx! zY)&MCE5Z?@K}y014A0eGU0o>ig)eT{y>?w!+;zpGb6AEUNYw?!op+@>S9T;Ga|?mo zx~{b&J9lnrZEI`(OUv>$duq~r?NE2=zn?ojIiIr^?r_}HXI1y%-bSmnA%1^IG;Wb1Qw;>7^->msO3!k3xS!{r>z_H@mpiAFp7!m0Tj!;f z|8o5%d*1I(EZ^{d38RIzvXPC#B%%tGb(x&6fb#zR^Zqho`XP5|=w^h2!BH6yPgFd2 zmDU<`O+(j4NP<`_KrCt!4+XJ=uJ;uwuBtFFGS2_}qTk!UZ}N1hWDom7UA?!S8TfBNU^e(8GdJ*Fj$ zOQ9_Ni3&iu;&IW-6EI46N>ePk^qrjL(CZi77hjk-efreg0j)XZN8oi&0^F?9syRWU z@hF)cY!N}W>RHC!vmDkoCw*3(t2pnnQSo?aK9;a{*;TjM^R&QM)?)r;p_sFpn{6%Va6)vCwbY?aZWBBxK~c%x@lz4r3OGslli z@6XOv4+F=5Q9plg`*~>%*iIj>85xeCm_adn1ESu4E0>-8kN>T2Z|CaN)TXUD`O+2nSrzOXNLxJ2mA)27dY=9Zn>>zEf*Q>on~6y z$uG5_6U8()aH_^Pbng6MwtHf{FcphguO*VfHPM*aBBf5at}aRSA;1x>s^tk-xUUxZQwRVC1D`$a@So<-pgA5pHo;I?4S;pBe!i4=I)9!iFKnj=-4(0vHuuLOD_hXv_^vN`z z7ID5}B-trq7%0$9e^84ke*tq1Q2oAS*w}^RsE!F#<&s~m>x;64%J z8zRDPVIp-Elnb~4qi)N2b#U=$7hhLc0jjM}{r_iJWHNF2#VarF#9Jd%&e+)Ue_XlPD1^eKw)Mw*@4U0UXKPpb z-j0sM=LQFN&)k21+pFLI{)M6c@sG#H{5xDJ_)W{=5h3brP%(X#XL^2?7k@nNegC@`PnB(+i1iy%HhUl^pors_ICFl6AN=r=`}co4HGFz#>8DERGr&}- z*eowEHC~Oy?U~;G=+{kKg|pcx!YBOWiHW`ofAs>g9fSqC)`Fv|II4)!O~NR&KgTjq z4j5Lqo#AJmIU=8b{&T&3ec9i%ZTYMar5NPVgLi ze`QKRhITdzSpFi+KKtzB?c26xf6KOwe=kHK1`BAeQg-t!7E4UctZ;dv?2Ml;O;pOx zIB)@&3zAC>D9ui-Ow7;LzgMgJm0H8)+i#v{vQk7O11AlHhCeIH&M;%%1h4r^yo5;s zdF>8%Z#To@yWjoo$iai#|C?>=XJE;Oe+67spwO&Rt~sm}9j?sR7#l4vUYaNlE2Yl? z(}4@FCKy*KU7oy9`se-kr(gTY^rc5%nVOY!=vI=dfU1FAFxlVeunXH3z%Re}CdHi^J?!!8v!!q0w8M+CwBH6Z*gjf7w{kaI=6# zPfy~WP>4?mQ4VQJRJ{tdhO4gfe zs#0k-@zi>6@_kLS;giqRfAVlm+7vs-SZ@&R}~RcMPWJ z>5USLTZBTANYtdaKfd$MeeH*UEMRR$B5ww;IC0|nfpA!T3Tg(FC^qvwXkD)<{1hFsjsGYjJR#c=tV+iUbmXJl9qM4;z6?7Df0Ja|!&sKYG$kS1 zAlqrD_UudlN=G)j6NqnyE_LcnZ+-Q$#-$r|-)+?WN+A2*DGa31 z$;XAwCuI^_*l)XXY{g~|?d;y(#=wpQnGTzfZ6Jg|2rx}SEM^*=UE%)DEs^bO+*;gf zz(zc79udN|Gpg#GH#h|q_LizvS*V{Ba&7`g$viXJGZ z*}o;r;GQ&Fx}rp5CWaxd6?cXq2}e!Z+U;znJv;!UTLt9C0B`hK5`Xq*UrmQX&b{E{ z>pInD^SbP|s(DSl?s>JUQwx&SwMr)X1u`Xfb9k-9ONix%WWU z?B5+Dk+v|+_1-F_z_ulAZC12B8y*1Kfp8Euw~pZh2exb#LL|Y#RSvGF-nGj1edW8Z z-&o_$I{XMBndald;`1`qD(Z1t?D|)z)K96=9Xk`=&K+s89T7}ZBCf-mWl2IIgLGTC zJ7~|^8^y9wf50M{bhAP@QH_V|dnkVc_q@Oll9d94(Z`^$_?nE;Et9REsye75o-@L{ zGp8=@*`4)!x|2ksCQ@GCOAS*Jju<3URw_tZ;f*G)4Fk5UMiQE~rr83l^?P6y8iZa= zR^i8p$vD3&;yf&~E#p+Z6}QegmfaCXwafXPJ2Gx6e;vj&Z)}=j2&|BSX%YpZn~C8K zyR?+9C4?)L_VBdYn2rmu3md~2;7JkY^D>ROnw6=8H_J-%O-}13Bfw}T6H%5W-_v{{ zK`CVf_wX&x(!%qU(%RD+A7AN>DA#KSgg(kHVe_nrlaSG%#aaiyK+`$JTe`?e-~@0f z5;6T7f4TCyyWUkej?w|x4HLJ~EUl|ms#^OFsOu(@pF2rINXwF@xt%_y7d%@CtA)kq9@Wlo}M`T?q3%O}*+-tNG5F9C2%f$MUjU@U`2}sB0qN z#y%{F#w;_Q2*r#69ur|6mMJX#cHH7lu;89$e^@)511G)k$nzA{ zs!O@#)q>)GL;b8xm4`=_3LXR;rbR)D7*|T2o$eSzK&5OIPblL2**Q9W5Sj`cmzUNIdcx zD23^2-gb%+)Hzd~+!%PMWs^uz&hweyDe#s}M`j{%$dB zhb5T~o0+)+|NF0g$jJ*=na&rf7raKK9LjZOBhEbsvs>;x)E+%}D9f(x84(Ugf4gj3 zbqdjtps#z+Ypto*J+3a+_1s)7Un)6^0bu7=1J;25U;oP+qjw#6?A2}C!=H-AOmSmj zASvYQ{P?A5zV(0Jq7ik$z;(wsqm~#Mg-e$&RwAyaezmP5v_GA-jAYco&?^$a(+bz~ zuM@k9rK@!&FP57VeC&e~B7HU9M0a;8EM>@UCE1@BGoGi&=bBu)SmNyIeBRw)B zqoi^e?cTPpSX`)cVYJA}x-+FRnB)<+Bctc)j#&jgm-)NG2_;P^-h((HS=GJ>0%y z>T-GSi+^7|v8Ev}qER;?r5{_RRj*@LGkv+tsi9osjaL`Xf1iIV_nPOa)4=)bOfkfo zko$!J3&1e%#122ggGL9Rkug4qO&<^|Rcqqqa>Qu1SFuz7w ziEn@V*+?oCe@*_uAAF}YGBV|Gv#W=(uVNwDD&rh5GW;rGJ|@HTVj>=5CO{ODEdp0Z{I1<|TNB{Go7bZr_e~yzn{h<%tAMWhz z`l6JT4#m`UrKAvOrBuOn)VVboz6z)>ed!_j!V90@f8N*E{;gboSs(sD?>9z9rp~Tu z`frk9mpBm~M)EZ90Cn0`4XM@J6{z-t7OMw3q?vO|{CKq9m^xFrvS&{^wzV(T*0VKg zWw(Us>WOmCy>0uB9Pa;p>2J9biEK%lrnN-~X=^RedVMJ(1jG`i?COqLk*L|Ml%2{d zvrj&Ge@H(6{O1OGdfJ~uG>%-HJa_uk>B)iMKpHm%*cqZG61*Y|=8+uN4tFBhCoHxJ zo45#Li7-Nhf^V^ah^FK;m*048;inhRmsYyB#?pQLiTxd&p`L7KB))4;+PrX!ARYIj*gF9yq9lEQhx3}weEX&{Lt3~tm<3qK-``-BCO37I} z;kc=7TD7K$z6v^uOG1}O=n^SiV=#0VU%}*{FcCuF>Jp2=TEiqz)S7U!;l-C4Ug8}s zRdfH{o!dY9(QSJ|AtO=u{dHDK32m7We;@c@r`6MucqlA7?~)?h425DDDJ! zugmwfAW+sqv_LD>DjrtK4h!>D#>WaA{n=IT=+Bleoj$qrM!oJG14eZHxrSjF70=bXou-#@TwgTnK8=Qte^#1i)2EPc zGCNge{CtVGM)KY z`7i(1=!*k)q?h*YZ+p78FM1>rG19TP6^_OX!}qnQlwEaYzTTLdspTdvu3Vg&EFBFB zh;zW@V7cXAY}eBF$5~eQfAAwM7(lViCbntFMdi#`Id><76U*xP)aGbk>tDH1kXms`PL ztUVZkrhr)Ra{{j^2UXJQ23~Wc%-%}C08%800ZF}ryCzHP&3;edLUraE{kE!{yx>`9@_zx3Syz%?C%bEYNgly%+Ooe@&;J97DA+LkKK!l#0000 Date: Thu, 2 Jun 2011 17:21:03 +0200 Subject: [PATCH 21/62] applied #3863 (fixes #2774) --- doc/CONTRIBUTORS | 1 + resources/context_help/QgsBookmarks-en_US | 5 ++ src/app/qgisapp.cpp | 1 - src/app/qgsbookmarkitem.cpp | 63 +++++++++----------- src/app/qgsbookmarks.cpp | 71 ++++++++++++++++++++++- src/app/qgsbookmarks.h | 3 +- 6 files changed, 105 insertions(+), 39 deletions(-) diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS index e397d363f85f..d29403c394c7 100644 --- a/doc/CONTRIBUTORS +++ b/doc/CONTRIBUTORS @@ -48,6 +48,7 @@ Richard Duivenvoorde Richard Kostecky Robert Szczepanek Stefanie Tellex +Steven Mizuno Tom Russo Tyler Mitchell Vita Cizek diff --git a/resources/context_help/QgsBookmarks-en_US b/resources/context_help/QgsBookmarks-en_US index d516a1dad55b..8b89bf2d3aa7 100644 --- a/resources/context_help/QgsBookmarks-en_US +++ b/resources/context_help/QgsBookmarks-en_US @@ -5,6 +5,7 @@ Spatial Bookmarks allow you to "bookmark" a geographic location and return to it Working with Bookmarks
    Zooming to a Bookmark
    Deleting a Bookmark
    +Updating a Bookmark

    Creating a Bookmark

    @@ -31,4 +32,8 @@ You can also zoom to a bookmark by double-clicking on it.
    Deleting a Bookmark
    To delete a bookmark from the Bookmarks dialog, click on it then click the button. Confirm your choice by clicking or cancel the delete by clicking . + +
    Updating a Bookmark
    +
    +To update the extent of a bookmark, click on it then click the button. Confirm your choice by clicking or cancel the update by clicking . diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 684c993f0d8a..8829ebbdcd34 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -6338,7 +6338,6 @@ void QgisApp::showBookmarks() { bookmarks = new QgsBookmarks( this, Qt::WindowMinMaxButtonsHint ); } - bookmarks->restorePosition(); bookmarks->show(); bookmarks->raise(); bookmarks->setWindowState( bookmarks->windowState() & ~Qt::WindowMinimized ); diff --git a/src/app/qgsbookmarkitem.cpp b/src/app/qgsbookmarkitem.cpp index 254a19d5edc2..64e00d258ec0 100644 --- a/src/app/qgsbookmarkitem.cpp +++ b/src/app/qgsbookmarkitem.cpp @@ -42,48 +42,41 @@ void QgsBookmarkItem::store() int rc; QgsDebugMsg( QString( "Opening user database: %1" ).arg( mUserDbPath ) ); rc = sqlite3_open( mUserDbPath.toUtf8().data(), &db ); - if ( rc ) + if ( SQLITE_OK == rc ) { - QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( db ) ) ); - - // XXX This will likely never happen since on open, sqlite creates the - // database if it does not exist. - assert( rc == 0 ); - } - // prepare the sql statement - const char *pzTail; - sqlite3_stmt *ppStmt; - QString sql; - QTextStream sqlStream( &sql ); - sqlStream << "insert into tbl_bookmarks values(null,'" << - mName << "','" << - mProjectTitle << "'," << - mViewExtent.xMinimum() << "," << - mViewExtent.yMinimum() << "," << - mViewExtent.xMaximum() << "," << - mViewExtent.yMaximum() << "," << - mSrid << ")"; + // prepare the sql statement + QString sql; + QTextStream sqlStream( &sql ); + // use '17 g' format; SmartNotation is default + sqlStream.setRealNumberPrecision( 17 ); + sqlStream << "insert into tbl_bookmarks values(null,'" << + // fix occurrences of single-quote + mName.replace( '\'', "''" ) << "','" << + mProjectTitle.replace( '\'', "''" ) << "'," << + mViewExtent.xMinimum() << "," << + mViewExtent.yMinimum() << "," << + mViewExtent.xMaximum() << "," << + mViewExtent.yMaximum() << "," << + mSrid << ")"; - QgsDebugMsg( QString( "Storing bookmark using: %1" ).arg( sql ) ); + QgsDebugMsg( QString( "Storing bookmark using: %1" ).arg( sql ) ); - QByteArray sqlData = sql.toUtf8(); - - rc = sqlite3_prepare( db, sqlData.constData(), sqlData.size(), &ppStmt, &pzTail ); - // XXX Need to free memory from the error msg if one is set - if ( rc == SQLITE_OK ) - { - // get the first row of the result set - if ( sqlite3_step( ppStmt ) != SQLITE_DONE ) + char * errmsg = 0; + rc = sqlite3_exec( db, sql.toUtf8(), NULL, NULL, &errmsg ); + if ( rc != SQLITE_OK ) { - // XXX query failed -- warn the user some how - QgsDebugMsg( QString( "Failed to store bookmark: %1" ).arg( sqlite3_errmsg( db ) ) ); + QgsDebugMsg( QString( "Failed to store bookmark: %1" ).arg( errmsg ) ); + sqlite3_free( errmsg ); } - // close the statement - sqlite3_finalize( ppStmt ); - // close the database sqlite3_close( db ); } + else + { + QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( db ) ) ); - + // XXX This will likely never happen since on open, sqlite creates the + // database if it does not exist. + assert( rc == 0 ); + } } diff --git a/src/app/qgsbookmarks.cpp b/src/app/qgsbookmarks.cpp index 1552772816ff..214fcbfc3c8d 100644 --- a/src/app/qgsbookmarks.cpp +++ b/src/app/qgsbookmarks.cpp @@ -37,6 +37,9 @@ QgsBookmarks::QgsBookmarks( QWidget *parent, Qt::WFlags fl ) mParent( parent ) { setupUi( this ); + + restorePosition(); + // user database is created at QGIS startup in QgisApp::createDB // we just check whether there is our database [MD] QFileInfo myFileInfo; @@ -53,11 +56,15 @@ QgsBookmarks::QgsBookmarks( QWidget *parent, Qt::WFlags fl ) // Create the zoomto and delete buttons and add them to the // toolbar // + QPushButton * btnUpdate = new QPushButton( tr( "&Update" ) ); QPushButton * btnDelete = new QPushButton( tr( "&Delete" ) ); QPushButton * btnZoomTo = new QPushButton( tr( "&Zoom to" ) ); btnZoomTo->setDefault( true ); + buttonBox->addButton( btnUpdate, QDialogButtonBox::ActionRole ); buttonBox->addButton( btnDelete, QDialogButtonBox::ActionRole ); buttonBox->addButton( btnZoomTo, QDialogButtonBox::ActionRole ); + // connect the slot up to catch when a bookmark is updated + connect( btnUpdate, SIGNAL( clicked() ), this, SLOT( on_btnUpdate_clicked() ) ); // connect the slot up to catch when a bookmark is deleted connect( btnDelete, SIGNAL( clicked() ), this, SLOT( on_btnDelete_clicked() ) ); // connect the slot up to catch when a bookmark is zoomed to @@ -108,7 +115,7 @@ void QgsBookmarks::initialise() QString xMax = QString::fromUtf8(( const char * )sqlite3_column_text( ppStmt, 5 ) ); QString yMax = QString::fromUtf8(( const char * )sqlite3_column_text( ppStmt, 6 ) ); // set the extents - item->setText( 2, xMin + ", " + yMin + ", " + xMax + ", " + yMax ); + item->setText( 2, xMin + ", " + yMin + " : " + xMax + ", " + yMax ); // use colon to separate ll from ur corners listed (be consistent with other displays of extent) // set the id item->setText( 3, QString::fromUtf8(( const char * )sqlite3_column_text( ppStmt, 0 ) ) ); } @@ -144,6 +151,66 @@ void QgsBookmarks::saveWindowLocation() settings.setValue( "/Windows/Bookmarks/geometry", saveGeometry() ); } +void QgsBookmarks::on_btnUpdate_clicked() +{ + // get the current item + QTreeWidgetItem *item = lstBookmarks->currentItem(); + if ( item ) + { + // make sure the user really wants to update this bookmark + if ( QMessageBox::Ok == QMessageBox::information( this, tr( "Really Update?" ), + tr( "Are you sure you want to update the %1 bookmark?" ).arg( item->text( 0 ) ), + QMessageBox::Ok | QMessageBox::Cancel ) ) + { + // retrieve the current map extent + QgsRectangle viewExtent = QgisApp::instance()->mapCanvas()->extent(); + + int rc; + QgsDebugMsg( QString( "Opening user database: %1" ).arg( QgsApplication::qgisUserDbFilePath() ) ); + rc = connectDb(); + if ( SQLITE_OK == rc ) + { + // prepare the sql statement + QString sql; + QTextStream sqlStream( &sql ); + // use '17 g' format; SmartNotation is default + sqlStream.setRealNumberPrecision( 17 ); + sqlStream << "update tbl_bookmarks set " << + "xmin=" << viewExtent.xMinimum() << "," << + "ymin=" << viewExtent.yMinimum() << "," << + "xmax=" << viewExtent.xMaximum() << "," << + "ymax=" << viewExtent.yMaximum() << " " << + "where bookmark_id=" << item->text( 3 ); + QgsDebugMsg( QString( "Storing bookmark using: %1" ).arg( sql ) ); + + char * errmsg; + rc = sqlite3_exec( db, sql.toUtf8(), NULL, NULL, &errmsg ); + if ( rc != SQLITE_OK ) + { + // XXX Provide popup message on failure? + QMessageBox::warning( this, tr( "Error updating bookmark" ), + tr( "Failed to update the %1 bookmark. The database said:\n%2" ) + .arg( item->text( 0 ) ).arg( errmsg ) ); + sqlite3_free( errmsg ); + } + // close the database + sqlite3_close( db ); + + refreshBookmarks(); + + } + else + { + QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( db ) ) ); + + // XXX This will likely never happen since on open, sqlite creates the + // database if it does not exist. + assert( rc == 0 ); + } + } + } +} + void QgsBookmarks::on_btnDelete_clicked() { // get the current item @@ -186,7 +253,7 @@ void QgsBookmarks::on_btnZoomTo_clicked() zoomToBookmark(); } -void QgsBookmarks::on_lstBookmarks_doubleClicked( QTreeWidgetItem *lvi ) +void QgsBookmarks::on_lstBookmarks_itemDoubleClicked( QTreeWidgetItem *lvi ) { zoomToBookmark(); } diff --git a/src/app/qgsbookmarks.h b/src/app/qgsbookmarks.h index 511dd5a0f5e0..2e10216d768b 100644 --- a/src/app/qgsbookmarks.h +++ b/src/app/qgsbookmarks.h @@ -34,9 +34,10 @@ class QgsBookmarks : public QDialog, private Ui::QgsBookmarksBase void restorePosition(); private slots: void saveWindowLocation(); + void on_btnUpdate_clicked(); void on_btnDelete_clicked(); void on_btnZoomTo_clicked(); - void on_lstBookmarks_doubleClicked( QTreeWidgetItem * ); + void on_lstBookmarks_itemDoubleClicked( QTreeWidgetItem * ); void refreshBookmarks(); void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); } From 107df1f08c00a718966f7aa6550c13f506e95dc9 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Thu, 2 Jun 2011 21:52:20 +0200 Subject: [PATCH 22/62] browser changes: - use empty string as default wms style - update wms preview when render caching is enabled - some cleanups --- src/browser/qgsbrowser.cpp | 118 ++++++++++------ src/browser/qgsbrowsermodel.cpp | 198 ++++++++++----------------- src/browser/qgsbrowsermodel.h | 35 +++-- src/providers/wms/qgswmsprovider.cpp | 2 +- 4 files changed, 174 insertions(+), 179 deletions(-) diff --git a/src/browser/qgsbrowser.cpp b/src/browser/qgsbrowser.cpp index bb13cac0b444..549312530ec2 100644 --- a/src/browser/qgsbrowser.cpp +++ b/src/browser/qgsbrowser.cpp @@ -34,9 +34,12 @@ QgsBrowser::QgsBrowser( QWidget *parent, Qt::WFlags flags ) - : QMainWindow( parent, flags ), - mDirtyMetadata( true ), mDirtyPreview( true ), mDirtyAttributes( true ), - mLayer( 0 ), mParamWidget( 0 ) + : QMainWindow( parent, flags ) + , mDirtyMetadata( true ) + , mDirtyPreview( true ) + , mDirtyAttributes( true ) + , mLayer( 0 ) + , mParamWidget( 0 ) { setupUi( this ); @@ -86,9 +89,9 @@ void QgsBrowser::expand( QString path, const QModelIndex& index ) for ( int i = 0; i < mModel->rowCount( index ); i++ ) { QModelIndex idx = mModel->index( i, 0, index ); - QgsDataItem* ptr = ( QgsDataItem* ) idx.internalPointer(); + QgsDataItem *item = mModel->dataItem( idx ); - if ( path.indexOf( ptr->path() ) == 0 ) + if ( item && path.indexOf( item->path() ) == 0 ) { treeView->expand( idx ); treeView->scrollTo( idx, QAbstractItemView::PositionAtTop ); @@ -102,7 +105,9 @@ void QgsBrowser::itemClicked( const QModelIndex& index ) { mIndex = index; - QgsDataItem* ptr = ( QgsDataItem* ) index.internalPointer(); + QgsDataItem *item = mModel->dataItem( index ); + if ( !item ) + return; // Disable preview, attributes tab @@ -135,9 +140,7 @@ void QgsBrowser::itemClicked( const QModelIndex& index ) mLayer = 0; // this should probably go to the model and only emit signal when a layer is clicked - - - mParamWidget = ptr->paramWidget(); + mParamWidget = item->paramWidget(); if ( mParamWidget ) { paramLayout->addWidget( mParamWidget ); @@ -145,10 +148,10 @@ void QgsBrowser::itemClicked( const QModelIndex& index ) paramEnable = true; } - if ( ptr->type() == QgsDataItem::Layer ) + QgsLayerItem *layerItem = qobject_cast( mModel->dataItem( index ) ); + if ( layerItem ) { - QgsLayerItem* item = static_cast( ptr ); - bool res = layerClicked( item ); + bool res = layerClicked( layerItem ); if ( res ) { @@ -169,9 +172,9 @@ void QgsBrowser::itemClicked( const QModelIndex& index ) updateCurrentTab(); int selected = -1; - if ( mLastTab.contains( ptr->metaObject()->className() ) ) + if ( mLastTab.contains( item->metaObject()->className() ) ) { - selected = mLastTab[ ptr->metaObject()->className() ]; + selected = mLastTab[ item->metaObject()->className()]; } // Enabling tabs call tabChanged ! @@ -183,22 +186,25 @@ void QgsBrowser::itemClicked( const QModelIndex& index ) // select tab according last selection for this data item if ( selected >= 0 ) { - qDebug( "set tab %s %d", ptr->metaObject()->className(), selected ); + QgsDebugMsg( QString( "set tab %1 %2" ).arg( item->metaObject()->className() ).arg( selected ) ); tabWidget->setCurrentIndex( selected ); } - qDebug( "clicked: %d %d %s", index.row(), index.column(), ptr->name().toAscii().data() ); + QgsDebugMsg( QString( "clicked: %1 %2 %3" ).arg( index.row() ).arg( index.column() ).arg( item->name() ) ); } -bool QgsBrowser::layerClicked( QgsLayerItem* ptr ) +bool QgsBrowser::layerClicked( QgsLayerItem *item ) { - mActionSetProjection->setEnabled( ptr->capabilities() & QgsLayerItem::SetCrs ); + if ( !item ) + return false; + + mActionSetProjection->setEnabled( item->capabilities() & QgsLayerItem::SetCrs ); - QString uri = ptr->uri(); + QString uri = item->uri(); if ( !uri.isEmpty() ) { - QgsMapLayer::LayerType type = ptr->mapLayerType(); - QString providerKey = ptr->providerKey(); + QgsMapLayer::LayerType type = item->mapLayerType(); + QString providerKey = item->providerKey(); QgsDebugMsg( providerKey + " : " + uri ); if ( type == QgsMapLayer::VectorLayer ) @@ -253,26 +259,32 @@ bool QgsBrowser::layerClicked( QgsLayerItem* ptr ) void QgsBrowser::itemDoubleClicked( const QModelIndex& index ) { - QgsDataItem* ptr = ( QgsDataItem* ) index.internalPointer(); + QgsDataItem *item = mModel->dataItem( index ); + if ( !item ) + return; // Currently doing nothing - qDebug( "doubleclicked: %d %d %s", index.row(), index.column(), ptr->name().toAscii().data() ); + QgsDebugMsg( QString( "%1 %2 %3" ).arg( index.row() ).arg( index.column() ).arg( item->name() ) ); } void QgsBrowser::itemExpanded( const QModelIndex& index ) { QSettings settings; - QgsDataItem* ptr = ( QgsDataItem* ) index.internalPointer(); - /* - if (ptr->mType == QgsDataItem::Directory || ptr->mType == QgsDataItem::Collection ) - { - QgsDirectoryItem* i = (QgsDirectoryItem*) ptr; - settings.setValue ( "/Browser/lastExpandedDir", i->mPath ); - } - */ + QgsDataItem *item = mModel->dataItem( index ); + if ( !item ) + return; + +#if 0 + if ( item->mType == QgsDataItem::Directory || item->mType == QgsDataItem::Collection ) + { + QgsDirectoryItem *i = qobject_cast( item ); + settings.setValue( "/Browser/lastExpandedDir", i->mPath ); + } +#endif + // TODO: save separately each type (FS, WMS) - settings.setValue( "/Browser/lastExpanded", ptr->path() ); - QgsDebugMsg( "last expanded: " + ptr->path() ); + settings.setValue( "/Browser/lastExpanded", item->path() ); + QgsDebugMsg( "last expanded: " + item->path() ); } void QgsBrowser::newVectorLayer() @@ -315,22 +327,26 @@ void QgsBrowser::on_mActionSetProjection_triggered() { if ( !mLayer ) return; + QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector( this ); mySelector->setMessage(); mySelector->setSelectedCrsId( mLayer->crs().srsid() ); if ( mySelector->exec() ) { QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::InternalCrsId ); + // TODO: open data source in write mode set crs and save - //mLayer->setCrs( srs ); +#if 0 + mLayer->setCrs( srs ); // Is this safe? // selectedIndexes() is protected +#endif - QgsDataItem* ptr = ( QgsDataItem* ) mIndex.internalPointer(); - if ( ptr->type() == QgsDataItem::Layer ) + QgsDataItem *item = mModel->dataItem( mIndex ); + QgsLayerItem *layerItem = qobject_cast( item ); + if ( layerItem ) { - QgsLayerItem* layerItem = static_cast( ptr ); - if ( ! layerItem->setCrs( srs ) ) + if ( !layerItem->setCrs( srs ) ) { QMessageBox::critical( this, tr( "CRS" ), tr( "Cannot set layer CRS" ) ); } @@ -341,6 +357,7 @@ void QgsBrowser::on_mActionSetProjection_triggered() { QApplication::restoreOverrideCursor(); } + delete mySelector; } @@ -452,6 +469,13 @@ void QgsBrowser::updateCurrentTab() fullExtent.scale( 1.05 ); // add some border mapCanvas->setExtent( fullExtent ); mapCanvas->refresh(); + + QgsRasterLayer *rlayer = qobject_cast< QgsRasterLayer * >( mLayer ); + if ( rlayer ) + { + connect( rlayer->dataProvider(), SIGNAL( dataChanged() ), rlayer, SLOT( clearCacheImage() ) ); + connect( rlayer->dataProvider(), SIGNAL( dataChanged() ), mapCanvas, SLOT( refresh() ) ); + } } mDirtyPreview = false; } @@ -479,9 +503,12 @@ void QgsBrowser::tabChanged() // Store last selected tab for selected data item if ( mIndex.isValid() ) { - QObject* ptr = ( QObject* ) mIndex.internalPointer(); - QgsDebugMsg( QString( "save last tab %1 : %2" ).arg( ptr->metaObject()->className() ).arg( tabWidget->currentIndex() ) ); - mLastTab[ ptr->metaObject()->className() ] = tabWidget->currentIndex(); + QgsDataItem *item = mModel->dataItem( mIndex ); + if ( !item ) + return; + + QgsDebugMsg( QString( "save last tab %1 : %2" ).arg( item->metaObject()->className() ).arg( tabWidget->currentIndex() ) ); + mLastTab[ item->metaObject()->className()] = tabWidget->currentIndex(); } } @@ -496,10 +523,15 @@ void QgsBrowser::refresh( const QModelIndex& index ) QgsDebugMsg( "Entered" ); if ( index.isValid() ) { - QgsDataItem* item = ( QgsDataItem* ) index.internalPointer(); - QgsDebugMsg( "path = " + item->path() ); + QgsDataItem *item = mModel->dataItem( index ); + if ( item ) + QgsDebugMsg( "path = " + item->path() ); + else + QgsDebugMsg( "invalid item" ); } + mModel->refresh( index ); + for ( int i = 0 ; i < mModel->rowCount( index ); i++ ) { QModelIndex idx = mModel->index( i, 0, index ); diff --git a/src/browser/qgsbrowsermodel.cpp b/src/browser/qgsbrowsermodel.cpp index c940151286e3..fbe2b574525f 100644 --- a/src/browser/qgsbrowsermodel.cpp +++ b/src/browser/qgsbrowsermodel.cpp @@ -43,20 +43,20 @@ QgsBrowserModel::QgsBrowserModel( QObject *parent ) : } int capabilities = dataCapabilities(); - if ( capabilities == QgsDataProvider::NoDataCapabilities ) + if ( capabilities == QgsDataProvider::NoDataCapabilities ) { QgsDebugMsg( library->fileName() + " does not have any dataCapabilities" ); continue; } dataItem_t * dataItem = ( dataItem_t * ) cast_to_fptr( library->resolve( "dataItem" ) ); - if ( ! dataItem ) + if ( !dataItem ) { QgsDebugMsg( library->fileName() + " does not have dataItem" ); continue; } - QgsDataItem * item = dataItem( "", NULL ); // empty path -> top level + QgsDataItem *item = dataItem( "", NULL ); // empty path -> top level if ( item ) { QgsDebugMsg( "Add new top level item : " + item->name() ); @@ -83,24 +83,29 @@ Qt::ItemFlags QgsBrowserModel::flags( const QModelIndex & index ) const return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } -QVariant QgsBrowserModel::data( const QModelIndex & index, int role ) const +QVariant QgsBrowserModel::data( const QModelIndex &index, int role ) const { if ( !index.isValid() ) return QVariant(); - QgsDataItem* ptr = ( QgsDataItem* ) index.internalPointer(); - - if ( role == Qt::DisplayRole ) + QgsDataItem *item = dataItem( index ); + if ( !item ) { - return QVariant( ptr->name() ); + return QVariant(); + } + else if ( role == Qt::DisplayRole ) + { + return item->name(); } else if ( role == Qt::DecorationRole && index.column() == 0 ) { - return QVariant( ptr->icon() ); + return item->icon(); + } + else + { + // unsupported role + return QVariant(); } - - // unsupported role - return QVariant(); } QVariant QgsBrowserModel::headerData( int section, Qt::Orientation orientation, int role ) const @@ -113,7 +118,7 @@ QVariant QgsBrowserModel::headerData( int section, Qt::Orientation orientation, return QVariant(); } -int QgsBrowserModel::rowCount( const QModelIndex & parent ) const +int QgsBrowserModel::rowCount( const QModelIndex &parent ) const { //qDebug("rowCount: idx: (valid %d) %d %d", parent.isValid(), parent.row(), parent.column()); @@ -125,24 +130,18 @@ int QgsBrowserModel::rowCount( const QModelIndex & parent ) const else { // ordinary item: number of its children - QgsDataItem* ptr = ( QgsDataItem* ) parent.internalPointer(); - - return ptr->rowCount(); + QgsDataItem *item = dataItem( parent ); + return item ? item->rowCount() : 0; } } bool QgsBrowserModel::hasChildren( const QModelIndex & parent ) const { if ( !parent.isValid() ) - { return true; // root item: its children are top level items - } - else - { - QgsDataItem* ptr = ( QgsDataItem* ) parent.internalPointer(); - return ptr->hasChildren(); - } + QgsDataItem *item = dataItem( parent ); + return item && item->hasChildren(); } int QgsBrowserModel::columnCount( const QModelIndex & parent ) const @@ -150,134 +149,81 @@ int QgsBrowserModel::columnCount( const QModelIndex & parent ) const return 1; } -QModelIndex QgsBrowserModel::index( int row, int column, const QModelIndex & parent ) const +/* Refresh dir path */ +void QgsBrowserModel::refresh( QString path, const QModelIndex &theIndex ) { - //qDebug("index: idx: (valid %d) %d %d", parent.isValid(), parent.row(), parent.column()); - - if ( !parent.isValid() ) - { - // this is the root item, parent of the top level items - Q_ASSERT( column == 0 && row >= 0 && row < mRootItems.count() ); - return createIndex( row, column, mRootItems[row] ); - } - else + QStringList paths = path.split( '/' ); + for ( int i = 0; i < rowCount( theIndex ); i++ ) { - // this is ordinary item: return a valid index if the requested child exists - QgsDataItem* ptr = ( QgsDataItem* ) parent.internalPointer(); - if ( ptr->type() == QgsDataItem::Directory || ptr->type() == QgsDataItem::Collection ) - { - // this is a directory: get index of its subdir! - QgsDirectoryItem* di = ( QgsDirectoryItem* ) ptr; - return createIndex( row, column, di->children().at( row ) ); - } - if ( ptr->type() == QgsDataItem::Layer ) + QModelIndex idx = index( i, 0, theIndex ); + QgsDataItem *item = dataItem( idx ); + if ( !item ) + break; + + if ( item->path() == path ) { - return QModelIndex(); // has no children + QgsDebugMsg( "Arrived " + item->path() ); + item->refresh(); + return; } - Q_ASSERT( false && "unknown item in index()" ); - } - - return QModelIndex(); // if the child does not exist -} - -QModelIndex QgsBrowserModel::index( QgsDataItem *item ) -{ - // Item index - QModelIndex index = QModelIndex(); - - const QVector& children = item->parent() ? item->parent()->children() : mRootItems; - - Q_ASSERT( children.size() > 0 ); - int row = -1; - for ( int i = 0; i < children.size(); i++ ) - { - if ( item == children[i] ) + if ( path.indexOf( item->path() ) == 0 ) { - row = i; + refresh( path, idx ); break; } } - QgsDebugMsg( QString( "row = %1" ).arg( row ) ); - Q_ASSERT( row >= 0 ); - index = createIndex( row, 0, item ); +} - return index; +QModelIndex QgsBrowserModel::index( int row, int column, const QModelIndex &parent ) const +{ + QgsDataItem *p = dataItem( parent ); + const QVector &items = p ? p->children() : mRootItems; + QgsDataItem *item = items.value( row, 0 ); + return item ? createIndex( row, column, item ) : QModelIndex(); } -QModelIndex QgsBrowserModel::parent( const QModelIndex & index ) const +QModelIndex QgsBrowserModel::parent( const QModelIndex &index ) const { - if ( !index.isValid() ) + QgsDataItem *item = dataItem( index ); + if ( !item ) return QModelIndex(); - // return QModelInde of parent, i.e. where the parent is within its parent :-) - - //qDebug("parent of: %d %d", index.row(), index.column()); + return findItem( item->parent() ); +} - QgsDataItem* ptr = ( QgsDataItem* ) index.internalPointer(); - QgsDataItem* parentItem = ptr->parent(); +QModelIndex QgsBrowserModel::findItem( QgsDataItem *item, QgsDataItem *parent ) const +{ + const QVector &items = parent ? parent->children() : mRootItems; - if ( parentItem == NULL ) + for ( int i = 0; i < items.size(); i++ ) { - // parent of our root is invalid index - return QModelIndex(); - } - - const QVector& children = - parentItem->parent() ? (( QgsDirectoryItem* )parentItem->parent() )->children() : mRootItems; - Q_ASSERT( children.count() > 0 ); + if ( items[i] == item ) + return createIndex( i, 0, item ); - for ( int i = 0; i < children.count(); i++ ) - { - if ( children[i] == parentItem ) - return createIndex( i, 0, parentItem ); + QModelIndex childIndex = findItem( item, items[i] ); + if ( childIndex.isValid() ) + return childIndex; } - Q_ASSERT( false && "parent not found!" ); return QModelIndex(); } -/* Refresh dir path */ -void QgsBrowserModel::refresh( QString path, const QModelIndex& theIndex ) -{ - QStringList paths = path.split( '/' ); - for ( int i = 0; i < rowCount( theIndex ); i++ ) - { - QModelIndex idx = index( i, 0, theIndex ); - QgsDataItem* ptr = ( QgsDataItem* ) idx.internalPointer(); - if ( ptr->path() == path ) - { - QgsDebugMsg( "Arrived " + ptr->path() ); - ptr->refresh(); - return; - } - if ( path.indexOf( ptr->path() ) == 0 ) - { - refresh( path, idx ); - break; - } - } -} - /* Refresh item */ void QgsBrowserModel::refresh( const QModelIndex& theIndex ) { - if ( !theIndex.isValid() ) // root - { - // Nothing to do I believe, mRootItems are always the same - } - else - { - QgsDataItem* ptr = ( QgsDataItem* ) theIndex.internalPointer(); - QgsDebugMsg( "Refresh " + ptr->path() ); - ptr->refresh(); - } + QgsDataItem *item = dataItem( theIndex ); + if ( !item ) + return; + + QgsDebugMsg( "Refresh " + item->path() ); + item->refresh(); } -void QgsBrowserModel::beginInsertItems( QgsDataItem* parent, int first, int last ) +void QgsBrowserModel::beginInsertItems( QgsDataItem *parent, int first, int last ) { QgsDebugMsg( "parent mPath = " + parent->path() ); - QModelIndex idx = index( parent ); + QModelIndex idx = findItem( parent ); if ( !idx.isValid() ) return; QgsDebugMsg( "valid" ); @@ -289,10 +235,10 @@ void QgsBrowserModel::endInsertItems() QgsDebugMsg( "Entered" ); endInsertRows(); } -void QgsBrowserModel::beginRemoveItems( QgsDataItem* parent, int first, int last ) +void QgsBrowserModel::beginRemoveItems( QgsDataItem *parent, int first, int last ) { QgsDebugMsg( "parent mPath = " + parent->path() ); - QModelIndex idx = index( parent ); + QModelIndex idx = findItem( parent ); if ( !idx.isValid() ) return; beginRemoveRows( idx, first, last ); @@ -313,3 +259,11 @@ void QgsBrowserModel::connectItem( QgsDataItem* item ) connect( item, SIGNAL( endRemoveItems() ), this, SLOT( endRemoveItems() ) ); } + +QgsDataItem *QgsBrowserModel::dataItem( const QModelIndex &idx ) const +{ + void *v = idx.internalPointer(); + QgsDataItem *d = reinterpret_cast( v ); + Q_ASSERT( !v || d ); + return d; +} diff --git a/src/browser/qgsbrowsermodel.h b/src/browser/qgsbrowsermodel.h index 19c5bad5fa34..b629dcc78eac 100644 --- a/src/browser/qgsbrowsermodel.h +++ b/src/browser/qgsbrowsermodel.h @@ -9,6 +9,7 @@ class QgsBrowserModel : public QAbstractItemModel { Q_OBJECT + public: explicit QgsBrowserModel( QObject *parent = 0 ); ~QgsBrowserModel(); @@ -17,39 +18,47 @@ class QgsBrowserModel : public QAbstractItemModel /** Used by other components to obtain information about each item provided by the model. In many models, the combination of flags should include Qt::ItemIsEnabled and Qt::ItemIsSelectable. */ - virtual Qt::ItemFlags flags( const QModelIndex & index ) const; + virtual Qt::ItemFlags flags( const QModelIndex &index ) const; + /** Used to supply item data to views and delegates. Generally, models only need to supply data for Qt::DisplayRole and any application-specific user roles, but it is also good practice to provide data for Qt::ToolTipRole, Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole. See the Qt::ItemDataRole enum documentation for information about the types associated with each role. */ - virtual QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const; + virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const; + /** Provides views with information to show in their headers. The information is only retrieved by views that can display header information. */ virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; /** Provides the number of rows of data exposed by the model. */ - virtual int rowCount( const QModelIndex & parent = QModelIndex() ) const; + virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const; + /** Provides the number of columns of data exposed by the model. List models do not provide this function because it is already implemented in QAbstractListModel. */ - virtual int columnCount( const QModelIndex & parent = QModelIndex() ) const; + virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const; /** Returns the index of the item in the model specified by the given row, column and parent index. */ virtual QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const; - QModelIndex index( QgsDataItem *item ); + QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const; - /** Returns the parent of the model item with the given index. If the item has no parent, an invalid QModelIndex is returned. */ - virtual QModelIndex parent( const QModelIndex & index ) const; + /** Returns the parent of the model item with the given index. + * If the item has no parent, an invalid QModelIndex is returned. + */ + virtual QModelIndex parent( const QModelIndex &index ) const; + QgsDataItem *dataItem( const QModelIndex &idx ) const; - bool hasChildren( const QModelIndex & parent = QModelIndex() ) const; + bool hasChildren( const QModelIndex &parent = QModelIndex() ) const; // Refresh item specified by path - void refresh( QString path, const QModelIndex& index = QModelIndex() ); + void refresh( QString path, const QModelIndex &index = QModelIndex() ); + // Refresh item childs - void refresh( const QModelIndex& index = QModelIndex() ); + void refresh( const QModelIndex &index = QModelIndex() ); + + void connectItem( QgsDataItem *item ); - void connectItem( QgsDataItem * item ); signals: public slots: @@ -57,9 +66,9 @@ class QgsBrowserModel : public QAbstractItemModel //void addItems( QgsDataItem * parent, QVectoritems ); //void refreshItems( QgsDataItem * parent, QVectoritems ); - void beginInsertItems( QgsDataItem* parent, int first, int last ); + void beginInsertItems( QgsDataItem *parent, int first, int last ); void endInsertItems(); - void beginRemoveItems( QgsDataItem* parent, int first, int last ); + void beginRemoveItems( QgsDataItem *parent, int first, int last ); void endRemoveItems(); protected: diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index b18c7fa67b61..556198d749eb 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -3184,7 +3184,7 @@ QString QgsWMSLayerItem::createUri() } else { - styles << "default"; // TODO: use loadDefaultStyleFlag + styles << ""; // TODO: use loadDefaultStyleFlag } QString format; From 3ac604ff1be4676e69e2d3a17f76b2a9d8b97485 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Fri, 3 Jun 2011 14:13:21 +0200 Subject: [PATCH 23/62] Don't list join fields to facilitate 'save as' function (fixes #3857). Don't display the query builder if a layer has joins (#3858) --- src/app/qgsvectorlayerproperties.cpp | 10 ++++++++-- src/core/qgsvectorlayer.cpp | 1 + src/core/qgsvectorlayerjoinbuffer.cpp | 12 +++++++++++- src/core/qgsvectorlayerjoinbuffer.h | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index f2af3e19e6b2..c3dc58f3d781 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -296,7 +296,8 @@ void QgsVectorLayerProperties::toggleEditing() { emit toggleEditing( layer ); - pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && !layer->isEditable() ); + pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && + !layer->isEditable() && layer->vectorJoins().size() < 1 ); if ( layer->isEditable() ) { pbnQueryBuilder->setToolTip( tr( "Stop editing mode to enable this." ) ); @@ -474,7 +475,8 @@ void QgsVectorLayerProperties::reset( void ) // on the builder. If the ability to enter a query directly into the box is required, // a mechanism to check it must be implemented. txtSubsetSQL->setEnabled( false ); - pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && !layer->isEditable() ); + pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && + !layer->isEditable() && layer->vectorJoins().size() < 1 ); if ( layer->isEditable() ) { pbnQueryBuilder->setToolTip( tr( "Stop editing mode to enable this." ) ); @@ -1079,6 +1081,8 @@ void QgsVectorLayerProperties::on_mButtonAddJoin_clicked() layer->addJoin( info ); loadRows(); //update attribute tab addJoinToTreeWidget( info ); + pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && + !layer->isEditable() && layer->vectorJoins().size() < 1 ); } } } @@ -1116,6 +1120,8 @@ void QgsVectorLayerProperties::on_mButtonRemoveJoin_clicked() layer->removeJoin( currentJoinItem->data( 0, Qt::UserRole ).toString() ); loadRows(); mJoinTreeWidget->takeTopLevelItem( mJoinTreeWidget->indexOfTopLevelItem( currentJoinItem ) ); + pbnQueryBuilder->setEnabled( layer && layer->dataProvider() && layer->dataProvider()->supportsSubsetString() && + !layer->isEditable() && layer->vectorJoins().size() < 1 ); } void QgsVectorLayerProperties::handleDiagramItemDoubleClick( QTreeWidgetItem * item, int column ) diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index 4308d55bc8bd..ab1fa01ef163 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -2693,6 +2693,7 @@ bool QgsVectorLayer::readXml( QDomNode & layer_node ) mJoinBuffer->readXml( layer_node ); updateFieldMap(); + connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( checkJoinLayerRemove( QString ) ) ); QString errorMsg; if ( !readSymbology( layer_node, errorMsg ) ) diff --git a/src/core/qgsvectorlayerjoinbuffer.cpp b/src/core/qgsvectorlayerjoinbuffer.cpp index a2cba3954381..433283582c52 100644 --- a/src/core/qgsvectorlayerjoinbuffer.cpp +++ b/src/core/qgsvectorlayerjoinbuffer.cpp @@ -96,7 +96,11 @@ void QgsVectorLayerJoinBuffer::updateFieldMap( QgsFieldMap& fields, int& maxInde QgsFieldMap::const_iterator fieldIt = joinFields.constBegin(); for ( ; fieldIt != joinFields.constEnd(); ++fieldIt ) { - fields.insert( maxIndex + 1 + fieldIt.key(), fieldIt.value() ); + //skip the join field to avoid double field names (fields often have the same name) + if ( fieldIt.key() != joinIt->joinField ) + { + fields.insert( maxIndex + 1 + fieldIt.key(), fieldIt.value() ); + } } if ( maximumIndex( joinFields, currentMaxIndex ) ) @@ -217,6 +221,12 @@ void QgsVectorLayerJoinBuffer::addJoinedFeatureAttributes( QgsFeature& f, const QgsAttributeList::const_iterator attIt = attributes.constBegin(); for ( ; attIt != attributes.constEnd(); ++attIt ) { + //skip the join field to avoid double field names (fields often have the same name) + if ( *attIt == joinInfo.joinField ) + { + continue; + } + if ( found ) { f.addAttribute( *attIt + attributeIndexOffset, featureAttributes.value( *attIt ) ); diff --git a/src/core/qgsvectorlayerjoinbuffer.h b/src/core/qgsvectorlayerjoinbuffer.h index f1da63d7e08c..49358184b4e1 100644 --- a/src/core/qgsvectorlayerjoinbuffer.h +++ b/src/core/qgsvectorlayerjoinbuffer.h @@ -24,7 +24,7 @@ #include #include -/**Manages joined field for a vector layer*/ +/**Manages joined fields for a vector layer*/ class CORE_EXPORT QgsVectorLayerJoinBuffer { public: From 50d255f20fdb362c6b26bf0bec7f60e3f35ea1e2 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Fri, 3 Jun 2011 16:52:27 +0200 Subject: [PATCH 24/62] fix #3866 --- src/app/qgsmeasuredialog.cpp | 35 ++++++++++++----------------------- src/app/qgsmeasuredialog.h | 4 +++- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/app/qgsmeasuredialog.cpp b/src/app/qgsmeasuredialog.cpp index fbad0bdb15b6..939494413eca 100644 --- a/src/app/qgsmeasuredialog.cpp +++ b/src/app/qgsmeasuredialog.cpp @@ -97,10 +97,6 @@ void QgsMeasureDialog::mouseMove( QgsPoint &point ) QSettings settings; int decimalPlaces = settings.value( "/qgis/measure/decimalplaces", "3" ).toInt(); - // Create QgsDistance Area for customization ProjectionEnabled setting - QgsDistanceArea myDa; - configureDistanceArea( myDa ); - // show current distance/area while moving the point // by creating a temporary copy of point array // and adding moving point at the end @@ -108,14 +104,14 @@ void QgsMeasureDialog::mouseMove( QgsPoint &point ) { QList tmpPoints = mTool->points(); tmpPoints.append( point ); - double area = myDa.measurePolygon( tmpPoints ); + double area = mDa.measurePolygon( tmpPoints ); editTotal->setText( formatArea( area, decimalPlaces ) ); } else if ( !mMeasureArea && mTool->points().size() > 0 ) { QgsPoint p1( mTool->points().last() ), p2( point ); - double d = myDa.measureLine( p1, p2 ); + double d = mDa.measureLine( p1, p2 ); editTotal->setText( formatDistance( mTotal + d, decimalPlaces ) ); QGis::UnitType myDisplayUnits; // Ignore units @@ -130,14 +126,10 @@ void QgsMeasureDialog::addPoint( QgsPoint &point ) QSettings settings; int decimalPlaces = settings.value( "/qgis/measure/decimalplaces", "3" ).toInt(); - // Create QgsDistance Area for customization ProjectionEnabled setting - QgsDistanceArea myDa; - configureDistanceArea( myDa ); - int numPoints = mTool->points().size(); if ( mMeasureArea && numPoints > 2 ) { - double area = myDa.measurePolygon( mTool->points() ); + double area = mDa.measurePolygon( mTool->points() ); editTotal->setText( formatArea( area, decimalPlaces ) ); } else if ( !mMeasureArea && numPoints > 1 ) @@ -146,7 +138,7 @@ void QgsMeasureDialog::addPoint( QgsPoint &point ) QgsPoint p1 = mTool->points()[last], p2 = mTool->points()[last+1]; - double d = myDa.measureLine( p1, p2 ); + double d = mDa.measureLine( p1, p2 ); mTotal += d; editTotal->setText( formatDistance( mTotal, decimalPlaces ) ); @@ -243,7 +235,7 @@ void QgsMeasureDialog::updateUi() break; case QGis::UnknownUnit: mTable->setHeaderLabels( QStringList( tr( "Segments" ) ) ); - }; + } if ( mMeasureArea ) { @@ -256,6 +248,7 @@ void QgsMeasureDialog::updateUi() editTotal->setText( formatDistance( 0, decimalPlaces ) ); } + configureDistanceArea(); } void QgsMeasureDialog::convertMeasurement( double &measure, QGis::UnitType &u, bool isArea ) @@ -322,16 +315,12 @@ void QgsMeasureDialog::changeProjectionEnabledState() int decimalPlaces = settings.value( "/qgis/measure/decimalplaces", "3" ).toInt(); - // create DistanceArea - QgsDistanceArea myDa; - configureDistanceArea( myDa ); - if ( mMeasureArea ) { double area = 0.0; if ( mTool->points().size() > 1 ) { - area = myDa.measurePolygon( mTool->points() ); + area = mDa.measurePolygon( mTool->points() ); } editTotal->setText( formatArea( area, decimalPlaces ) ); } @@ -347,7 +336,7 @@ void QgsMeasureDialog::changeProjectionEnabledState() p2 = *it; if ( !b ) { - double d = myDa.measureLine( p1, p2 ); + double d = mDa.measureLine( p1, p2 ); mTotal += d; editTotal->setText( formatDistance( mTotal, decimalPlaces ) ); QGis::UnitType myDisplayUnits; @@ -367,11 +356,11 @@ void QgsMeasureDialog::changeProjectionEnabledState() } } -void QgsMeasureDialog::configureDistanceArea( QgsDistanceArea& da ) +void QgsMeasureDialog::configureDistanceArea() { QSettings settings; QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString(); - da.setSourceCrs( mTool->canvas()->mapRenderer()->destinationCrs().srsid() ); - da.setEllipsoid( ellipsoidId ); - da.setProjectionsEnabled( mcbProjectionEnabled->isChecked() ); + mDa.setSourceCrs( mTool->canvas()->mapRenderer()->destinationCrs().srsid() ); + mDa.setEllipsoid( ellipsoidId ); + mDa.setProjectionsEnabled( mcbProjectionEnabled->isChecked() ); } diff --git a/src/app/qgsmeasuredialog.h b/src/app/qgsmeasuredialog.h index 868a59795bf4..472acc908a78 100644 --- a/src/app/qgsmeasuredialog.h +++ b/src/app/qgsmeasuredialog.h @@ -81,13 +81,15 @@ class QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase void convertMeasurement( double &measure, QGis::UnitType &u, bool isArea ); //! Configures distance area objects with ellipsoid / output crs - void configureDistanceArea( QgsDistanceArea& da ); + void configureDistanceArea(); double mTotal; //! indicates whether we're measuring distances or areas bool mMeasureArea; + QgsDistanceArea mDa; + //! pointer to measure tool which owns this dialog QgsMeasureTool* mTool; }; From 0e318b0c5ff17cac2e24e3395a95a2f84f94854f Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Fri, 3 Jun 2011 17:03:28 +0200 Subject: [PATCH 25/62] remove unimplemented QgsLabel::setLabelFieldName() --- src/core/qgslabel.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/qgslabel.h b/src/core/qgslabel.h index e9e865bf371d..de67395a8067 100644 --- a/src/core/qgslabel.h +++ b/src/core/qgslabel.h @@ -158,9 +158,6 @@ class CORE_EXPORT QgsLabel //! Set label field void setLabelField( int attr, int fieldIndex ); - //! Set label field by name - bool setLabelFieldName( int attr, QString name ); - //! label field QString labelField( int attr ) const; From 48d82eb5d9dfa4f25a73cdeedc869bb34659e5c2 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 5 Jun 2011 13:44:05 +0200 Subject: [PATCH 26/62] Updated references to bug tracker to point to hub website --- CODING | 6 +++--- INSTALL | 20 +++++++++++++------- doc/CODING.t2t | 6 +++--- doc/INSTALL.html | 8 ++++---- doc/index.dox | 2 +- doc/index.html | 23 ++++++++++++++--------- 6 files changed, 38 insertions(+), 27 deletions(-) diff --git a/CODING b/CODING index 2151d59c07c3..972e9ea17a28 100644 --- a/CODING +++ b/CODING @@ -596,10 +596,10 @@ easily, and help us deal with the patches that are sent to use easily. If the patch is a fix for a specific bug, please name the file with the bug number in it e.g. bug777fix.patch, and attach it to the original bug report -in trac (https://trac.osgeo.org/qgis/). +in trac (http://hub.qgis.org/projects/quantum-gis). If the bug is an enhancement or new feature, its usually a good idea to create -a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you +a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you 2.7.2. Create your patch in the top level QGIS source dir @@ -868,7 +868,7 @@ test before fixing the bug will let you automate the testing for bug resolution in an efficient manner. To implement your regression test, you should follow the naming convention of -regression for your test functions. If no trac ticket exists for the +regression for your test functions. If no redmine ticket exists for the regression, you should create one first. Using this approach allows the person running a failed regression test easily go and find out more information. diff --git a/INSTALL b/INSTALL index 558a91ca444d..6164df3f060e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,10 +1,10 @@ Quantum GIS (QGIS) Building QGIS from source - step by step -Sunday May 29, 2011 +Sunday June 05, 2011 -Last Updated: Sunday May 29, 2011 -Last Change : Friday May 20, 2011 +Last Updated: Sunday June 05, 2011 +Last Change : Thursday June 02, 2011 1. Introduction @@ -27,7 +27,7 @@ Last Change : Friday May 20, 2011 5.1. Install Qt4 from disk image 5.2. Install development frameworks for QGIS dependencies 5.3. Install CMake for OSX - 5.4. Download QGIS source from github + 5.4. QGIS source 5.5. Configure the build 5.6. Building 6. Authors and Acknowledgments @@ -1496,10 +1496,16 @@ tarball, then cd to the source folder and: sudo make install - 5.4. Download QGIS source from github - ===================================== + 5.4. QGIS source + ================ + +Unzip the QGIS source tarball to a working folder of your choice +(/usr/somewhere is not a good choice as it's hidden and requires root +privileges). If you are reading this from the source, you've already done +this. -Go to the github QGIS project page: +If you want to experiment with the latest development sources, go to the github +QGIS project page: http://github.com/qgis/Quantum-GIS diff --git a/doc/CODING.t2t b/doc/CODING.t2t index 62697ef4e031..48c1dc2f4ab9 100644 --- a/doc/CODING.t2t +++ b/doc/CODING.t2t @@ -575,10 +575,10 @@ easily, and help us deal with the patches that are sent to use easily. If the patch is a fix for a specific bug, please name the file with the bug number in it e.g. **bug777fix.patch**, and attach it to the original bug report -in trac (https://trac.osgeo.org/qgis/). +in trac (http://hub.qgis.org/projects/quantum-gis). If the bug is an enhancement or new feature, its usually a good idea to create -a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you +a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you === Create your patch in the top level QGIS source dir === @@ -854,7 +854,7 @@ test **before** fixing the bug will let you automate the testing for bug resolution in an efficient manner. To implement your regression test, you should follow the naming convention of -regression for your test functions. If no trac ticket exists for the +regression for your test functions. If no redmine ticket exists for the regression, you should create one first. Using this approach allows the person running a failed regression test easily go and find out more information. diff --git a/doc/INSTALL.html b/doc/INSTALL.html index 9b81956e11ca..3aac281bca82 100644 --- a/doc/INSTALL.html +++ b/doc/INSTALL.html @@ -45,13 +45,13 @@

    -Last Updated: Sunday May 29, 2011 -Last Change : Friday May 20, 2011 +Last Updated: Sunday June 05, 2011 +Last Change : Thursday June 02, 2011

    @@ -2291,5 +2291,5 @@

    6. Authors and Acknowledgments

    - + diff --git a/doc/index.dox b/doc/index.dox index c8dda52b1405..493eb93782d1 100644 --- a/doc/index.dox +++ b/doc/index.dox @@ -36,7 +36,7 @@ developers.
  • \section index_bugs Bug Reporting If you think you have found a bug, please report it using our bug tracker. When reporting bugs, +href="http://hub.qgis.org/projects/quantum-gis">bug tracker. When reporting bugs, please include some contact information in case we need help with replicating your issue. diff --git a/doc/index.html b/doc/index.html index 91f112671d8a..c1ab1c77dedb 100644 --- a/doc/index.html +++ b/doc/index.html @@ -10,7 +10,7 @@ Quantum GIS Documentation
    - Version 1.7.0 Wroclaw
    + Version 1.7.0 Wrocław
    Please read this entire document for important information about this release.
    You find a PDF manual of the current version on the QGIS website. @@ -25,7 +25,7 @@

    Whats new in Version 1.7.0 'Wrocław'?

    This release is named after the town of Wrocław in Poland. The Department of Climatology and Atmosphere Protection, University of Wrocław kindly hosted our -last developer meeting in November 2010. Please note that this is a release in +developer meeting in November 2010. Please note that this is a release in our 'cutting edge' release series. As such it contains new features and extends the programmatic interface over QGIS 1.0.x and QGIS 1.6.0. As with any software, there may be bugs and issues that we were not able to fix in time for @@ -430,7 +430,7 @@

    Whats new in Version 1.2.0?

    Keyboard shortcuts: New feature: configure shortcuts for actions within main window of qgis! -See menu Setting->Configure shortcuts +See menu Setting->Configure shortcuts Map Composer: @@ -471,7 +471,7 @@

    Whats new in Version 1.2.0?

    QGIS now includes support for project relative position of file data sources and svgs. The saving of relative paths of file data sources is optional. -PostGIS & the PostgreSQL Provider: +PostGIS & the PostgreSQL Provider: You can now select the SSL mode when adding a new DB connection. Turning off SSL encryption can greatly improve performance of PostGIS data loading where @@ -655,7 +655,9 @@

    Whats new in Version 1.0.0?

    OS X Specific
      -
    • Due to a limitation in the Quicktime graphics engine, there is a limit on the number points allowed per feature. See the Readme that comes with the OS X dmg +
    • Due to a limitation in the Quicktime graphics engine, there is a + limit on the number points allowed per feature. See the Readme that comes + with the OS X dmg
    @@ -670,10 +672,13 @@

    Whats new in Version 1.0.0?

    If think you have found a bug, please consider reporting it to the development team. The steps to report a bug are:
      -
    1. Go to the Bug Tracker at https://svn.qgis.org/trac -
    2. Read Using Trac With QGIS to learn about the submission process -
    3. Review the list of current issues to make sure your bug has not already been submitted. If it has, review the submission and see if there is anything you can add to the bug report to aid the developers -
    4. If your bug has not been reported, create a new ticket, making sure to either login to trac or provide your email address. Tickets lacking contact information are subject to deletion. +
    5. Ensure you have an OSGEO login (available to anyone by filling out the form on this page: http://www.osgeo.org/osgeo_userid +
    6. Go to the Bug Tracker at http://hub.qgis.org/projects/quantum-gis +
    7. Review the list of current issues to make sure your bug has not + already been submitted. If it has, review the submission and see if + there is anything you can add to the bug report to aid the developers +
    8. If your bug has not been reported, create a new ticket. Tickets + lacking contact information are subject to deletion.
    From 03525ea0378c9f28d6cc298ca8a9ac0f6c020190 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 5 Jun 2011 13:44:05 +0200 Subject: [PATCH 27/62] Updated references to bug tracker to point to hub website --- CODING | 6 +++--- INSTALL | 20 +++++++++++++------- doc/CODING.t2t | 6 +++--- doc/INSTALL.html | 8 ++++---- doc/index.dox | 2 +- doc/index.html | 23 ++++++++++++++--------- 6 files changed, 38 insertions(+), 27 deletions(-) diff --git a/CODING b/CODING index 2151d59c07c3..972e9ea17a28 100644 --- a/CODING +++ b/CODING @@ -596,10 +596,10 @@ easily, and help us deal with the patches that are sent to use easily. If the patch is a fix for a specific bug, please name the file with the bug number in it e.g. bug777fix.patch, and attach it to the original bug report -in trac (https://trac.osgeo.org/qgis/). +in trac (http://hub.qgis.org/projects/quantum-gis). If the bug is an enhancement or new feature, its usually a good idea to create -a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you +a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you 2.7.2. Create your patch in the top level QGIS source dir @@ -868,7 +868,7 @@ test before fixing the bug will let you automate the testing for bug resolution in an efficient manner. To implement your regression test, you should follow the naming convention of -regression for your test functions. If no trac ticket exists for the +regression for your test functions. If no redmine ticket exists for the regression, you should create one first. Using this approach allows the person running a failed regression test easily go and find out more information. diff --git a/INSTALL b/INSTALL index 558a91ca444d..6164df3f060e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,10 +1,10 @@ Quantum GIS (QGIS) Building QGIS from source - step by step -Sunday May 29, 2011 +Sunday June 05, 2011 -Last Updated: Sunday May 29, 2011 -Last Change : Friday May 20, 2011 +Last Updated: Sunday June 05, 2011 +Last Change : Thursday June 02, 2011 1. Introduction @@ -27,7 +27,7 @@ Last Change : Friday May 20, 2011 5.1. Install Qt4 from disk image 5.2. Install development frameworks for QGIS dependencies 5.3. Install CMake for OSX - 5.4. Download QGIS source from github + 5.4. QGIS source 5.5. Configure the build 5.6. Building 6. Authors and Acknowledgments @@ -1496,10 +1496,16 @@ tarball, then cd to the source folder and: sudo make install - 5.4. Download QGIS source from github - ===================================== + 5.4. QGIS source + ================ + +Unzip the QGIS source tarball to a working folder of your choice +(/usr/somewhere is not a good choice as it's hidden and requires root +privileges). If you are reading this from the source, you've already done +this. -Go to the github QGIS project page: +If you want to experiment with the latest development sources, go to the github +QGIS project page: http://github.com/qgis/Quantum-GIS diff --git a/doc/CODING.t2t b/doc/CODING.t2t index 62697ef4e031..48c1dc2f4ab9 100644 --- a/doc/CODING.t2t +++ b/doc/CODING.t2t @@ -575,10 +575,10 @@ easily, and help us deal with the patches that are sent to use easily. If the patch is a fix for a specific bug, please name the file with the bug number in it e.g. **bug777fix.patch**, and attach it to the original bug report -in trac (https://trac.osgeo.org/qgis/). +in trac (http://hub.qgis.org/projects/quantum-gis). If the bug is an enhancement or new feature, its usually a good idea to create -a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you +a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you === Create your patch in the top level QGIS source dir === @@ -854,7 +854,7 @@ test **before** fixing the bug will let you automate the testing for bug resolution in an efficient manner. To implement your regression test, you should follow the naming convention of -regression for your test functions. If no trac ticket exists for the +regression for your test functions. If no redmine ticket exists for the regression, you should create one first. Using this approach allows the person running a failed regression test easily go and find out more information. diff --git a/doc/INSTALL.html b/doc/INSTALL.html index 9b81956e11ca..3aac281bca82 100644 --- a/doc/INSTALL.html +++ b/doc/INSTALL.html @@ -45,13 +45,13 @@

    -Last Updated: Sunday May 29, 2011 -Last Change : Friday May 20, 2011 +Last Updated: Sunday June 05, 2011 +Last Change : Thursday June 02, 2011

    @@ -2291,5 +2291,5 @@

    6. Authors and Acknowledgments

    - + diff --git a/doc/index.dox b/doc/index.dox index c8dda52b1405..493eb93782d1 100644 --- a/doc/index.dox +++ b/doc/index.dox @@ -36,7 +36,7 @@ developers. \section index_bugs Bug Reporting If you think you have found a bug, please report it using our bug tracker. When reporting bugs, +href="http://hub.qgis.org/projects/quantum-gis">bug tracker. When reporting bugs, please include some contact information in case we need help with replicating your issue. diff --git a/doc/index.html b/doc/index.html index 91f112671d8a..c1ab1c77dedb 100644 --- a/doc/index.html +++ b/doc/index.html @@ -10,7 +10,7 @@ Quantum GIS Documentation
    - Version 1.7.0 Wroclaw
    + Version 1.7.0 Wrocław
    Please read this entire document for important information about this release.
    You find a PDF manual of the current version on the QGIS website. @@ -25,7 +25,7 @@

    Whats new in Version 1.7.0 'Wrocław'?

    This release is named after the town of Wrocław in Poland. The Department of Climatology and Atmosphere Protection, University of Wrocław kindly hosted our -last developer meeting in November 2010. Please note that this is a release in +developer meeting in November 2010. Please note that this is a release in our 'cutting edge' release series. As such it contains new features and extends the programmatic interface over QGIS 1.0.x and QGIS 1.6.0. As with any software, there may be bugs and issues that we were not able to fix in time for @@ -430,7 +430,7 @@

    Whats new in Version 1.2.0?

    Keyboard shortcuts: New feature: configure shortcuts for actions within main window of qgis! -See menu Setting->Configure shortcuts +See menu Setting->Configure shortcuts Map Composer: @@ -471,7 +471,7 @@

    Whats new in Version 1.2.0?

    QGIS now includes support for project relative position of file data sources and svgs. The saving of relative paths of file data sources is optional. -PostGIS & the PostgreSQL Provider: +PostGIS & the PostgreSQL Provider: You can now select the SSL mode when adding a new DB connection. Turning off SSL encryption can greatly improve performance of PostGIS data loading where @@ -655,7 +655,9 @@

    Whats new in Version 1.0.0?

    OS X Specific
      -
    • Due to a limitation in the Quicktime graphics engine, there is a limit on the number points allowed per feature. See the Readme that comes with the OS X dmg +
    • Due to a limitation in the Quicktime graphics engine, there is a + limit on the number points allowed per feature. See the Readme that comes + with the OS X dmg
    @@ -670,10 +672,13 @@

    Whats new in Version 1.0.0?

    If think you have found a bug, please consider reporting it to the development team. The steps to report a bug are:
      -
    1. Go to the Bug Tracker at https://svn.qgis.org/trac -
    2. Read Using Trac With QGIS to learn about the submission process -
    3. Review the list of current issues to make sure your bug has not already been submitted. If it has, review the submission and see if there is anything you can add to the bug report to aid the developers -
    4. If your bug has not been reported, create a new ticket, making sure to either login to trac or provide your email address. Tickets lacking contact information are subject to deletion. +
    5. Ensure you have an OSGEO login (available to anyone by filling out the form on this page: http://www.osgeo.org/osgeo_userid +
    6. Go to the Bug Tracker at http://hub.qgis.org/projects/quantum-gis +
    7. Review the list of current issues to make sure your bug has not + already been submitted. If it has, review the submission and see if + there is anything you can add to the bug report to aid the developers +
    8. If your bug has not been reported, create a new ticket. Tickets + lacking contact information are subject to deletion.
    From c1065b9cd64945d04ac9c668a8547b664b47f2b9 Mon Sep 17 00:00:00 2001 From: Gary Sherman Date: Tue, 7 Jun 2011 08:33:22 -0800 Subject: [PATCH 28/62] Fix feature count for postgres provider so it doesn't use estimated metadata when reporting results of a subset in the query builder --- src/providers/postgres/qgspostgresprovider.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index 23deb736fa3c..66fb3b3287fc 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -2890,7 +2890,9 @@ long QgsPostgresProvider::featureCount() const // get total number of features QString sql; - if ( !isQuery && mUseEstimatedMetadata ) + // only use estimated metadata when there is no where clause, otherwise + // we get an incorrect feature count for the subset + if ( !isQuery && mUseEstimatedMetadata && sqlWhereClause.isEmpty()) { sql = QString( "select reltuples::int from pg_catalog.pg_class where oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) ); } @@ -2904,6 +2906,7 @@ long QgsPostgresProvider::featureCount() const } } + Result result = connectionRO->PQexec( sql ); QgsDebugMsg( "number of features as text: " + From a57968532b75023bdd427028d6a086d056582747 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Tue, 7 Jun 2011 22:32:07 +0200 Subject: [PATCH 29/62] document impact of using estimated table metadata (and revert last commit) --- resources/context_help/QgsNewConnection-de_DE | 19 ----------- resources/context_help/QgsNewConnection-en_US | 19 ----------- .../context_help/QgsPgNewConnection-de_DE | 32 +++++++++++++++++++ .../context_help/QgsPgNewConnection-en_US | 32 +++++++++++++++++++ ...nection-es_ES => QgsPgNewConnection-es_ES} | 0 ...nection-fr_FR => QgsPgNewConnection-fr_FR} | 0 ...nection-it_IT => QgsPgNewConnection-it_IT} | 0 ...nection-ja_JP => QgsPgNewConnection-ja_JP} | 0 ...nection-pl_PL => QgsPgNewConnection-pl_PL} | 0 ...nection-pt_BR => QgsPgNewConnection-pt_BR} | 0 ...nection-ru_RU => QgsPgNewConnection-ru_RU} | 0 ...nection-sk_SK => QgsPgNewConnection-sk_SK} | 0 ...nection-sv_SE => QgsPgNewConnection-sv_SE} | 0 .../postgres/qgspostgresprovider.cpp | 8 ++--- 14 files changed, 68 insertions(+), 42 deletions(-) delete mode 100644 resources/context_help/QgsNewConnection-de_DE delete mode 100644 resources/context_help/QgsNewConnection-en_US create mode 100644 resources/context_help/QgsPgNewConnection-de_DE create mode 100644 resources/context_help/QgsPgNewConnection-en_US rename resources/context_help/{QgsNewConnection-es_ES => QgsPgNewConnection-es_ES} (100%) rename resources/context_help/{QgsNewConnection-fr_FR => QgsPgNewConnection-fr_FR} (100%) rename resources/context_help/{QgsNewConnection-it_IT => QgsPgNewConnection-it_IT} (100%) rename resources/context_help/{QgsNewConnection-ja_JP => QgsPgNewConnection-ja_JP} (100%) rename resources/context_help/{QgsNewConnection-pl_PL => QgsPgNewConnection-pl_PL} (100%) rename resources/context_help/{QgsNewConnection-pt_BR => QgsPgNewConnection-pt_BR} (100%) rename resources/context_help/{QgsNewConnection-ru_RU => QgsPgNewConnection-ru_RU} (100%) rename resources/context_help/{QgsNewConnection-sk_SK => QgsPgNewConnection-sk_SK} (100%) rename resources/context_help/{QgsNewConnection-sv_SE => QgsPgNewConnection-sv_SE} (100%) diff --git a/resources/context_help/QgsNewConnection-de_DE b/resources/context_help/QgsNewConnection-de_DE deleted file mode 100644 index 27083e503451..000000000000 --- a/resources/context_help/QgsNewConnection-de_DE +++ /dev/null @@ -1,19 +0,0 @@ -

    Neue PostGIS-Verbindung erzeugen

    -Um eine PostGIS-Verbindung anzulegen, müssen Sie den Host, Port und Ihren Benutzername/Passwort für den Datenbankserver kennen. -

    Benötigte Parameter

    -
      -
    • - ein beschreibender Name für die Verbindung -
    • - der Name des Hosts des Datenbankservers (z.B. madison.qgis.org) -
    • - Name der zu verbindenden Datenbank -
    • - Port auf dem PostgreSQL horcht. Voreingestellt ist 5432. Im Zweifel fragen Sie Ihren Datenbankadministrator -
    • - Ihre Datenbankbenutzername -
    • - Ihr Datenbankpasswort -
    -

    Optionen

    -
      -
    1. - speichern Sie Ihr Passwort, damit sie es nicht jedes mal wieder eingeben müssen. Das Passwort wird im Klartext in Ihren QGIS-Einstellungen gespeichert. -
    2. - normalerweise durchsucht QGIS alle Tabellen nach Geometriespalten und fügt sie dann der Layerliste hinzu. Ein Haken hier sorgt dafür, dass QGIS nur "registrierte" Tabellen mit einem Eintrag in der geometry_columns-Tabelle anzeigt. -
    3. - diese begrenzt die Suche auf Layer im public-Schema -
    -

    Verbindung testen

    -Klicken Sie auf um einen Verbindungsversuch mit diesen Parameters auszulösen. Hiermit können Sie die Verbindungsparameter vor dem Speichern gut prüfen. diff --git a/resources/context_help/QgsNewConnection-en_US b/resources/context_help/QgsNewConnection-en_US deleted file mode 100644 index 4515acaa0e25..000000000000 --- a/resources/context_help/QgsNewConnection-en_US +++ /dev/null @@ -1,19 +0,0 @@ -

    Create a new PostGIS connection

    -To create a new PostGIS Connection, you need to know the host, port, and your user name/password for the database server. -

    Required Parameters

    -
      -
    • - a descriptive name for this connection -
    • - the host name of the database server (eg. madison.qgis.org) -
    • - name of the database to connect to -
    • - port that PostgreSQL is listening on. By default this is 5432. If in doubt, check with your database administrator. -
    • - your database user name -
    • - your database password -
    -

    Options

    -
      -
    1. - save your password so you don't have to enter each time. The password is stored in clear text with your QGIS preferences. -
    2. - normally QGIS examines every table in the database to see if it has a geometry column and if so, adds it to the list of layers. Checking this box tells QGIS to only list layer that have been "registered" and have an entry in the geometry_columns table. -
    3. - this limits the search for layers to the public schema -
    -

    Testing the Connection

    -Clicking on the button initiates a connect attempt to the database using the parameters you specified. This is a good way to check the connection parameters prior to saving the connection. diff --git a/resources/context_help/QgsPgNewConnection-de_DE b/resources/context_help/QgsPgNewConnection-de_DE new file mode 100644 index 000000000000..04f6e1cb4d73 --- /dev/null +++ b/resources/context_help/QgsPgNewConnection-de_DE @@ -0,0 +1,32 @@ +

    Neue PostgreSQL-Verbindung erstellen

    +In diesem Dialog kann eine Verbindung zu einer PostgreSQL-Datenbank eingestellt werden. +

    +

      +
    • Ein Name um die Verbindung zu identifizieren. + +
    • Der Name eines Dienstes aus der Connection Service Datei (englisch). + +
    • Name oder IP-Adresse des Computers, der den Datenbankserver beherbergt (für lokale Verbindungen und Dienste frei lassen). + +
    • IP-Port des Datenbankservers (für lokale Verbindungen oder den voreingestellten Port 5432 frei lassen). + +
    • Name der Datenbank (für die voreingestellte Datenbank leer lassen). + +
    • SSL-Modus (englisch) der Verbindung. + +
    • Datenbankbenutzername. +
    • Datenbankpasswort. + +
    • Legt fest, dass der Benutzername in der Verbindungseinstellungen gespeichert werden soll. + +
    • Legt fest, dass das Passwort in den Verbindungseinstellungen gespeichert werden soll. Passworte werden dann im Klartext in der Systemkonfiguration und Projektdateien gespeichert! + +
    • Legt fest, dass nur "gelistete" Geometriespalten benutzt werden sollen - statt alle Tabellen nach Geometriespalten zu durchsuchen. + +
    • Legt fest, dass nur das Schema 'public' berücksichtigt werden soll - statt alle zugänglichen Tabellen. + +
    • Legt fest, dass normalerweise nicht nur Tabellen mit Geometrie, sondern alle Tabellen aufgelistet werden sollen. + +
    • Wenn die Layer initialisiert werden, können mehrere Abfragen nötig sein, um die Eigenschaften der Geometrien der Datenbanktabelle zu bestimmen. Wenn diese Option gewählt ist werden die Abfragen nur einige Zeilen und die Tabellenstatistiken, statt der gesamten Tabelle, betrachten. Dies beschleunigt die Benutzung Layer erheblich, kann aber auch zu falschen Ergebnissen führen (z.B. wird die Objektanzahl von gefilterten Layern nicht genau bestimmt). + +
    diff --git a/resources/context_help/QgsPgNewConnection-en_US b/resources/context_help/QgsPgNewConnection-en_US new file mode 100644 index 000000000000..3d06d6ca2329 --- /dev/null +++ b/resources/context_help/QgsPgNewConnection-en_US @@ -0,0 +1,32 @@ +

    Create a New PostgreSQL Connection

    +This dialog allows you to define the settings for a connection to a PostgreSQL database. +

    +

      +
    • A name to identify the connection settings. + +
    • A name of a service listed in the Connection Service File. + +
    • Name or IP address of the computer hosting the database server (leave blank for local connections or services). + +
    • IP port used by the database server (leave blank for local connections or to use default port 5432). + +
    • Name of the database (leave blank for default database). + +
    • SSL mode of the connection + +
    • Database user name. +
    • Database password. + +
    • Indicates whether to save the database user name in the connection configuration. + +
    • Indicates whether to save the database password in the connection settings. Passwords are saved in clear text in the system configuration and in the project files! + +
    • Indicates that only "listed" geometry columns should be used - opposed to scanning all tables for geometry columns. + +
    • Indicates that only tables in the 'public' schema should be considers - opposed to all accessible tables. + +
    • Indicates that tables without geometry should also be listed by default. + +
    • When initializing layers, various queries may be needed to establish the characteristics of the geometries stored in the database table. When this option is checked, these queries examine only a sample of the rows and use the table statistics, rather than the entire table. This can drastically speed up operations on large datasets, but may result in incorrect characterization of layers (eg. the feature count of filtered layers will not be accurately determined). + +
    diff --git a/resources/context_help/QgsNewConnection-es_ES b/resources/context_help/QgsPgNewConnection-es_ES similarity index 100% rename from resources/context_help/QgsNewConnection-es_ES rename to resources/context_help/QgsPgNewConnection-es_ES diff --git a/resources/context_help/QgsNewConnection-fr_FR b/resources/context_help/QgsPgNewConnection-fr_FR similarity index 100% rename from resources/context_help/QgsNewConnection-fr_FR rename to resources/context_help/QgsPgNewConnection-fr_FR diff --git a/resources/context_help/QgsNewConnection-it_IT b/resources/context_help/QgsPgNewConnection-it_IT similarity index 100% rename from resources/context_help/QgsNewConnection-it_IT rename to resources/context_help/QgsPgNewConnection-it_IT diff --git a/resources/context_help/QgsNewConnection-ja_JP b/resources/context_help/QgsPgNewConnection-ja_JP similarity index 100% rename from resources/context_help/QgsNewConnection-ja_JP rename to resources/context_help/QgsPgNewConnection-ja_JP diff --git a/resources/context_help/QgsNewConnection-pl_PL b/resources/context_help/QgsPgNewConnection-pl_PL similarity index 100% rename from resources/context_help/QgsNewConnection-pl_PL rename to resources/context_help/QgsPgNewConnection-pl_PL diff --git a/resources/context_help/QgsNewConnection-pt_BR b/resources/context_help/QgsPgNewConnection-pt_BR similarity index 100% rename from resources/context_help/QgsNewConnection-pt_BR rename to resources/context_help/QgsPgNewConnection-pt_BR diff --git a/resources/context_help/QgsNewConnection-ru_RU b/resources/context_help/QgsPgNewConnection-ru_RU similarity index 100% rename from resources/context_help/QgsNewConnection-ru_RU rename to resources/context_help/QgsPgNewConnection-ru_RU diff --git a/resources/context_help/QgsNewConnection-sk_SK b/resources/context_help/QgsPgNewConnection-sk_SK similarity index 100% rename from resources/context_help/QgsNewConnection-sk_SK rename to resources/context_help/QgsPgNewConnection-sk_SK diff --git a/resources/context_help/QgsNewConnection-sv_SE b/resources/context_help/QgsPgNewConnection-sv_SE similarity index 100% rename from resources/context_help/QgsNewConnection-sv_SE rename to resources/context_help/QgsPgNewConnection-sv_SE diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index 66fb3b3287fc..1cfe268caed1 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -2890,9 +2890,10 @@ long QgsPostgresProvider::featureCount() const // get total number of features QString sql; - // only use estimated metadata when there is no where clause, otherwise - // we get an incorrect feature count for the subset - if ( !isQuery && mUseEstimatedMetadata && sqlWhereClause.isEmpty()) + // use estimated metadata even when there is a where clause, + // although we get an incorrect feature count for the subset + // - but make huge dataset usable. + if ( !isQuery && mUseEstimatedMetadata ) { sql = QString( "select reltuples::int from pg_catalog.pg_class where oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) ); } @@ -2906,7 +2907,6 @@ long QgsPostgresProvider::featureCount() const } } - Result result = connectionRO->PQexec( sql ); QgsDebugMsg( "number of features as text: " + From 3a9e267af8a98256a661472b1a1c9cdc09376186 Mon Sep 17 00:00:00 2001 From: Sergey Yakushev Date: Mon, 6 Jun 2011 10:03:27 +0300 Subject: [PATCH 30/62] fix RoadGraph plugin "path not found" error when start and stop points are equal --- src/plugins/roadgraph/utils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/roadgraph/utils.cpp b/src/plugins/roadgraph/utils.cpp index 48bb2d89f369..751d943bc337 100644 --- a/src/plugins/roadgraph/utils.cpp +++ b/src/plugins/roadgraph/utils.cpp @@ -150,6 +150,7 @@ AdjacencyMatrix DijkstraFinder::find( const QgsPoint& frontPoint, const QgsPoint } AdjacencyMatrix m; + m[ frontPoint ]; QgsPoint nextPoint = backPoint; QgsPoint firstPoint = backPoint; while ( true ) From dd83c441fa4a07f56d1aee2c5bc446091a09db8b Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Mon, 30 May 2011 16:06:37 +0200 Subject: [PATCH 31/62] embedding of single layer --- src/app/qgisapp.cpp | 17 ++ src/app/qgisapp.h | 4 + src/core/qgsmaplayer.cpp | 4 +- src/core/qgsmaplayer.h | 4 +- src/core/qgsproject.cpp | 235 ++++++++++++++++++++++---- src/core/qgsproject.h | 24 ++- src/core/qgsvectorlayer.cpp | 2 +- src/core/qgsvectorlayer.h | 2 +- src/core/qgsvectorlayerjoinbuffer.cpp | 2 +- src/core/qgsvectorlayerjoinbuffer.h | 2 +- src/core/raster/qgsrasterlayer.cpp | 2 +- src/core/raster/qgsrasterlayer.h | 2 +- src/ui/qgisapp.ui | 10 +- 13 files changed, 260 insertions(+), 50 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 8829ebbdcd34..961a2cce1abb 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -779,6 +779,7 @@ void QgisApp::createActions() connect( mActionNewVectorLayer, SIGNAL( triggered() ), this, SLOT( newVectorLayer() ) ); connect( mActionNewSpatialiteLayer, SIGNAL( triggered() ), this, SLOT( newSpatialiteLayer() ) ); connect( mActionShowRasterCalculator, SIGNAL( triggered() ), this, SLOT( showRasterCalculator() ) ); + connect( mActionEmbedLayers, SIGNAL( triggered() ) , this, SLOT( embedLayers() ) ); connect( mActionAddOgrLayer, SIGNAL( triggered() ), this, SLOT( addVectorLayer() ) ); connect( mActionAddRasterLayer, SIGNAL( triggered() ), this, SLOT( addRasterLayer() ) ); connect( mActionAddPgLayer, SIGNAL( triggered() ), this, SLOT( addDatabaseLayer() ) ); @@ -5048,6 +5049,16 @@ void QgisApp::addMapLayer( QgsMapLayer *theMapLayer ) } +void QgisApp::embedLayers() +{ + //dialog to select groups/layers from other project files + + //hardcoded for debugging + QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; + QString id="komb113320110516093016594"; + QgsProject::instance()->createEmbeddedLayer( id, filepath ); +} + void QgisApp::setExtent( QgsRectangle theRect ) { mMapCanvas->setExtent( theRect ); @@ -6513,6 +6524,11 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml ) if ( !ml ) return; + if( !QgsProject::instance()->layerIsEmbedded( ml->id() ).isEmpty() ) + { + return; //don't show properties of embedded layers + } + if ( ml->type() == QgsMapLayer::RasterLayer ) { QgsRasterLayerProperties *rlp = NULL; // See note above about reusing this @@ -6525,6 +6541,7 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml ) rlp = new QgsRasterLayerProperties( ml, mMapCanvas ); connect( rlp, SIGNAL( refreshLegend( QString, bool ) ), mMapLegend, SLOT( refreshLayerSymbology( QString, bool ) ) ); } + rlp->exec(); delete rlp; // delete since dialog cannot be reused without updating code } diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 241c8710709a..3d8a3e77da86 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -249,6 +249,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow QAction *actionNewVectorLayer() { return mActionNewVectorLayer; } QAction *actionNewSpatialLiteLayer() { return mActionNewSpatialiteLayer; } + QAction *actionEmbedLayers() { return mActionEmbedLayers; } QAction *actionAddOgrLayer() { return mActionAddOgrLayer; } QAction *actionAddRasterLayer() { return mActionAddRasterLayer; } QAction *actionAddPgLayer() { return mActionAddPgLayer; } @@ -541,6 +542,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow void fileNew( bool thePromptToSaveFlag ); //! Calculate new rasters from existing ones void showRasterCalculator(); + void embedLayers(); //! Create a new empty vector layer void newVectorLayer(); @@ -763,6 +765,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow //! Activates label property tool void changeLabelProperties(); + + signals: /** emitted when a key is pressed and we want non widget sublasses to be able to pick up on this (e.g. maplayer) */ diff --git a/src/core/qgsmaplayer.cpp b/src/core/qgsmaplayer.cpp index d2b5e1320d85..a21ee3bb1041 100644 --- a/src/core/qgsmaplayer.cpp +++ b/src/core/qgsmaplayer.cpp @@ -141,7 +141,7 @@ void QgsMapLayer::drawLabels( QgsRenderContext& rendererContext ) // QgsDebugMsg("entered."); } -bool QgsMapLayer::readXML( QDomNode & layer_node ) +bool QgsMapLayer::readXML( const QDomNode& layer_node ) { QgsCoordinateReferenceSystem savedCRS; CUSTOM_CRS_VALIDATION savedValidation; @@ -269,7 +269,7 @@ bool QgsMapLayer::readXML( QDomNode & layer_node ) } // void QgsMapLayer::readXML -bool QgsMapLayer::readXml( QDomNode & layer_node ) +bool QgsMapLayer::readXml( const QDomNode& layer_node ) { // NOP by default; children will over-ride with behavior specific to them diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 23a1d4f774dc..b893c47a7c5f 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -155,7 +155,7 @@ class CORE_EXPORT QgsMapLayer : public QObject @returns true if successful */ - bool readXML( QDomNode & layer_node ); + bool readXML( const QDomNode& layer_node ); /** stores state in Dom node @@ -378,7 +378,7 @@ class CORE_EXPORT QgsMapLayer : public QObject /** called by readXML(), used by children to read state specific to them from project files. */ - virtual bool readXml( QDomNode & layer_node ); + virtual bool readXml( const QDomNode& layer_node ); /** called by writeXML(), used by children to write state specific to them to project files. diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 49f058eb240c..aeea76dca9fa 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -682,54 +682,66 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do QDomNode node = nl.item( i ); QDomElement element = node.toElement(); - QString type = element.attribute( "type" ); - - QgsDebugMsg( "Layer type is " + type ); - - QgsMapLayer *mapLayer = NULL; - - if ( type == "vector" ) + if( element.attribute("embedded") == "1" ) { - mapLayer = new QgsVectorLayer; + createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ) ); + continue; } - else if ( type == "raster" ) - { - mapLayer = new QgsRasterLayer; - } - else if ( type == "plugin" ) + else { - QString typeName = element.attribute( "name" ); - mapLayer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); - } +#if 0 + QString type = element.attribute( "type" ); + QgsDebugMsg( "Layer type is " + type ); + QgsMapLayer *mapLayer = NULL; + + if ( type == "vector" ) + { + mapLayer = new QgsVectorLayer; + } + else if ( type == "raster" ) + { + mapLayer = new QgsRasterLayer; + } + else if ( type == "plugin" ) + { + QString typeName = element.attribute( "name" ); + mapLayer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); + } - Q_CHECK_PTR( mapLayer ); + Q_CHECK_PTR( mapLayer ); - if ( !mapLayer ) - { - QgsDebugMsg( "Unable to create layer" ); + if ( !mapLayer ) + { + QgsDebugMsg( "Unable to create layer" ); - return qMakePair( false, brokenNodes ); - } + return qMakePair( false, brokenNodes ); + } - // have the layer restore state that is stored in Dom node - if ( mapLayer->readXML( node ) && mapLayer->isValid() ) - { - mapLayer = QgsMapLayerRegistry::instance()->addMapLayer( mapLayer ); - QgsVectorLayer* vLayer = qobject_cast( mapLayer ); - if ( vLayer && vLayer->vectorJoins().size() > 0 ) + // have the layer restore state that is stored in Dom node + if ( mapLayer->readXML( node ) && mapLayer->isValid() ) { - vLayerList.push_back( qMakePair( vLayer, element ) ); + mapLayer = QgsMapLayerRegistry::instance()->addMapLayer( mapLayer ); + QgsVectorLayer* vLayer = qobject_cast( mapLayer ); + if ( vLayer && vLayer->vectorJoins().size() > 0 ) + { + vLayerList.push_back( qMakePair( vLayer, element ) ); + } } - } - else - { - delete mapLayer; + else + { + delete mapLayer; - QgsDebugMsg( "Unable to load " + type + " layer" ); + QgsDebugMsg( "Unable to load " + type + " layer" ); - returnStatus = false; // flag that we had problems loading layers + returnStatus = false; // flag that we had problems loading layers - brokenNodes.push_back( node ); + brokenNodes.push_back( node ); + } +#endif //0 + if( !addLayer( element, brokenNodes, vLayerList ) ) + { + returnStatus = false; + } } emit layerLoaded( i + 1, nl.count() ); } @@ -754,6 +766,55 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do } // _getMapLayers +bool QgsProject::addLayer( const QDomElement& layerElem, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ) +{ + QString type = layerElem.attribute( "type" ); + QgsDebugMsg( "Layer type is " + type ); + QgsMapLayer *mapLayer = NULL; + + if ( type == "vector" ) + { + mapLayer = new QgsVectorLayer; + } + else if ( type == "raster" ) + { + mapLayer = new QgsRasterLayer; + } + else if ( type == "plugin" ) + { + QString typeName = layerElem.attribute( "name" ); + mapLayer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); + } + + Q_CHECK_PTR( mapLayer ); + + if ( !mapLayer ) + { + QgsDebugMsg( "Unable to create layer" ); + + return false; + } + + // have the layer restore state that is stored in Dom node + if ( mapLayer->readXML( layerElem ) && mapLayer->isValid() ) + { + mapLayer = QgsMapLayerRegistry::instance()->addMapLayer( mapLayer ); + QgsVectorLayer* vLayer = qobject_cast( mapLayer ); + if ( vLayer && vLayer->vectorJoins().size() > 0 ) + { + vectorLayerList.push_back( qMakePair( vLayer, layerElem ) ); + } + return true; + } + else + { + delete mapLayer; + + QgsDebugMsg( "Unable to load " + type + " layer" ); + brokenNodes.push_back( layerElem ); + return false; + } +} /** @@ -1022,7 +1083,19 @@ bool QgsProject::write() if ( ml ) { - ml->writeXML( projectLayersNode, *doc ); + QString externalProjectFile = layerIsEmbedded( ml->id() ); + if( externalProjectFile.isEmpty() ) + { + ml->writeXML( projectLayersNode, *doc ); + } + else //layer defined in an external project file + { + QDomElement mapLayerElem = doc->createElement("maplayer"); + mapLayerElem.setAttribute("embedded", 1 ); + mapLayerElem.setAttribute("project", writePath( externalProjectFile ) ); + mapLayerElem.setAttribute("id", ml->id() ); + projectLayersNode.appendChild( mapLayerElem ); + } } li++; } @@ -1529,6 +1602,94 @@ void QgsProject::setBadLayerHandler( QgsProjectBadLayerHandler* handler ) mBadLayerHandler = handler; } +void QgsProject::addEmbeddedLayer( const QString& layerId, const QString& projectFilePath ) +{ + mEmbeddedLayers.insert( layerId, projectFilePath ); +} + +QString QgsProject::layerIsEmbedded( const QString& id ) const +{ + QHash< QString, QString >::const_iterator it = mEmbeddedLayers.find( id ); + if( it == mEmbeddedLayers.constEnd() ) + { + return QString(); + } + return it.value(); +}; + +QgsMapLayer* QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ) +{ + QFile projectFile( projectFilePath ); + if( !projectFile.open( QIODevice::ReadOnly ) ) + { + return 0; + } + + QDomDocument projectDocument; + if( !projectDocument.setContent( &projectFile ) ) + { + return 0; + } + + QDomElement projectLayersElem = projectDocument.documentElement().firstChildElement("projectlayers"); + if( projectLayersElem.isNull() ) + { + return 0; + } + + QDomNodeList mapLayerNodes = projectLayersElem.elementsByTagName("maplayer"); + for( int i = 0; i < mapLayerNodes.size(); ++i ) + { + //get layer id + QDomElement mapLayerElem = mapLayerNodes.at(i).toElement(); + QString id = mapLayerElem.firstChildElement("id").text(); + if( id == layerId ) + { +#if 0 + if( !addLayer( element, brokenNodes, vLayerList ) ) + { + returnStatus = false; + } +#endif //0 + QString type = mapLayerElem.attribute("type"); + QgsMapLayer* layer = 0; + if( type == "vector" ) + { + layer = new QgsVectorLayer(); + } + else if( type == "raster" ) + { + layer = new QgsRasterLayer(); + } + else if( type == "plugin" ) + { + QString typeName = mapLayerElem.attribute( "name" ); + layer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); + } + else + { + return 0; + } + + // have the layer restore state that is stored in Dom node + if ( layer->readXML( mapLayerElem ) ) + { + QgsMapLayerRegistry::instance()->addMapLayer( layer ); + QgsProject::instance()->addEmbeddedLayer( layerId, projectFilePath ); + } + else + { + delete layer; + QgsDebugMsg( "unable to load " + type + " layer" ); + return 0; + } + return layer; + } + } + + return 0; +} + void QgsProjectBadLayerDefaultHandler::handleBadLayers( QList /*layers*/, QDomDocument /*projectDom*/ ) { // just ignore any bad layers diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index 605fb635dcb0..0ccffbd8e65e 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -23,17 +23,21 @@ #include #include "qgsprojectversion.h" -#include +#include #include +#include #include //#include class QFileInfo; class QDomDocument; +class QDomElement; class QDomNode; +class QgsMapLayer; class QgsProjectBadLayerHandler; +class QgsVectorLayer; /** \ingroup core * Reads and writes project states. @@ -272,6 +276,18 @@ class CORE_EXPORT QgsProject : public QObject @note added in 1.4 */ void setBadLayerHandler( QgsProjectBadLayerHandler* handler ); + /**Adds layer to list of embedded layers + @note: added in version 1.8*/ + void addEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); + + /**Returns project file path if layer is embedded from other project file. Returns empty string if layer is not embedded*/ + QString layerIsEmbedded( const QString& id ) const; + + /**Creates a maplayer instance defined in an arbitrary project file. Caller takes ownership + @return the layer or 0 in case of error + @note: added in version 1.8*/ + static QgsMapLayer* createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); + protected: /** Set error message from read/write operation @@ -282,6 +298,9 @@ class CORE_EXPORT QgsProject : public QObject @note added in 1.4 */ void clearError(); + //Creates layer and adds it to maplayer registry + bool addLayer( const QDomElement& layerElem, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ); + signals: //! emitted when project is being read @@ -317,6 +336,9 @@ class CORE_EXPORT QgsProject : public QObject QgsProjectBadLayerHandler* mBadLayerHandler; + /**Embeded layers which are defined in other projects. Key: layer id, value: project file path*/ + QHash< QString, QString > mEmbeddedLayers; + }; // QgsProject diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index ab1fa01ef163..080f9ede785e 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -2638,7 +2638,7 @@ bool QgsVectorLayer::startEditing() return true; } -bool QgsVectorLayer::readXml( QDomNode & layer_node ) +bool QgsVectorLayer::readXml( const QDomNode& layer_node ) { QgsDebugMsg( QString( "Datasource in QgsVectorLayer::readXml: " ) + mDataSource.toLocal8Bit().data() ); diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 395973f710e7..04c9dc3efe12 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -269,7 +269,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer /** reads vector layer specific state from project file Dom node. * @note Called by QgsMapLayer::readXML(). */ - virtual bool readXml( QDomNode & layer_node ); + virtual bool readXml( const QDomNode& layer_node ); /** write vector layer specific state to project file Dom node. * @note Called by QgsMapLayer::writeXML(). diff --git a/src/core/qgsvectorlayerjoinbuffer.cpp b/src/core/qgsvectorlayerjoinbuffer.cpp index 433283582c52..0d9e7af8960e 100644 --- a/src/core/qgsvectorlayerjoinbuffer.cpp +++ b/src/core/qgsvectorlayerjoinbuffer.cpp @@ -299,7 +299,7 @@ void QgsVectorLayerJoinBuffer::writeXml( QDomNode& layer_node, QDomDocument& doc } } -void QgsVectorLayerJoinBuffer::readXml( QDomNode& layer_node ) +void QgsVectorLayerJoinBuffer::readXml( const QDomNode& layer_node ) { mVectorJoins.clear(); QDomElement vectorJoinsElem = layer_node.firstChildElement( "vectorjoins" ); diff --git a/src/core/qgsvectorlayerjoinbuffer.h b/src/core/qgsvectorlayerjoinbuffer.h index 49358184b4e1..ec84693e5734 100644 --- a/src/core/qgsvectorlayerjoinbuffer.h +++ b/src/core/qgsvectorlayerjoinbuffer.h @@ -57,7 +57,7 @@ class CORE_EXPORT QgsVectorLayerJoinBuffer void writeXml( QDomNode& layer_node, QDomDocument& document ) const; /**Reads joins from project file*/ - void readXml( QDomNode& layer_node ); + void readXml( const QDomNode& layer_node ); /**Quick way to test if there is any join at all*/ bool containsJoins() const { return ( mVectorJoins.size() > 0 ); } diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index 050b28262b04..2d538089e38e 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -3221,7 +3221,7 @@ bool QgsRasterLayer::readSymbology( const QDomNode& layer_node, QString& errorMe @note Called by QgsMapLayer::readXML(). */ -bool QgsRasterLayer::readXml( QDomNode & layer_node ) +bool QgsRasterLayer::readXml( const QDomNode& layer_node ) { //! @note Make sure to read the file first so stats etc are initialised properly! diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index e7b1bef9fe82..037df315a27d 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -695,7 +695,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer bool readSymbology( const QDomNode& node, QString& errorMessage ); /** \brief Reads layer specific state from project file Dom node */ - bool readXml( QDomNode & layer_node ); + bool readXml( const QDomNode& layer_node ); /** \brief Write the symbology for the layer into the docment provided */ bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessage ) const; diff --git a/src/ui/qgisapp.ui b/src/ui/qgisapp.ui index c2e30780422e..2580a8f9fc6e 100644 --- a/src/ui/qgisapp.ui +++ b/src/ui/qgisapp.ui @@ -17,7 +17,7 @@ 0 0 1054 - 21 + 24 @@ -234,6 +234,7 @@ false + @@ -532,7 +533,7 @@ true - + :/images/themes/default/mActionAddFeature.png:/images/themes/default/mActionAddFeature.png @@ -1480,6 +1481,11 @@ Ctrl+M + + + Embed Layers + + From b41493b7b8f0e4ae73e3362003eed560882593b1 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 31 May 2011 10:34:40 +0200 Subject: [PATCH 32/62] remove more redundancy in qgsproject --- src/app/qgisapp.cpp | 5 ++++- src/core/qgsproject.cpp | 28 +++++++++++++++++----------- src/core/qgsproject.h | 3 ++- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 961a2cce1abb..8b8f190dc9b9 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5056,7 +5056,10 @@ void QgisApp::embedLayers() //hardcoded for debugging QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; QString id="komb113320110516093016594"; - QgsProject::instance()->createEmbeddedLayer( id, filepath ); + + QList brokenNodes; + QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; + QgsProject::instance()->createEmbeddedLayer( id, filepath, brokenNodes, vectorLayerList ); } void QgisApp::setExtent( QgsRectangle theRect ) diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index aeea76dca9fa..6609f09429cc 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -684,7 +684,10 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do if( element.attribute("embedded") == "1" ) { - createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ) ); + if( !createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList ) ) + { + returnStatus = false; + } continue; } else @@ -960,6 +963,10 @@ bool QgsProject::read() bool QgsProject::read( QDomNode & layerNode ) { + QList brokenNodes; + QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; + return addLayer( layerNode.toElement(), brokenNodes, vectorLayerList ); +#if 0 QString type = layerNode.toElement().attribute( "type" ); QgsMapLayer *mapLayer = NULL; @@ -1004,6 +1011,7 @@ bool QgsProject::read( QDomNode & layerNode ) } return true; +#endif //0 } // QgsProject::read( QDomNode & layerNode ) @@ -1617,24 +1625,24 @@ QString QgsProject::layerIsEmbedded( const QString& id ) const return it.value(); }; -QgsMapLayer* QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ) +bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ) { QFile projectFile( projectFilePath ); if( !projectFile.open( QIODevice::ReadOnly ) ) { - return 0; + return false; } QDomDocument projectDocument; if( !projectDocument.setContent( &projectFile ) ) { - return 0; + return false; } QDomElement projectLayersElem = projectDocument.documentElement().firstChildElement("projectlayers"); if( projectLayersElem.isNull() ) { - return 0; + return false; } QDomNodeList mapLayerNodes = projectLayersElem.elementsByTagName("maplayer"); @@ -1645,12 +1653,8 @@ QgsMapLayer* QgsProject::createEmbeddedLayer( const QString& layerId, const QStr QString id = mapLayerElem.firstChildElement("id").text(); if( id == layerId ) { + return addLayer( mapLayerElem, brokenNodes, vectorLayerList ); #if 0 - if( !addLayer( element, brokenNodes, vLayerList ) ) - { - returnStatus = false; - } -#endif //0 QString type = mapLayerElem.attribute("type"); QgsMapLayer* layer = 0; if( type == "vector" ) @@ -1684,10 +1688,12 @@ QgsMapLayer* QgsProject::createEmbeddedLayer( const QString& layerId, const QStr return 0; } return layer; +#endif //0 } } - return 0; + //brokenNodes.push_back( ); + return false; } void QgsProjectBadLayerDefaultHandler::handleBadLayers( QList /*layers*/, QDomDocument /*projectDom*/ ) diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index 0ccffbd8e65e..d9825d04ba78 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -286,7 +286,8 @@ class CORE_EXPORT QgsProject : public QObject /**Creates a maplayer instance defined in an arbitrary project file. Caller takes ownership @return the layer or 0 in case of error @note: added in version 1.8*/ - static QgsMapLayer* createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); + //static QgsMapLayer* createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); + bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ); protected: From 733df174a1078212db6fc83be90239bb1c4afcd4 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 31 May 2011 11:39:45 +0200 Subject: [PATCH 33/62] Show embedded layers in italic --- src/app/legend/qgslegend.cpp | 6 ++++++ src/app/qgisapp.cpp | 2 +- src/core/qgsproject.cpp | 11 ++++++++++- src/core/qgsproject.h | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 6438ee989b18..29a7639ed5d2 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -636,6 +636,12 @@ void QgsLegend::addLayer( QgsMapLayer * layer ) } QgsLegendLayer* llayer = new QgsLegendLayer( layer ); + if( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) + { + QFont itemFont; + itemFont.setItalic( true ); + llayer->setFont( 0, itemFont ); + } //set the correct check states blockSignals( true ); diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 8b8f190dc9b9..533a8468c3f9 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5055,7 +5055,7 @@ void QgisApp::embedLayers() //hardcoded for debugging QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; - QString id="komb113320110516093016594"; + QString id="komb113320110531113659299"; QList brokenNodes; QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 6609f09429cc..82222686bc51 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -1653,7 +1653,16 @@ bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& pro QString id = mapLayerElem.firstChildElement("id").text(); if( id == layerId ) { - return addLayer( mapLayerElem, brokenNodes, vectorLayerList ); + mEmbeddedLayers.insert( layerId, projectFilePath ); + if( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) + { + return true; + } + else + { + mEmbeddedLayers.remove( layerId ); + return false; + } #if 0 QString type = mapLayerElem.attribute("type"); QgsMapLayer* layer = 0; diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index d9825d04ba78..06d15d841f74 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -337,7 +337,8 @@ class CORE_EXPORT QgsProject : public QObject QgsProjectBadLayerHandler* mBadLayerHandler; - /**Embeded layers which are defined in other projects. Key: layer id, value: project file path*/ + /**Embeded layers which are defined in other projects. Key: layer id, value: project file path. + If the project file path is empty, QgsProject is going to ignore the layer for saving (e.g. because it is part and managed by an embedded group)*/ QHash< QString, QString > mEmbeddedLayers; }; // QgsProject From f0252285729f91da93e002c0d511ac93d9a40688 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 31 May 2011 17:06:37 +0200 Subject: [PATCH 34/62] Add support for embedded legend groups --- src/app/legend/qgslegend.cpp | 71 ++++++++++++++++++++++++++++++++++++ src/app/legend/qgslegend.h | 5 +++ src/app/qgisapp.cpp | 8 +++- src/core/qgsproject.cpp | 5 --- src/core/qgsproject.h | 4 -- 5 files changed, 82 insertions(+), 11 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 29a7639ed5d2..bb8fd9ca83fe 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -611,6 +611,77 @@ Qt::CheckState QgsLegend::layerCheckState( QgsMapLayer * layer ) return ll ? ll->checkState( 0 ) : Qt::Unchecked; } +void QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent ) +{ + mEmbeddedGroups.insert( groupName, projectFilePath ); + + //open project file, get layer ids in group, add the layers + QFile projectFile( projectFilePath ); + if( !projectFile.open( QIODevice::ReadOnly ) ) + { + return; + } + + QDomDocument projectDocument; + if( !projectDocument.setContent( &projectFile ) ) + { + return; + } + + QDomElement legendElem = projectDocument.documentElement().firstChildElement("legend"); + if( legendElem.isNull() ) + { + return; + } + + QList brokenNodes; + QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; + QSettings settings; + + QDomNodeList legendGroupList = legendElem.elementsByTagName("legendgroup"); + for( int i = 0; i < legendGroupList.size(); ++i ) + { + QDomElement legendElem = legendGroupList.at(i).toElement(); + if( legendElem.attribute("name") == groupName ) + { + QgsLegendGroup* group = 0; + if( parent ) + { + group = new QgsLegendGroup( parent, groupName ); + } + else + { + group = new QgsLegendGroup( this, groupName ); + } + + QFont groupFont; + groupFont.setItalic( true ); + group->setFont( 0, groupFont ); + setCurrentItem( group ); + + QDomNodeList groupChildren = legendElem.childNodes(); + for( int j = 0; j < groupChildren.size(); ++j ) + { + QDomElement childElem = groupChildren.at( j ).toElement(); + QString tagName = childElem.tagName(); + if( tagName == "legendlayer" ) + { + QString layerId = childElem.firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid"); + QgsProject::instance()->createEmbeddedLayer( layerId, projectFilePath, brokenNodes, vectorLayerList ); + if( currentItem() ) + { + insertItem( currentItem(), group ); + } + } + else if( tagName == "legendgroup" ) + { + addEmbeddedGroup( childElem.attribute("name"), projectFilePath, group ); + } + } + } + } +} + int QgsLegend::getItemPos( QTreeWidgetItem* item ) { int counter = 1; diff --git a/src/app/legend/qgslegend.h b/src/app/legend/qgslegend.h index b242e162f88e..416beac0cd9d 100644 --- a/src/app/legend/qgslegend.h +++ b/src/app/legend/qgslegend.h @@ -193,6 +193,8 @@ class QgsLegend : public QTreeWidget /**Returns a layers check state*/ Qt::CheckState layerCheckState( QgsMapLayer * layer ); + void addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent = 0 ); + public slots: /*!Adds a new layer group with the maplayer to the canvas*/ @@ -367,6 +369,9 @@ class QgsLegend : public QTreeWidget // The action when the mouse is released enum { BEFORE, INSERT, AFTER } mDropAction; + // Groups defined in other project files + QHash< QString, QString > mEmbeddedGroups; + /** Hide the line that indicates insertion position */ void hideLine(); diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 533a8468c3f9..2775a0d93466 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5054,12 +5054,16 @@ void QgisApp::embedLayers() //dialog to select groups/layers from other project files //hardcoded for debugging - QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; + /*QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; QString id="komb113320110531113659299"; QList brokenNodes; QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; - QgsProject::instance()->createEmbeddedLayer( id, filepath, brokenNodes, vectorLayerList ); + QgsProject::instance()->createEmbeddedLayer( id, filepath, brokenNodes, vectorLayerList );*/ + + QString filepath="/home/marco/geodaten/projekte/rasters.qgs"; + QString groupname="Karten"; + mMapLegend->addEmbeddedGroup( groupname, filepath ); } void QgisApp::setExtent( QgsRectangle theRect ) diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 82222686bc51..dba4b63f56bd 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -1610,11 +1610,6 @@ void QgsProject::setBadLayerHandler( QgsProjectBadLayerHandler* handler ) mBadLayerHandler = handler; } -void QgsProject::addEmbeddedLayer( const QString& layerId, const QString& projectFilePath ) -{ - mEmbeddedLayers.insert( layerId, projectFilePath ); -} - QString QgsProject::layerIsEmbedded( const QString& id ) const { QHash< QString, QString >::const_iterator it = mEmbeddedLayers.find( id ); diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index 06d15d841f74..d2f0a21e9e03 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -276,10 +276,6 @@ class CORE_EXPORT QgsProject : public QObject @note added in 1.4 */ void setBadLayerHandler( QgsProjectBadLayerHandler* handler ); - /**Adds layer to list of embedded layers - @note: added in version 1.8*/ - void addEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); - /**Returns project file path if layer is embedded from other project file. Returns empty string if layer is not embedded*/ QString layerIsEmbedded( const QString& id ) const; From 9f0d334d564e1af1906ffce1f42d175cc2b9dbee Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Wed, 1 Jun 2011 17:22:48 +0200 Subject: [PATCH 35/62] Wire in dialog to select embedded groups and layers --- src/app/CMakeLists.txt | 2 + src/app/legend/qgslegend.cpp | 47 +++++--- src/app/legend/qgslegend.h | 6 +- src/app/qgisapp.cpp | 28 ++++- src/app/qgsembedlayerdialog.cpp | 182 ++++++++++++++++++++++++++++++ src/app/qgsembedlayerdialog.h | 33 ++++++ src/core/qgsproject.cpp | 110 +++--------------- src/core/qgsproject.h | 8 +- src/ui/qgsembedlayerdialogbase.ui | 100 ++++++++++++++++ 9 files changed, 400 insertions(+), 116 deletions(-) create mode 100644 src/app/qgsembedlayerdialog.cpp create mode 100644 src/app/qgsembedlayerdialog.h create mode 100644 src/ui/qgsembedlayerdialogbase.ui diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 8fc2d570f277..4d22c84c54ab 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -20,6 +20,7 @@ SET(QGIS_APP_SRCS qgscustomprojectiondialog.cpp qgsdbfilterproxymodel.cpp qgsdbtablemodel.cpp + qgsembedlayerdialog.cpp qgsformannotationdialog.cpp qgsdelattrdialog.cpp qgsdisplayangle.cpp @@ -152,6 +153,7 @@ SET (QGIS_APP_MOC_HDRS qgsdbtablemodel.h qgsdelattrdialog.h qgsdisplayangle.h + qgsembedlayerdialog.h qgsfeatureaction.h qgsfieldcalculator.h qgsformannotationdialog.h diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index bb8fd9ca83fe..2f5143ff5292 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -611,7 +611,7 @@ Qt::CheckState QgsLegend::layerCheckState( QgsMapLayer * layer ) return ll ? ll->checkState( 0 ) : Qt::Unchecked; } -void QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent ) +QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent ) { mEmbeddedGroups.insert( groupName, projectFilePath ); @@ -619,19 +619,19 @@ void QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& proje QFile projectFile( projectFilePath ); if( !projectFile.open( QIODevice::ReadOnly ) ) { - return; + return 0; } QDomDocument projectDocument; if( !projectDocument.setContent( &projectFile ) ) { - return; + return 0; } QDomElement legendElem = projectDocument.documentElement().firstChildElement("legend"); if( legendElem.isNull() ) { - return; + return 0; } QList brokenNodes; @@ -667,8 +667,8 @@ void QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& proje if( tagName == "legendlayer" ) { QString layerId = childElem.firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid"); - QgsProject::instance()->createEmbeddedLayer( layerId, projectFilePath, brokenNodes, vectorLayerList ); - if( currentItem() ) + QgsProject::instance()->createEmbeddedLayer( layerId, projectFilePath, brokenNodes, vectorLayerList, false ); + if( currentItem() && currentItem() != group ) { insertItem( currentItem(), group ); } @@ -678,8 +678,10 @@ void QgsLegend::addEmbeddedGroup( const QString& groupName, const QString& proje addEmbeddedGroup( childElem.attribute("name"), projectFilePath, group ); } } + return group; } } + return 0; } int QgsLegend::getItemPos( QTreeWidgetItem* item ) @@ -1003,14 +1005,22 @@ bool QgsLegend::writeXML( QList items, QDomNode &node, QDomDo legendgroupnode.setAttribute( "checked", "Qt::PartiallyChecked" ); } - QList children; - for ( int i = 0; i < currentItem->childCount(); i++ ) + QHash< QString, QString >::const_iterator embedIt = mEmbeddedGroups.find( item->text( 0 ) ); + if( embedIt != mEmbeddedGroups.constEnd() ) { - children << currentItem->child( i ); + legendgroupnode.setAttribute("embedded", 1); + legendgroupnode.setAttribute("project", embedIt.value() ); } + else + { + QList children; + for ( int i = 0; i < currentItem->childCount(); i++ ) + { + children << currentItem->child( i ); + } - writeXML( children, legendgroupnode, document ); - + writeXML( children, legendgroupnode, document ); + } node.appendChild( legendgroupnode ); } else if ( item->type() == QgsLegendItem::LEGEND_LAYER ) @@ -1109,11 +1119,18 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node ) //test every possibility of element... if ( childelem.tagName() == "legendgroup" ) { - QgsLegendGroup *theGroup; - if ( parent ) - theGroup = new QgsLegendGroup( parent, name ); + QgsLegendGroup* theGroup = 0; + if( childelem.attribute("embedded") == "1" ) + { + theGroup = addEmbeddedGroup( name, childelem.attribute( "project" ) ); + } else - theGroup = new QgsLegendGroup( this, name ); + { + if ( parent ) + theGroup = new QgsLegendGroup( parent, name ); + else + theGroup = new QgsLegendGroup( this, name ); + } //set the checkbox of the legend group to the right state blockSignals( true ); diff --git a/src/app/legend/qgslegend.h b/src/app/legend/qgslegend.h index 416beac0cd9d..09a3fcf6e4f6 100644 --- a/src/app/legend/qgslegend.h +++ b/src/app/legend/qgslegend.h @@ -193,7 +193,8 @@ class QgsLegend : public QTreeWidget /**Returns a layers check state*/ Qt::CheckState layerCheckState( QgsMapLayer * layer ); - void addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent = 0 ); + /**Add group from other project file. Returns a pointer to the new group in case of success or 0 in case of error*/ + QgsLegendGroup* addEmbeddedGroup( const QString& groupName, const QString& projectFilePath, QgsLegendItem* parent = 0 ); public slots: @@ -369,7 +370,8 @@ class QgsLegend : public QTreeWidget // The action when the mouse is released enum { BEFORE, INSERT, AFTER } mDropAction; - // Groups defined in other project files + /** Groups defined in other project files. + Key: group name, value: absolute path to project file*/ QHash< QString, QString > mEmbeddedGroups; /** Hide the line that indicates insertion position */ diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 2775a0d93466..b21c25a4e453 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -113,6 +113,7 @@ #include "qgscustomization.h" #include "qgscustomprojectiondialog.h" #include "qgsdatasourceuri.h" +#include "qgsembedlayerdialog.h" #include "qgsencodingfiledialog.h" #include "qgsexception.h" #include "qgsfeature.h" @@ -5061,9 +5062,32 @@ void QgisApp::embedLayers() QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; QgsProject::instance()->createEmbeddedLayer( id, filepath, brokenNodes, vectorLayerList );*/ - QString filepath="/home/marco/geodaten/projekte/rasters.qgs"; + /*QString filepath="/home/marco/geodaten/projekte/rasters.qgs"; QString groupname="Karten"; - mMapLegend->addEmbeddedGroup( groupname, filepath ); + mMapLegend->addEmbeddedGroup( groupname, filepath );*/ + + QgsEmbedLayerDialog d; + if( d.exec() == QDialog::Accepted ) + { + //groups + QList< QPair < QString, QString > > groups = d.embeddedGroups(); + QList< QPair < QString, QString > >::const_iterator groupIt = groups.constBegin(); + for(; groupIt != groups.constEnd(); ++groupIt ) + { + mMapLegend->addEmbeddedGroup( groupIt->first, groupIt->second ); + } + + //layers + QList brokenNodes; + QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; + + QList< QPair < QString, QString > > layers = d.embeddedLayers(); + QList< QPair < QString, QString > >::const_iterator layerIt = layers.constBegin(); + for(; layerIt != layers.constEnd(); ++layerIt ) + { + QgsProject::instance()->createEmbeddedLayer( layerIt->first, layerIt->second, brokenNodes, vectorLayerList ); + } + } } void QgisApp::setExtent( QgsRectangle theRect ) diff --git a/src/app/qgsembedlayerdialog.cpp b/src/app/qgsembedlayerdialog.cpp new file mode 100644 index 000000000000..6ed8def2042a --- /dev/null +++ b/src/app/qgsembedlayerdialog.cpp @@ -0,0 +1,182 @@ +#include "qgsembedlayerdialog.h" +#include +#include + +QgsEmbedLayerDialog::QgsEmbedLayerDialog( QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ) +{ + setupUi( this ); +} + +QgsEmbedLayerDialog::~QgsEmbedLayerDialog() +{ +} + +QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedGroups() const +{ + QList< QPair < QString, QString > > result; + + QList items = mTreeWidget->selectedItems(); + QList::iterator itemIt = items.begin(); + for(; itemIt != items.end(); ++itemIt ) + { + if( (*itemIt)->data(0, Qt::UserRole).toString() == "group" ) + { + result.push_back( qMakePair( (*itemIt)->text( 0 ), mProjectFileLineEdit->text() ) ); + } + } + + return result; +} + +QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedLayers() const +{ + QList< QPair < QString, QString > > result; + + QList items = mTreeWidget->selectedItems(); + QList::iterator itemIt = items.begin(); + for(; itemIt != items.end(); ++itemIt ) + { + if( (*itemIt)->data(0, Qt::UserRole).toString() == "layer" ) + { + result.push_back( qMakePair( (*itemIt)->data(0, Qt::UserRole + 1).toString(), mProjectFileLineEdit->text() ) ); + } + } + return result; +} + +void QgsEmbedLayerDialog::on_mBrowseFileToolButton_clicked() +{ + QString projectFile = QFileDialog::getOpenFileName( 0, tr("Select project file"), "",tr("QGIS project files (*.qgs)") ); + if( !projectFile.isEmpty() ) + { + mProjectFileLineEdit->setText( projectFile ); + } + changeProjectFile(); +} + +void QgsEmbedLayerDialog::on_mProjectFileLineEdit_editingFinished() +{ + changeProjectFile(); +} + +void QgsEmbedLayerDialog::changeProjectFile() +{ + mTreeWidget->clear(); + QFile projectFile( mProjectFileLineEdit->text() ); + if( !projectFile.exists() ) + { + return; + } + + //parse project file and fill tree + if( !projectFile.open( QIODevice::ReadOnly ) ) + { + return; + } + + QDomDocument projectDom; + if( !projectDom.setContent( &projectFile ) ) + { + return; + } + + QDomElement legendElem = projectDom.documentElement().firstChildElement("legend"); + if( legendElem.isNull() ) + { + return; + } + + QDomNodeList legendChildren = legendElem.childNodes(); + QDomElement currentChildElem; + + for( int i = 0; i < legendChildren.size(); ++i ) + { + currentChildElem = legendChildren.at( i ).toElement(); + if( currentChildElem.tagName() == "legendlayer" ) + { + addLegendLayerToTreeWidget( currentChildElem ); + } + else if( currentChildElem.tagName() == "legendgroup" ) + { + addLegendGroupToTreeWidget( currentChildElem ); + } + } +} + +void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupElem, QTreeWidgetItem* parent ) +{ + QDomNodeList groupChildren = groupElem.childNodes(); + QDomElement currentChildElem; + + QTreeWidgetItem* groupItem = 0; + if( !parent ) + { + groupItem = new QTreeWidgetItem( mTreeWidget ); + } + else + { + groupItem = new QTreeWidgetItem( parent ); + } + groupItem->setText( 0, groupElem.attribute("name") ); + groupItem->setData( 0, Qt::UserRole, "group" ); + + for( int i = 0; i < groupChildren.size(); ++i ) + { + currentChildElem = groupChildren.at( i ).toElement(); + if( currentChildElem.tagName() == "legendlayer" ) + { + addLegendLayerToTreeWidget( currentChildElem, groupItem ); + } + else if( currentChildElem.tagName() == "legendgroup" ) + { + addLegendGroupToTreeWidget( currentChildElem, groupItem ); + } + } +} + +void QgsEmbedLayerDialog::addLegendLayerToTreeWidget( const QDomElement& layerElem, QTreeWidgetItem* parent ) +{ + QTreeWidgetItem* item = 0; + if( parent ) + { + item = new QTreeWidgetItem( parent ); + } + else + { + item = new QTreeWidgetItem( mTreeWidget ); + } + item->setText( 0, layerElem.attribute("name") ); + item->setData( 0, Qt::UserRole, "layer" ); + item->setData( 0, Qt::UserRole + 1, layerElem.firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid") ); +} + +void QgsEmbedLayerDialog::on_mTreeWidget_itemSelectionChanged() +{ + mTreeWidget->blockSignals( true ); + QList items = mTreeWidget->selectedItems(); + QList::iterator itemIt = items.begin(); + for(; itemIt != items.end(); ++itemIt ) + { + //deselect children recursively + unselectChildren( *itemIt ); + } + mTreeWidget->blockSignals( false ); +} + +void QgsEmbedLayerDialog::unselectChildren( QTreeWidgetItem* item ) +{ + if( !item ) + { + return; + } + + QTreeWidgetItem* currentChild = 0; + for( int i = 0; i < item->childCount(); ++i ) + { + currentChild = item->child( i ); + currentChild->setSelected( false ); + unselectChildren( currentChild ); + } +} + + diff --git a/src/app/qgsembedlayerdialog.h b/src/app/qgsembedlayerdialog.h new file mode 100644 index 000000000000..9e15a2a895d8 --- /dev/null +++ b/src/app/qgsembedlayerdialog.h @@ -0,0 +1,33 @@ +#ifndef QGSEMBEDLAYERSDIALOG_H +#define QGSEMBEDLAYERSDIALOG_H + +#include "QDialog" +#include "ui_qgsembedlayerdialogbase.h" + +class QDomElement; + +class QgsEmbedLayerDialog: public QDialog, private Ui::QgsEmbedLayerDialogBase +{ + Q_OBJECT + public: + QgsEmbedLayerDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 ); + ~QgsEmbedLayerDialog(); + + /**Returns name / projectfiles of groups to embed*/ + QList< QPair < QString, QString > > embeddedGroups() const; + /**Returns layer id / projectfiles of single layers to embed*/ + QList< QPair < QString, QString > > embeddedLayers() const; + + private slots: + void on_mBrowseFileToolButton_clicked(); + void on_mProjectFileLineEdit_editingFinished(); + void on_mTreeWidget_itemSelectionChanged(); + + private: + void changeProjectFile(); + void addLegendGroupToTreeWidget( const QDomElement& groupElem, QTreeWidgetItem* parent = 0 ); + void addLegendLayerToTreeWidget( const QDomElement& layerElem, QTreeWidgetItem* parent = 0 ); + void unselectChildren( QTreeWidgetItem* item ); +}; + +#endif // QGSEMBEDLAYERSDIALOG_H diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index dba4b63f56bd..8c36cf89def1 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -692,55 +692,6 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do } else { -#if 0 - QString type = element.attribute( "type" ); - QgsDebugMsg( "Layer type is " + type ); - QgsMapLayer *mapLayer = NULL; - - if ( type == "vector" ) - { - mapLayer = new QgsVectorLayer; - } - else if ( type == "raster" ) - { - mapLayer = new QgsRasterLayer; - } - else if ( type == "plugin" ) - { - QString typeName = element.attribute( "name" ); - mapLayer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); - } - - Q_CHECK_PTR( mapLayer ); - - if ( !mapLayer ) - { - QgsDebugMsg( "Unable to create layer" ); - - return qMakePair( false, brokenNodes ); - } - - // have the layer restore state that is stored in Dom node - if ( mapLayer->readXML( node ) && mapLayer->isValid() ) - { - mapLayer = QgsMapLayerRegistry::instance()->addMapLayer( mapLayer ); - QgsVectorLayer* vLayer = qobject_cast( mapLayer ); - if ( vLayer && vLayer->vectorJoins().size() > 0 ) - { - vLayerList.push_back( qMakePair( vLayer, element ) ); - } - } - else - { - delete mapLayer; - - QgsDebugMsg( "Unable to load " + type + " layer" ); - - returnStatus = false; // flag that we had problems loading layers - - brokenNodes.push_back( node ); - } -#endif //0 if( !addLayer( element, brokenNodes, vLayerList ) ) { returnStatus = false; @@ -1092,17 +1043,22 @@ bool QgsProject::write() if ( ml ) { QString externalProjectFile = layerIsEmbedded( ml->id() ); - if( externalProjectFile.isEmpty() ) + QHash< QString, QPair< QString, bool> >::const_iterator emIt = mEmbeddedLayers.find( ml->id() ); + if( emIt == mEmbeddedLayers.constEnd() ) { ml->writeXML( projectLayersNode, *doc ); } else //layer defined in an external project file { - QDomElement mapLayerElem = doc->createElement("maplayer"); - mapLayerElem.setAttribute("embedded", 1 ); - mapLayerElem.setAttribute("project", writePath( externalProjectFile ) ); - mapLayerElem.setAttribute("id", ml->id() ); - projectLayersNode.appendChild( mapLayerElem ); + //only save embedded layer if not managed by a legend group + if( emIt.value().second ) + { + QDomElement mapLayerElem = doc->createElement("maplayer"); + mapLayerElem.setAttribute("embedded", 1 ); + mapLayerElem.setAttribute("project", writePath( emIt.value().first ) ); + mapLayerElem.setAttribute("id", ml->id() ); + projectLayersNode.appendChild( mapLayerElem ); + } } } li++; @@ -1612,15 +1568,16 @@ void QgsProject::setBadLayerHandler( QgsProjectBadLayerHandler* handler ) QString QgsProject::layerIsEmbedded( const QString& id ) const { - QHash< QString, QString >::const_iterator it = mEmbeddedLayers.find( id ); + QHash< QString, QPair< QString, bool > >::const_iterator it = mEmbeddedLayers.find( id ); if( it == mEmbeddedLayers.constEnd() ) { return QString(); } - return it.value(); + return it.value().first; }; -bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ) +bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, + QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag ) { QFile projectFile( projectFilePath ); if( !projectFile.open( QIODevice::ReadOnly ) ) @@ -1648,7 +1605,7 @@ bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& pro QString id = mapLayerElem.firstChildElement("id").text(); if( id == layerId ) { - mEmbeddedLayers.insert( layerId, projectFilePath ); + mEmbeddedLayers.insert( layerId, qMakePair( projectFilePath, saveFlag ) ); if( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) { return true; @@ -1658,41 +1615,6 @@ bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& pro mEmbeddedLayers.remove( layerId ); return false; } -#if 0 - QString type = mapLayerElem.attribute("type"); - QgsMapLayer* layer = 0; - if( type == "vector" ) - { - layer = new QgsVectorLayer(); - } - else if( type == "raster" ) - { - layer = new QgsRasterLayer(); - } - else if( type == "plugin" ) - { - QString typeName = mapLayerElem.attribute( "name" ); - layer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); - } - else - { - return 0; - } - - // have the layer restore state that is stored in Dom node - if ( layer->readXML( mapLayerElem ) ) - { - QgsMapLayerRegistry::instance()->addMapLayer( layer ); - QgsProject::instance()->addEmbeddedLayer( layerId, projectFilePath ); - } - else - { - delete layer; - QgsDebugMsg( "unable to load " + type + " layer" ); - return 0; - } - return layer; -#endif //0 } } diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index d2f0a21e9e03..2371af2a57dc 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -283,7 +283,8 @@ class CORE_EXPORT QgsProject : public QObject @return the layer or 0 in case of error @note: added in version 1.8*/ //static QgsMapLayer* createEmbeddedLayer( const QString& layerId, const QString& projectFilePath ); - bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ); + bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, + QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag = true ); protected: @@ -333,9 +334,10 @@ class CORE_EXPORT QgsProject : public QObject QgsProjectBadLayerHandler* mBadLayerHandler; - /**Embeded layers which are defined in other projects. Key: layer id, value: project file path. + /**Embeded layers which are defined in other projects. Key: layer id, + value: pair< project file path, save layer yes / no (e.g. if the layer is part of an embedded group, loading/saving is done by the legend) If the project file path is empty, QgsProject is going to ignore the layer for saving (e.g. because it is part and managed by an embedded group)*/ - QHash< QString, QString > mEmbeddedLayers; + QHash< QString, QPair< QString, bool> > mEmbeddedLayers; }; // QgsProject diff --git a/src/ui/qgsembedlayerdialogbase.ui b/src/ui/qgsembedlayerdialogbase.ui new file mode 100644 index 000000000000..7c01f90bc8dd --- /dev/null +++ b/src/ui/qgsembedlayerdialogbase.ui @@ -0,0 +1,100 @@ + + + QgsEmbedLayerDialogBase + + + + 0 + 0 + 400 + 300 + + + + Select layers and groups to embed + + + + + + + + Project file + + + + + + + + + + ... + + + + + + + + + QAbstractItemView::ExtendedSelection + + + false + + + + 1 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + QgsEmbedLayerDialogBase + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + QgsEmbedLayerDialogBase + reject() + + + 316 + 260 + + + 286 + 274 + + + + + From 9a90855c9012eb4fd98a46405ecf7d2339a1905b Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Fri, 3 Jun 2011 13:36:21 +0200 Subject: [PATCH 36/62] Improvements to embed dialogs and stability --- src/app/legend/qgslegend.cpp | 126 ++++++++++++++++++++++++------ src/app/legend/qgslegend.h | 6 ++ src/app/qgsembedlayerdialog.cpp | 38 ++++++++- src/app/qgsembedlayerdialog.h | 2 + src/core/qgsproject.cpp | 6 ++ src/ui/qgsembedlayerdialogbase.ui | 37 +-------- 6 files changed, 150 insertions(+), 65 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 2f5143ff5292..954d3cda8385 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -295,6 +295,12 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) // record which items were selected and hide them foreach( QTreeWidgetItem * item, selectedItems() ) { + //prevent to drag out content under groups that are embedded from other + //project files. + if( parentGroupEmbedded( item ) ) + { + continue; + } item->setHidden( true ); mItemsBeingMoved << item; } @@ -324,6 +330,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) if ( mItemsBeingMoved.isEmpty() ) { QgsDebugMsg( "nothing to move" ); + setCursor( QCursor( Qt::ArrowCursor ) ); return; } @@ -364,36 +371,47 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) mDropTarget = layer; - if ( e->y() < ( y0 + y1 ) / 2 ) + //prevent inserting content into embedded groups + if( !parentGroupEmbedded( litem ) ) { - QgsDebugMsg( "insert before layer" ); - mDropAction = BEFORE; - line_y = y0; - } - else - { - QgsDebugMsg( "insert after layer" ); - mDropAction = AFTER; - line_y = y1; + if ( e->y() < ( y0 + y1 ) / 2 ) + { + QgsDebugMsg( "insert before layer" ); + mDropAction = BEFORE; + line_y = y0; + } + else + { + QgsDebugMsg( "insert after layer" ); + mDropAction = AFTER; + line_y = y1; + } } } - else if ( group ) - { + else if ( group ) + { if ( yCoordAboveCenter( litem, e->y() ) ) //over center of item { QgsDebugMsg( "insert before group" ); - line_y = visualItemRect( item ).top() + 1; - mDropTarget = item; - mDropAction = BEFORE; + //prevent inserting content into embedded groups + if( !parentGroupEmbedded( item ) ) + { + line_y = visualItemRect( item ).top() + 1; + mDropTarget = item; + mDropAction = BEFORE; + } } else // below center of item { - QgsDebugMsg( "insert into group" ); + if( !groupEmbedded( item ) ) + { + QgsDebugMsg( "insert into group" ); - line_y = visualItemRect( item ).bottom() - 2; - mDropTarget = item; - mDropAction = INSERT; + line_y = visualItemRect( item ).bottom() - 2; + mDropTarget = item; + mDropAction = INSERT; + } } } else @@ -566,7 +584,7 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi { qobject_cast( li )->addToPopupMenu( theMenu ); - if ( li->parent() ) + if ( li->parent() && !parentGroupEmbedded( li ) ) { theMenu.addAction( tr( "&Make to toplevel item" ), this, SLOT( makeToTopLevelItem() ) ); } @@ -583,7 +601,7 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi tr( "&Set group CRS" ), this, SLOT( legendGroupSetCRS() ) ); } - if ( li->type() == QgsLegendItem::LEGEND_LAYER || li->type() == QgsLegendItem::LEGEND_GROUP ) + if ( ( li->type() == QgsLegendItem::LEGEND_LAYER || li->type() == QgsLegendItem::LEGEND_GROUP ) && !groupEmbedded( li ) && !parentGroupEmbedded( li ) ) { theMenu.addAction( tr( "Re&name" ), this, SLOT( openEditor() ) ); } @@ -644,6 +662,13 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt QDomElement legendElem = legendGroupList.at(i).toElement(); if( legendElem.attribute("name") == groupName ) { + //embedded groups cannot be embedded again + if( legendElem.attribute("embedded") == "1" ) + { + mEmbeddedGroups.remove( groupName ); + return 0; + } + QgsLegendGroup* group = 0; if( parent ) { @@ -678,6 +703,7 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt addEmbeddedGroup( childElem.attribute("name"), projectFilePath, group ); } } + checkLayerOrderUpdate(); return group; } } @@ -1092,6 +1118,12 @@ bool QgsLegend::writeXML( QList items, QDomNode &node, QDomDo legendlayerfilenode.setAttribute( "layerid", layer->id() ); layerfilegroupnode.appendChild( legendlayerfilenode ); + //embedded layer? + if( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) + { + legendlayerfilenode.setAttribute( "embedded", "1" ); + } + // visible flag legendlayerfilenode.setAttribute( "visible", ll->isVisible() ); @@ -1814,7 +1846,10 @@ void QgsLegend::openEditor() QTreeWidgetItem* theItem = currentItem(); if ( theItem ) { - editItem( theItem, 0 ); + if( !groupEmbedded( theItem ) && !parentGroupEmbedded( theItem ) ) + { + editItem( theItem, 0 ); + } } } @@ -1823,10 +1858,13 @@ void QgsLegend::makeToTopLevelItem() QgsLegendItem* theItem = dynamic_cast( currentItem() ); if ( theItem ) { - theItem->storeAppearanceSettings(); - removeItem( theItem ); - addTopLevelItem( theItem ); - theItem->restoreAppearanceSettings(); + if( !parentGroupEmbedded( theItem ) ) + { + theItem->storeAppearanceSettings(); + removeItem( theItem ); + addTopLevelItem( theItem ); + theItem->restoreAppearanceSettings(); + } } } @@ -2130,3 +2168,39 @@ void QgsLegend::setCRSForSelectedLayers( const QgsCoordinateReferenceSystem &crs if ( renderFlagState ) mMapCanvas->setRenderFlag( true ); } + +bool QgsLegend::parentGroupEmbedded( QTreeWidgetItem* item ) const +{ + if( !item ) + { + return false; + } + + QgsLegendItem* lItem = dynamic_cast(item); + if( lItem && lItem->parent() ) + { + QgsLegendGroup* parentGroup = dynamic_cast( lItem->parent() ); + if( parentGroup && parentGroup->type() == QgsLegendItem::LEGEND_GROUP + && mEmbeddedGroups.contains( parentGroup->text( 0 ) ) ) + { + return true; + } + } + return false; +} + +bool QgsLegend::groupEmbedded( QTreeWidgetItem* item ) const +{ + if( !item ) + { + return false; + } + + QgsLegendGroup* gItem = dynamic_cast(item); + if( !gItem ) + { + return false; + } + + return mEmbeddedGroups.contains( gItem->text( 0 ) ); +} diff --git a/src/app/legend/qgslegend.h b/src/app/legend/qgslegend.h index 09a3fcf6e4f6..5efe5bf7ae35 100644 --- a/src/app/legend/qgslegend.h +++ b/src/app/legend/qgslegend.h @@ -437,6 +437,12 @@ class QgsLegend : public QTreeWidget */ int getItemPos( QTreeWidgetItem* item ); + /**Returns true if the item is a group embedde from another project*/ + bool groupEmbedded( QTreeWidgetItem* item ) const; + + /**Returns true if the parent group is embedded from another project*/ + bool parentGroupEmbedded( QTreeWidgetItem* item ) const; + /**Pointer to the main canvas. Used for requiring repaints in case of legend changes*/ QgsMapCanvas* mMapCanvas; diff --git a/src/app/qgsembedlayerdialog.cpp b/src/app/qgsembedlayerdialog.cpp index 6ed8def2042a..b7a69f4da139 100644 --- a/src/app/qgsembedlayerdialog.cpp +++ b/src/app/qgsembedlayerdialog.cpp @@ -1,10 +1,14 @@ #include "qgsembedlayerdialog.h" +#include "qgisapp.h" #include #include +#include +#include QgsEmbedLayerDialog::QgsEmbedLayerDialog( QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ) { setupUi( this ); + QObject::connect( mButtonBox, SIGNAL(rejected() ), this, SLOT(reject() ) ); } QgsEmbedLayerDialog::~QgsEmbedLayerDialog() @@ -21,7 +25,7 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedGroups() const { if( (*itemIt)->data(0, Qt::UserRole).toString() == "group" ) { - result.push_back( qMakePair( (*itemIt)->text( 0 ), mProjectFileLineEdit->text() ) ); + result.push_back( qMakePair( (*itemIt)->text( 0 ), mProjectPath ) ); } } @@ -38,7 +42,7 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedLayers() const { if( (*itemIt)->data(0, Qt::UserRole).toString() == "layer" ) { - result.push_back( qMakePair( (*itemIt)->data(0, Qt::UserRole + 1).toString(), mProjectFileLineEdit->text() ) ); + result.push_back( qMakePair( (*itemIt)->data(0, Qt::UserRole + 1).toString(), mProjectPath ) ); } } return result; @@ -46,7 +50,8 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedLayers() const void QgsEmbedLayerDialog::on_mBrowseFileToolButton_clicked() { - QString projectFile = QFileDialog::getOpenFileName( 0, tr("Select project file"), "",tr("QGIS project files (*.qgs)") ); + QSettings s; + QString projectFile = QFileDialog::getOpenFileName( 0, tr("Select project file"), s.value("/qgis/last_embedded_project_path").toString() ,tr("QGIS project files (*.qgs)") ); if( !projectFile.isEmpty() ) { mProjectFileLineEdit->setText( projectFile ); @@ -61,13 +66,14 @@ void QgsEmbedLayerDialog::on_mProjectFileLineEdit_editingFinished() void QgsEmbedLayerDialog::changeProjectFile() { - mTreeWidget->clear(); QFile projectFile( mProjectFileLineEdit->text() ); if( !projectFile.exists() ) { return; } + mTreeWidget->clear(); + //parse project file and fill tree if( !projectFile.open( QIODevice::ReadOnly ) ) { @@ -101,6 +107,8 @@ void QgsEmbedLayerDialog::changeProjectFile() addLegendGroupToTreeWidget( currentChildElem ); } } + + mProjectPath = mProjectFileLineEdit->text(); } void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupElem, QTreeWidgetItem* parent ) @@ -108,6 +116,11 @@ void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupEl QDomNodeList groupChildren = groupElem.childNodes(); QDomElement currentChildElem; + if(groupElem.attribute("embedded") == "1" ) + { + return; + } + QTreeWidgetItem* groupItem = 0; if( !parent ) { @@ -117,6 +130,7 @@ void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupEl { groupItem = new QTreeWidgetItem( parent ); } + groupItem->setIcon( 0, QgisApp::getThemeIcon("mActionFolder.png") ); groupItem->setText( 0, groupElem.attribute("name") ); groupItem->setData( 0, Qt::UserRole, "group" ); @@ -136,6 +150,11 @@ void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupEl void QgsEmbedLayerDialog::addLegendLayerToTreeWidget( const QDomElement& layerElem, QTreeWidgetItem* parent ) { + if(layerElem.attribute("embedded") == "1" ) + { + return; + } + QTreeWidgetItem* item = 0; if( parent ) { @@ -179,4 +198,15 @@ void QgsEmbedLayerDialog::unselectChildren( QTreeWidgetItem* item ) } } +void QgsEmbedLayerDialog::on_mButtonBox_accepted() +{ + QSettings s; + QFileInfo fi( mProjectPath ); + if( fi.exists() ) + { + s.setValue("/qgis/last_embedded_project_path", fi.absolutePath() ); + } + accept(); +} + diff --git a/src/app/qgsembedlayerdialog.h b/src/app/qgsembedlayerdialog.h index 9e15a2a895d8..4b807e06e9e7 100644 --- a/src/app/qgsembedlayerdialog.h +++ b/src/app/qgsembedlayerdialog.h @@ -22,12 +22,14 @@ class QgsEmbedLayerDialog: public QDialog, private Ui::QgsEmbedLayerDialogBase void on_mBrowseFileToolButton_clicked(); void on_mProjectFileLineEdit_editingFinished(); void on_mTreeWidget_itemSelectionChanged(); + void on_mButtonBox_accepted(); private: void changeProjectFile(); void addLegendGroupToTreeWidget( const QDomElement& groupElem, QTreeWidgetItem* parent = 0 ); void addLegendLayerToTreeWidget( const QDomElement& layerElem, QTreeWidgetItem* parent = 0 ); void unselectChildren( QTreeWidgetItem* item ); + QString mProjectPath; }; #endif // QGSEMBEDLAYERSDIALOG_H diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 8c36cf89def1..b00ec172305b 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -1605,6 +1605,12 @@ bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& pro QString id = mapLayerElem.firstChildElement("id").text(); if( id == layerId ) { + //layer can be embedded only once + if( mapLayerElem.attribute("embedded") == "1" ) + { + return false; + } + mEmbeddedLayers.insert( layerId, qMakePair( projectFilePath, saveFlag ) ); if( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) { diff --git a/src/ui/qgsembedlayerdialogbase.ui b/src/ui/qgsembedlayerdialogbase.ui index 7c01f90bc8dd..1f15004c936c 100644 --- a/src/ui/qgsembedlayerdialogbase.ui +++ b/src/ui/qgsembedlayerdialogbase.ui @@ -51,7 +51,7 @@ - + Qt::Horizontal @@ -63,38 +63,5 @@ - - - buttonBox - accepted() - QgsEmbedLayerDialogBase - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - QgsEmbedLayerDialogBase - reject() - - - 316 - 260 - - - 286 - 274 - - - - + From 71d96a25b5543a91f83e6148cf9e01691f90549d Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Fri, 3 Jun 2011 16:39:48 +0200 Subject: [PATCH 37/62] Move embed action to layer menu --- src/app/qgsembedlayerdialog.cpp | 9 +++++++++ src/ui/qgisapp.ui | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/qgsembedlayerdialog.cpp b/src/app/qgsembedlayerdialog.cpp index b7a69f4da139..fbbc45b083df 100644 --- a/src/app/qgsembedlayerdialog.cpp +++ b/src/app/qgsembedlayerdialog.cpp @@ -1,8 +1,10 @@ #include "qgsembedlayerdialog.h" +#include "qgsproject.h" #include "qgisapp.h" #include #include #include +#include #include QgsEmbedLayerDialog::QgsEmbedLayerDialog( QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ) @@ -72,6 +74,13 @@ void QgsEmbedLayerDialog::changeProjectFile() return; } + //check we are not embedding from/to the same project + if( mProjectFileLineEdit->text() == QgsProject::instance()->fileName() ) + { + QMessageBox::critical( 0, tr("Recursive embeding not possible"), tr("It is not possible to embed layers / groups from the current project") ); + return; + } + mTreeWidget->clear(); //parse project file and fill tree diff --git a/src/ui/qgisapp.ui b/src/ui/qgisapp.ui index 2580a8f9fc6e..2eacbb3cd026 100644 --- a/src/ui/qgisapp.ui +++ b/src/ui/qgisapp.ui @@ -132,6 +132,7 @@ + @@ -234,7 +235,6 @@ false - @@ -1483,7 +1483,10 @@ - Embed Layers + Embed layers and groups... + + + Embed layers and groups from other project files From 0735436447006160668b08f7a242bac0055c134b Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Sun, 5 Jun 2011 15:21:06 +0200 Subject: [PATCH 38/62] Support embedded layers and groups in server --- src/mapserver/qgis_map_serv.cpp | 3 +- src/mapserver/qgsconfigcache.cpp | 11 ++ src/mapserver/qgsconfigcache.h | 7 +- src/mapserver/qgsprojectparser.cpp | 194 ++++++++++++++++++++++++----- 4 files changed, 181 insertions(+), 34 deletions(-) diff --git a/src/mapserver/qgis_map_serv.cpp b/src/mapserver/qgis_map_serv.cpp index 5dbde3036caa..aa107c520d0a 100644 --- a/src/mapserver/qgis_map_serv.cpp +++ b/src/mapserver/qgis_map_serv.cpp @@ -176,7 +176,6 @@ int main( int argc, char * argv[] ) //create config cache and search for config files in the current directory. //These configurations are used if no mapfile parameter is present in the request - QgsConfigCache configCache; QString defaultConfigFilePath; QFileInfo projectFileInfo = defaultProjectFile(); //try to find a .qgs file in the server directory if ( projectFileInfo.exists() ) @@ -245,7 +244,7 @@ int main( int argc, char * argv[] ) configFilePath = mapFileIt->second; } - QgsConfigParser* adminConfigParser = configCache.searchConfiguration( configFilePath ); + QgsConfigParser* adminConfigParser = QgsConfigCache::instance()->searchConfiguration( configFilePath ); if ( !adminConfigParser ) { QgsMSDebugMsg( "parse error on config file " + configFilePath ); diff --git a/src/mapserver/qgsconfigcache.cpp b/src/mapserver/qgsconfigcache.cpp index a0b4a21e4c0b..e2597b092340 100644 --- a/src/mapserver/qgsconfigcache.cpp +++ b/src/mapserver/qgsconfigcache.cpp @@ -22,6 +22,17 @@ #include "qgssldparser.h" #include +QgsConfigCache* QgsConfigCache::mInstance = 0; + +QgsConfigCache* QgsConfigCache::instance() +{ + if ( !mInstance ) + { + mInstance = new QgsConfigCache(); + } + return mInstance; +} + QgsConfigCache::QgsConfigCache() { QObject::connect( &mFileSystemWatcher, SIGNAL( fileChanged( const QString& ) ), this, SLOT( removeChangedEntry( const QString& ) ) ); diff --git a/src/mapserver/qgsconfigcache.h b/src/mapserver/qgsconfigcache.h index 9685f1c84cf5..8f0c50be016c 100644 --- a/src/mapserver/qgsconfigcache.h +++ b/src/mapserver/qgsconfigcache.h @@ -30,13 +30,18 @@ class QgsConfigCache: public QObject { Q_OBJECT public: - QgsConfigCache(); + static QgsConfigCache* instance(); ~QgsConfigCache(); /**Returns configuration for given config file path. The calling function does _not_ take ownership*/ QgsConfigParser* searchConfiguration( const QString& filePath ); + protected: + QgsConfigCache(); + private: + static QgsConfigCache* mInstance; + /**Creates configuration parser depending on the file type and, if successfull, inserts it to the cached configuration map @param filePath path of the configuration file @return the inserted config parser or 0 in case of error*/ diff --git a/src/mapserver/qgsprojectparser.cpp b/src/mapserver/qgsprojectparser.cpp index 3cbd9fa2b139..cd8ba50d3de8 100644 --- a/src/mapserver/qgsprojectparser.cpp +++ b/src/mapserver/qgsprojectparser.cpp @@ -16,6 +16,7 @@ ***************************************************************************/ #include "qgsprojectparser.h" +#include "qgsconfigcache.h" #include "qgsepsgcache.h" #include "qgsmslayercache.h" #include "qgsmapserverlogger.h" @@ -143,7 +144,43 @@ void QgsProjectParser::addLayers( QDomDocument &doc, titleElem.appendChild( titleText ); layerElem.appendChild( titleElem ); - addLayers( doc, layerElem, currentChildElem, layerMap, nonIdentifiableLayers, mapExtent, mapCRS ); + if( currentChildElem.attribute("embedded") == "1" ) + { + //add layers from other project files and embed into this group + QString project = convertToAbsolutePath( currentChildElem.attribute("project") ); + QString embeddedGroupName = currentChildElem.attribute("name"); + QgsProjectParser* p = dynamic_cast( QgsConfigCache::instance()->searchConfiguration( project ) ); + if( p ) + { + QStringList pIdDisabled = p->identifyDisabledLayers(); + + QDomElement embeddedGroupElem; + QList pLegendElems = p->legendGroupElements(); + QList::const_iterator pLegendIt = pLegendElems.constBegin(); + for(; pLegendIt != pLegendElems.constEnd(); ++pLegendIt ) + { + if( pLegendIt->attribute("name") == embeddedGroupName ) + { + embeddedGroupElem = *pLegendIt; + break; + } + } + + QList pLayerElems = p->projectLayerElements(); + QMap pLayerMap; + QList::const_iterator pLayerIt = pLayerElems.constBegin(); + for(; pLayerIt != pLayerElems.constEnd(); ++pLayerIt ) + { + pLayerMap.insert( layerId( *pLayerIt ), p->createLayerFromElement( *pLayerIt ) ); + } + + p->addLayers( doc, layerElem, embeddedGroupElem, pLayerMap, pIdDisabled, mapExtent, mapCRS); + } + } + else //normal (not embedded) legend group + { + addLayers( doc, layerElem, currentChildElem, layerMap, nonIdentifiableLayers, mapExtent, mapCRS ); + } // combine bounding boxes of childs (groups/layers) @@ -283,7 +320,6 @@ void QgsProjectParser::addLayers( QDomDocument &doc, QList QgsProjectParser::mapLayerFromStyle( const QString& lName, const QString& styleName, bool allowCaching ) const { QList layerList; - bool layerFound = false; //first assume lName refers to a leaf layer QMap< QString, QDomElement > layerElemMap = projectLayerElementsByName(); @@ -294,18 +330,11 @@ QList QgsProjectParser::mapLayerFromStyle( const QString& lName, c if ( layer ) { layerList.push_back( layer ); + return layerList; } - layerFound = true; - } - - if ( layerFound ) - { - return layerList; } //Check if layer name refers to the top level group for the project. - //The project group is not contained in the groupLayerRelationship list - //because the list (and the qgis legend) does not support nested groups if ( lName == projectTitle() ) { QList layerElemList = projectLayerElements(); @@ -326,18 +355,110 @@ QList QgsProjectParser::mapLayerFromStyle( const QString& lName, c { if ( groupIt->attribute( "name" ) == lName ) { - QDomNodeList layerFileList = groupIt->elementsByTagName( "legendlayerfile" ); - for ( int i = 0; i < layerFileList.size(); ++i ) + if( groupIt->attribute("embedded") == "1") //requested group is embedded from another project { - QMap< QString, QDomElement >::const_iterator layerEntry = idLayerMap.find( layerFileList.at( i ).toElement().attribute( "layerid" ) ); - if ( layerEntry != idLayerMap.constEnd() ) + QgsProjectParser* p = dynamic_cast(QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath(groupIt->attribute("project") ) ) ); + if( p ) { - layerList.push_back( createLayerFromElement( layerEntry.value() ) ); + QList pGroupElems = p->legendGroupElements(); + QList::const_iterator pGroupIt = pGroupElems.constBegin(); + QDomElement embeddedGroupElem; + + for(; pGroupIt != pGroupElems.constEnd(); ++pGroupIt ) + { + if( pGroupIt->attribute("name") == lName ) + { + embeddedGroupElem = *pGroupIt; + break; + } + } + + if( !embeddedGroupElem.isNull() ) + { + //add all the layers under the group + QMap< QString, QDomElement > pLayerElems = p->projectLayerElementsById(); + QDomNodeList pLayerNodes = embeddedGroupElem.elementsByTagName("legendlayer"); + for( int i = 0; i < pLayerNodes.size(); ++i ) + { + QString pLayerId = pLayerNodes.at(i).toElement().firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid"); + QgsMapLayer* pLayer = p->createLayerFromElement( pLayerElems[pLayerId] ); + if( pLayer ) + { + layerList.push_back( pLayer ); + } + } + } } } + else //normal (not embedded) group + { + QDomNodeList layerFileList = groupIt->elementsByTagName( "legendlayerfile" ); + for ( int i = 0; i < layerFileList.size(); ++i ) + { + QMap< QString, QDomElement >::const_iterator layerEntry = idLayerMap.find( layerFileList.at( i ).toElement().attribute( "layerid" ) ); + if ( layerEntry != idLayerMap.constEnd() ) + { + layerList.push_back( createLayerFromElement( layerEntry.value() ) ); + } + } + } + return layerList; } } + //maybe the layer is embedded from another project + QMap< QString, QDomElement >::const_iterator layerIt = idLayerMap.constBegin(); + for(; layerIt != idLayerMap.constEnd(); ++layerIt ) + { + if( layerIt.value().attribute("embedded") == "1" ) + { + QString id = layerIt.value().attribute("id"); + QString project = layerIt.value().attribute("project"); + + //get config parser from cache + QgsProjectParser* otherParser = dynamic_cast(QgsConfigCache::instance()->searchConfiguration( project ) ); + if( otherParser ) + { + //get element by id + QMap< QString, QDomElement > otherLayerElems = otherParser->projectLayerElementsById(); + QMap< QString, QDomElement >::const_iterator otherLayerIt = otherLayerElems.find( id ); + if( otherLayerIt != otherLayerElems.constEnd() ) + { + if( otherLayerIt.value().firstChildElement("layername").text() == lName ) + { + layerList.push_back( otherParser->createLayerFromElement( otherLayerIt.value() ) ); + return layerList; + } + } + } + } + } + + //layer still not found. Check if it is a single layer contained in a embedded layer group + groupIt = legendGroups.constBegin(); + for(; groupIt != legendGroups.constEnd(); ++groupIt ) + { + if( groupIt->attribute("embedded") == "1") + { + QgsProjectParser* p = dynamic_cast(QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath(groupIt->attribute("project") ) ) ); + if( p ) + { + QMap< QString, QDomElement > pLayers = p->projectLayerElementsByName(); + QMap< QString, QDomElement >::const_iterator pLayerIt = pLayers.find( lName ); + if( pLayerIt != pLayers.constEnd() ) + { + QgsMapLayer* layer = p->createLayerFromElement( pLayerIt.value() ); + if( layer ) + { + layerList.push_back( layer ); + return layerList; + } + } + } + } + } + + //layer not found, return empty list return layerList; } @@ -728,27 +849,22 @@ QgsMapLayer* QgsProjectParser::createLayerFromElement( const QDomElement& elem ) return 0; } + QString uri; + QString absoluteUri; QDomElement dataSourceElem = elem.firstChildElement( "datasource" ); - if ( dataSourceElem.isNull() ) + if ( !dataSourceElem.isNull() ) { - return 0; - } - - //convert relative pathes to absolute ones if necessary - QString uri = dataSourceElem.text(); - QString absoluteUri = convertToAbsolutePath( uri ); - if ( uri != absoluteUri ) - { - QDomText absoluteTextNode = mXMLDoc->createTextNode( absoluteUri ); - dataSourceElem.replaceChild( absoluteTextNode, dataSourceElem.firstChild() ); + //convert relative pathes to absolute ones if necessary + uri = dataSourceElem.text(); + absoluteUri = convertToAbsolutePath( uri ); + if ( uri != absoluteUri ) + { + QDomText absoluteTextNode = mXMLDoc->createTextNode( absoluteUri ); + dataSourceElem.replaceChild( absoluteTextNode, dataSourceElem.firstChild() ); + } } QString id = layerId( elem ); - if ( id.isNull() ) - { - return 0; - } - QgsMapLayer* layer = QgsMSLayerCache::instance()->searchLayer( absoluteUri, id ); if ( layer ) { @@ -767,6 +883,22 @@ QgsMapLayer* QgsProjectParser::createLayerFromElement( const QDomElement& elem ) { layer = new QgsRasterLayer(); } + else if ( elem.attribute("embedded") == "1" ) //layer is embedded from another project file + { + QgsProjectParser* otherConfig = dynamic_cast( QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath( elem.attribute( "project" ) ) ) ); + if( !otherConfig ) + { + return 0; + } + + QMap< QString, QDomElement > layerMap = otherConfig->projectLayerElementsById(); + QMap< QString, QDomElement >::const_iterator layerIt = layerMap.find( elem.attribute( "id" ) ); + if( layerIt == layerMap.constEnd() ) + { + return 0; + } + return otherConfig->createLayerFromElement( layerIt.value() ); + } if ( layer ) { From fba308672d4b8eb3da9f5dc8b3442e64567ac811 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Mon, 6 Jun 2011 14:43:34 +0200 Subject: [PATCH 39/62] More safety checks --- src/app/legend/qgslegend.cpp | 5 +++++ src/app/qgsembedlayerdialog.cpp | 10 ++++++++++ src/core/qgsproject.cpp | 5 +---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 954d3cda8385..b7db152c66fe 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -1164,6 +1164,11 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node ) theGroup = new QgsLegendGroup( this, name ); } + if( !theGroup ) + { + continue; + } + //set the checkbox of the legend group to the right state blockSignals( true ); QString checked = childelem.attribute( "checked" ); diff --git a/src/app/qgsembedlayerdialog.cpp b/src/app/qgsembedlayerdialog.cpp index fbbc45b083df..95388bc07c0b 100644 --- a/src/app/qgsembedlayerdialog.cpp +++ b/src/app/qgsembedlayerdialog.cpp @@ -52,6 +52,9 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedLayers() const void QgsEmbedLayerDialog::on_mBrowseFileToolButton_clicked() { + //line edit might emit editingFinished signal when loosing focus + mProjectFileLineEdit->blockSignals( true ); + QSettings s; QString projectFile = QFileDialog::getOpenFileName( 0, tr("Select project file"), s.value("/qgis/last_embedded_project_path").toString() ,tr("QGIS project files (*.qgs)") ); if( !projectFile.isEmpty() ) @@ -59,6 +62,7 @@ void QgsEmbedLayerDialog::on_mBrowseFileToolButton_clicked() mProjectFileLineEdit->setText( projectFile ); } changeProjectFile(); + mProjectFileLineEdit->blockSignals( false ); } void QgsEmbedLayerDialog::on_mProjectFileLineEdit_editingFinished() @@ -74,6 +78,12 @@ void QgsEmbedLayerDialog::changeProjectFile() return; } + if( mProjectPath == mProjectFileLineEdit->text() ) + { + //already up to date + return; + } + //check we are not embedding from/to the same project if( mProjectFileLineEdit->text() == QgsProject::instance()->fileName() ) { diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index b00ec172305b..0a9a58e1a6ca 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -684,10 +684,7 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do if( element.attribute("embedded") == "1" ) { - if( !createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList ) ) - { - returnStatus = false; - } + createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList ); continue; } else From b7ec033fd1de3b75218d724c930aee3e1c408adf Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Mon, 6 Jun 2011 17:09:17 +0200 Subject: [PATCH 40/62] Fix order of embedded layers in groups --- src/app/legend/qgslegend.cpp | 86 +++++++++++++++++++----------------- src/app/qgisapp.cpp | 27 +++++------ 2 files changed, 55 insertions(+), 58 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index b7db152c66fe..959495a1356a 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -186,6 +186,7 @@ int QgsLegend::addGroup( QString name, bool expand, int groupIndex ) void QgsLegend::removeAll() { clear(); + mEmbeddedGroups.clear(); mPixmapWidthValues.clear(); mPixmapHeightValues.clear(); updateMapCanvasLayerSet(); @@ -297,7 +298,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) { //prevent to drag out content under groups that are embedded from other //project files. - if( parentGroupEmbedded( item ) ) + if ( parentGroupEmbedded( item ) ) { continue; } @@ -372,7 +373,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) mDropTarget = layer; //prevent inserting content into embedded groups - if( !parentGroupEmbedded( litem ) ) + if ( !parentGroupEmbedded( litem ) ) { if ( e->y() < ( y0 + y1 ) / 2 ) { @@ -388,14 +389,14 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) } } } - else if ( group ) - { + else if ( group ) + { if ( yCoordAboveCenter( litem, e->y() ) ) //over center of item { QgsDebugMsg( "insert before group" ); //prevent inserting content into embedded groups - if( !parentGroupEmbedded( item ) ) + if ( !parentGroupEmbedded( item ) ) { line_y = visualItemRect( item ).top() + 1; mDropTarget = item; @@ -404,7 +405,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e ) } else // below center of item { - if( !groupEmbedded( item ) ) + if ( !groupEmbedded( item ) ) { QgsDebugMsg( "insert into group" ); @@ -601,7 +602,7 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi tr( "&Set group CRS" ), this, SLOT( legendGroupSetCRS() ) ); } - if ( ( li->type() == QgsLegendItem::LEGEND_LAYER || li->type() == QgsLegendItem::LEGEND_GROUP ) && !groupEmbedded( li ) && !parentGroupEmbedded( li ) ) + if (( li->type() == QgsLegendItem::LEGEND_LAYER || li->type() == QgsLegendItem::LEGEND_GROUP ) && !groupEmbedded( li ) && !parentGroupEmbedded( li ) ) { theMenu.addAction( tr( "Re&name" ), this, SLOT( openEditor() ) ); } @@ -635,19 +636,19 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt //open project file, get layer ids in group, add the layers QFile projectFile( projectFilePath ); - if( !projectFile.open( QIODevice::ReadOnly ) ) + if ( !projectFile.open( QIODevice::ReadOnly ) ) { return 0; } QDomDocument projectDocument; - if( !projectDocument.setContent( &projectFile ) ) + if ( !projectDocument.setContent( &projectFile ) ) { return 0; } - QDomElement legendElem = projectDocument.documentElement().firstChildElement("legend"); - if( legendElem.isNull() ) + QDomElement legendElem = projectDocument.documentElement().firstChildElement( "legend" ); + if ( legendElem.isNull() ) { return 0; } @@ -656,21 +657,21 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; QSettings settings; - QDomNodeList legendGroupList = legendElem.elementsByTagName("legendgroup"); - for( int i = 0; i < legendGroupList.size(); ++i ) + QDomNodeList legendGroupList = legendElem.elementsByTagName( "legendgroup" ); + for ( int i = 0; i < legendGroupList.size(); ++i ) { - QDomElement legendElem = legendGroupList.at(i).toElement(); - if( legendElem.attribute("name") == groupName ) + QDomElement legendElem = legendGroupList.at( i ).toElement(); + if ( legendElem.attribute( "name" ) == groupName ) { //embedded groups cannot be embedded again - if( legendElem.attribute("embedded") == "1" ) + if ( legendElem.attribute( "embedded" ) == "1" ) { mEmbeddedGroups.remove( groupName ); return 0; } QgsLegendGroup* group = 0; - if( parent ) + if ( parent ) { group = new QgsLegendGroup( parent, groupName ); } @@ -685,22 +686,24 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt setCurrentItem( group ); QDomNodeList groupChildren = legendElem.childNodes(); - for( int j = 0; j < groupChildren.size(); ++j ) + for ( int j = 0; j < groupChildren.size(); ++j ) { QDomElement childElem = groupChildren.at( j ).toElement(); QString tagName = childElem.tagName(); - if( tagName == "legendlayer" ) + if ( tagName == "legendlayer" ) { - QString layerId = childElem.firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid"); + QString layerId = childElem.firstChildElement( "filegroup" ).firstChildElement( "legendlayerfile" ).attribute( "layerid" ); QgsProject::instance()->createEmbeddedLayer( layerId, projectFilePath, brokenNodes, vectorLayerList, false ); - if( currentItem() && currentItem() != group ) + QTreeWidgetItem* cItem = currentItem(); + if ( cItem && cItem != group ) { - insertItem( currentItem(), group ); + removeItem( cItem ); + group->insertChild( group->childCount(), cItem ); } } - else if( tagName == "legendgroup" ) + else if ( tagName == "legendgroup" ) { - addEmbeddedGroup( childElem.attribute("name"), projectFilePath, group ); + addEmbeddedGroup( childElem.attribute( "name" ), projectFilePath, group ); } } checkLayerOrderUpdate(); @@ -735,7 +738,7 @@ void QgsLegend::addLayer( QgsMapLayer * layer ) } QgsLegendLayer* llayer = new QgsLegendLayer( layer ); - if( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) + if ( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) { QFont itemFont; itemFont.setItalic( true ); @@ -1032,10 +1035,10 @@ bool QgsLegend::writeXML( QList items, QDomNode &node, QDomDo } QHash< QString, QString >::const_iterator embedIt = mEmbeddedGroups.find( item->text( 0 ) ); - if( embedIt != mEmbeddedGroups.constEnd() ) + if ( embedIt != mEmbeddedGroups.constEnd() ) { - legendgroupnode.setAttribute("embedded", 1); - legendgroupnode.setAttribute("project", embedIt.value() ); + legendgroupnode.setAttribute( "embedded", 1 ); + legendgroupnode.setAttribute( "project", embedIt.value() ); } else { @@ -1119,7 +1122,7 @@ bool QgsLegend::writeXML( QList items, QDomNode &node, QDomDo layerfilegroupnode.appendChild( legendlayerfilenode ); //embedded layer? - if( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) + if ( !QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() ) { legendlayerfilenode.setAttribute( "embedded", "1" ); } @@ -1152,7 +1155,7 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node ) if ( childelem.tagName() == "legendgroup" ) { QgsLegendGroup* theGroup = 0; - if( childelem.attribute("embedded") == "1" ) + if ( childelem.attribute( "embedded" ) == "1" ) { theGroup = addEmbeddedGroup( name, childelem.attribute( "project" ) ); } @@ -1164,7 +1167,7 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node ) theGroup = new QgsLegendGroup( this, name ); } - if( !theGroup ) + if ( !theGroup ) { continue; } @@ -1264,6 +1267,7 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node ) bool QgsLegend::readXML( QDomNode& legendnode ) { clear(); //remove all items first + mEmbeddedGroups.clear(); return readXML( 0, legendnode ); } @@ -1851,7 +1855,7 @@ void QgsLegend::openEditor() QTreeWidgetItem* theItem = currentItem(); if ( theItem ) { - if( !groupEmbedded( theItem ) && !parentGroupEmbedded( theItem ) ) + if ( !groupEmbedded( theItem ) && !parentGroupEmbedded( theItem ) ) { editItem( theItem, 0 ); } @@ -1863,7 +1867,7 @@ void QgsLegend::makeToTopLevelItem() QgsLegendItem* theItem = dynamic_cast( currentItem() ); if ( theItem ) { - if( !parentGroupEmbedded( theItem ) ) + if ( !parentGroupEmbedded( theItem ) ) { theItem->storeAppearanceSettings(); removeItem( theItem ); @@ -2176,17 +2180,17 @@ void QgsLegend::setCRSForSelectedLayers( const QgsCoordinateReferenceSystem &crs bool QgsLegend::parentGroupEmbedded( QTreeWidgetItem* item ) const { - if( !item ) + if ( !item ) { return false; } - QgsLegendItem* lItem = dynamic_cast(item); - if( lItem && lItem->parent() ) + QgsLegendItem* lItem = dynamic_cast( item ); + if ( lItem && lItem->parent() ) { QgsLegendGroup* parentGroup = dynamic_cast( lItem->parent() ); - if( parentGroup && parentGroup->type() == QgsLegendItem::LEGEND_GROUP - && mEmbeddedGroups.contains( parentGroup->text( 0 ) ) ) + if ( parentGroup && parentGroup->type() == QgsLegendItem::LEGEND_GROUP + && mEmbeddedGroups.contains( parentGroup->text( 0 ) ) ) { return true; } @@ -2196,13 +2200,13 @@ bool QgsLegend::parentGroupEmbedded( QTreeWidgetItem* item ) const bool QgsLegend::groupEmbedded( QTreeWidgetItem* item ) const { - if( !item ) + if ( !item ) { return false; } - QgsLegendGroup* gItem = dynamic_cast(item); - if( !gItem ) + QgsLegendGroup* gItem = dynamic_cast( item ); + if ( !gItem ) { return false; } diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index b21c25a4e453..2a4a9207db84 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5053,26 +5053,14 @@ void QgisApp::addMapLayer( QgsMapLayer *theMapLayer ) void QgisApp::embedLayers() { //dialog to select groups/layers from other project files - - //hardcoded for debugging - /*QString filepath="/home/marco/geodaten/projekte/composertest.qgs"; - QString id="komb113320110531113659299"; - - QList brokenNodes; - QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; - QgsProject::instance()->createEmbeddedLayer( id, filepath, brokenNodes, vectorLayerList );*/ - - /*QString filepath="/home/marco/geodaten/projekte/rasters.qgs"; - QString groupname="Karten"; - mMapLegend->addEmbeddedGroup( groupname, filepath );*/ - QgsEmbedLayerDialog d; - if( d.exec() == QDialog::Accepted ) + if ( d.exec() == QDialog::Accepted ) { + mMapCanvas->freeze( true ); //groups QList< QPair < QString, QString > > groups = d.embeddedGroups(); QList< QPair < QString, QString > >::const_iterator groupIt = groups.constBegin(); - for(; groupIt != groups.constEnd(); ++groupIt ) + for ( ; groupIt != groups.constEnd(); ++groupIt ) { mMapLegend->addEmbeddedGroup( groupIt->first, groupIt->second ); } @@ -5083,10 +5071,15 @@ void QgisApp::embedLayers() QList< QPair < QString, QString > > layers = d.embeddedLayers(); QList< QPair < QString, QString > >::const_iterator layerIt = layers.constBegin(); - for(; layerIt != layers.constEnd(); ++layerIt ) + for ( ; layerIt != layers.constEnd(); ++layerIt ) { QgsProject::instance()->createEmbeddedLayer( layerIt->first, layerIt->second, brokenNodes, vectorLayerList ); } + mMapCanvas->freeze( false ); + if ( groups.size() > 0 || layers.size() > 0 ) + { + mMapCanvas->refresh(); + } } } @@ -6555,7 +6548,7 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml ) if ( !ml ) return; - if( !QgsProject::instance()->layerIsEmbedded( ml->id() ).isEmpty() ) + if ( !QgsProject::instance()->layerIsEmbedded( ml->id() ).isEmpty() ) { return; //don't show properties of embedded layers } From 81e55a4bd523ef56b01d8dd42a7e76a890bad953 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Mon, 6 Jun 2011 17:19:27 +0200 Subject: [PATCH 41/62] Reformating, fix for project cleaning --- src/core/qgsproject.cpp | 89 ++++++++++------------------------------- 1 file changed, 22 insertions(+), 67 deletions(-) diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 0a9a58e1a6ca..e45d030e26ff 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -682,14 +682,14 @@ QPair< bool, QList > QgsProject::_getMapLayers( QDomDocument const &do QDomNode node = nl.item( i ); QDomElement element = node.toElement(); - if( element.attribute("embedded") == "1" ) + if ( element.attribute( "embedded" ) == "1" ) { createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList ); continue; } else { - if( !addLayer( element, brokenNodes, vLayerList ) ) + if ( !addLayer( element, brokenNodes, vLayerList ) ) { returnStatus = false; } @@ -859,6 +859,7 @@ bool QgsProject::read() // project still hanging around imp_->clear(); + mEmbeddedLayers.clear(); // now get any properties _getProperties( *doc, imp_->properties_ ); @@ -914,52 +915,6 @@ bool QgsProject::read( QDomNode & layerNode ) QList brokenNodes; QList< QPair< QgsVectorLayer*, QDomElement > > vectorLayerList; return addLayer( layerNode.toElement(), brokenNodes, vectorLayerList ); -#if 0 - QString type = layerNode.toElement().attribute( "type" ); - - QgsMapLayer *mapLayer = NULL; - - if ( type == "vector" ) - { - mapLayer = new QgsVectorLayer; - } - else if ( type == "raster" ) - { - mapLayer = new QgsRasterLayer; - } - else if ( type == "plugin" ) - { - QString typeName = layerNode.toElement().attribute( "name" ); - mapLayer = QgsPluginLayerRegistry::instance()->createLayer( typeName ); - } - else - { - QgsDebugMsg( "bad layer type" ); - return false; - } - - if ( !mapLayer ) - { - QgsDebugMsg( "unable to create layer" ); - return false; - } - - // have the layer restore state that is stored in Dom node - if ( mapLayer->readXML( layerNode ) ) - { - mapLayer = QgsMapLayerRegistry::instance()->addMapLayer( mapLayer ); - } - else - { - delete mapLayer; - - QgsDebugMsg( "unable to load " + type + " layer" ); - - return false; - } - - return true; -#endif //0 } // QgsProject::read( QDomNode & layerNode ) @@ -1041,19 +996,19 @@ bool QgsProject::write() { QString externalProjectFile = layerIsEmbedded( ml->id() ); QHash< QString, QPair< QString, bool> >::const_iterator emIt = mEmbeddedLayers.find( ml->id() ); - if( emIt == mEmbeddedLayers.constEnd() ) + if ( emIt == mEmbeddedLayers.constEnd() ) { ml->writeXML( projectLayersNode, *doc ); } else //layer defined in an external project file { //only save embedded layer if not managed by a legend group - if( emIt.value().second ) + if ( emIt.value().second ) { - QDomElement mapLayerElem = doc->createElement("maplayer"); - mapLayerElem.setAttribute("embedded", 1 ); - mapLayerElem.setAttribute("project", writePath( emIt.value().first ) ); - mapLayerElem.setAttribute("id", ml->id() ); + QDomElement mapLayerElem = doc->createElement( "maplayer" ); + mapLayerElem.setAttribute( "embedded", 1 ); + mapLayerElem.setAttribute( "project", writePath( emIt.value().first ) ); + mapLayerElem.setAttribute( "id", ml->id() ); projectLayersNode.appendChild( mapLayerElem ); } } @@ -1566,7 +1521,7 @@ void QgsProject::setBadLayerHandler( QgsProjectBadLayerHandler* handler ) QString QgsProject::layerIsEmbedded( const QString& id ) const { QHash< QString, QPair< QString, bool > >::const_iterator it = mEmbeddedLayers.find( id ); - if( it == mEmbeddedLayers.constEnd() ) + if ( it == mEmbeddedLayers.constEnd() ) { return QString(); } @@ -1574,42 +1529,42 @@ QString QgsProject::layerIsEmbedded( const QString& id ) const }; bool QgsProject::createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList& brokenNodes, - QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag ) + QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag ) { QFile projectFile( projectFilePath ); - if( !projectFile.open( QIODevice::ReadOnly ) ) + if ( !projectFile.open( QIODevice::ReadOnly ) ) { return false; } QDomDocument projectDocument; - if( !projectDocument.setContent( &projectFile ) ) + if ( !projectDocument.setContent( &projectFile ) ) { return false; } - QDomElement projectLayersElem = projectDocument.documentElement().firstChildElement("projectlayers"); - if( projectLayersElem.isNull() ) + QDomElement projectLayersElem = projectDocument.documentElement().firstChildElement( "projectlayers" ); + if ( projectLayersElem.isNull() ) { return false; } - QDomNodeList mapLayerNodes = projectLayersElem.elementsByTagName("maplayer"); - for( int i = 0; i < mapLayerNodes.size(); ++i ) + QDomNodeList mapLayerNodes = projectLayersElem.elementsByTagName( "maplayer" ); + for ( int i = 0; i < mapLayerNodes.size(); ++i ) { //get layer id - QDomElement mapLayerElem = mapLayerNodes.at(i).toElement(); - QString id = mapLayerElem.firstChildElement("id").text(); - if( id == layerId ) + QDomElement mapLayerElem = mapLayerNodes.at( i ).toElement(); + QString id = mapLayerElem.firstChildElement( "id" ).text(); + if ( id == layerId ) { //layer can be embedded only once - if( mapLayerElem.attribute("embedded") == "1" ) + if ( mapLayerElem.attribute( "embedded" ) == "1" ) { return false; } mEmbeddedLayers.insert( layerId, qMakePair( projectFilePath, saveFlag ) ); - if( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) + if ( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) { return true; } From 09878e5a6a8c7e7c8a6eaac9eb29a034560982bd Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 7 Jun 2011 17:29:55 +0200 Subject: [PATCH 42/62] Zoom to filtered layers in wms server if BBOX parameter missing --- src/mapserver/qgswmsserver.cpp | 47 ++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/src/mapserver/qgswmsserver.cpp b/src/mapserver/qgswmsserver.cpp index 5278e4e46ce6..4a0f82ca892c 100644 --- a/src/mapserver/qgswmsserver.cpp +++ b/src/mapserver/qgswmsserver.cpp @@ -1556,24 +1556,49 @@ QMap QgsWMSServer::applyRequestedLayerFilters( const QStringLi QgsVectorLayer* filteredLayer = dynamic_cast( QgsMapLayerRegistry::instance()->mapLayer( layerId ) ); if ( filteredLayer ) { - QgsVectorDataProvider* dp = filteredLayer->dataProvider(); - if ( dp ) + if( filteredLayer ) { - filterMap.insert( layerId, dp->subsetString() ); + filterMap.insert( layerId, filteredLayer->subsetString() ); + QString newSubsetString = eqSplit.at( 1 ); + if ( !filteredLayer->subsetString().isEmpty() ) + { + newSubsetString.prepend( " AND " ); + newSubsetString.prepend( filteredLayer->subsetString() ); + } + filteredLayer->setSubsetString( newSubsetString ); } - - QString newSubsetString = eqSplit.at( 1 ); - if ( !dp->subsetString().isEmpty() ) - { - newSubsetString.prepend( " AND " ); - newSubsetString.prepend( dp->subsetString() ); - } - dp->setSubsetString( newSubsetString ); } } ++listPos; } } + + //No BBOX parameter in request. We use the union of the filtered layer + //to provide the functionality of zooming to selected records via (enhanced) WMS. + if( mMapRenderer && mMapRenderer->extent().isEmpty() ) + { + QgsRectangle filterExtent; + QMap::const_iterator filterIt = filterMap.constBegin(); + for(; filterIt != filterMap.constEnd(); ++filterIt ) + { + QgsMapLayer* mapLayer = QgsMapLayerRegistry::instance()->mapLayer( filterIt.key() ); + if( !mapLayer ) + { + continue; + } + + QgsRectangle layerExtent = mapLayer->extent(); + if( filterExtent.isEmpty() ) + { + filterExtent = layerExtent; + } + else + { + filterExtent.combineExtentWith( &layerExtent ); + } + } + mMapRenderer->setExtent( filterExtent ); + } } return filterMap; } From f56281049623c0d7301661bc9a2cd985462c2178 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 7 Jun 2011 18:28:18 +0200 Subject: [PATCH 43/62] Avoid unnecessary canvas refreshes when adding group to legend --- src/app/legend/qgslegend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 959495a1356a..b69fd2a8f368 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -156,6 +156,9 @@ int QgsLegend::addGroupToCurrentItem( QString name, bool expand ) int QgsLegend::addGroup( QString name, bool expand, QTreeWidgetItem* parent ) { + //avoid multiple refreshes of map canvas because of itemChanged signal + blockSignals( true ); + bool nameEmpty = name.isEmpty(); if ( nameEmpty ) name = tr( "group" ); // some default name if none specified @@ -174,6 +177,7 @@ int QgsLegend::addGroup( QString name, bool expand, QTreeWidgetItem* parent ) if ( nameEmpty ) openEditor(); + blockSignals( false ); return groupIndex.row(); } From 1b1552812dc30337c4f9c6eb3a552d37f7dc3c18 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Tue, 7 Jun 2011 22:25:53 +0200 Subject: [PATCH 44/62] Fix for layer order in case of option addNewLayersToCurrentGroup --- src/app/legend/qgslegend.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index b69fd2a8f368..39cad526ac5b 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -698,10 +698,19 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt { QString layerId = childElem.firstChildElement( "filegroup" ).firstChildElement( "legendlayerfile" ).attribute( "layerid" ); QgsProject::instance()->createEmbeddedLayer( layerId, projectFilePath, brokenNodes, vectorLayerList, false ); - QTreeWidgetItem* cItem = currentItem(); - if ( cItem && cItem != group ) + QTreeWidgetItem* cItem = 0; + if( settings.value("/qgis/addNewLayersToCurrentGroup", false ).toBool() ) { + cItem = group->takeChild( 0 ); + } + else + { + cItem = currentItem(); removeItem( cItem ); + } + + if( cItem ) + { group->insertChild( group->childCount(), cItem ); } } From fabc66aa1d4a63e135153bbefc5491a9c896aae0 Mon Sep 17 00:00:00 2001 From: Marco Hugentobler Date: Fri, 10 Jun 2011 08:47:12 +0200 Subject: [PATCH 45/62] [FEATURE]: zonal statistics plugin --- src/plugins/CMakeLists.txt | 1 + src/plugins/zonal_statistics/CMakeLists.txt | 57 ++++++++ .../qgszonalstatisticsdialog.cpp | 132 ++++++++++++++++++ .../qgszonalstatisticsdialog.h | 50 +++++++ .../qgszonalstatisticsdialogbase.ui | 93 ++++++++++++ .../qgszonalstatisticsplugin.cpp | 106 ++++++++++++++ .../qgszonalstatisticsplugin.h | 48 +++++++ 7 files changed, 487 insertions(+) create mode 100644 src/plugins/zonal_statistics/CMakeLists.txt create mode 100644 src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp create mode 100644 src/plugins/zonal_statistics/qgszonalstatisticsdialog.h create mode 100644 src/plugins/zonal_statistics/qgszonalstatisticsdialogbase.ui create mode 100644 src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp create mode 100644 src/plugins/zonal_statistics/qgszonalstatisticsplugin.h diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 1acf96bc6668..5a8299ad9139 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -13,6 +13,7 @@ ADD_SUBDIRECTORY(point_displacement_renderer) ADD_SUBDIRECTORY(spatialquery) ADD_SUBDIRECTORY(sqlanywhere) ADD_SUBDIRECTORY(roadgraph) +ADD_SUBDIRECTORY(zonal_statistics) IF (WITH_SPATIALITE) ADD_SUBDIRECTORY(offline_editing) diff --git a/src/plugins/zonal_statistics/CMakeLists.txt b/src/plugins/zonal_statistics/CMakeLists.txt new file mode 100644 index 000000000000..592f97912f1d --- /dev/null +++ b/src/plugins/zonal_statistics/CMakeLists.txt @@ -0,0 +1,57 @@ +######################################################## +# Files + +SET (ZONAL_STATISTICS_SRCS + qgszonalstatisticsplugin.cpp + qgszonalstatisticsdialog.cpp +) + +SET (ZONAL_STATISTICS_UIS + qgszonalstatisticsdialogbase.ui + ) + +SET (ZONAL_STATISTICS_MOC_HDRS +qgszonalstatisticsdialog.h +qgszonalstatisticsplugin.h +) + +######################################################## +# Build + +QT4_WRAP_UI (ZONAL_STATISTICS_UIS_H ${ZONAL_STATISTICS_UIS}) + +QT4_WRAP_CPP (ZONAL_STATISTICS_MOC_SRCS ${ZONAL_STATISTICS_MOC_HDRS}) + +QT4_ADD_RESOURCES(ZONAL_STATISTICS_RCC_SRCS ${ZONAL_STATISTICS_RCCS}) + +ADD_LIBRARY (zonalstatisticsplugin MODULE + ${ZONAL_STATISTICS_SRCS} + ${ZONAL_STATISTICS_MOC_SRCS} + ${ZONAL_STATISTICS_RCC_SRCS} + ${ZONAL_STATISTICS_UIS_H}) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} + ${GDAL_INCLUDE_DIR} + ../../core + ../../core/raster + ../../gui + ../../analysis/vector + .. + . +) + +TARGET_LINK_LIBRARIES(zonalstatisticsplugin + qgis_analysis + qgis_core + qgis_gui +) + + +######################################################## +# Install + +INSTALL(TARGETS zonalstatisticsplugin + RUNTIME DESTINATION ${QGIS_PLUGIN_DIR} + LIBRARY DESTINATION ${QGIS_PLUGIN_DIR} + ) diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp new file mode 100644 index 000000000000..dbfbc84de0c1 --- /dev/null +++ b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp @@ -0,0 +1,132 @@ +/*************************************************************************** + qgszonalstatisticsdialog.h - description + ----------------------- + begin : September 1st, 2009 + copyright : (C) 2009 by Marco Hugentobler + email : marco dot hugentobler at karto dot baug dot ethz dot ch + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 "qgszonalstatisticsdialog.h" +#include "qgsmaplayerregistry.h" +#include "qgsrasterlayer.h" +#include "qgsvectordataprovider.h" +#include "qgsvectorlayer.h" + +QgsZonalStatisticsDialog::QgsZonalStatisticsDialog(QgisInterface* iface): QDialog(), mIface(iface) +{ + setupUi(this); + insertAvailableLayers(); + mColumnPrefixLineEdit->setText(proposeAttributePrefix()); +} + +QgsZonalStatisticsDialog::QgsZonalStatisticsDialog(): QDialog(0), mIface(0) +{ + setupUi(this); +} + +QgsZonalStatisticsDialog::~QgsZonalStatisticsDialog() +{ + +} + +void QgsZonalStatisticsDialog::insertAvailableLayers() +{ + //insert available raster layers + //enter available layers into the combo box + QMap mapLayers = QgsMapLayerRegistry::instance()->mapLayers(); + QMap::iterator layer_it = mapLayers.begin(); + + for ( ; layer_it != mapLayers.end(); ++layer_it ) + { + QgsRasterLayer* rl = dynamic_cast( layer_it.value() ); + if ( rl ) + { + mRasterLayerComboBox->addItem( rl->name(), QVariant( rl->source() ) ); + } + else + { + QgsVectorLayer* vl = dynamic_cast( layer_it.value() ); + if(vl && vl->geometryType() == QGis::Polygon) + { + mPolygonLayerComboBox->addItem( vl->name(), QVariant( vl->getLayerID() ) ); + } + } + } +} + +QString QgsZonalStatisticsDialog::rasterFilePath() const +{ + int index = mRasterLayerComboBox->currentIndex(); + if ( index == -1 ) + { + return ""; + } + return mRasterLayerComboBox->itemData( index ).toString(); +} + +QgsVectorLayer* QgsZonalStatisticsDialog::polygonLayer() const +{ + int index = mPolygonLayerComboBox->currentIndex(); + if(index == -1) + { + return 0; + } + return dynamic_cast(QgsMapLayerRegistry::instance()->mapLayer(mPolygonLayerComboBox->itemData( index ).toString())); +} + +QString QgsZonalStatisticsDialog::attributePrefix() const +{ + return mColumnPrefixLineEdit->text(); +} + +QString QgsZonalStatisticsDialog::proposeAttributePrefix() const +{ + if(!polygonLayer()) + { + return ""; + } + + QString proposedPrefix = ""; + while(!prefixIsValid(proposedPrefix)) + { + proposedPrefix.prepend("_"); + } + return proposedPrefix; +} + +bool QgsZonalStatisticsDialog::prefixIsValid(const QString& prefix) const +{ + QgsVectorLayer* vl = polygonLayer(); + if(!vl) + { + return false; + } + QgsVectorDataProvider* dp = vl->dataProvider(); + if(!dp) + { + return false; + } + + QgsFieldMap providerFieldMap = dp->fields(); + QgsFieldMap::const_iterator it = providerFieldMap.constBegin(); + QString currentFieldName; + + for(; it != providerFieldMap.constEnd(); ++it) + { + currentFieldName = it.value().name(); + if(currentFieldName == (prefix + "mean") || currentFieldName == (prefix + "sum") || currentFieldName == (prefix + "count") ) + { + return false; + } + } + return true; +} diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsdialog.h b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.h new file mode 100644 index 000000000000..6e573533a4e8 --- /dev/null +++ b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.h @@ -0,0 +1,50 @@ +/*************************************************************************** + qgszonalstatisticsdialog.h - description + ----------------------- + begin : September 1st, 2009 + copyright : (C) 2009 by Marco Hugentobler + email : marco dot hugentobler at karto dot baug dot ethz dot ch + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef QGSZONALSTATISTICSDIALOG_H +#define QGSZONALSTATISTICSDIALOG_H + +#include "ui_qgszonalstatisticsdialogbase.h" + +class QgisInterface; +class QgsVectorLayer; + +class QgsZonalStatisticsDialog: public QDialog, private Ui::QgsZonalStatisticsDialogBase +{ + Q_OBJECT + public: + QgsZonalStatisticsDialog(QgisInterface* iface); + ~QgsZonalStatisticsDialog(); + + QString rasterFilePath() const; + int rasterBand() const {return 1;} //todo: expose that in the GUI + QgsVectorLayer* polygonLayer() const; + QString attributePrefix() const; + + private: + QgsZonalStatisticsDialog(); + /**Fills the available raster and polygon layers into the combo boxes*/ + void insertAvailableLayers(); + /**Propose a valid prefix for the attributes*/ + QString proposeAttributePrefix() const; + /**Check if a prefix can be used for the count, sum and mean attribute*/ + bool prefixIsValid(const QString& prefix) const; + + QgisInterface* mIface; +}; + +#endif // QGSZONALSTATISTICSDIALOG_H diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsdialogbase.ui b/src/plugins/zonal_statistics/qgszonalstatisticsdialogbase.ui new file mode 100644 index 000000000000..4ab7bbc95fe3 --- /dev/null +++ b/src/plugins/zonal_statistics/qgszonalstatisticsdialogbase.ui @@ -0,0 +1,93 @@ + + QgsZonalStatisticsDialogBase + + + + 0 + 0 + 366 + 242 + + + + Dialog + + + + + + Raster layer: + + + + + + + + + + Polygon layer containing the zones: + + + + + + + + + + Output column prefix: + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + QgsZonalStatisticsDialogBase + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + QgsZonalStatisticsDialogBase + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp b/src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp new file mode 100644 index 000000000000..3b83dc6c3914 --- /dev/null +++ b/src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp @@ -0,0 +1,106 @@ +/*************************************************************************** + qgszonalstatisticsplugin.cpp - description + ---------------------------- + begin : August 29th, 2009 + copyright : (C) 2009 by Marco Hugentobler + email : marco dot hugentobler at karto dot baug dot ethz dot ch + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 "qgszonalstatisticsplugin.h" +#include "qgisinterface.h" +#include "qgszonalstatistics.h" +#include "qgszonalstatisticsdialog.h" +#include "qgsvectorlayer.h" +#include +#include + +static const QString name_ = QObject::tr( "Zonal statistics plugin" ); +static const QString description_ = QObject::tr( "A plugin to calculate count, sum, mean of rasters for each polygon of a vector layer" ); +static const QString version_ = QObject::tr( "Version 0.1" ); + +QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface(iface), mAction(0) +{ + +} + +QgsZonalStatisticsPlugin::~QgsZonalStatisticsPlugin() +{ + +} + +void QgsZonalStatisticsPlugin::initGui() +{ + mAction = new QAction( tr( "&Zonal statistics..." ), 0 ); + QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) ); + mIface->addToolBarIcon( mAction ); + mIface->addPluginToMenu( tr( "&Zonal statistics..." ), mAction ); +} + +void QgsZonalStatisticsPlugin::unload() +{ + +} + +void QgsZonalStatisticsPlugin::run() +{ + QgsZonalStatisticsDialog d(mIface); + if(d.exec() == QDialog::Rejected) + { + return; + } + + QString rasterFile = d.rasterFilePath(); + QgsVectorLayer* vl = d.polygonLayer(); + if(!vl) + { + return; + } + + QgsZonalStatistics zs(vl, rasterFile, d.attributePrefix(), 1); //atm hardcode first band + QProgressDialog p(tr("Calculating zonal statistics..."), tr("Abort..."), 0, 0); + p.setWindowModality(Qt::WindowModal); + zs.calculateStatistics(&p); +} + +//global methods for the plugin manager +QGISEXTERN QgisPlugin* classFactory( QgisInterface * ifacePointer ) +{ + return new QgsZonalStatisticsPlugin( ifacePointer ); +} + +QGISEXTERN QString name() +{ + return name_; +} + +QGISEXTERN QString description() +{ + return description_; +} + +QGISEXTERN QString version() +{ + return version_; +} + +QGISEXTERN int type() +{ + return QgisPlugin::UI; +} + +QGISEXTERN void unload( QgisPlugin* pluginPointer ) +{ + delete pluginPointer; +} + + + diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsplugin.h b/src/plugins/zonal_statistics/qgszonalstatisticsplugin.h new file mode 100644 index 000000000000..c44b2d8c707a --- /dev/null +++ b/src/plugins/zonal_statistics/qgszonalstatisticsplugin.h @@ -0,0 +1,48 @@ +/*************************************************************************** + qgszonalstatisticsplugin.h - description + ----------------------- + begin : August 29th, 2009 + copyright : (C) 2009 by Marco Hugentobler + email : marco dot hugentobler at karto dot baug dot ethz dot ch + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#ifndef QGSZONALSTATISTICSPLUGIN_H +#define QGSZONALSTATISTICSPLUGIN_H + +#include "qgisplugin.h" +#include + +class QgsInterface; +class QAction; + +class QgsZonalStatisticsPlugin: public QObject, public QgisPlugin +{ + Q_OBJECT + public: + QgsZonalStatisticsPlugin( QgisInterface* iface ); + ~QgsZonalStatisticsPlugin(); + + /**initialize connection to GUI*/ + void initGui(); + /**Unload the plugin and cleanup the GUI*/ + void unload(); + + private slots: + /**Select input file, output file, format and analysis method*/ + void run(); + + private: + QgisInterface* mIface; + QAction* mAction; +}; + +#endif // QGSZONALSTATISTICSPLUGIN_H From b2fa1b8952c095454eae27130792014baf41ae75 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 09:21:28 +0200 Subject: [PATCH 46/62] Added warning that .qgs extension may be missing --- src/mapserver/qgis_map_serv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapserver/qgis_map_serv.cpp b/src/mapserver/qgis_map_serv.cpp index aa107c520d0a..7f4cfeeb23ba 100644 --- a/src/mapserver/qgis_map_serv.cpp +++ b/src/mapserver/qgis_map_serv.cpp @@ -248,7 +248,7 @@ int main( int argc, char * argv[] ) if ( !adminConfigParser ) { QgsMSDebugMsg( "parse error on config file " + configFilePath ); - theRequestHandler->sendServiceException( QgsMapServiceException( "", "Configuration file problem" ) ); + theRequestHandler->sendServiceException( QgsMapServiceException( "", "Configuration file problem : perhaps you left off the .qgs extension?" ) ); continue; } From 5b995615be46d0caff67638d73913ba636eca7e3 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 09:21:28 +0200 Subject: [PATCH 47/62] Added warning that .qgs extension may be missing --- src/mapserver/qgis_map_serv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapserver/qgis_map_serv.cpp b/src/mapserver/qgis_map_serv.cpp index aa107c520d0a..7f4cfeeb23ba 100644 --- a/src/mapserver/qgis_map_serv.cpp +++ b/src/mapserver/qgis_map_serv.cpp @@ -248,7 +248,7 @@ int main( int argc, char * argv[] ) if ( !adminConfigParser ) { QgsMSDebugMsg( "parse error on config file " + configFilePath ); - theRequestHandler->sendServiceException( QgsMapServiceException( "", "Configuration file problem" ) ); + theRequestHandler->sendServiceException( QgsMapServiceException( "", "Configuration file problem : perhaps you left off the .qgs extension?" ) ); continue; } From 49e9286bc9719a23ce474bbf678219a32cb7ccec Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 10:02:59 +0200 Subject: [PATCH 48/62] Don't use exponential notation for wms extents display --- src/app/qgsprojectproperties.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/qgsprojectproperties.cpp b/src/app/qgsprojectproperties.cpp index cb593625c55f..de66fd6f6262 100644 --- a/src/app/qgsprojectproperties.cpp +++ b/src/app/qgsprojectproperties.cpp @@ -508,10 +508,10 @@ void QgsProjectProperties::restoreState() void QgsProjectProperties::on_pbnWMSExtCanvas_clicked() { QgsRectangle ext = mMapCanvas->extent(); - mWMSExtMinX->setText( QString::number( ext.xMinimum() ) ); - mWMSExtMinY->setText( QString::number( ext.yMinimum() ) ); - mWMSExtMaxX->setText( QString::number( ext.xMaximum() ) ); - mWMSExtMaxY->setText( QString::number( ext.yMaximum() ) ); + mWMSExtMinX->setText( QString::number( ext.xMinimum(), 'f', 8 ) ); + mWMSExtMinY->setText( QString::number( ext.yMinimum(), 'f', 8 ) ); + mWMSExtMaxX->setText( QString::number( ext.xMaximum(), 'f', 8 ) ); + mWMSExtMaxY->setText( QString::number( ext.yMaximum(), 'f', 8 ) ); } void QgsProjectProperties::on_pbnWMSAddSRS_clicked() From 4bcddc19298efe5e0f39e5bebc5290c93204092f Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 12:23:53 +0200 Subject: [PATCH 49/62] [FEATURE] Added support for logging to a file. To enable it, set the QGIS_LOG_FILE environment variable to a writable file on your file system. When using the QGIS Mapserver, you can enable logging by adding a directive such as 'SetEnv QGIS_LOG_FILE /tmp/qgislog.txt' to the cgi-bin section of your apache config file. --- src/core/qgslogger.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/core/qgslogger.h | 13 ++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index a920db57656a..cdb813e2ad24 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -18,6 +18,7 @@ #include "qgslogger.h" #include +#include int QgsLogger::mDebugLevel = -999; // undefined value @@ -38,14 +39,17 @@ void QgsLogger::debug( const QString& msg, int debuglevel, const char* file, con if ( file == NULL ) { qDebug( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else if ( function == NULL ) { qDebug( "%s: %s", file, msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else if ( line == -1 ) { qDebug( "%s: (%s) %s", file, function, msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else { @@ -54,6 +58,7 @@ void QgsLogger::debug( const QString& msg, int debuglevel, const char* file, con #else qDebug( "%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().constData() ); #endif + logMessageToFile( msg ); } } } @@ -75,14 +80,17 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* if ( file == NULL ) { qDebug( "%s: %d", var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %d" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { qDebug( "%s: %s: %d", file, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %s: %d" ).arg( file ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( line == -1 ) { qDebug( "%s: (%s): %s: %d", file, function, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: (%s): %s: %d" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -91,6 +99,7 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* #else qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val ); #endif + logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -112,14 +121,17 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha if ( file == NULL ) { qDebug( "%s: %f", var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { qDebug( "%s: %s: %f", file, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %s: %f" ).arg( file ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( line == -1 ) { qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -128,6 +140,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha #else qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val ); #endif + logMessageToFile( QString( "%s: %d: (%s), %s: %f").arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -135,16 +148,19 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha void QgsLogger::warning( const QString& msg ) { qWarning( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } void QgsLogger::critical( const QString& msg ) { qCritical( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } void QgsLogger::fatal( const QString& msg ) { qFatal( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } int QgsLogger::debugLevel() @@ -178,6 +194,26 @@ int QgsLogger::debugLevel() return mDebugLevel; } +const QString QgsLogger::logFile() +{ + const QString logFile = getenv( "QGIS_LOG_FILE" ); + return logFile; +} + +const void QgsLogger::logMessageToFile( QString theMessage ) +{ + if ( ! logFile().isEmpty() ) + { + //Maybe more efficient to keep the file open for the life of qgis... + QFile file( logFile() ); + file.open(QIODevice::Append); + file.write( theMessage.toStdString().c_str() ); + file.write( "\n" ); + file.close(); + } + return; +} + const char* QgsLogger::debugFile() { const char* dfile = getenv( "QGIS_DEBUG_FILE" ); diff --git a/src/core/qgslogger.h b/src/core/qgslogger.h index f8d7908cc518..985b6bd63b04 100644 --- a/src/core/qgslogger.h +++ b/src/core/qgslogger.h @@ -21,6 +21,7 @@ #include #include #include +class QFile; #ifdef QGISDEBUG #define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__) @@ -45,6 +46,9 @@ * QGIS_DEBUG_FILE may contain a file name. Only the messages from this file are * printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not * set, messages from all files are printed + * + * QGIS_LOG_FILE may contain a file name. If set, all messages will be appended + * to this file rather than to stdout. */ class CORE_EXPORT QgsLogger @@ -107,8 +111,15 @@ class CORE_EXPORT QgsLogger static int debugLevel(); private: + /**Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set, + * otherwise returns a file name for writing log messages to.*/ + static const QString logFile(); - /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set*/ + /** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/ + static const void logMessageToFile( QString theMessage ); + + /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set. + * If set, only messages from this source file will be sent to logs. */ static const char* debugFile(); /** current debug level */ From 83925f8de8ba7b6c6ae8e3db6c074ad0f4d480e5 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 12:38:49 +0200 Subject: [PATCH 50/62] Run astyle to cleanup formatting --- src/core/qgslogger.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index cdb813e2ad24..41f0e4f35c6a 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -99,7 +99,7 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* #else qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val ); #endif - logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -121,7 +121,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha if ( file == NULL ) { qDebug( "%s: %f", var.toLocal8Bit().constData(), val ); - logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { @@ -131,7 +131,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha else if ( line == -1 ) { qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().constData(), val ); - logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -140,7 +140,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha #else qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val ); #endif - logMessageToFile( QString( "%s: %d: (%s), %s: %f").arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %d: (%s), %s: %f" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -206,9 +206,9 @@ const void QgsLogger::logMessageToFile( QString theMessage ) { //Maybe more efficient to keep the file open for the life of qgis... QFile file( logFile() ); - file.open(QIODevice::Append); + file.open( QIODevice::Append ); file.write( theMessage.toStdString().c_str() ); - file.write( "\n" ); + file.write( "\n" ); file.close(); } return; From 6f8deec721007ad8640b20582b6723c5acec903e Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 12:23:53 +0200 Subject: [PATCH 51/62] [FEATURE] Added support for logging to a file. To enable it, set the QGIS_LOG_FILE environment variable to a writable file on your file system. When using the QGIS Mapserver, you can enable logging by adding a directive such as 'SetEnv QGIS_LOG_FILE /tmp/qgislog.txt' to the cgi-bin section of your apache config file. --- src/core/qgslogger.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/core/qgslogger.h | 13 ++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index a920db57656a..cdb813e2ad24 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -18,6 +18,7 @@ #include "qgslogger.h" #include +#include int QgsLogger::mDebugLevel = -999; // undefined value @@ -38,14 +39,17 @@ void QgsLogger::debug( const QString& msg, int debuglevel, const char* file, con if ( file == NULL ) { qDebug( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else if ( function == NULL ) { qDebug( "%s: %s", file, msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else if ( line == -1 ) { qDebug( "%s: (%s) %s", file, function, msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } else { @@ -54,6 +58,7 @@ void QgsLogger::debug( const QString& msg, int debuglevel, const char* file, con #else qDebug( "%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().constData() ); #endif + logMessageToFile( msg ); } } } @@ -75,14 +80,17 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* if ( file == NULL ) { qDebug( "%s: %d", var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %d" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { qDebug( "%s: %s: %d", file, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %s: %d" ).arg( file ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( line == -1 ) { qDebug( "%s: (%s): %s: %d", file, function, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: (%s): %s: %d" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -91,6 +99,7 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* #else qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val ); #endif + logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -112,14 +121,17 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha if ( file == NULL ) { qDebug( "%s: %f", var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { qDebug( "%s: %s: %f", file, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: %s: %f" ).arg( file ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( line == -1 ) { qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().constData(), val ); + logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -128,6 +140,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha #else qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val ); #endif + logMessageToFile( QString( "%s: %d: (%s), %s: %f").arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -135,16 +148,19 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha void QgsLogger::warning( const QString& msg ) { qWarning( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } void QgsLogger::critical( const QString& msg ) { qCritical( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } void QgsLogger::fatal( const QString& msg ) { qFatal( "%s", msg.toLocal8Bit().constData() ); + logMessageToFile( msg ); } int QgsLogger::debugLevel() @@ -178,6 +194,26 @@ int QgsLogger::debugLevel() return mDebugLevel; } +const QString QgsLogger::logFile() +{ + const QString logFile = getenv( "QGIS_LOG_FILE" ); + return logFile; +} + +const void QgsLogger::logMessageToFile( QString theMessage ) +{ + if ( ! logFile().isEmpty() ) + { + //Maybe more efficient to keep the file open for the life of qgis... + QFile file( logFile() ); + file.open(QIODevice::Append); + file.write( theMessage.toStdString().c_str() ); + file.write( "\n" ); + file.close(); + } + return; +} + const char* QgsLogger::debugFile() { const char* dfile = getenv( "QGIS_DEBUG_FILE" ); diff --git a/src/core/qgslogger.h b/src/core/qgslogger.h index f8d7908cc518..985b6bd63b04 100644 --- a/src/core/qgslogger.h +++ b/src/core/qgslogger.h @@ -21,6 +21,7 @@ #include #include #include +class QFile; #ifdef QGISDEBUG #define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__) @@ -45,6 +46,9 @@ * QGIS_DEBUG_FILE may contain a file name. Only the messages from this file are * printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not * set, messages from all files are printed + * + * QGIS_LOG_FILE may contain a file name. If set, all messages will be appended + * to this file rather than to stdout. */ class CORE_EXPORT QgsLogger @@ -107,8 +111,15 @@ class CORE_EXPORT QgsLogger static int debugLevel(); private: + /**Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set, + * otherwise returns a file name for writing log messages to.*/ + static const QString logFile(); - /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set*/ + /** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/ + static const void logMessageToFile( QString theMessage ); + + /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set. + * If set, only messages from this source file will be sent to logs. */ static const char* debugFile(); /** current debug level */ From 689181dd3b46882e285398e3b9af8691bac1a577 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 12:38:49 +0200 Subject: [PATCH 52/62] Run astyle to cleanup formatting --- src/core/qgslogger.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index cdb813e2ad24..41f0e4f35c6a 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -99,7 +99,7 @@ void QgsLogger::debug( const QString& var, int val, int debuglevel, const char* #else qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val ); #endif - logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %d: (%s), %s: %d" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -121,7 +121,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha if ( file == NULL ) { qDebug( "%s: %f", var.toLocal8Bit().constData(), val ); - logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %f" ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else if ( function == NULL ) { @@ -131,7 +131,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha else if ( line == -1 ) { qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().constData(), val ); - logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: (%s): %s: %f" ).arg( file ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } else { @@ -140,7 +140,7 @@ void QgsLogger::debug( const QString& var, double val, int debuglevel, const cha #else qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val ); #endif - logMessageToFile( QString( "%s: %d: (%s), %s: %f").arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); + logMessageToFile( QString( "%s: %d: (%s), %s: %f" ).arg( file ).arg( line ).arg( function ).arg( var.toLocal8Bit().constData() ).arg( val ) ); } } } @@ -206,9 +206,9 @@ const void QgsLogger::logMessageToFile( QString theMessage ) { //Maybe more efficient to keep the file open for the life of qgis... QFile file( logFile() ); - file.open(QIODevice::Append); + file.open( QIODevice::Append ); file.write( theMessage.toStdString().c_str() ); - file.write( "\n" ); + file.write( "\n" ); file.close(); } return; From 2776ea42466cf010034e016345a53012717e6fae Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 14:20:16 +0200 Subject: [PATCH 53/62] Improve formatting of debug output for maprenderer map dimentions --- src/core/qgsmaprenderer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/qgsmaprenderer.cpp b/src/core/qgsmaprenderer.cpp index dddb4820a696..4d7adb9bd72e 100644 --- a/src/core/qgsmaprenderer.cpp +++ b/src/core/qgsmaprenderer.cpp @@ -190,9 +190,9 @@ void QgsMapRenderer::adjustExtentToSize() dymax = mExtent.yMaximum() + whitespace; } - QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2\n" ).arg( mapUnitsPerPixelX ).arg( mapUnitsPerPixelY ) ); - QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2\n" ).arg( myWidth ).arg( myHeight ) ); - QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2\n" ).arg( mExtent.width() ).arg( mExtent.height() ) ); + QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2\n" ).arg( mapUnitsPerPixelX, 0, 'f', 8 ).arg( mapUnitsPerPixelY, 0, 'f', 8 ) ); + QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2\n" ).arg( myWidth, 0, 'f', 8 ).arg( myHeight, 0, 'f', 8) ); + QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2\n" ).arg( mExtent.width(), 0, 'f',8 ).arg( mExtent.height(), 0, 'f', 8 ) ); QgsDebugMsg( mExtent.toString() ); // update extent @@ -204,7 +204,7 @@ void QgsMapRenderer::adjustExtentToSize() // update the scale updateScale(); - QgsDebugMsg( QString( "Scale (assuming meters as map units) = 1:%1" ).arg( mScale ) ); + QgsDebugMsg( QString( "Scale (assuming meters as map units) = 1:%1" ).arg( mScale, 0, 'f', 8 ) ); newCoordXForm.setParameters( mMapUnitsPerPixel, dxmin, dymin, myHeight ); mRenderContext.setMapToPixel( newCoordXForm ); From efb462b8317400207590e6c89136aeec480e1ed2 Mon Sep 17 00:00:00 2001 From: Sergey Yakushev Date: Fri, 10 Jun 2011 08:36:27 +0300 Subject: [PATCH 54/62] add support for WKBMultiLineString geometries in RoadGraph plugin --- .../roadgraph/linevectorlayerdirector.cpp | 156 ++++++++++-------- 1 file changed, 89 insertions(+), 67 deletions(-) diff --git a/src/plugins/roadgraph/linevectorlayerdirector.cpp b/src/plugins/roadgraph/linevectorlayerdirector.cpp index 3ad2a04637d0..e1ee5d6978b8 100644 --- a/src/plugins/roadgraph/linevectorlayerdirector.cpp +++ b/src/plugins/roadgraph/linevectorlayerdirector.cpp @@ -103,41 +103,53 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto QgsFeature feature; while ( vl->nextFeature( feature ) ) { - QgsPoint pt1, pt2; - bool isFirstPoint = true; - QgsPolyline pl = feature.geometry()->asPolyline(); - QgsPolyline::iterator pointIt; - for ( pointIt = pl.begin(); pointIt != pl.end(); ++pointIt ) + QgsMultiPolyline mpl; + if ( feature.geometry()->wkbType() == QGis::WKBLineString ) { - pt2 = builder->addVertex( ct.transform( *pointIt ) ); - if ( !isFirstPoint ) + mpl.push_back( feature.geometry()->asPolyline() ); + }else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString ) + { + mpl = feature.geometry()->asMultiPolyline(); + } + + QgsMultiPolyline::iterator mplIt; + for ( mplIt = mpl.begin(); mplIt != mpl.end(); ++mplIt ) + { + QgsPoint pt1, pt2; + bool isFirstPoint = true; + QgsPolyline::iterator pointIt; + for ( pointIt = mplIt->begin(); pointIt != mplIt->end(); ++pointIt ) { - int i = 0; - for ( i = 0; i != additionalPoints.size(); ++i ) + pt2 = builder->addVertex( ct.transform( *pointIt ) ); + if ( !isFirstPoint ) { - TiePointInfo info; - if ( pt1 == pt2 ) - { - info.mLength = additionalPoints[ i ].sqrDist( pt1 ); - info.mTiedPoint = pt1; - } - else - { - info.mLength = additionalPoints[ i ].sqrDistToSegment( pt1.x(), pt1.y(), pt2.x(), pt2.y(), info.mTiedPoint ); - } - if ( pointLengthMap[ i ].mLength > info.mLength ) + int i = 0; + for ( i = 0; i != additionalPoints.size(); ++i ) { - info.mTiedPoint = builder->addVertex( info.mTiedPoint ); - info.mFirstPoint = pt1; - info.mLastPoint = pt2; + TiePointInfo info; + if ( pt1 == pt2 ) + { + info.mLength = additionalPoints[ i ].sqrDist( pt1 ); + info.mTiedPoint = pt1; + } + else + { + info.mLength = additionalPoints[ i ].sqrDistToSegment( pt1.x(), pt1.y(), pt2.x(), pt2.y(), info.mTiedPoint ); + } + if ( pointLengthMap[ i ].mLength > info.mLength ) + { + info.mTiedPoint = builder->addVertex( info.mTiedPoint ); + info.mFirstPoint = pt1; + info.mLastPoint = pt2; - pointLengthMap[ i ] = info; - tiedPoint[ i ] = info.mTiedPoint; + pointLengthMap[ i ] = info; + tiedPoint[ i ] = info.mTiedPoint; + } } } + pt1 = pt2; + isFirstPoint = false; } - pt1 = pt2; - isFirstPoint = false; } emit buildProgress( ++step, featureCount ); } @@ -198,57 +210,67 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto } // begin features segments and add arc to the Graph; - QgsPoint pt1, pt2; - - bool isFirstPoint = true; - QgsPolyline pl = feature.geometry()->asPolyline(); - QgsPolyline::iterator pointIt; - for ( pointIt = pl.begin(); pointIt != pl.end(); ++pointIt ) + QgsMultiPolyline mpl; + if ( feature.geometry()->wkbType() == QGis::WKBLineString ) + { + mpl.push_back( feature.geometry()->asPolyline() ); + }else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString ) + { + mpl = feature.geometry()->asMultiPolyline(); + } + QgsMultiPolyline::iterator mplIt; + for ( mplIt = mpl.begin(); mplIt != mpl.end(); ++mplIt ) { - pt2 = builder->addVertex( ct.transform( *pointIt ) ); + QgsPoint pt1, pt2; + bool isFirstPoint = true; + QgsPolyline::iterator pointIt; + for ( pointIt = mplIt->begin(); pointIt != mplIt->end(); ++pointIt ) + { + pt2 = builder->addVertex( ct.transform( *pointIt ) ); - std::map< double, QgsPoint > pointsOnArc; - pointsOnArc[ 0.0 ] = pt1; - pointsOnArc[ pt1.sqrDist( pt2 )] = pt2; + std::map< double, QgsPoint > pointsOnArc; + pointsOnArc[ 0.0 ] = pt1; + pointsOnArc[ pt1.sqrDist( pt2 )] = pt2; - for ( pointLengthIt = pointLengthMap.begin(); pointLengthIt != pointLengthMap.end(); ++pointLengthIt ) - { - if ( pointLengthIt->mFirstPoint == pt1 && pointLengthIt->mLastPoint == pt2 ) + for ( pointLengthIt = pointLengthMap.begin(); pointLengthIt != pointLengthMap.end(); ++pointLengthIt ) { - QgsPoint tiedPoint = pointLengthIt->mTiedPoint; - pointsOnArc[ pt1.sqrDist( tiedPoint )] = tiedPoint; + if ( pointLengthIt->mFirstPoint == pt1 && pointLengthIt->mLastPoint == pt2 ) + { + QgsPoint tiedPoint = pointLengthIt->mTiedPoint; + pointsOnArc[ pt1.sqrDist( tiedPoint )] = tiedPoint; + } } - } - if ( !isFirstPoint ) - { - std::map< double, QgsPoint >::iterator pointsIt; - QgsPoint pt1; - QgsPoint pt2; - bool isFirstPoint = true; - for ( pointsIt = pointsOnArc.begin(); pointsIt != pointsOnArc.end(); ++pointsIt ) + if ( !isFirstPoint ) { - pt2 = pointsIt->second; - if ( !isFirstPoint ) + std::map< double, QgsPoint >::iterator pointsIt; + QgsPoint pt1; + QgsPoint pt2; + bool isFirstPoint = true; + for ( pointsIt = pointsOnArc.begin(); pointsIt != pointsOnArc.end(); ++pointsIt ) { - double cost = da.measureLine( pt1, pt2 ); - if ( directionType == 1 || - directionType == 3 ) + pt2 = pointsIt->second; + if ( !isFirstPoint ) { - builder->addArc( pt1, pt2, cost, speed*su.multipler(), feature.id() ); - } - if ( directionType == 2 || - directionType == 3 ) - { - builder->addArc( pt2, pt1, cost, speed*su.multipler(), feature.id() ); + double cost = da.measureLine( pt1, pt2 ); + if ( directionType == 1 || + directionType == 3 ) + { + builder->addArc( pt1, pt2, cost, speed*su.multipler(), feature.id() ); + } + if ( directionType == 2 || + directionType == 3 ) + { + builder->addArc( pt2, pt1, cost, speed*su.multipler(), feature.id() ); + } } + pt1 = pt2; + isFirstPoint = false; } - pt1 = pt2; - isFirstPoint = false; - } - } // if ( !isFirstPoint ) - pt1 = pt2; - isFirstPoint = false; + } // if ( !isFirstPoint ) + pt1 = pt2; + isFirstPoint = false; + } } // for (it = pl.begin(); it != pl.end(); ++it) emit buildProgress( ++step, featureCount ); } // while( vl->nextFeature(feature) ) From fd235737aad4a82dd74378fdc743b4c12a7a71cc Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 5 Jun 2011 13:45:23 +0200 Subject: [PATCH 55/62] added debugging info to mapserver while trying to resolve blank rendering issues --- src/mapserver/qgswmsserver.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mapserver/qgswmsserver.cpp b/src/mapserver/qgswmsserver.cpp index 4a0f82ca892c..5a898239f4b4 100644 --- a/src/mapserver/qgswmsserver.cpp +++ b/src/mapserver/qgswmsserver.cpp @@ -702,6 +702,9 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& { return 0; } + QFile file("/tmp/wmslog.txt"); + file.open(QIODevice::Append); + file.write( "initialiseRendering parser initial checks ok\n" ); //pass external GML to the SLD parser. std::map::const_iterator gmlIt = mParameterMap.find( "GML" ); @@ -720,6 +723,7 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& delete gmlDoc; } } + file.write( "initialiseRendering parser gml checks ok\n" ); QImage* theImage = createImage(); if ( !theImage ) @@ -732,6 +736,7 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& delete theImage; return 0; } + file.write( "initialiseRendering parser secondary checks ok\n" ); mMapRenderer->setLabelingEngine( new QgsPalLabeling() ); //find out the current scale denominater and set it to the SLD parser @@ -743,6 +748,9 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& layerIdList.clear(); layerIdList = layerSet( layersList, stylesList, mMapRenderer->destinationCrs() ); mMapRenderer->setLayerSet( layerIdList ); + file.write( "initialiseRendering done\n" ); + file.write( mapExtent.toString() ); + file.close(); return theImage; } From 93405b10b9d9210dc88e48f566fe889fe0c3beb8 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 14:20:16 +0200 Subject: [PATCH 56/62] Improve formatting of debug output for maprenderer map dimentions --- src/core/qgsmaprenderer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/qgsmaprenderer.cpp b/src/core/qgsmaprenderer.cpp index dddb4820a696..4d7adb9bd72e 100644 --- a/src/core/qgsmaprenderer.cpp +++ b/src/core/qgsmaprenderer.cpp @@ -190,9 +190,9 @@ void QgsMapRenderer::adjustExtentToSize() dymax = mExtent.yMaximum() + whitespace; } - QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2\n" ).arg( mapUnitsPerPixelX ).arg( mapUnitsPerPixelY ) ); - QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2\n" ).arg( myWidth ).arg( myHeight ) ); - QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2\n" ).arg( mExtent.width() ).arg( mExtent.height() ) ); + QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2\n" ).arg( mapUnitsPerPixelX, 0, 'f', 8 ).arg( mapUnitsPerPixelY, 0, 'f', 8 ) ); + QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2\n" ).arg( myWidth, 0, 'f', 8 ).arg( myHeight, 0, 'f', 8) ); + QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2\n" ).arg( mExtent.width(), 0, 'f',8 ).arg( mExtent.height(), 0, 'f', 8 ) ); QgsDebugMsg( mExtent.toString() ); // update extent @@ -204,7 +204,7 @@ void QgsMapRenderer::adjustExtentToSize() // update the scale updateScale(); - QgsDebugMsg( QString( "Scale (assuming meters as map units) = 1:%1" ).arg( mScale ) ); + QgsDebugMsg( QString( "Scale (assuming meters as map units) = 1:%1" ).arg( mScale, 0, 'f', 8 ) ); newCoordXForm.setParameters( mMapUnitsPerPixel, dxmin, dymin, myHeight ); mRenderContext.setMapToPixel( newCoordXForm ); From 2fe16b599011929a2089e9759f6dd035f38bce4c Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 14:38:16 +0200 Subject: [PATCH 57/62] Added pre-render layer count to maprenderer --- src/core/qgsmaprenderer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/qgsmaprenderer.cpp b/src/core/qgsmaprenderer.cpp index 4d7adb9bd72e..de9aa2c72830 100644 --- a/src/core/qgsmaprenderer.cpp +++ b/src/core/qgsmaprenderer.cpp @@ -836,6 +836,7 @@ void QgsMapRenderer::updateFullExtent() // iterate through the map layers and test each layers extent // against the current min and max values QStringList::iterator it = mLayerSet.begin(); + QgsDebugMsg( QString( "Layer count: %1" ).arg( mLayerSet.count() ) ); while ( it != mLayerSet.end() ) { QgsMapLayer * lyr = registry->mapLayer( *it ); From d967b71c9139d3cf3821c374c2b151fb69aeb2f0 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Fri, 10 Jun 2011 16:12:08 +0200 Subject: [PATCH 58/62] Obsoleted QgsMSLogger as it duplicates functionality from QgsLogger --- src/mapserver/CMakeLists.txt | 1 - src/mapserver/qgis_map_serv.cpp | 66 ++++++------ src/mapserver/qgscapabilitiescache.cpp | 4 +- src/mapserver/qgsconfigcache.cpp | 14 +-- src/mapserver/qgsgetrequesthandler.cpp | 12 +-- src/mapserver/qgshostedrdsbuilder.cpp | 10 +- src/mapserver/qgshostedvdsbuilder.cpp | 10 +- .../qgsinterpolationlayerbuilder.cpp | 8 +- src/mapserver/qgsmapserverlogger.cpp | 86 --------------- src/mapserver/qgsmapserverlogger.h | 55 ---------- src/mapserver/qgsmslayercache.cpp | 19 ++-- src/mapserver/qgsmsutils.cpp | 4 +- src/mapserver/qgsprojectparser.cpp | 15 +-- src/mapserver/qgsremotedatasourcebuilder.cpp | 12 +-- src/mapserver/qgsremoteowsbuilder.cpp | 46 ++++---- src/mapserver/qgssentdatasourcebuilder.cpp | 11 +- src/mapserver/qgssldparser.cpp | 102 +++++++++--------- src/mapserver/qgssldrenderer.cpp | 2 +- src/mapserver/qgssldrule.cpp | 9 +- src/mapserver/qgssoaprequesthandler.cpp | 54 +++++----- src/mapserver/qgswmsserver.cpp | 60 ++++++----- 21 files changed, 231 insertions(+), 369 deletions(-) delete mode 100644 src/mapserver/qgsmapserverlogger.cpp delete mode 100644 src/mapserver/qgsmapserverlogger.h diff --git a/src/mapserver/CMakeLists.txt b/src/mapserver/CMakeLists.txt index bdebbf3066e8..51fd054278b7 100644 --- a/src/mapserver/CMakeLists.txt +++ b/src/mapserver/CMakeLists.txt @@ -29,7 +29,6 @@ SET ( qgis_mapserv_SRCS qgssldrenderer.cpp qgswmsserver.cpp qgsmapserviceexception.cpp - qgsmapserverlogger.cpp qgsmslayercache.cpp qgsfilter.cpp qgssldrule.cpp diff --git a/src/mapserver/qgis_map_serv.cpp b/src/mapserver/qgis_map_serv.cpp index 7f4cfeeb23ba..30e38cadfc6b 100644 --- a/src/mapserver/qgis_map_serv.cpp +++ b/src/mapserver/qgis_map_serv.cpp @@ -23,7 +23,7 @@ map service syntax for SOAP/HTTP POST #include "qgsgetrequesthandler.h" #include "qgssoaprequesthandler.h" #include "qgsproviderregistry.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgswmsserver.h" #include "qgsmaprenderer.h" #include "qgsmapserviceexception.h" @@ -62,7 +62,7 @@ void dummyMessageHandler( QtMsgType type, const char *msg ) output += msg; - QgsMapServerLogger::instance()->printMessage( output ); + QgsDebugMsg( output ); if ( type == QtFatalMsg ) abort(); @@ -73,36 +73,36 @@ void printRequestInfos() { #ifdef QGSMSDEBUG //print out some infos about the request - QgsMSDebugMsg( "************************new request**********************" ); - QgsMSDebugMsg( QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ) ); + QgsDebugMsg( "************************new request**********************" ); + QgsDebugMsg( QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ) ); if ( getenv( "REMOTE_ADDR" ) != NULL ) { - QgsMSDebugMsg( "remote ip: " + QString( getenv( "REMOTE_ADDR" ) ) ); + QgsDebugMsg( "remote ip: " + QString( getenv( "REMOTE_ADDR" ) ) ); } if ( getenv( "REMOTE_HOST" ) != NULL ) { - QgsMSDebugMsg( "remote host: " + QString( getenv( "REMOTE_HOST" ) ) ); + QgsDebugMsg( "remote host: " + QString( getenv( "REMOTE_HOST" ) ) ); } if ( getenv( "REMOTE_USER" ) != NULL ) { - QgsMSDebugMsg( "remote user: " + QString( getenv( "REMOTE_USER" ) ) ); + QgsDebugMsg( "remote user: " + QString( getenv( "REMOTE_USER" ) ) ); } if ( getenv( "REMOTE_IDENT" ) != NULL ) { - QgsMSDebugMsg( "REMOTE_IDENT: " + QString( getenv( "REMOTE_IDENT" ) ) ); + QgsDebugMsg( "REMOTE_IDENT: " + QString( getenv( "REMOTE_IDENT" ) ) ); } if ( getenv( "CONTENT_TYPE" ) != NULL ) { - QgsMSDebugMsg( "CONTENT_TYPE: " + QString( getenv( "CONTENT_TYPE" ) ) ); + QgsDebugMsg( "CONTENT_TYPE: " + QString( getenv( "CONTENT_TYPE" ) ) ); } if ( getenv( "AUTH_TYPE" ) != NULL ) { - QgsMSDebugMsg( "AUTH_TYPE: " + QString( getenv( "AUTH_TYPE" ) ) ); + QgsDebugMsg( "AUTH_TYPE: " + QString( getenv( "AUTH_TYPE" ) ) ); } if ( getenv( "HTTP_USER_AGENT" ) != NULL ) { - QgsMSDebugMsg( "HTTP_USER_AGENT: " + QString( getenv( "HTTP_USER_AGENT" ) ) ); + QgsDebugMsg( "HTTP_USER_AGENT: " + QString( getenv( "HTTP_USER_AGENT" ) ) ); } #endif //QGSMSDEBUG } @@ -110,7 +110,7 @@ void printRequestInfos() QFileInfo defaultProjectFile() { QDir currentDir; - QgsMSDebugMsg( "current directory: " + currentDir.absolutePath() ); + QgsDebugMsg( "current directory: " + currentDir.absolutePath() ); fprintf( FCGI_stderr, "current directory: %s\n", currentDir.absolutePath().toUtf8().constData() ); QStringList nameFilterList; nameFilterList << "*.qgs"; @@ -163,16 +163,12 @@ int main( int argc, char * argv[] ) // Instantiate the plugin directory so that providers are loaded QgsProviderRegistry::instance( QgsApplication::pluginPath() ); -#if defined(QGSMSDEBUG) && !defined(_MSC_VER) - //write to qgis_wms_server.log in application directory - QgsMapServerLogger::instance()->setLogFilePath( qgsapp.applicationDirPath() + "/qgis_wms_server.log" ); -#endif - QgsMSDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() ); - QgsMSDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() ); - QgsMSDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() ); - QgsMSDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() ); + QgsDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() ); + QgsDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() ); + QgsDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() ); + QgsDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() ); - QgsMSDebugMsg( qgsapp.applicationDirPath() + "/qgis_wms_server.log" ); + QgsDebugMsg( qgsapp.applicationDirPath() + "/qgis_wms_server.log" ); //create config cache and search for config files in the current directory. //These configurations are used if no mapfile parameter is present in the request @@ -208,18 +204,18 @@ int main( int argc, char * argv[] ) { if ( strcmp( requestMethod, "POST" ) == 0 ) { - QgsMSDebugMsg( "Creating QgsSOAPRequestHandler" ); + QgsDebugMsg( "Creating QgsSOAPRequestHandler" ); theRequestHandler = new QgsSOAPRequestHandler(); } else { - QgsMSDebugMsg( "Creating QgsGetRequestHandler" ); + QgsDebugMsg( "Creating QgsGetRequestHandler" ); theRequestHandler = new QgsGetRequestHandler(); } } else { - QgsMSDebugMsg( "Creating QgsGetRequestHandler" ); + QgsDebugMsg( "Creating QgsGetRequestHandler" ); theRequestHandler = new QgsGetRequestHandler(); } @@ -231,7 +227,7 @@ int main( int argc, char * argv[] ) } catch ( QgsMapServiceException& e ) { - QgsMSDebugMsg( "An exception was thrown during input parsing" ); + QgsDebugMsg( "An exception was thrown during input parsing" ); theRequestHandler->sendServiceException( e ); continue; } @@ -247,7 +243,7 @@ int main( int argc, char * argv[] ) QgsConfigParser* adminConfigParser = QgsConfigCache::instance()->searchConfiguration( configFilePath ); if ( !adminConfigParser ) { - QgsMSDebugMsg( "parse error on config file " + configFilePath ); + QgsDebugMsg( "parse error on config file " + configFilePath ); theRequestHandler->sendServiceException( QgsMapServiceException( "", "Configuration file problem : perhaps you left off the .qgs extension?" ) ); continue; } @@ -260,7 +256,7 @@ int main( int argc, char * argv[] ) if ( serviceIt == parameterMap.end() ) { //tell the user that service parameter is mandatory - QgsMSDebugMsg( "unable to find 'SERVICE' parameter, exiting..." ); + QgsDebugMsg( "unable to find 'SERVICE' parameter, exiting..." ); theRequestHandler->sendServiceException( QgsMapServiceException( "ServiceNotSpecified", "Service not specified. The SERVICE parameter is mandatory" ) ); delete theRequestHandler; continue; @@ -285,7 +281,7 @@ int main( int argc, char * argv[] ) if ( requestIt == parameterMap.end() ) { //do some error handling - QgsMSDebugMsg( "unable to find 'REQUEST' parameter, exiting..." ); + QgsDebugMsg( "unable to find 'REQUEST' parameter, exiting..." ); theRequestHandler->sendServiceException( QgsMapServiceException( "OperationNotSupported", "Please check the value of the REQUEST parameter" ) ); delete theRequestHandler; delete theServer; @@ -297,7 +293,7 @@ int main( int argc, char * argv[] ) const QDomDocument* capabilitiesDocument = capabilitiesCache.searchCapabilitiesDocument( configFilePath ); if ( !capabilitiesDocument ) //capabilities xml not in cache. Create a new one { - QgsMSDebugMsg( "Capabilities document not found in cache" ); + QgsDebugMsg( "Capabilities document not found in cache" ); QDomDocument doc; try { @@ -315,7 +311,7 @@ int main( int argc, char * argv[] ) } else { - QgsMSDebugMsg( "Found capabilities document in cache" ); + QgsDebugMsg( "Found capabilities document in cache" ); } if ( capabilitiesDocument ) @@ -335,7 +331,7 @@ int main( int argc, char * argv[] ) } catch ( QgsMapServiceException& ex ) { - QgsMSDebugMsg( "Catched exception during GetMap request" ); + QgsDebugMsg( "Catched exception during GetMap request" ); theRequestHandler->sendServiceException( ex ); delete theRequestHandler; delete theServer; @@ -344,13 +340,13 @@ int main( int argc, char * argv[] ) if ( result ) { - QgsMSDebugMsg( "Sending GetMap response" ); + QgsDebugMsg( "Sending GetMap response" ); theRequestHandler->sendGetMapResponse( serviceIt->second, result ); } else { //do some error handling - QgsMSDebugMsg( "result image is 0" ); + QgsDebugMsg( "result image is 0" ); } delete result; delete theRequestHandler; @@ -420,14 +416,14 @@ int main( int argc, char * argv[] ) if ( result ) { - QgsMSDebugMsg( "Sending GetLegendGraphics response" ); + QgsDebugMsg( "Sending GetLegendGraphics response" ); //sending is the same for GetMap and GetLegendGraphics theRequestHandler->sendGetMapResponse( serviceIt->second, result ); } else { //do some error handling - QgsMSDebugMsg( "result image is 0" ); + QgsDebugMsg( "result image is 0" ); } delete result; delete theRequestHandler; diff --git a/src/mapserver/qgscapabilitiescache.cpp b/src/mapserver/qgscapabilitiescache.cpp index 4989ba86b642..8c6f2e427c4e 100644 --- a/src/mapserver/qgscapabilitiescache.cpp +++ b/src/mapserver/qgscapabilitiescache.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include "qgscapabilitiescache.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include QgsCapabilitiesCache::QgsCapabilitiesCache() @@ -57,7 +57,7 @@ void QgsCapabilitiesCache::insertCapabilitiesDocument( const QString& configFile void QgsCapabilitiesCache::removeChangedEntry( const QString& path ) { - QgsMSDebugMsg( "Remove capabilities cache entry because file changed" ); + QgsDebugMsg( "Remove capabilities cache entry because file changed" ); QHash< QString, QDomDocument >::iterator it = mCachedCapabilities.find( path ); if ( it != mCachedCapabilities.end() ) { diff --git a/src/mapserver/qgsconfigcache.cpp b/src/mapserver/qgsconfigcache.cpp index e2597b092340..254136391e99 100644 --- a/src/mapserver/qgsconfigcache.cpp +++ b/src/mapserver/qgsconfigcache.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include "qgsconfigcache.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmslayercache.h" #include "qgsprojectparser.h" #include "qgssldparser.h" @@ -54,12 +54,12 @@ QgsConfigParser* QgsConfigCache::searchConfiguration( const QString& filePath ) QHash::const_iterator configIt = mCachedConfigurations.find( filePath ); if ( configIt == mCachedConfigurations.constEnd() ) { - QgsMSDebugMsg( "Create new configuration" ); + QgsDebugMsg( "Create new configuration" ); p = insertConfiguration( filePath ); } else { - QgsMSDebugMsg( "Return configuration from cache" ); + QgsDebugMsg( "Return configuration from cache" ); p = configIt.value(); } @@ -89,7 +89,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath ) QFile* configFile = new QFile( filePath ); if ( !configFile->exists() || !configFile->open( QIODevice::ReadOnly ) ) { - QgsMSDebugMsg( "File unreadable: " + filePath ); + QgsDebugMsg( "File unreadable: " + filePath ); delete configFile; return 0; } @@ -100,7 +100,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath ) int line, column; if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) ) { - QgsMSDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " ) + QgsDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " ) .arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) ); delete configFile; delete configDoc; @@ -120,7 +120,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath ) } else { - QgsMSDebugMsg( "SLD or qgis expected in " + filePath ); + QgsDebugMsg( "SLD or qgis expected in " + filePath ); delete configDoc; return 0; } @@ -133,7 +133,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath ) void QgsConfigCache::removeChangedEntry( const QString& path ) { - QgsMSDebugMsg( "Remove config cache entry because file changed" ); + QgsDebugMsg( "Remove config cache entry because file changed" ); QHash::iterator configIt = mCachedConfigurations.find( path ); if ( configIt != mCachedConfigurations.end() ) { diff --git a/src/mapserver/qgsgetrequesthandler.cpp b/src/mapserver/qgsgetrequesthandler.cpp index bed0fc6f2ee8..7e569f51a32b 100644 --- a/src/mapserver/qgsgetrequesthandler.cpp +++ b/src/mapserver/qgsgetrequesthandler.cpp @@ -1,6 +1,6 @@ #include "qgsgetrequesthandler.h" #include "qgsftptransaction.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmapserviceexception.h" #include "qgsremotedatasourcebuilder.h" #include "qgshttptransaction.h" @@ -24,11 +24,11 @@ std::map QgsGetRequestHandler::parseInput() if ( qs ) { queryString = QString( qs ); - QgsMSDebugMsg( "query string is: " + queryString ); + QgsDebugMsg( "query string is: " + queryString ); } else { - QgsMSDebugMsg( "error, no query string found" ); + QgsDebugMsg( "error, no query string found" ); return parameters; //no query string? something must be wrong... } @@ -84,7 +84,7 @@ std::map QgsGetRequestHandler::parseInput() } parameters.insert( std::make_pair( key.toUpper(), value ) ); - QgsMSDebugMsg( "inserting pair " + key.toUpper() + " // " + value + " into the parameter map" ); + QgsDebugMsg( "inserting pair " + key.toUpper() + " // " + value + " into the parameter map" ); } //feature info format? @@ -100,7 +100,7 @@ std::map QgsGetRequestHandler::parseInput() { QString formatString = formatIt->second; - QgsMapServerLogger::instance()->printMessage( "formatString is: " + formatString ); + QgsDebugMsg( QString( "formatString is: %1" ).arg( formatString ) ); //remove the image/ in front of the format if ( formatString.compare( "image/png", Qt::CaseInsensitive ) == 0 || formatString.compare( "png", Qt::CaseInsensitive ) == 0 ) @@ -164,7 +164,7 @@ void QgsGetRequestHandler::sendGetStyleResponse( const QDomDocument& doc ) const void QgsGetRequestHandler::sendGetFeatureInfoResponse( const QDomDocument& infoDoc, const QString& infoFormat ) const { QByteArray ba; - QgsMSDebugMsg( "Info format is:" + infoFormat ); + QgsDebugMsg( "Info format is:" + infoFormat ); if ( infoFormat == "text/xml" ) { diff --git a/src/mapserver/qgshostedrdsbuilder.cpp b/src/mapserver/qgshostedrdsbuilder.cpp index 608fc18468ee..8c9dbe384c0f 100644 --- a/src/mapserver/qgshostedrdsbuilder.cpp +++ b/src/mapserver/qgshostedrdsbuilder.cpp @@ -17,7 +17,7 @@ ***************************************************************************/ #include "qgshostedrdsbuilder.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmslayercache.h" #include "qgsrasterlayer.h" #include "qgscoordinatereferencesystem.h" @@ -35,7 +35,7 @@ QgsHostedRDSBuilder::~QgsHostedRDSBuilder() QgsMapLayer* QgsHostedRDSBuilder::createMapLayer( const QDomElement& elem, const QString& layerName, QList& filesToRemove, QList& layersToRemove, bool allowCaching ) const { - QgsMSDebugMsg( "entering." ); + QgsDebugMsg( "entering." ); if ( elem.isNull() ) { @@ -45,12 +45,12 @@ QgsMapLayer* QgsHostedRDSBuilder::createMapLayer( const QDomElement& elem, const QString uri = elem.attribute( "uri", "not found" ); if ( uri == "not found" ) { - QgsMSDebugMsg( "Uri not found" ); + QgsDebugMsg( "Uri not found" ); return 0; } else { - QgsMSDebugMsg( "Trying to get hostedrds layer from cache with uri: " + uri ); + QgsDebugMsg( "Trying to get hostedrds layer from cache with uri: " + uri ); QgsRasterLayer* rl = 0; if ( allowCaching ) { @@ -58,7 +58,7 @@ QgsMapLayer* QgsHostedRDSBuilder::createMapLayer( const QDomElement& elem, const } if ( !rl ) { - QgsMSDebugMsg( "hostedrds layer not in cache, so create and insert it" ); + QgsDebugMsg( "hostedrds layer not in cache, so create and insert it" ); rl = new QgsRasterLayer( uri, layerNameFromUri( uri ) ); if ( allowCaching ) { diff --git a/src/mapserver/qgshostedvdsbuilder.cpp b/src/mapserver/qgshostedvdsbuilder.cpp index 9be42e14d647..f767baccf4bf 100644 --- a/src/mapserver/qgshostedvdsbuilder.cpp +++ b/src/mapserver/qgshostedvdsbuilder.cpp @@ -17,7 +17,7 @@ #include "qgshostedvdsbuilder.h" #include "qgsmslayercache.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgscoordinatereferencesystem.h" #include "qgsvectorlayer.h" #include @@ -44,7 +44,7 @@ QgsMapLayer* QgsHostedVDSBuilder::createMapLayer( const QDomElement& elem, const if ( providerType == "not found" || uri == "not found" ) { - QgsMSDebugMsg( "error, provider type not found" ); + QgsDebugMsg( "error, provider type not found" ); return 0; } @@ -52,18 +52,18 @@ QgsMapLayer* QgsHostedVDSBuilder::createMapLayer( const QDomElement& elem, const if ( allowCaching ) //take layer from cache if allowed { - QgsMSDebugMsg( "Taking hostedvds layer from cash" ); + QgsDebugMsg( "Taking hostedvds layer from cash" ); ml = QgsMSLayerCache::instance()->searchLayer( uri, layerName ); } if ( !ml ) { - QgsMSDebugMsg( "hostedvds layer not in cash, so create and insert it" ); + QgsDebugMsg( "hostedvds layer not in cash, so create and insert it" ); ml = new QgsVectorLayer( uri, layerNameFromUri( uri ), providerType ); if ( !ml || !ml->isValid() ) { - QgsMSDebugMsg( "error, VectorLayer is 0 or invalid" ); + QgsDebugMsg( "error, VectorLayer is 0 or invalid" ); delete ml; return 0; } diff --git a/src/mapserver/qgsinterpolationlayerbuilder.cpp b/src/mapserver/qgsinterpolationlayerbuilder.cpp index f43297c73c51..afaddf5d75e3 100644 --- a/src/mapserver/qgsinterpolationlayerbuilder.cpp +++ b/src/mapserver/qgsinterpolationlayerbuilder.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include "qgsinterpolationlayerbuilder.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsrasterlayer.h" #include "qgsvectordataprovider.h" #include "qgsvectorlayer.h" @@ -53,7 +53,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement& el QDomNodeList interpolationList = elem.elementsByTagName( "Interpolation" ); if ( interpolationList.size() < 1 ) { - QgsMSDebugMsg( "No Interpolation element found" ); + QgsDebugMsg( "No Interpolation element found" ); return 0; } QDomElement interpolationElem = interpolationList.at( 0 ).toElement(); @@ -122,7 +122,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement& el nRows = resolutionElem.attribute( "nrows" ).toInt(); if ( nCols == 0 && nRows == 0 ) { - QgsMSDebugMsg( "Reading of resolution failed" ); + QgsDebugMsg( "Reading of resolution failed" ); return 0; } } @@ -137,7 +137,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement& el QgsGridFileWriter gridWriter( theInterpolator, tmpFile->fileName(), extent, nCols, nRows, extent.width() / nCols, extent.height() / nRows ); if ( gridWriter.writeFile( false ) != 0 ) { - QgsMSDebugMsg( "Interpolation of raster failed" ); + QgsDebugMsg( "Interpolation of raster failed" ); return 0; } diff --git a/src/mapserver/qgsmapserverlogger.cpp b/src/mapserver/qgsmapserverlogger.cpp deleted file mode 100644 index 1fa80f7bac41..000000000000 --- a/src/mapserver/qgsmapserverlogger.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/*************************************************************************** - qgsmapserverlogger.cpp - ---------------------- - begin : July 04, 2006 - copyright : (C) 2006 by Marco Hugentobler - email : marco dot hugentobler at karto dot baug dot ethz dot ch - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 "qgsmapserverlogger.h" - -#ifdef _MSC_VER -#include -#endif - -QgsMapServerLogger* QgsMapServerLogger::mInstance = 0; - -QgsMapServerLogger::QgsMapServerLogger() -{ - -} -QgsMapServerLogger::~QgsMapServerLogger() -{ - delete mInstance; -} - -QgsMapServerLogger* QgsMapServerLogger::instance() -{ - if ( mInstance == 0 ) - { - mInstance = new QgsMapServerLogger(); - } - return mInstance; -} - -int QgsMapServerLogger::setLogFilePath( const QString& path ) -{ - mLogFile.setFileName( path ); - if ( mLogFile.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ) ) - { - mTextStream.setDevice( &mLogFile ); - return 0; - } - return 1; -} - -void QgsMapServerLogger::printMessage( const QString& message ) -{ - if ( !mLogFile.isOpen() ) - { -#ifdef _MSC_VER - ::OutputDebugString( message .toLocal8Bit() ); - ::OutputDebugString( "\n" ); -#endif - return; - } - - mTextStream << message << endl; -} - -void QgsMapServerLogger::printChar( QChar c ) -{ - if ( !mLogFile.isOpen() ) - return; - - mTextStream << c; -} - -#ifdef QGSMSDEBUG -void QgsMapServerLogger::printMessage( const char *file, const char *function, int line, const QString& message ) -{ -#if defined(_MSC_VER) - printMessage( QString( "%1(%2): (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( message ) ); -#else - printMessage( QString( "%1: %2: (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( message ) ); -#endif -} -#endif diff --git a/src/mapserver/qgsmapserverlogger.h b/src/mapserver/qgsmapserverlogger.h deleted file mode 100644 index 9470eaef1825..000000000000 --- a/src/mapserver/qgsmapserverlogger.h +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - qgsmapserverlogger.h - -------------------- - begin : July 04, 2006 - copyright : (C) 2006 by Marco Hugentobler - email : marco dot hugentobler at karto dot baug dot ethz dot ch - ***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ - -#ifndef QGSMAPSERVERLOGGER_H -#define QGSMAPSERVERLOGGER_H - -#include -#include - -#ifdef QGSMSDEBUG -#define QgsMSDebugMsg(str) QgsMapServerLogger::instance()->printMessage(__FILE__, __FUNCTION__, __LINE__, str) -#else -#define QgsMSDebugMsg(str) -#endif - -class QString; - -/**A singleton class that supports writing server log messages into a log file*/ -class QgsMapServerLogger -{ - public: - ~QgsMapServerLogger(); - static QgsMapServerLogger* instance(); - /**Sets a new log file. */ - int setLogFilePath( const QString& path ); - /**Print a message to the Logfile*/ - void printMessage( const QString& message ); - /**Prints only one char*/ - void printChar( QChar c ); -#ifdef QGSMSDEBUG - /**Print a message to the Logfile*/ - void printMessage( const char *file, const char *function, int line, const QString& message ); -#endif - private: - static QgsMapServerLogger* mInstance; - QgsMapServerLogger(); - QFile mLogFile; - QTextStream mTextStream; -}; - -#endif diff --git a/src/mapserver/qgsmslayercache.cpp b/src/mapserver/qgsmslayercache.cpp index 8142b277ebc2..445273b918c9 100644 --- a/src/mapserver/qgsmslayercache.cpp +++ b/src/mapserver/qgsmslayercache.cpp @@ -17,7 +17,8 @@ #include "qgsmslayercache.h" #include "qgsvectorlayer.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" +#include //maximum number of layers in the cache (and upper limit for layers in one published project) #define DEFAULT_MAX_N_LAYERS 50 @@ -40,7 +41,7 @@ QgsMSLayerCache::QgsMSLayerCache() QgsMSLayerCache::~QgsMSLayerCache() { - QgsMSDebugMsg( "removing all entries" ); + QgsDebugMsg( "removing all entries" ); QHash, QgsMSLayerCacheEntry>::iterator it; for ( it = mEntries.begin(); it != mEntries.end(); ++it ) { @@ -51,7 +52,7 @@ QgsMSLayerCache::~QgsMSLayerCache() void QgsMSLayerCache::insertLayer( const QString& url, const QString& layerName, QgsMapLayer* layer, const QList& tempFiles ) { - QgsMSDebugMsg( "inserting layer" ); + QgsDebugMsg( "inserting layer" ); if ( mEntries.size() > std::max( DEFAULT_MAX_N_LAYERS, mProjectMaxLayers ) ) //force cache layer examination after 10 inserted layers { updateEntries(); @@ -80,7 +81,7 @@ QgsMapLayer* QgsMSLayerCache::searchLayer( const QString& url, const QString& la QHash, QgsMSLayerCacheEntry>::iterator it = mEntries.find( urlNamePair ); if ( it == mEntries.end() ) { - QgsMSDebugMsg( "Layer not found in cache" ); + QgsDebugMsg( "Layer not found in cache" ); return 0; } else @@ -94,14 +95,14 @@ QgsMapLayer* QgsMSLayerCache::searchLayer( const QString& url, const QString& la vl->removeOverlay( "diagram" ); } #endif //DIAGRAMSERVER - QgsMSDebugMsg( "Layer found in cache" ); + QgsDebugMsg( "Layer found in cache" ); return it->layerPointer; } } void QgsMSLayerCache::updateEntries() { - QgsMSDebugMsg( "updateEntries" ); + QgsDebugMsg( "updateEntries" ); int entriesToDelete = mEntries.size() - std::max( DEFAULT_MAX_N_LAYERS, mProjectMaxLayers ); if ( entriesToDelete < 1 ) { @@ -121,7 +122,7 @@ void QgsMSLayerCache::removeLeastUsedEntry() { return; } - QgsMSDebugMsg( "removeLeastUsedEntry" ); + QgsDebugMsg( "removeLeastUsedEntry" ); QHash, QgsMSLayerCacheEntry>::iterator it = mEntries.begin(); QHash, QgsMSLayerCacheEntry>::iterator lowest_it = it; time_t lowest_time = it->lastUsedTime; @@ -150,8 +151,8 @@ void QgsMSLayerCache::freeEntryRessources( QgsMSLayerCacheEntry& entry ) QFile removeFile( *it ); if ( !removeFile.remove() ) { - QgsMSDebugMsg( "could not remove file: " + *it ); - QgsMSDebugMsg( removeFile.errorString() ); + QgsDebugMsg( "could not remove file: " + *it ); + QgsDebugMsg( removeFile.errorString() ); } } } diff --git a/src/mapserver/qgsmsutils.cpp b/src/mapserver/qgsmsutils.cpp index 67a21a584c36..cb3da68309f6 100644 --- a/src/mapserver/qgsmsutils.cpp +++ b/src/mapserver/qgsmsutils.cpp @@ -1,5 +1,5 @@ #include "qgsmsutils.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include #include #include @@ -49,7 +49,7 @@ QString QgsMSUtils::createTempFilePath() tempFilePath += "1"; testFile.setFile( tempFilePath ); } - QgsMapServerLogger::instance()->printMessage( tempFilePath ); + QgsDebugMsg( tempFilePath ); return tempFilePath; } diff --git a/src/mapserver/qgsprojectparser.cpp b/src/mapserver/qgsprojectparser.cpp index cd8ba50d3de8..ba490777cffa 100644 --- a/src/mapserver/qgsprojectparser.cpp +++ b/src/mapserver/qgsprojectparser.cpp @@ -19,7 +19,7 @@ #include "qgsconfigcache.h" #include "qgsepsgcache.h" #include "qgsmslayercache.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmapserviceexception.h" #include "qgsrasterlayer.h" #include "qgsvectorlayer.h" @@ -35,6 +35,7 @@ #include "qgscomposershape.h" #include "QFileInfo" +#include "QTextStream" QgsProjectParser::QgsProjectParser( QDomDocument* xmlDoc, const QString& filePath ): QgsConfigParser(), mXMLDoc( xmlDoc ), mProjectPath( filePath ) @@ -73,7 +74,7 @@ void QgsProjectParser::layersAndStylesCapabilities( QDomElement& parentElement, QgsMapLayer *layer = createLayerFromElement( *layerIt ); if ( layer ) { - QgsMSDebugMsg( QString( "add layer %1 to map" ).arg( layer->id() ) ); + QgsDebugMsg( QString( "add layer %1 to map" ).arg( layer->id() ) ); layerMap.insert( layer->id(), layer ); } #if QGSMSDEBUG @@ -82,7 +83,7 @@ void QgsProjectParser::layersAndStylesCapabilities( QDomElement& parentElement, QString buf; QTextStream s( &buf ); layerIt->save( s, 0 ); - QgsMSDebugMsg( QString( "layer %1 not found" ).arg( buf ) ); + QgsDebugMsg( QString( "layer %1 not found" ).arg( buf ) ); } #endif } @@ -238,14 +239,14 @@ void QgsProjectParser::addLayers( QDomDocument &doc, if ( !layerMap.contains( id ) ) { - QgsMSDebugMsg( QString( "layer %1 not found in map - layer cache to small?" ).arg( id ) ); + QgsDebugMsg( QString( "layer %1 not found in map - layer cache to small?" ).arg( id ) ); continue; } QgsMapLayer *currentLayer = layerMap[ id ]; if ( !currentLayer ) { - QgsMSDebugMsg( QString( "layer %1 not found" ).arg( id ) ); + QgsDebugMsg( QString( "layer %1 not found" ).arg( id ) ); continue; } @@ -301,7 +302,7 @@ void QgsProjectParser::addLayers( QDomDocument &doc, } else { - QgsMSDebugMsg( "unexpected child element" ); + QgsDebugMsg( "unexpected child element" ); continue; } @@ -309,7 +310,7 @@ void QgsProjectParser::addLayers( QDomDocument &doc, QString buf; QTextStream s( &buf ); layerElem.save( s, 0 ); - QgsMSDebugMsg( QString( "adding layer: %1" ).arg( buf ) ); + QgsDebugMsg( QString( "adding layer: %1" ).arg( buf ) ); #endif parentElem.appendChild( layerElem ); diff --git a/src/mapserver/qgsremotedatasourcebuilder.cpp b/src/mapserver/qgsremotedatasourcebuilder.cpp index 2adda4f93893..d25e925e2d7e 100644 --- a/src/mapserver/qgsremotedatasourcebuilder.cpp +++ b/src/mapserver/qgsremotedatasourcebuilder.cpp @@ -18,7 +18,7 @@ #include "qgsremotedatasourcebuilder.h" #include "qgsftptransaction.h" #include "qgshttptransaction.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsrasterlayer.h" #include "qgsvectorlayer.h" #include @@ -37,7 +37,7 @@ QgsRemoteDataSourceBuilder::~QgsRemoteDataSourceBuilder() QgsMapLayer* QgsRemoteDataSourceBuilder::createMapLayer( const QDomElement& elem, const QString& layerName, QList& filesToRemove, QList& layersToRemove, bool allowCaching ) const { - QgsMSDebugMsg( "entering." ); + QgsDebugMsg( "entering." ); QgsMapLayer* theLayer = 0; if ( elem.tagName() == "RemoteRDS" ) { @@ -56,7 +56,7 @@ QgsMapLayer* QgsRemoteDataSourceBuilder::createMapLayer( const QDomElement& elem QgsRasterLayer* QgsRemoteDataSourceBuilder::rasterLayerFromRemoteRDS( const QDomElement& remoteRDSElem, const QString& layerName, QList& filesToRemove, QList& layersToRemove, bool allowCaching ) const { - QgsMSDebugMsg( "entering." ); + QgsDebugMsg( "entering." ); //load file with QgsHttpTransaction or QgsFtpTransaction QByteArray fileContents; QString uri = remoteRDSElem.text(); @@ -75,7 +75,7 @@ QgsRasterLayer* QgsRemoteDataSourceBuilder::rasterLayerFromRemoteRDS( const QDom } else { - QgsMSDebugMsg( "Error, creation of temp file failed" ); + QgsDebugMsg( "Error, creation of temp file failed" ); delete tmpFile; return 0; } @@ -140,7 +140,7 @@ QgsVectorLayer* QgsRemoteDataSourceBuilder::vectorLayerFromRemoteVDS( const QDom if ( !( vl->isValid() ) ) { - QgsMapServerLogger::instance()->printMessage( "vl is not valid" ); + QgsDebugMsg( "vl is not valid" ); } layersToRemove.push_back( vl ); @@ -155,7 +155,7 @@ int QgsRemoteDataSourceBuilder::loadData( const QString& url, QByteArray& data ) QgsHttpTransaction http( url ); if ( !http.getSynchronously( data ) ) { - QgsMSDebugMsg( "Error, loading from http failed" ); + QgsDebugMsg( "Error, loading from http failed" ); return 1; //no success } } diff --git a/src/mapserver/qgsremoteowsbuilder.cpp b/src/mapserver/qgsremoteowsbuilder.cpp index 606bffb83f12..4f911be76e52 100644 --- a/src/mapserver/qgsremoteowsbuilder.cpp +++ b/src/mapserver/qgsremoteowsbuilder.cpp @@ -17,7 +17,7 @@ #include "qgsremoteowsbuilder.h" #include "qgshttptransaction.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmslayercache.h" #include "qgsrasterlayer.h" #include "qgsvectorlayer.h" @@ -50,7 +50,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const QDomNode serviceNode = elem.namedItem( "Service" ); if ( serviceNode.isNull() ) { - QgsMSDebugMsg( "No node found, returning 0" ); + QgsDebugMsg( "No node found, returning 0" ); return 0; //service node is necessary } @@ -58,7 +58,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const QDomNode onlineResourceNode = elem.namedItem( "OnlineResource" ); if ( onlineResourceNode.isNull() ) { - QgsMSDebugMsg( "No element, returning 0" ); + QgsDebugMsg( "No element, returning 0" ); return 0; } @@ -122,7 +122,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const } else if ( serviceName == "WCS" ) { - QgsMSDebugMsg( "Trying to get WCS layer" ); + QgsDebugMsg( "Trying to get WCS layer" ); result = wcsLayerFromUrl( url, layerName, filesToRemove, layersToRemove ); } else if ( serviceName == "SOS" ) @@ -132,7 +132,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const if ( !result || !result->isValid() ) { - QgsMSDebugMsg( "Error, maplayer is 0 or invalid" ); + QgsDebugMsg( "Error, maplayer is 0 or invalid" ); if ( result ) { delete result; @@ -145,7 +145,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const QgsRasterLayer* QgsRemoteOWSBuilder::wmsLayerFromUrl( const QString& url, const QString& layerName, QList& layersToRemove, bool allowCaching ) const { - QgsMSDebugMsg( "Entering" ); + QgsDebugMsg( "Entering" ); QgsRasterLayer* result = 0; QString baseUrl, format, crs; QStringList layerList, styleList; @@ -193,11 +193,11 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wmsLayerFromUrl( const QString& url, const } } - QgsMSDebugMsg( "baseUrl: " + baseUrl ); - QgsMSDebugMsg( "format: " + format ); - QgsMSDebugMsg( "crs: " + crs ); - QgsMSDebugMsg( "layerList first item: " + layerList.at( 0 ) ); - QgsMSDebugMsg( "styleList first item: " + styleList.at( 0 ) ); + QgsDebugMsg( "baseUrl: " + baseUrl ); + QgsDebugMsg( "format: " + format ); + QgsDebugMsg( "crs: " + crs ); + QgsDebugMsg( "layerList first item: " + layerList.at( 0 ) ); + QgsDebugMsg( "styleList first item: " + styleList.at( 0 ) ); result = new QgsRasterLayer( 0, baseUrl, "", "wms", layerList, styleList, format, crs ); if ( !result->isValid() ) @@ -219,7 +219,7 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wmsLayerFromUrl( const QString& url, const QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const QString& layerName, QList& filesToRemove, QList& layersToRemove, bool allowCaching ) const { - QgsMSDebugMsg( "Entering" ); + QgsDebugMsg( "Entering" ); //write server url and coverage name to a temporary file QString fileName = createTempFile(); @@ -239,13 +239,13 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const filesToRemove.push_back( tmpFile ); //make sure the temporary file gets deleted after each request - QgsMSDebugMsg( "opening successful" ); - QgsMSDebugMsg( "url: " + url ); + QgsDebugMsg( "opening successful" ); + QgsDebugMsg( "url: " + url ); //extract server url and coverage name from string QStringList serverSplit = url.split( "?" ); if ( serverSplit.size() < 2 ) { - QgsMSDebugMsg( "error, no '?' contained in url" ); + QgsDebugMsg( "error, no '?' contained in url" ); return 0; } QString serverUrl = serverSplit.at( 0 ); @@ -267,7 +267,7 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const if ( coverageName.isEmpty() ) { - QgsMSDebugMsg( "coverage name is empty" ); + QgsDebugMsg( "coverage name is empty" ); return 0; } @@ -276,8 +276,8 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const format = "GeoTIFF"; //use geotiff as default } - QgsMSDebugMsg( "wcs server url: " + serverUrl ); - QgsMSDebugMsg( "coverage name: " + coverageName ); + QgsDebugMsg( "wcs server url: " + serverUrl ); + QgsDebugMsg( "coverage name: " + coverageName ); //fetch WCS layer in the current resolution as geotiff QString wcsRequest = serverUrl + "?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=" + coverageName + "&FORMAT=" + format; @@ -289,7 +289,7 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const crsIt = mParameterMap.find( "SRS" ); if ( crsIt == mParameterMap.end() ) { - QgsMSDebugMsg( "No CRS or SRS parameter found for wcs layer, returning 0" ); + QgsDebugMsg( "No CRS or SRS parameter found for wcs layer, returning 0" ); return 0; } } @@ -300,7 +300,7 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const std::map::const_iterator widthIt = mParameterMap.find( "WIDTH" ); if ( widthIt == mParameterMap.end() ) { - QgsMSDebugMsg( "No WIDTH parameter found for wcs layer, returning 0" ); + QgsDebugMsg( "No WIDTH parameter found for wcs layer, returning 0" ); return 0; } wcsRequest += "&WIDTH="; @@ -310,7 +310,7 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const std::map::const_iterator heightIt = mParameterMap.find( "HEIGHT" ); if ( heightIt == mParameterMap.end() ) { - QgsMSDebugMsg( "No HEIGHT parameter found for wcs layer, returning 0" ); + QgsDebugMsg( "No HEIGHT parameter found for wcs layer, returning 0" ); return 0; } wcsRequest += "&HEIGHT="; @@ -320,13 +320,13 @@ QgsRasterLayer* QgsRemoteOWSBuilder::wcsLayerFromUrl( const QString& url, const std::map::const_iterator bboxIt = mParameterMap.find( "BBOX" ); if ( bboxIt == mParameterMap.end() ) { - QgsMSDebugMsg( "No BBOX parameter found for wcs layer, returning 0" ); + QgsDebugMsg( "No BBOX parameter found for wcs layer, returning 0" ); return 0; } wcsRequest += "&BBOX="; wcsRequest += bboxIt->second; - QgsMSDebugMsg( "WCS request is: " + wcsRequest ); + QgsDebugMsg( "WCS request is: " + wcsRequest ); //make request and store byte array into temporary file QgsHttpTransaction httpTransaction( wcsRequest ); diff --git a/src/mapserver/qgssentdatasourcebuilder.cpp b/src/mapserver/qgssentdatasourcebuilder.cpp index 40abaa45b7f1..c4945e1df5ca 100644 --- a/src/mapserver/qgssentdatasourcebuilder.cpp +++ b/src/mapserver/qgssentdatasourcebuilder.cpp @@ -16,12 +16,13 @@ ***************************************************************************/ #include "qgssentdatasourcebuilder.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsrasterlayer.h" #include "qgsvectorlayer.h" #include #include #include +#include QgsSentDataSourceBuilder::QgsSentDataSourceBuilder() { @@ -66,10 +67,10 @@ QgsVectorLayer* QgsSentDataSourceBuilder::vectorLayerFromSentVDS( const QDomElem QgsVectorLayer* theVectorLayer = new QgsVectorLayer( tmpFile->fileName(), layerNameFromUri( tmpFile->fileName() ), "WFS" ); if ( !theVectorLayer || !theVectorLayer->isValid() ) { - QgsMSDebugMsg( "invalid maplayer" ); + QgsDebugMsg( "invalid maplayer" ); return 0; } - QgsMSDebugMsg( "returning maplayer" ); + QgsDebugMsg( "returning maplayer" ); layersToRemove.push_back( theVectorLayer ); //make sure the layer gets deleted after each request @@ -84,7 +85,7 @@ QgsVectorLayer* QgsSentDataSourceBuilder::vectorLayerFromSentVDS( const QDomElem QgsRasterLayer* QgsSentDataSourceBuilder::rasterLayerFromSentRDS( const QDomElement& sentRDSElem, QList& filesToRemove, QList& layersToRemove ) const { - QgsMSDebugMsg( "Entering" ); + QgsDebugMsg( "Entering" ); QString tempFilePath = createTempFile(); if ( tempFilePath.isEmpty() ) { @@ -125,7 +126,7 @@ QgsRasterLayer* QgsSentDataSourceBuilder::rasterLayerFromSentRDS( const QDomElem } } - QgsMSDebugMsg( "TempFilePath is: " + tempFilePath ); + QgsDebugMsg( "TempFilePath is: " + tempFilePath ); tmpFile->close(); QgsRasterLayer* rl = new QgsRasterLayer( tmpFile->fileName(), layerNameFromUri( tmpFile->fileName() ) ); diff --git a/src/mapserver/qgssldparser.cpp b/src/mapserver/qgssldparser.cpp index 823ad77e70f3..451bd5c850d0 100644 --- a/src/mapserver/qgssldparser.cpp +++ b/src/mapserver/qgssldparser.cpp @@ -27,7 +27,7 @@ #include "qgsvectordataprovider.h" #include "qgsvectorlayer.h" #include "qgsmapserviceexception.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmslayercache.h" #include "qgsmsutils.h" #include "qgsrasterlayer.h" @@ -213,7 +213,7 @@ void QgsSLDParser::layersAndStylesCapabilities( QDomElement& parentElement, QDom QList layerList = mapLayerFromStyle( nameList.item( 0 ).toElement().text(), "" ); if ( layerList.size() < 1 )//error while generating the layer { - QgsMSDebugMsg( "Error, no maplayer in layer list" ); + QgsDebugMsg( "Error, no maplayer in layer list" ); continue; } @@ -221,7 +221,7 @@ void QgsSLDParser::layersAndStylesCapabilities( QDomElement& parentElement, QDom QgsMapLayer* theMapLayer = layerList.at( 0 ); if ( !theMapLayer )//error while generating the layer { - QgsMSDebugMsg( "Error, QgsMapLayer object is 0" ); + QgsDebugMsg( "Error, QgsMapLayer object is 0" ); continue; } @@ -363,17 +363,17 @@ QList QgsSLDParser::mapLayerFromStyle( const QString& layerName, c QgsRasterLayer* theRasterLayer = dynamic_cast( theMapLayer ); if ( theRasterLayer ) { - QgsMSDebugMsg( "Layer is a rasterLayer" ); + QgsDebugMsg( "Layer is a rasterLayer" ); if ( !userStyleElement.isNull() ) { - QgsMSDebugMsg( "Trying to add raster symbology" ); + QgsDebugMsg( "Trying to add raster symbology" ); rasterSymbologyFromUserStyle( userStyleElement, theRasterLayer ); //todo: possibility to have vector layer or raster layer - QgsMSDebugMsg( "Trying to find contour symbolizer" ); + QgsDebugMsg( "Trying to find contour symbolizer" ); QgsVectorLayer* v = contourLayerFromRaster( userStyleElement, theRasterLayer ); if ( v ) { - QgsMSDebugMsg( "Returning vector layer" ); + QgsDebugMsg( "Returning vector layer" ); resultList.push_back( v ); mLayersToRemove.push_back( v ); } @@ -399,25 +399,25 @@ QList QgsSLDParser::mapLayerFromStyle( const QString& layerName, c } else { - QgsMSDebugMsg( "Trying to get a renderer from the user style" ); + QgsDebugMsg( "Trying to get a renderer from the user style" ); theRenderer = rendererFromUserStyle( userStyleElement, theVectorLayer ); //apply labels if tag is present labelSettingsFromUserStyle( userStyleElement, theVectorLayer ); #ifdef DIAGRAMSERVER //apply any vector overlays - QgsMSDebugMsg( "Trying to get overlays from user style" ); + QgsDebugMsg( "Trying to get overlays from user style" ); overlaysFromUserStyle( userStyleElement, theVectorLayer ); #endif //DIAGRAMSERVER } if ( !theRenderer ) { - QgsMSDebugMsg( "Error, could not create a renderer" ); + QgsDebugMsg( "Error, could not create a renderer" ); delete theVectorLayer; return resultList; } theVectorLayer->setRenderer( theRenderer ); - QgsMSDebugMsg( "Returning the vectorlayer" ); + QgsDebugMsg( "Returning the vectorlayer" ); setOpacityForLayer( userLayerElement, theVectorLayer ); resultList.push_back( theVectorLayer ); return resultList; @@ -430,7 +430,7 @@ QgsRenderer* QgsSLDParser::rendererFromUserStyle( const QDomElement& userStyleEl return 0; } - QgsMSDebugMsg( "Entering" ); + QgsDebugMsg( "Entering" ); QgsSLDRenderer* theRenderer = new QgsSLDRenderer( vec->geometryType() ); theRenderer->setScaleDenominator( mScaleDenominator ); @@ -461,7 +461,7 @@ QgsRenderer* QgsSLDParser::rendererFromUserStyle( const QDomElement& userStyleEl bool QgsSLDParser::rasterSymbologyFromUserStyle( const QDomElement& userStyleElement, QgsRasterLayer* r ) const { - QgsMSDebugMsg( "Entering" ); + QgsDebugMsg( "Entering" ); if ( !r ) { return false; @@ -522,7 +522,7 @@ bool QgsSLDParser::rasterSymbologyFromUserStyle( const QDomElement& userStyleEle myNewColorRampItem.color = QColor( red, green, blue ); QString value = currentColorMapEntryElem.attribute( "quantity" ); myNewColorRampItem.value = value.toDouble(); - QgsMSDebugMsg( "Adding colormap entry" ); + QgsDebugMsg( "Adding colormap entry" ); colorRampItems.push_back( myNewColorRampItem ); } @@ -539,7 +539,7 @@ bool QgsSLDParser::rasterSymbologyFromUserStyle( const QDomElement& userStyleEle myRasterShaderFunction->setColorRampType( QgsColorRampShader::DISCRETE ); } - //QgsMSDebugMsg("Setting drawing style"); + //QgsDebugMsg("Setting drawing style"); r->setDrawingStyle( QgsRasterLayer::SingleBandPseudoColor ); //set pseudo color mode @@ -619,7 +619,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme QDomNodeList cssNodes = labelFontElementList.item( 0 ).toElement().elementsByTagName( "CssParameter" ); QString cssName; QDomElement currentElement; - QgsMSDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); + QgsDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); for ( int i = 0; i < cssNodes.size(); ++i ) { currentElement = cssNodes.item( i ).toElement(); @@ -631,22 +631,22 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme //switch depending on attribute 'name' cssName = currentElement.attribute( "name", "not_found" ); - QgsMSDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); + QgsDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); if ( cssName != "not_found" ) { if ( cssName == "font-family" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); fontfamily = elemText; } else if ( cssName == "font-style" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); fontstyle = elemText; } else if ( cssName == "font-size" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); success = false; fontsize = elemText.toInt( &success ); if ( !success ) @@ -657,12 +657,12 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme } else if ( cssName == "font-weight" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); fontweight = elemText; } else if ( cssName == "font-underline" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); fontunderline = elemText; } } @@ -678,7 +678,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme QDomNodeList cssNodes = labelFillElementList.item( 0 ).toElement().elementsByTagName( "CssParameter" ); QString cssName; QDomElement currentElement; - QgsMSDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); + QgsDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); for ( int i = 0; i < cssNodes.size(); ++i ) { currentElement = cssNodes.item( i ).toElement(); @@ -690,12 +690,12 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme //switch depending on attribute 'name' cssName = currentElement.attribute( "name", "not_found" ); - QgsMSDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); + QgsDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); if ( cssName != "not_found" ) { if ( cssName == "fill" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); //accept input in the form of #ff0000 if ( elemText.length() == 7 ) { @@ -719,7 +719,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme } else if ( cssName == "fill-opacity" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); bool success; double op = elemText.toDouble( &success ); if ( success ) @@ -770,7 +770,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme QDomNodeList cssNodes = labelBufferElementList.item( 0 ).toElement().elementsByTagName( "CssParameter" ); QString cssName; QDomElement currentElement; - QgsMSDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); + QgsDebugMsg( "Number of Css Properties: " + QString::number( cssNodes.size() ) ); for ( int i = 0; i < cssNodes.size(); ++i ) { currentElement = cssNodes.item( i ).toElement(); @@ -782,12 +782,12 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme //switch depending on attribute 'name' cssName = currentElement.attribute( "name", "not_found" ); - QgsMSDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); + QgsDebugMsg( "property " + QString::number( i ) + ": " + cssName + " " + elemText ); if ( cssName != "not_found" ) { if ( cssName == "fill" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); //accept input in the form of #ff0000 if ( elemText.length() == 7 ) { @@ -811,7 +811,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme } else if ( cssName == "fill-opacity" ) { - QgsMSDebugMsg( cssName + " " + elemText ); + QgsDebugMsg( cssName + " " + elemText ); bool success; double op = elemText.toDouble( &success ); if ( success ) @@ -887,7 +887,7 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme displacementY = 0.0; } } - QgsMSDebugMsg( "rotationAngle " + QString::number( rotationAngle ) ); + QgsDebugMsg( "rotationAngle " + QString::number( rotationAngle ) ); myLabelAttributes->setOffset( displacementX, displacementY, QgsLabelAttributes::PointUnits ); myLabelAttributes->setAngle( rotationAngle ); @@ -1006,7 +1006,7 @@ QDomElement QgsSLDParser::findUserStyleElement( const QDomElement& userLayerElem int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) const { - QgsMSDebugMsg( "Entering." ); + QgsDebugMsg( "Entering." ); layers.clear(); styles.clear(); @@ -1022,7 +1022,7 @@ int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) co QDomElement currentLayerElement = layerNodes.item( i ).toElement(); if ( currentLayerElement.localName() == "NamedLayer" ) { - QgsMSDebugMsg( "Found a NamedLayer" ); + QgsDebugMsg( "Found a NamedLayer" ); //layer name QDomNodeList nameList = currentLayerElement.elementsByTagName/*NS*/( /*mSLDNamespace,*/ "Name" ); if ( nameList.length() < 1 ) @@ -1041,7 +1041,7 @@ int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) co continue; //a layer name is mandatory } QString styleName = styleNameList.item( 0 ).toElement().text(); - QgsMSDebugMsg( "styleName is: " + styleName ); + QgsDebugMsg( "styleName is: " + styleName ); layers.push_back( layerName ); styles.push_back( styleName ); } @@ -1056,23 +1056,23 @@ int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) co continue; //a layer name is mandatory } QString styleName = styleNameList.item( 0 ).toElement().text(); - QgsMSDebugMsg( "styleName is: " + styleName ); + QgsDebugMsg( "styleName is: " + styleName ); layers.push_back( layerName ); styles.push_back( styleName ); } } else if ( currentLayerElement.localName() == "UserLayer" ) { - QgsMSDebugMsg( "Found a UserLayer" ); + QgsDebugMsg( "Found a UserLayer" ); //layer name QDomNodeList nameList = currentLayerElement.elementsByTagName/*NS*/( /*mSLDNamespace,*/ "Name" ); if ( nameList.length() < 1 ) { - QgsMSDebugMsg( "Namelist size is <1" ); + QgsDebugMsg( "Namelist size is <1" ); continue; //a layer name is mandatory } QString layerName = nameList.item( 0 ).toElement().text(); - QgsMSDebugMsg( "layerName is: " + layerName ); + QgsDebugMsg( "layerName is: " + layerName ); //find the User Styles and the corresponding names QDomNodeList userStyleList = currentLayerElement.elementsByTagName/*NS*/( /*mSLDNamespace,*/ "UserStyle" ); for ( int j = 0; j < userStyleList.size(); ++j ) @@ -1080,12 +1080,12 @@ int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) co QDomNodeList styleNameList = userStyleList.item( j ).toElement().elementsByTagName/*NS*/( /*mSLDNamespace,*/ "Name" ); if ( styleNameList.size() < 1 ) { - QgsMSDebugMsg( "Namelist size is <1" ); + QgsDebugMsg( "Namelist size is <1" ); continue; } QString styleName = styleNameList.item( 0 ).toElement().text(); - QgsMSDebugMsg( "styleName is: " + styleName ); + QgsDebugMsg( "styleName is: " + styleName ); layers.push_back( layerName ); styles.push_back( styleName ); } @@ -1102,7 +1102,7 @@ int QgsSLDParser::layersAndStyles( QStringList& layers, QStringList& styles ) co QgsMapLayer* QgsSLDParser::mapLayerFromUserLayer( const QDomElement& userLayerElem, const QString& layerName, bool allowCaching ) const { - QgsMSDebugMsg( "Entering." ); + QgsDebugMsg( "Entering." ); QgsMSLayerBuilder* layerBuilder = 0; QDomElement builderRootElement; @@ -1136,7 +1136,7 @@ QgsMapLayer* QgsSLDParser::mapLayerFromUserLayer( const QDomElement& userLayerEl { builderRootElement = remoteRDSNode.toElement(); layerBuilder = new QgsRemoteDataSourceBuilder(); - QgsMSDebugMsg( "Detected remote raster datasource" ); + QgsDebugMsg( "Detected remote raster datasource" ); } QDomNode remoteVDSNode = userLayerElem.namedItem( "RemoteVDS" ); @@ -1144,7 +1144,7 @@ QgsMapLayer* QgsSLDParser::mapLayerFromUserLayer( const QDomElement& userLayerEl { builderRootElement = remoteVDSNode.toElement(); layerBuilder = new QgsRemoteDataSourceBuilder(); - QgsMSDebugMsg( "Detected remote vector datasource" ); + QgsDebugMsg( "Detected remote vector datasource" ); } //sent vector/raster datasource @@ -1194,7 +1194,7 @@ QgsMapLayer* QgsSLDParser::mapLayerFromUserLayer( const QDomElement& userLayerEl if ( gmlIt != mExternalGMLDatasets.end() ) { - QgsMSDebugMsg( "Trying to get maplayer from external GML" ); + QgsDebugMsg( "Trying to get maplayer from external GML" ); theMapLayer = vectorLayerFromGML( gmlIt.value()->documentElement() ); } } @@ -1218,7 +1218,7 @@ QgsMapLayer* QgsSLDParser::mapLayerFromUserLayer( const QDomElement& userLayerEl QgsVectorLayer* QgsSLDParser::vectorLayerFromGML( const QDomElement gmlRootElement ) const { - QgsMSDebugMsg( "Entering." ); + QgsDebugMsg( "Entering." ); //QString tempFilePath = QgsMSUtils::createTempFilePath(); //QFile tempFile(tempFilePath); @@ -1239,10 +1239,10 @@ QgsVectorLayer* QgsSLDParser::vectorLayerFromGML( const QDomElement gmlRootEleme QgsVectorLayer* theVectorLayer = new QgsVectorLayer( tmpFile->fileName(), layerNameFromUri( tmpFile->fileName() ), "WFS" ); if ( !theVectorLayer || !theVectorLayer->isValid() ) { - QgsMSDebugMsg( "invalid maplayer" ); + QgsDebugMsg( "invalid maplayer" ); return 0; } - QgsMSDebugMsg( "returning maplayer" ); + QgsDebugMsg( "returning maplayer" ); mLayersToRemove.push_back( theVectorLayer ); //make sure the layer gets deleted after each request @@ -1251,7 +1251,7 @@ QgsVectorLayer* QgsSLDParser::vectorLayerFromGML( const QDomElement gmlRootEleme QgsVectorLayer* QgsSLDParser::contourLayerFromRaster( const QDomElement& userStyleElem, QgsRasterLayer* rasterLayer ) const { - QgsMSDebugMsg( "Entering." ); + QgsDebugMsg( "Entering." ); if ( !rasterLayer ) { @@ -1427,7 +1427,7 @@ QgsVectorLayer* QgsSLDParser::contourLayerFromRaster( const QDomElement& userSty //add labelling if requested labelSettingsFromUserStyle( userStyleElem, contourLayer ); - QgsMSDebugMsg( "Returning the contour layer" ); + QgsDebugMsg( "Returning the contour layer" ); return contourLayer; } @@ -1510,7 +1510,7 @@ void QgsSLDParser::setOpacityForLayer( const QDomElement& layerElem, QgsMapLayer opacityValue = 0; } - QgsMSDebugMsg( "Setting opacity value: " + QString::number( opacityValue ) ); + QgsDebugMsg( "Setting opacity value: " + QString::number( opacityValue ) ); layer->setTransparency( opacityValue ); } @@ -1825,7 +1825,7 @@ int QgsSLDParser::diagramItemsFromCategorize( const QDomElement& categorizeEleme if ( ! valueNodeList.size() == ( thresholdNodeList.size() + 1 ) ) { - QgsMSDebugMsg( "error, sizes of value and threshold lists do not match" ); + QgsDebugMsg( "error, sizes of value and threshold lists do not match" ); return 3; } diff --git a/src/mapserver/qgssldrenderer.cpp b/src/mapserver/qgssldrenderer.cpp index e77a0f1a2072..80b776529493 100644 --- a/src/mapserver/qgssldrenderer.cpp +++ b/src/mapserver/qgssldrenderer.cpp @@ -21,7 +21,7 @@ #include "qgsfilter.h" #include "qgssldrule.h" #include "qgssymbol.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include #include #include diff --git a/src/mapserver/qgssldrule.cpp b/src/mapserver/qgssldrule.cpp index 7ed477403b26..9ad9a43dc14c 100644 --- a/src/mapserver/qgssldrule.cpp +++ b/src/mapserver/qgssldrule.cpp @@ -17,7 +17,7 @@ #include "qgssldrule.h" #include "qgsfilter.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmsutils.h" #include "qgssymbol.h" #include "qgsvectordataprovider.h" @@ -26,6 +26,7 @@ #include #include #include +#include #include QgsSLDRule::QgsSLDRule( double minDenom, double maxDenom, const QgsSymbol& s, const QgsFilter* f ): mSymbol( s ), mMinScaleDenominator( minDenom ), mMaxScaleDenominator( maxDenom ) @@ -547,7 +548,7 @@ int QgsSLDRule::brushFromSvgParameters( const QDomElement& fillElement, QBrush& int QgsSLDRule::brushFromSvgPattern( const QDomElement& svgPatternElement, QBrush& brush ) const { - QgsMSDebugMsg( "Entering QgsSLDRule::brushFromSvgPattern" ); + QgsDebugMsg( "Entering QgsSLDRule::brushFromSvgPattern" ); if ( svgPatternElement.isNull() ) { @@ -579,11 +580,11 @@ int QgsSLDRule::brushFromSvgPattern( const QDomElement& svgPatternElement, QBrus svgElem.appendChild( svgDocument.importNode( svgGroupElem, true ) ); //debug - QgsMSDebugMsg( svgDocument.toString() ); + QgsDebugMsg( svgDocument.toString() ); if ( !renderer.load( svgDocument.toByteArray() ) ) { - QgsMSDebugMsg( "Loading of svg content into QSvgRenderer failed" ); + QgsDebugMsg( "Loading of svg content into QSvgRenderer failed" ); } QImage brushImage( patternWidth, patternHeight, QImage::Format_ARGB32 ); diff --git a/src/mapserver/qgssoaprequesthandler.cpp b/src/mapserver/qgssoaprequesthandler.cpp index fb886791b453..0207b905a626 100644 --- a/src/mapserver/qgssoaprequesthandler.cpp +++ b/src/mapserver/qgssoaprequesthandler.cpp @@ -16,7 +16,7 @@ * * ***************************************************************************/ #include "qgssoaprequesthandler.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmapserviceexception.h" #include #include @@ -53,7 +53,7 @@ std::map QgsSOAPRequestHandler::parseInput() bool conversionSuccess = false; lengthQString = QString( lengthString ); length = lengthQString.toInt( &conversionSuccess ); - QgsMSDebugMsg( "length is: " + lengthQString ); + QgsDebugMsg( "length is: " + lengthQString ); if ( conversionSuccess ) { input = ( char* )malloc( length + 1 ); @@ -76,27 +76,27 @@ std::map QgsSOAPRequestHandler::parseInput() } else { - QgsMSDebugMsg( "input is NULL " ); + QgsDebugMsg( "input is NULL " ); } free( input ); } else { - QgsMSDebugMsg( "could not convert CONTENT_LENGTH to int" ); + QgsDebugMsg( "could not convert CONTENT_LENGTH to int" ); } } - //QgsMSDebugMsg("input string is: " + inputString) + //QgsDebugMsg("input string is: " + inputString) //inputString to QDomDocument QDomDocument inputXML; QString errorMsg; if ( !inputXML.setContent( inputString, true, &errorMsg ) ) { - QgsMSDebugMsg( "soap request parse error" ); - QgsMSDebugMsg( "error message: " + errorMsg ); - QgsMSDebugMsg( "the xml string was:" ); - QgsMSDebugMsg( inputString ); + QgsDebugMsg( "soap request parse error" ); + QgsDebugMsg( "error message: " + errorMsg ); + QgsDebugMsg( "the xml string was:" ); + QgsDebugMsg( inputString ); throw QgsMapServiceException( "InvalidXML", "XML error: " + errorMsg ); return result; } @@ -109,7 +109,7 @@ std::map QgsSOAPRequestHandler::parseInput() QDomNodeList envelopeNodeList = inputXML.elementsByTagNameNS( "http://schemas.xmlsoap.org/soap/envelope/", "Envelope" ); if ( envelopeNodeList.size() < 1 ) { - QgsMSDebugMsg( "Envelope element not found" ); + QgsDebugMsg( "Envelope element not found" ); throw QgsMapServiceException( "SOAPError", "Element not found" ); return result; } @@ -117,7 +117,7 @@ std::map QgsSOAPRequestHandler::parseInput() QDomNodeList bodyNodeList = envelopeNodeList.item( 0 ).toElement().elementsByTagNameNS( "http://schemas.xmlsoap.org/soap/envelope/", "Body" ); if ( bodyNodeList.size() < 1 ) { - QgsMSDebugMsg( "body node not found" ); + QgsDebugMsg( "body node not found" ); throw QgsMapServiceException( "SOAPError", "Element not found" ); return result; } @@ -127,7 +127,7 @@ std::map QgsSOAPRequestHandler::parseInput() QString serviceString = firstChildElement.attribute( "service" ); if ( serviceString == "MS" ) { - QgsMSDebugMsg( "service = MS " ); + QgsDebugMsg( "service = MS " ); result.insert( std::make_pair( "SERVICE", "MS" ) ); mService = "MS"; } @@ -274,7 +274,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc if ( !common.open( QIODevice::ReadOnly ) ) { //throw an exception... - QgsMSDebugMsg( "external orchestra common capabilities not found" ); + QgsDebugMsg( "external orchestra common capabilities not found" ); } else { @@ -283,7 +283,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc int errorLineNo; if ( !externCapDoc.setContent( &common, false, &parseError, &errorLineNo ) ) { - QgsMSDebugMsg( "parse error at setting content of external orchestra common capabilities: " + QgsDebugMsg( "parse error at setting content of external orchestra common capabilities: " + parseError + " at line " + QString::number( errorLineNo ) ); common.close(); } @@ -348,7 +348,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc if ( !wmsService.open( QIODevice::ReadOnly ) ) { //throw an exception... - QgsMSDebugMsg( "external wms service capabilities not found" ); + QgsDebugMsg( "external wms service capabilities not found" ); } else { @@ -357,7 +357,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc int errorLineNo; if ( !externServiceDoc.setContent( &wmsService, false, &parseError, &errorLineNo ) ) { - QgsMSDebugMsg( "parse error at setting content of external wms service capabilities: " + QgsDebugMsg( "parse error at setting content of external wms service capabilities: " + parseError + " at line " + QString::number( errorLineNo ) ); wmsService.close(); } @@ -395,7 +395,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc if ( !common.open( QIODevice::ReadOnly ) ) { //throw an exception... - QgsMSDebugMsg( "external orchestra common capabilities not found" ); + QgsDebugMsg( "external orchestra common capabilities not found" ); } else { @@ -404,7 +404,7 @@ void QgsSOAPRequestHandler::sendGetCapabilitiesResponse( const QDomDocument& doc int errorLineNo; if ( !externCapDoc.setContent( &common, false, &parseError, &errorLineNo ) ) { - QgsMSDebugMsg( "parse error at setting content of external orchestra common capabilities: " + QgsDebugMsg( "parse error at setting content of external orchestra common capabilities: " + parseError + " at line " + QString::number( errorLineNo ) ); common.close(); } @@ -700,7 +700,7 @@ int QgsSOAPRequestHandler::parseOutputAttributesElement( std::mapsave( &theFile, mFormat.toLocal8Bit().data(), -1 ) ) { - QgsMSDebugMsg( "Error, could not save image" ); + QgsDebugMsg( "Error, could not save image" ); return 5; } @@ -860,7 +860,7 @@ int QgsSOAPRequestHandler::findOutHostAddress( QString& address ) const return 3; } address = onlineResourceList.at( 0 ).toElement().attribute( "href" ); - QgsMSDebugMsg( "address found: " + address ); + QgsDebugMsg( "address found: " + address ); if ( address.isEmpty() ) { return 4; diff --git a/src/mapserver/qgswmsserver.cpp b/src/mapserver/qgswmsserver.cpp index 5a898239f4b4..4bfa9d933ef0 100644 --- a/src/mapserver/qgswmsserver.cpp +++ b/src/mapserver/qgswmsserver.cpp @@ -30,7 +30,7 @@ #include "qgscoordinatereferencesystem.h" #include "qgsvectordataprovider.h" #include "qgsvectorlayer.h" -#include "qgsmapserverlogger.h" +#include "qgslogger.h" #include "qgsmapserviceexception.h" #include "qgssldparser.h" #include "qgssymbol.h" @@ -68,7 +68,7 @@ QgsWMSServer::QgsWMSServer() QDomDocument QgsWMSServer::getCapabilities() { - QgsMSDebugMsg( "Entering." ); + QgsDebugMsg( "Entering." ); QDomDocument doc; //wms:WMS_Capabilities element QDomElement wmsCapabilitiesElement = doc.createElement( "WMS_Capabilities"/*wms:WMS_Capabilities*/ ); @@ -203,12 +203,12 @@ QDomDocument QgsWMSServer::getCapabilities() } //add the xml content for the individual layers/styles - QgsMSDebugMsg( "calling layersAndStylesCapabilities" ); + QgsDebugMsg( "calling layersAndStylesCapabilities" ); if ( mConfigParser ) { mConfigParser->layersAndStylesCapabilities( capabilityElement, doc ); } - QgsMSDebugMsg( "layersAndStylesCapabilities returned" ); + QgsDebugMsg( "layersAndStylesCapabilities returned" ); //for debugging: save the document to disk /*QFile capabilitiesFile( QDir::tempPath() + "/capabilities.txt" ); @@ -231,7 +231,7 @@ QImage* QgsWMSServer::getLegendGraphics() if ( readLayersAndStyles( layersList, stylesList ) != 0 ) { - QgsMSDebugMsg( "error reading layers and styles" ); + QgsDebugMsg( "error reading layers and styles" ); return 0; } @@ -505,7 +505,7 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result ) for ( std::map::iterator it = mParameterMap.begin(); it != mParameterMap.end(); ++it ) { - QgsMapServerLogger::instance()->printMessage( it->first + "//" + it->second ); + QgsDebugMsg( QString( "%1 // %2" ).arg( it->first ).arg( it->second ) ); } if ( readLayersAndStyles( layersList, stylesList ) != 0 ) @@ -628,7 +628,7 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result ) { continue; } - QgsMSDebugMsg( "Info point in layer crs: " + QString::number( infoPoint.x() ) + "//" + QString::number( infoPoint.y() ) ); + QgsDebugMsg( "Info point in layer crs: " + QString::number( infoPoint.x() ) + "//" + QString::number( infoPoint.y() ) ); QDomElement layerElement = result.createElement( "Layer" ); layerElement.setAttribute( "name", currentLayer->name() ); @@ -682,19 +682,19 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& { if ( !mConfigParser ) { - QgsMSDebugMsg( "Error: mSLDParser is 0" ); + QgsDebugMsg( "Error: mSLDParser is 0" ); return 0; } if ( !mMapRenderer ) { - QgsMSDebugMsg( "Error: mMapRenderer is 0" ); + QgsDebugMsg( "Error: mMapRenderer is 0" ); return 0; } if ( readLayersAndStyles( layersList, stylesList ) != 0 ) { - QgsMSDebugMsg( "error reading layers and styles" ); + QgsDebugMsg( "error reading layers and styles" ); return 0; } @@ -702,10 +702,6 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& { return 0; } - QFile file("/tmp/wmslog.txt"); - file.open(QIODevice::Append); - file.write( "initialiseRendering parser initial checks ok\n" ); - //pass external GML to the SLD parser. std::map::const_iterator gmlIt = mParameterMap.find( "GML" ); if ( gmlIt != mParameterMap.end() ) @@ -714,16 +710,15 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& if ( gmlDoc->setContent( gmlIt->second, true ) ) { QString layerName = gmlDoc->documentElement().attribute( "layerName" ); - QgsMSDebugMsg( "Adding entry with key: " + layerName + " to external GML data" ); + QgsDebugMsg( "Adding entry with key: " + layerName + " to external GML data" ); mConfigParser->addExternalGMLData( layerName, gmlDoc ); } else { - QgsMSDebugMsg( "Error, could not add external GML to QgsSLDParser" ); + QgsDebugMsg( "Error, could not add external GML to QgsSLDParser" ); delete gmlDoc; } } - file.write( "initialiseRendering parser gml checks ok\n" ); QImage* theImage = createImage(); if ( !theImage ) @@ -736,7 +731,6 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& delete theImage; return 0; } - file.write( "initialiseRendering parser secondary checks ok\n" ); mMapRenderer->setLabelingEngine( new QgsPalLabeling() ); //find out the current scale denominater and set it to the SLD parser @@ -746,11 +740,17 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList& //create objects for qgis rendering layerIdList.clear(); + QgsDebugMsg( "Layers to render" ); + QString myLayer; + foreach ( myLayer, layerIdList) + { + QgsDebugMsg( myLayer ); + } layerIdList = layerSet( layersList, stylesList, mMapRenderer->destinationCrs() ); +#ifdef QGISDEBUG + QgsDebugMsg( QString( "Number of layers to be rendered. %1" ).arg( layerIdList.count() ) ); +#endif mMapRenderer->setLayerSet( layerIdList ); - file.write( "initialiseRendering done\n" ); - file.write( mapExtent.toString() ); - file.close(); return theImage; } @@ -915,7 +915,7 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const else { //enable on the fly projection - QgsMSDebugMsg( "enable on the fly projection" ); + QgsDebugMsg( "enable on the fly projection" ); QgsProject::instance()->writeEntry( "SpatialRefSys", "/ProjectionsEnabled", 1 ); QString crsString = crsIt->second; @@ -933,7 +933,7 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const outputCRS = QgsEPSGCache::instance()->searchCRS( epsgId ); if ( !outputCRS.isValid() ) { - QgsMSDebugMsg( "Error, could not create output CRS from EPSG" ); + QgsDebugMsg( "Error, could not create output CRS from EPSG" ); throw QgsMapServiceException( "InvalidCRS", "Could not create output CRS" ); return 5; } @@ -1007,8 +1007,8 @@ int QgsWMSServer::initializeSLDParser( QStringList& layersList, QStringList& sty if ( !theDocument->setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) { //std::cout << xml.toAscii().data() << std::endl; - QgsMapServerLogger::instance()->printMessage( "Error, could not create DomDocument from SLD" ); - QgsMapServerLogger::instance()->printMessage( "The error message is: " + errorMsg ); + QgsDebugMsg( "Error, could not create DomDocument from SLD" ); + QgsDebugMsg( QString( "The error message is: %1" ).arg( errorMsg ) ); delete theDocument; return 0; } @@ -1023,7 +1023,7 @@ int QgsWMSServer::initializeSLDParser( QStringList& layersList, QStringList& sty QStringList stylesSTDList; if ( mConfigParser->layersAndStyles( layersSTDList, stylesSTDList ) != 0 ) { - QgsMSDebugMsg( "Error, no layers and styles found in SLD" ); + QgsDebugMsg( "Error, no layers and styles found in SLD" ); return 0; } QStringList::const_iterator layersIt; @@ -1173,15 +1173,16 @@ QStringList QgsWMSServer::layerSet( const QStringList& layersList, QStringList::const_iterator llstIt; QStringList::const_iterator slstIt; QgsMapLayer* theMapLayer = 0; - + QgsDebugMsg( QString( "Calculating layerset using %1 layers, %2 styles and CRS %3" ).arg( layersList.count() ).arg( stylesList.count() ).arg( destCRS.description() ) ); for ( llstIt = layersList.begin(), slstIt = stylesList.begin(); llstIt != layersList.end(); ++llstIt ) { + QString styleName; if ( slstIt != stylesList.end() ) { styleName = *slstIt; } - QgsMSDebugMsg( "Trying to get layer " + *llstIt + "//" + styleName ); + QgsDebugMsg( "Trying to get layer " + *llstIt + "//" + styleName ); //does the layer name appear several times in the layer list? //if yes, layer caching must be disabled because several named layers could have @@ -1192,12 +1193,14 @@ QStringList QgsWMSServer::layerSet( const QStringList& layersList, allowCaching = false; } + // Problem method here! QList layerList = mConfigParser->mapLayerFromStyle( *llstIt, styleName, allowCaching ); int listIndex; for ( listIndex = layerList.size() - 1; listIndex >= 0; listIndex-- ) { theMapLayer = layerList.at( listIndex ); + QgsDebugMsg( QString( "Checking layer: %1").arg( theMapLayer->name() ) ); if ( theMapLayer ) { layerKeys.push_front( theMapLayer->id() ); @@ -1205,6 +1208,7 @@ QStringList QgsWMSServer::layerSet( const QStringList& layersList, } else { + QgsDebugMsg( "Layer or style not defined, aborting" ); throw QgsMapServiceException( "LayerNotDefined", "Layer '" + *llstIt + "' and/or style '" + styleName + "' not defined" ); } } From 10041327ea89172961c23e02ecf5e58f15774479 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sat, 11 Jun 2011 22:29:13 +0200 Subject: [PATCH 59/62] [BACKPORT] Partially address https://bugzilla.redhat.com/show_bug.cgi?id=712620 - don't assert when things go wrong. Still needs to give user some decent feedback somehow but at least it shouldnt crash QGIS --- src/plugins/georeferencer/qgsimagewarper.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index b45dbf0e6865..2f4da2d4855a 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -199,8 +199,12 @@ int QgsImageWarper::warpFile( const QString& input, destResY = -destResY; // Assert that the north-up convention is fullfiled by GDALSuggestedWarpOutput (should always be the case) - assert( adfGeoTransform[0] > 0.0 ); - assert( adfGeoTransform[5] < 0.0 ); + // Asserts are bad as they just crash out, changed to just return false. TS + if ( adfGeoTransform[0] <= 0.0 || adfGeoTransform[5] >= 0.0 ) + { + QgsDebugMsg("Image is not north up after GDALSuggestedWarpOutput, bailing out."); + return false; + } // Find suggested output image extent (in georeferenced units) double minX = adfGeoTransform[0]; double maxX = adfGeoTransform[0] + adfGeoTransform[1] * destPixels; From f947f844ccf97ce37922a83818f07b98aba718ac Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sat, 11 Jun 2011 23:29:25 +0200 Subject: [PATCH 60/62] [BACKPORT] Removed assert too --- src/plugins/georeferencer/qgsimagewarper.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index 2f4da2d4855a..eb6a91345869 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include From 3f2846a5760035f313868dfdd8cd3c93dccdab50 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 12 Jun 2011 00:11:37 +0200 Subject: [PATCH 61/62] [BACKPORT] Added missing include for qgslogger --- src/plugins/georeferencer/qgsimagewarper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index eb6a91345869..ee0664f55a2b 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -28,6 +28,7 @@ #include "qgsimagewarper.h" #include "qgsgeoreftransform.h" +#include "qgslogger.h" #if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800 #define TO8F(x) (x).toUtf8().constData() From a954488ba71ddfcc842f6774769c4a36c4a2deb7 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 12 Jun 2011 22:44:32 +0200 Subject: [PATCH 62/62] Fixed some old svn references and typos in INSTALL docs --- INSTALL | 34 ++++++++++------------------------ doc/INSTALL.html | 38 ++++++++++---------------------------- doc/linux.t2t | 30 +++++++----------------------- 3 files changed, 27 insertions(+), 75 deletions(-) diff --git a/INSTALL b/INSTALL index 6164df3f060e..bd84ba27b525 100644 --- a/INSTALL +++ b/INSTALL @@ -1,10 +1,10 @@ Quantum GIS (QGIS) Building QGIS from source - step by step -Sunday June 05, 2011 +Sunday June 12, 2011 -Last Updated: Sunday June 05, 2011 -Last Change : Thursday June 02, 2011 +Last Updated: Sunday June 12, 2011 +Last Change : Sunday June 05, 2011 1. Introduction @@ -235,26 +235,12 @@ if you do not have edit privileges for the QGIS source repository, or use 1. Anonymous Checkout cd ${HOME}/dev/cpp - svn co https://svn.osgeo.org/qgis/trunk/qgis qgis + git clone git://github.com/qgis/Quantum-GIS.git 2. Developer Checkout cd ${HOME}/dev/cpp - svn co --username https://svn.osgeo.org/qgis/trunk/qgis qgis - -The first time you check out the source you will be prompted to accept the -qgis.org certificate. Press 'p' to accept it permanently: - - Error validating server certificate for 'https://svn.qgis.org:443': - - The certificate is not issued by a trusted authority. Use the - fingerprint to validate the certificate manually! Certificate - information: - - Hostname: svn.qgis.org - - Valid: from Apr 1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT - - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US - - Fingerprint: - 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject, - accept (t)emporarily or accept (p)ermanently? + git clone git@github.com:qgis/Quantum-GIS.git 3.7. Starting the compile @@ -269,9 +255,9 @@ development version. I suggest you do something similar: Now we create a build directory and run ccmake: - cd qgis - mkdir build - cd build + cd Quantum-GIS + mkdir build-master + cd build-master ccmake .. When you run ccmake (note the .. is required!), a menu will appear where @@ -451,7 +437,7 @@ leave the folder ======================================== Before downloading and compile GRASS source code you need to install a few -other libraries and programs. We can do this trough apt +other libraries and programs. We can do this through apt sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \ tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \ @@ -461,7 +447,7 @@ other libraries and programs. We can do this trough apt tk8.4-dev tk8.4 libfftw3-dev libfftw3-3 At this point we can get the GRASS source code: you may want to download it -trough svn or maybe you want just to download the latest available source code arquive. +through svn or maybe you want just to download the latest available source code arquive. For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters diff --git a/doc/INSTALL.html b/doc/INSTALL.html index 3aac281bca82..c82b5039654c 100644 --- a/doc/INSTALL.html +++ b/doc/INSTALL.html @@ -45,13 +45,13 @@

    -Last Updated: Sunday June 05, 2011 -Last Change : Thursday June 02, 2011 +Last Updated: Sunday June 12, 2011 +Last Change : Sunday June 05, 2011

    @@ -369,7 +369,7 @@

    3.6. Check out the QGIS Source Code

     cd ${HOME}/dev/cpp 
    -svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
    +git clone git://github.com/qgis/Quantum-GIS.git
     

    @@ -378,25 +378,7 @@

    3.6. Check out the QGIS Source Code

     cd ${HOME}/dev/cpp 
    -svn co --username <yourusername> https://svn.osgeo.org/qgis/trunk/qgis qgis
    -
    - -

    -The first time you check out the source you will be prompted to accept the -qgis.org certificate. Press 'p' to accept it permanently: -

    - -
    -Error validating server certificate for 'https://svn.qgis.org:443':
    -   - The certificate is not issued by a trusted authority. Use the
    -     fingerprint to validate the certificate manually!  Certificate
    -     information:
    -   - Hostname: svn.qgis.org
    -   - Valid: from Apr  1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
    -   - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
    -   - Fingerprint:
    -     2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject,
    -     accept (t)emporarily or accept (p)ermanently?  
    +git clone git@github.com:qgis/Quantum-GIS.git
     
    @@ -418,9 +400,9 @@

    3.7. Starting the compile

    -cd qgis
    -mkdir build
    -cd build
    +cd Quantum-GIS
    +mkdir build-master
    +cd build-master
     ccmake ..
     
    @@ -693,7 +675,7 @@

    3.9.5. Step 5: compile and install GRASS

    Before downloading and compile GRASS source code you need to install a few -other libraries and programs. We can do this trough apt +other libraries and programs. We can do this through apt

    @@ -707,7 +689,7 @@ 

    3.9.5. Step 5: compile and install GRASS

    At this point we can get the GRASS source code: you may want to download it -trough svn or maybe you want just to download the latest available source code arquive. +through svn or maybe you want just to download the latest available source code arquive. For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz

    diff --git a/doc/linux.t2t b/doc/linux.t2t index 54ebdeaeeeef..6e81ea1749dd 100644 --- a/doc/linux.t2t +++ b/doc/linux.t2t @@ -129,30 +129,14 @@ if you do not have edit privileges for the QGIS source repository, or use ``` cd ${HOME}/dev/cpp -svn co https://svn.osgeo.org/qgis/trunk/qgis qgis +git clone git://github.com/qgis/Quantum-GIS.git ``` 2. Developer Checkout ``` cd ${HOME}/dev/cpp -svn co --username https://svn.osgeo.org/qgis/trunk/qgis qgis -``` - -The first time you check out the source you will be prompted to accept the -qgis.org certificate. Press 'p' to accept it permanently: - -``` -Error validating server certificate for 'https://svn.qgis.org:443': - - The certificate is not issued by a trusted authority. Use the - fingerprint to validate the certificate manually! Certificate - information: - - Hostname: svn.qgis.org - - Valid: from Apr 1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT - - Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US - - Fingerprint: - 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject, - accept (t)emporarily or accept (p)ermanently? +git clone git@github.com:qgis/Quantum-GIS.git ``` == Starting the compile == @@ -169,9 +153,9 @@ mkdir -p ${HOME}/apps Now we create a build directory and run ccmake: ``` -cd qgis -mkdir build -cd build +cd Quantum-GIS +mkdir build-master +cd build-master ccmake .. ``` @@ -386,7 +370,7 @@ cd .. === Step 5: compile and install GRASS === Before downloading and compile GRASS source code you need to install a few -other libraries and programs. We can do this trough apt +other libraries and programs. We can do this through apt ``` sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \ @@ -398,7 +382,7 @@ tk8.4-dev tk8.4 libfftw3-dev libfftw3-3 ``` At this point we can get the GRASS source code: you may want to download it -trough svn or maybe you want just to download the latest available source code arquive. +through svn or maybe you want just to download the latest available source code arquive. For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters